Automattic / Automattic/jetpack

Pass locale to PayPal script in SimplePayments buttons

Open
#11,160 3 comments 0 reactions 0 assignees View on GitHub
[Feature] Pay with PayPal [Focus] i18n Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

#### Is your feature request related to a problem? Please describe.

Simple Payment button loads PayPal checkout script and passes some settings to it. We do not pass a locale, which would probably tell PayPal to output the payment button in different languages.

#### Describe the solution you'd like

Pass `locale` to PayPal here:

https://github.com/Automattic/jetpack/blob/48db8b56a1f81cf31a2dd2982d08cbe4497e8f7f/modules/simple-payments/paypal-express-checkout.js#L137-L147

See documentation: https://developer.paypal.com/docs/checkout/integrate/#1-get-the-code
Supported locales: https://developer.paypal.com/docs/integration/direct/rest/locale-codes/

#### Additional context
p1547804273386000-slack-jpop-support

cc @rodrigoi

Contributor guide

Open the contributing guide

Research direction

Start in modules/simple-payments/paypal-express-checkout.js at lines 137-147 and compare the PayPal checkout script options with the linked PayPal documentation. Done means the Simple Payment button passes a supported locale to PayPal and displays the corresponding localized button output.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
payments
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.