Skip to content

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Jan 11, 2022
2 parents 2f58ffd + 0abecb8 commit 4ddf1d6
Show file tree
Hide file tree
Showing 17 changed files with 280 additions and 177 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@

# WordPress
/wordpress/
/wp-content/
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## [Unreleased][unreleased]
-

## [4.0.0] - 2022-01-11
### Changed
- Updated to https://github.com/pronamic/wp-pay-core/releases/tag/4.0.0.

## [3.0.1] - 2021-08-18
- Fixed `chargetotal` number format.

Expand Down Expand Up @@ -61,7 +65,8 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## 1.0.0 - 2016-07-06
- First release.

[unreleased]: https://github.com/wp-pay-gateways/ems-e-commerce/compare/3.0.1...HEAD
[unreleased]: https://github.com/wp-pay-gateways/ems-e-commerce/compare/4.0.0...HEAD
[4.0.0]: https://github.com/wp-pay-gateways/ems-e-commerce/compare/3.0.1...4.0.0
[3.0.1]: https://github.com/wp-pay-gateways/ems-e-commerce/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/wp-pay-gateways/ems-e-commerce/compare/2.1.2...3.0.0
[2.1.2]: https://github.com/wp-pay-gateways/ems-e-commerce/compare/2.1.1...2.1.2
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"require": {
"php": ">=5.6.20",
"pronamic/wp-money": "^2.0",
"wp-pay/core": "^3.0"
"wp-pay/core": "^4.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
Expand All @@ -44,7 +44,8 @@
"phpunit/phpunit": "^5.7 || ^6.0",
"pronamic/wp-coding-standards": "^1.0",
"roots/wordpress": "^5.8",
"wp-phpunit/wp-phpunit": "^5.8"
"wp-phpunit/wp-phpunit": "^5.8",
"yoast/phpunit-polyfills": "^1.0"
},
"scripts": {
"coveralls": "vendor/bin/php-coveralls -v",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ems-e-commerce",
"version": "3.0.1",
"version": "4.0.0",
"description": "EMS e-Commerce Gateway driver for the WordPress payment processing library.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Title: EMS e-Commerce client
* Description:
* Copyright: 2005-2021 Pronamic
* Copyright: 2005-2022 Pronamic
* Company: Pronamic
*
* @author Reüel van der Steege
Expand Down
2 changes: 1 addition & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Title: EMS e-Commerce config
* Description:
* Copyright: 2005-2021 Pronamic
* Copyright: 2005-2022 Pronamic
* Company: Pronamic
*
* @author Reüel van der Steege
Expand Down
20 changes: 13 additions & 7 deletions src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Title: EMS e-Commerce
* Description:
* Copyright: 2005-2021 Pronamic
* Copyright: 2005-2022 Pronamic
* Company: Pronamic
*
* @author Reüel van der Steege
Expand Down Expand Up @@ -95,19 +95,25 @@ public function get_output_fields( Payment $payment ) {
$this->client->set_return_url( home_url( '/' ) );
$this->client->set_notification_url( home_url( '/' ) );
$this->client->set_amount( $payment->get_total_amount() );
$this->client->set_issuer_id( $payment->get_issuer() );
$this->client->set_issuer_id( $payment->get_meta( 'issuer' ) );

// Language.
if ( null !== $payment->get_customer() ) {
$this->client->set_language( $payment->get_customer()->get_locale() );
$customer = $payment->get_customer();

if ( null !== $customer ) {
$locale = $customer->get_locale();

if ( null !== $locale ) {
$this->client->set_language( $locale );
}
}

// Payment method.
$payment_method = PaymentMethods::transform( $payment->get_method() );
$payment_method = PaymentMethods::transform( $payment->get_payment_method() );

if ( null === $payment_method && '' !== $payment->get_method() ) {
if ( null === $payment_method && '' !== $payment->get_payment_method() ) {
// Leap of faith if the WordPress payment method could not transform to a EMS method?
$payment_method = $payment->get_method();
$payment_method = $payment->get_payment_method();
}

$this->client->set_payment_method( $payment_method );
Expand Down
2 changes: 1 addition & 1 deletion src/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Title: EMS e-Commerce integration
* Description:
* Copyright: 2005-2021 Pronamic
* Copyright: 2005-2022 Pronamic
* Company: Pronamic
*
* @author Reüel van der Steege
Expand Down
2 changes: 1 addition & 1 deletion src/Listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Title: EMS e-Commerce listener
* Description:
* Copyright: 2005-2021 Pronamic
* Copyright: 2005-2022 Pronamic
* Company: Pronamic
*
* @author Reüel van der Steege
Expand Down
2 changes: 1 addition & 1 deletion src/PaymentMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Title: EMS e-Commerce payment methods
* Description:
* Copyright: 2005-2021 Pronamic
* Copyright: 2005-2022 Pronamic
* Company: Pronamic
*
* @author Reüel van der Steege
Expand Down
2 changes: 1 addition & 1 deletion src/Statuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Title: EMS e-Commerce Gateway statuses constants
* Description:
* Copyright: 2005-2021 Pronamic
* Copyright: 2005-2022 Pronamic
* Company: Pronamic
*
* @author Remco Tolsma
Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Bootstrap tests
*
* @author Pronamic <[email protected]>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\EMS\ECommerce
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/phpstan/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Definitions for PHPStan.
*
* @author Pronamic <[email protected]>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/src/PaymentMethodsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Title: EMS e-Commerce Gateway payment methods tests
* Description:
* Copyright: 2005-2021 Pronamic
* Copyright: 2005-2022 Pronamic
* Company: Pronamic
*
* @author Remco Tolsma
Expand Down
2 changes: 1 addition & 1 deletion tests/src/StatusesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Title: EMS e-Commerce Gateway statuses constants tests
* Description:
* Copyright: 2005-2021 Pronamic
* Copyright: 2005-2022 Pronamic
* Company: Pronamic
*
* @author Remco Tolsma
Expand Down
36 changes: 18 additions & 18 deletions vendor-bin/phpstan/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4ddf1d6

Please sign in to comment.