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

pass gateway_code to choose if multiple Amazon gateway instances #863

Merged
merged 3 commits into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/recurly/amazon/amazon-pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class AmazonPay extends Emitter {
super();
this.recurly = recurly;
this.options = options;

this.region = this.options.region || 'us';
this.setLocaleAndCurrency();
this.start();
Expand Down Expand Up @@ -72,9 +71,9 @@ class AmazonPay extends Emitter {

attach () {
const defaultEventName = 'amazon-pay';

let gatewayCode = this.options.gatewayCode || '';
this.frame = this.recurly.Frame({
path: `/amazon_pay/start?region=${this.region}`,
path: `/amazon_pay/start?region=${this.region}&gateway_code=${gatewayCode}`,
type: Frame.TYPES.WINDOW,
defaultEventName
}).on('error', cause => this.emit('error', cause)) // Emitted by js/v1/amazon_pay/cancel
Expand Down
Loading