recurly / recurly-js

Simple subscription billing in the browser
https://js.recurly.com/
MIT License
646 stars 139 forks source link

feat: Add Google Pay through Braintree #894

Closed cbarton closed 1 week ago

cbarton commented 3 weeks ago

Best viewed without whitespace

To use Google Pay through Braintree, ensure that you have enabled Google Pay on a Braintree gateway in the Recurly Admin UI and on your Braintree account.

Then, initialize recurly.GooglePay(...) with the braintree.clientAuthorization option:

const googlePay = recurly.GooglePay({
  ...options,
  gatewayCode: '<Recurly Braintree gateway code>',
  braintree: {
    clientAuthorization: '<Braintree client authorization key>',
  },
})