Skip to content

Commit

Permalink
Merge pull request #35 from billmn/allow-locale-parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed May 4, 2021
2 parents 9ff1be0 + 18bec2c commit 9af6fec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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:

Expand All @@ -95,4 +95,4 @@ As an example to disable PayPal credit funding you could output the payment form
'disable-funding': 'credit'
...
}) }}
```
```
1 change: 1 addition & 0 deletions src/gateways/Gateway.php
Expand Up @@ -740,6 +740,7 @@ private function _sdkQueryParameters(Array $passedParams): string
'currency',
'disable-card',
'disable-funding',
'locale',
];
$intent = strtolower(self::PAYMENT_TYPES[$this->paymentType]);
$params = [
Expand Down

0 comments on commit 9af6fec

Please sign in to comment.