Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow “locale” parameter #35

Merged
merged 2 commits into from May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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