diff --git a/lib/recurly/amazon/amazon-pay.js b/lib/recurly/amazon/amazon-pay.js index 555d20678..c899ebff6 100644 --- a/lib/recurly/amazon/amazon-pay.js +++ b/lib/recurly/amazon/amazon-pay.js @@ -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(); @@ -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