Skip to content

Commit

Permalink
pass gateway_code to choose if multiple Amazon gateway instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Anderson committed Nov 8, 2023
1 parent a88e7c8 commit ecc50df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 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,8 @@ class AmazonPay extends Emitter {

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

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

0 comments on commit ecc50df

Please sign in to comment.