Skip to content

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Jan 11, 2022
2 parents 3c9a3ce + 5c1c030 commit 2a6c9f6
Show file tree
Hide file tree
Showing 106 changed files with 768 additions and 485 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ jobs:
composer run-script coveralls
bash <(curl -s https://codecov.io/bash)
es-sass-linting:
name: Scripts and Styles
es-linting:
name: Scripts

runs-on: ubuntu-latest

Expand All @@ -311,6 +311,3 @@ jobs:

- name: ESLint
run: npm run-script eslint

- name: Sass Lint
run: npm run-script sass-lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@

# WordPress
/wordpress/
/wp-content/
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased][unreleased]

## [3.0.0] - 2022-01-11
### Changed
- Updated to https://github.com/pronamic/wp-pay-core/releases/tag/4.0.0.
- Make notifications only update payment status if not already completed (fixes [pronamic/wp-pronamic-pay#245](https://github.com/pronamic/wp-pronamic-pay/issues/245)).
- Use Drop-in with auto submit for Swish payment method (instead of direct API integration, because of redirect to mobile app on desktop).
- Removed guessing country code with `\Locale::getRegion()` (can result in e.g. `EN` as invalid country code).
- Improved error handling on payment creation ([pronamic/wp-pronamic-pay#278](https://github.com/pronamic/wp-pronamic-pay/issues/278)).
- Removed `pronamicPayAdyenProcessing` in favor of setting drop status to `loading`.
- Clarified Afterpay.
- Disable Application Passwords for routes within integration REST route namespace as it interferes with our HTTP Basic authorization permission check.

### Added
- Added BLIK and MB WAY payment methods.
- Added support for TWINT payment method.

### Fixed
- Move script to inside HTML body.

## [2.0.4] - 2021-09-16
- Added support for the PayPal payment method.
- Added country code to Apple Pay payment method configuration.
Expand Down Expand Up @@ -96,7 +114,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 1.0.0 - 2019-03-28
- First release.

[unreleased]: https://github.com/wp-pay-gateways/adyen/compare/2.0.4...HEAD
[unreleased]: https://github.com/wp-pay-gateways/adyen/compare/3.0.0...HEAD
[3.0.0]: https://github.com/wp-pay-gateways/adyen/compare/2.0.4...3.0.0
[2.0.4]: https://github.com/wp-pay-gateways/adyen/compare/2.0.3...2.0.4
[2.0.3]: https://github.com/wp-pay-gateways/adyen/compare/2.0.2...2.0.3
[2.0.2]: https://github.com/wp-pay-gateways/adyen/compare/2.0.1...2.0.2
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"justinrainbow/json-schema": "^5.2",
"pronamic/wp-http": "^1.0",
"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 @@ -49,7 +49,8 @@
"roots/wordpress": "^5.8",
"sirbrillig/phpcs-import-detection": "^1.2",
"sirbrillig/phpcs-variable-analysis": "^2.8",
"wp-phpunit/wp-phpunit": "^5.8"
"wp-phpunit/wp-phpunit": "^5.8",
"yoast/phpunit-polyfills": "^1.0"
},
"scripts": {
"ci": [
Expand Down
2 changes: 1 addition & 1 deletion docs/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Version | Description
------- | -----------
`1.2.0` | Added.

Source: [./src/DropInGateway.php](../src/DropInGateway.php), [line 262](../src/DropInGateway.php#L262-L269)
Source: [./src/DropInGateway.php](../src/DropInGateway.php), [line 285](../src/DropInGateway.php#L285-L292)

### `pronamic_pay_adyen_payment_metadata`

Expand Down
20 changes: 11 additions & 9 deletions js/dist/checkout-drop-in.js

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

2 changes: 1 addition & 1 deletion js/dist/checkout-drop-in.js.map

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions js/src/checkout-drop-in.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
};
}

let pronamicPayAdyenProcessing = false;

/**
* Parse JSON and check response status.
*
Expand All @@ -69,18 +67,20 @@

const dropin = checkout.create( 'dropin', {
paymentMethodsConfiguration: pronamicPayAdyenCheckout.paymentMethodsConfiguration,
onSubmit: ( state, dropin ) => {
if ( pronamicPayAdyenProcessing ) {
return false;
}
onSelect: ( dropin ) => {
let configuration = pronamicPayAdyenCheckout.configuration;

pronamicPayAdyenProcessing = true;
if ( false === configuration.showPayButton ) {
dropin.submit();
}
},
onSubmit: ( state, dropin ) => {
// Set loading status to prevent duplicate submits.
dropin.setStatus( 'loading' );

send_request( pronamicPayAdyenCheckout.paymentsUrl, state.data )
.then( validate_response )
.then( data => {
pronamicPayAdyenProcessing = false;

// Handle action object.
if ( data.action ) {
dropin.handleAction( data.action );
Expand Down
1 change: 0 additions & 1 deletion json-schemas/redirect.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
}
},
"required": [
"method",
"url"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adyen",
"version": "2.0.4",
"version": "3.0.0",
"description": "Adyen driver for the WordPress payment processing library.",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions pronamic-pay-adyen.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://www.pronamic.eu/plugins/pronamic-pay-adyen/
* Description: Extend the Pronamic Pay plugin with the Adyen gateway to receive payments with Adyen through a variety of WordPress plugins.
*
* Version: 2.0.2
* Version: 3.0.0
* Requires at least: 4.7
*
* Author: Pronamic
Expand All @@ -20,7 +20,7 @@
* GitHub URI: https://github.com/wp-pay-gateways/adyen
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Tags: pronamic, pay, adyen, add-on
Requires at least: 4.7
Tested up to: 5.1
Requires PHP: 5.3
Stable tag: 2.0.2
Stable tag: 3.0.0

Extend the Pronamic Pay plugin with the Adyen gateway to receive payments with Adyen through a variety of WordPress plugins.
2 changes: 1 addition & 1 deletion src/AbstractGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Gateway
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractPaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Abstract payment request
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ActionInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Action information
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/AdditionalData.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Additional data.
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Address
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/AddressTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Address transformer
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Amount.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Amount
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/AmountTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Amount transformer
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ApplicationInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Application info
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/BrowserInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Browser information
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Channel
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Adyen client
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Config
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
2 changes: 1 addition & 1 deletion src/DetailsInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Details information
*
* @author Pronamic <info@pronamic.eu>
* @copyright 2005-2021 Pronamic
* @copyright 2005-2022 Pronamic
* @license GPL-3.0-or-later
* @package Pronamic\WordPress\Pay\Gateways\Adyen
*/
Expand Down
Loading

0 comments on commit 2a6c9f6

Please sign in to comment.