Skip to content

Commit

Permalink
Merge pull request #863 from recurly/amazon_gateway_code
Browse files Browse the repository at this point in the history
pass gateway_code to choose if multiple Amazon gateway instances
  • Loading branch information
jsanderson1130 committed Nov 21, 2023
2 parents 1794e7b + 851cad6 commit 5d2777d
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit 5d2777d

Please sign in to comment.