From ecc50df2018a1bc916fb6f18008c477b53d55449 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 8 Nov 2023 11:40:49 -0600 Subject: [PATCH] pass gateway_code to choose if multiple Amazon gateway instances --- lib/recurly/amazon/amazon-pay.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/recurly/amazon/amazon-pay.js b/lib/recurly/amazon/amazon-pay.js index 555d20678..0e201d52c 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,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