diff --git a/CHANGELOG.md b/CHANGELOG.md index 976ca02..eeee062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ ## Unreleased -- Added string error message when an error occurs after the submitting payment information to PayPal Checkout. +### Added +- Added the `locale` parameter for when customizing the PayPal SDK script. ([#123](https://github.com/craftcms/commerce-paypal-checkout/pull/35)) + +### Fixed +- Fixed a bug where Commerce payment errors weren’t being returned ### Fixed - Fixed a bug where the PayPal Checkout gateway was incorrectly showing in the available gateways list for CP payments. ([#30](https://github.com/craftcms/commerce-paypal-checkout/issues/30)) diff --git a/README.md b/README.md index fcfaaab..13e17b4 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ This is required when paying with an alternative payment currency due to the int This gateway allows the passing of certain query string parameters, at runtime, as specified in the [PayPal documentation](https://developer.paypal.com/docs/checkout/reference/customize-sdk/#query-parameters). -THe allowed parameters are `currency` (as detailed above), `disable-card` and `disable-funding`. +The allowed parameters are `currency` (as detailed above), `disable-card`, `disable-funding` and `locale`. As an example to disable PayPal credit funding you could output the payment form as follows: @@ -95,4 +95,4 @@ As an example to disable PayPal credit funding you could output the payment form 'disable-funding': 'credit' ... }) }} -``` \ No newline at end of file +``` diff --git a/src/gateways/Gateway.php b/src/gateways/Gateway.php index 851af97..e3a9b26 100644 --- a/src/gateways/Gateway.php +++ b/src/gateways/Gateway.php @@ -740,6 +740,7 @@ private function _sdkQueryParameters(Array $passedParams): string 'currency', 'disable-card', 'disable-funding', + 'locale', ]; $intent = strtolower(self::PAYMENT_TYPES[$this->paymentType]); $params = [