@paydock/client-sdk 1.11.7 → 1.11.12-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +754 -746
- package/bundles/widget.umd.js +26 -29
- package/bundles/widget.umd.min.js +1 -1
- package/lib/api/api-base.js +1 -0
- package/lib/api/api-base.js.map +1 -1
- package/lib/checkout-button/index.d.ts +3 -1
- package/lib/checkout-button/index.js +3 -1
- package/lib/checkout-button/index.js.map +1 -1
- package/lib/checkout-button/runner.js +1 -0
- package/lib/checkout-button/runner.js.map +1 -1
- package/lib/checkout-button/zipmoney.runner.js +1 -0
- package/lib/checkout-button/zipmoney.runner.js.map +1 -1
- package/lib/components/dispatcher.js +1 -0
- package/lib/components/dispatcher.js.map +1 -1
- package/lib/components/env.d.ts +1 -0
- package/lib/components/env.js +1 -0
- package/lib/components/env.js.map +1 -1
- package/lib/components/http-core.js +1 -0
- package/lib/components/http-core.js.map +1 -1
- package/lib/components/link.js +1 -0
- package/lib/components/link.js.map +1 -1
- package/lib/components/param.d.ts +3 -1
- package/lib/components/param.js.map +1 -1
- package/lib/components/popup.js +1 -1
- package/lib/components/popup.js.map +1 -1
- package/lib/wallet-buttons/apple.wallet-service.js +2 -13
- package/lib/wallet-buttons/apple.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/google.wallet-service.js +7 -5
- package/lib/wallet-buttons/google.wallet-service.js.map +1 -1
- package/lib/widget/configuration.d.ts +3 -1
- package/lib/widget/configuration.js +4 -1
- package/lib/widget/configuration.js.map +1 -1
- package/lib/widget/html-multi-widget.d.ts +2 -1
- package/lib/widget/html-multi-widget.js +2 -1
- package/lib/widget/html-multi-widget.js.map +1 -1
- package/lib/widget/html-widget.d.ts +3 -1
- package/lib/widget/html-widget.js +3 -1
- package/lib/widget/html-widget.js.map +1 -1
- package/package.json +1 -1
- package/slate.md +17 -16
package/bundles/widget.umd.js
CHANGED
|
@@ -227,6 +227,7 @@
|
|
|
227
227
|
SANDBOX_DEMO_KOVENA: 'sandbox-demo-kovena',
|
|
228
228
|
PROD: 'production',
|
|
229
229
|
STAGING: 'staging',
|
|
230
|
+
STAGING_1: 'staging_1',
|
|
230
231
|
STAGING_2: 'staging_2',
|
|
231
232
|
STAGING_3: 'staging_3',
|
|
232
233
|
STAGING_4: 'staging_4',
|
|
@@ -361,7 +362,7 @@
|
|
|
361
362
|
this.params = {};
|
|
362
363
|
this.widgetId = Uuid.generate();
|
|
363
364
|
this.linkResource = linkResource;
|
|
364
|
-
this.env = new Env([{ env: ENV.SANDBOX_KOVENA, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://widget-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://widget-sandbox-demo.' }, { env: ENV.SANDBOX, url: 'https://widget-sandbox.' }, { env: ENV.PROD, url: 'https://widget.' }, { env: ENV.STAGING, url: 'https://widsta.' }, { env: ENV.STAGING_2, url: 'https://widsta-2.' }, { env: ENV.STAGING_3, url: 'https://widsta-3.' }, { env: ENV.STAGING_4, url: 'https://widsta-4.' }, { env: ENV.STAGING_5, url: 'https://widsta-5.' }, { env: ENV.STAGING_6, url: 'https://widsta-6.' }, { env: ENV.STAGING_7, url: 'https://widsta-7.' }, { env: ENV.STAGING_8, url: 'https://widsta-8.' }, { env: ENV.STAGING_9, url: 'https://widsta-9.' }, { env: ENV.STAGING_10, url: 'https://widsta-10.' }, { env: ENV.STAGING_11, url: 'https://widsta-11.' }, { env: ENV.STAGING_12, url: 'https://widsta-12.' }, { env: ENV.STAGING_13, url: 'https://widsta-13.' }, { env: ENV.STAGING_14, url: 'https://widsta-14.' }, { env: ENV.STAGING_15, url: 'https://widsta-15.' }, { env: ENV.STAGING_CBA, url: 'https://widget-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://widget-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://widget-cba.' }]);
|
|
365
|
+
this.env = new Env([{ env: ENV.SANDBOX_KOVENA, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://widget-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://widget-sandbox-demo.' }, { env: ENV.SANDBOX, url: 'https://widget-sandbox.' }, { env: ENV.PROD, url: 'https://widget.' }, { env: ENV.STAGING, url: 'https://widsta.' }, { env: ENV.STAGING_1, url: 'https://widsta-1.' }, { env: ENV.STAGING_2, url: 'https://widsta-2.' }, { env: ENV.STAGING_3, url: 'https://widsta-3.' }, { env: ENV.STAGING_4, url: 'https://widsta-4.' }, { env: ENV.STAGING_5, url: 'https://widsta-5.' }, { env: ENV.STAGING_6, url: 'https://widsta-6.' }, { env: ENV.STAGING_7, url: 'https://widsta-7.' }, { env: ENV.STAGING_8, url: 'https://widsta-8.' }, { env: ENV.STAGING_9, url: 'https://widsta-9.' }, { env: ENV.STAGING_10, url: 'https://widsta-10.' }, { env: ENV.STAGING_11, url: 'https://widsta-11.' }, { env: ENV.STAGING_12, url: 'https://widsta-12.' }, { env: ENV.STAGING_13, url: 'https://widsta-13.' }, { env: ENV.STAGING_14, url: 'https://widsta-14.' }, { env: ENV.STAGING_15, url: 'https://widsta-15.' }, { env: ENV.STAGING_CBA, url: 'https://widget-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://widget-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://widget-cba.' }]);
|
|
365
366
|
this.setParams({ widget_id: this.widgetId });
|
|
366
367
|
}
|
|
367
368
|
|
|
@@ -565,7 +566,9 @@
|
|
|
565
566
|
*
|
|
566
567
|
* var config = new Configuration('gatewayId', 'bank_account', 'paymentSource'); // extend
|
|
567
568
|
*
|
|
568
|
-
*
|
|
569
|
+
* var config = new Configuration('not_configured'); // without gateway
|
|
570
|
+
*
|
|
571
|
+
* @param {string} [gatewayID=default] - gateway ID. By default or if put 'default', it will use the selected default gateway. If put 'not_configured', it won’t use gateway to create downstream token.
|
|
569
572
|
* @param {string} paymentType - Type of payment source which shows in widget form. Available parameters [PAYMENT_TYPE]{@link PAYMENT_TYPE}
|
|
570
573
|
* @param {string} purpose - Param which describes payment purpose. By default uses Available parameters [PURPOSE]{@link PURPOSE}
|
|
571
574
|
**/
|
|
@@ -578,7 +581,7 @@
|
|
|
578
581
|
|
|
579
582
|
if (ObjectHelper.values(PAYMENT_TYPE).indexOf(paymentType) === -1) throw new Error('unsupported payment type');else if (paymentType === PAYMENT_TYPE.CHECKOUT) throw new Error('Payment type "checkout" is deprecated. Use CheckoutButton for this type of payments https://www.npmjs.com/package/@paydock/client-sdk#checkout-button');
|
|
580
583
|
if (ObjectHelper.values(PURPOSE).indexOf(purpose) === -1) throw new Error('unsupported purpose');
|
|
581
|
-
this.env = new Env([{ env: ENV.SANDBOX_KOVENA, url: 'https://api-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX, url: 'https://api-sandbox.' }, { env: ENV.PROD, url: 'https://api.' }, { env: ENV.STAGING, url: 'https://apista.' }, { env: ENV.STAGING_2, url: 'https://apista-2.' }, { env: ENV.STAGING_3, url: 'https://apista-3.' }, { env: ENV.STAGING_4, url: 'https://apista-4.' }, { env: ENV.STAGING_5, url: 'https://apista-5.' }, { env: ENV.STAGING_6, url: 'https://apista-6.' }, { env: ENV.STAGING_7, url: 'https://apista-7.' }, { env: ENV.STAGING_8, url: 'https://apista-8.' }, { env: ENV.STAGING_9, url: 'https://apista-9.' }, { env: ENV.STAGING_10, url: 'https://apista-10.' }, { env: ENV.STAGING_11, url: 'https://apista-11.' }, { env: ENV.STAGING_12, url: 'https://apista-12.' }, { env: ENV.STAGING_13, url: 'https://apista-13.' }, { env: ENV.STAGING_14, url: 'https://apista-14.' }, { env: ENV.STAGING_15, url: 'https://apista-15.' }, { env: ENV.STAGING_CBA, url: 'https://api-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://api-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://api-cba.' }]);
|
|
584
|
+
this.env = new Env([{ env: ENV.SANDBOX_KOVENA, url: 'https://api-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX, url: 'https://api-sandbox.' }, { env: ENV.PROD, url: 'https://api.' }, { env: ENV.STAGING, url: 'https://apista.' }, { env: ENV.STAGING_1, url: 'https://apista-1.' }, { env: ENV.STAGING_2, url: 'https://apista-2.' }, { env: ENV.STAGING_3, url: 'https://apista-3.' }, { env: ENV.STAGING_4, url: 'https://apista-4.' }, { env: ENV.STAGING_5, url: 'https://apista-5.' }, { env: ENV.STAGING_6, url: 'https://apista-6.' }, { env: ENV.STAGING_7, url: 'https://apista-7.' }, { env: ENV.STAGING_8, url: 'https://apista-8.' }, { env: ENV.STAGING_9, url: 'https://apista-9.' }, { env: ENV.STAGING_10, url: 'https://apista-10.' }, { env: ENV.STAGING_11, url: 'https://apista-11.' }, { env: ENV.STAGING_12, url: 'https://apista-12.' }, { env: ENV.STAGING_13, url: 'https://apista-13.' }, { env: ENV.STAGING_14, url: 'https://apista-14.' }, { env: ENV.STAGING_15, url: 'https://apista-15.' }, { env: ENV.STAGING_CBA, url: 'https://api-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://api-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://api-cba.' }]);
|
|
582
585
|
this.configs = {
|
|
583
586
|
purpose: purpose,
|
|
584
587
|
meta: {},
|
|
@@ -1873,7 +1876,8 @@
|
|
|
1873
1876
|
* var widget = new MultiWidget('#widget', 'publicKey', new Configuration('gatewayId')); With Configuration
|
|
1874
1877
|
*
|
|
1875
1878
|
* var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
|
|
1876
|
-
* Configuration() // default gateway_id,
|
|
1879
|
+
* Configuration(), // default gateway_id,
|
|
1880
|
+
* Configuration('not_configured'), // without gateway,
|
|
1877
1881
|
* Configuration('gatewayId'),
|
|
1878
1882
|
* Configuration('gatewayId', 'bank_account')
|
|
1879
1883
|
* ]);
|
|
@@ -2233,9 +2237,11 @@
|
|
|
2233
2237
|
*
|
|
2234
2238
|
* var widget = new HtmlWidget('#widget', 'publicKey', 'gatewayID', 'bank_account', 'payment_source'); // extend
|
|
2235
2239
|
*
|
|
2240
|
+
* var widget = new HtmlWidget('#widget', 'publicKey', 'not_configured'); // without gateway
|
|
2241
|
+
*
|
|
2236
2242
|
* @param {string} selector - Selector of html element. Container for widget
|
|
2237
2243
|
* @param {string} publicKey - PayDock users public key
|
|
2238
|
-
* @param {string} [gatewayID=default] - ID of a gateway connected to PayDock. By default or if put 'default', it will use the selected default gateway
|
|
2244
|
+
* @param {string} [gatewayID=default] - ID of a gateway connected to PayDock. By default or if put 'default', it will use the selected default gateway. If put 'not_configured', it won’t use gateway to create downstream token.
|
|
2239
2245
|
* @param {string} [paymentType=card] - Type of payment source which shows in widget form. Available parameters : “card”, “bank_account”.
|
|
2240
2246
|
* @param {string} [purpose=payment_source] - Purpose of widget form. Available parameters: ‘payment_source’, ‘card_payment_source_with_cvv’, ‘card_payment_source_without_cvv’
|
|
2241
2247
|
**/
|
|
@@ -2378,7 +2384,7 @@
|
|
|
2378
2384
|
function HttpCore() {
|
|
2379
2385
|
classCallCheck(this, HttpCore);
|
|
2380
2386
|
|
|
2381
|
-
this.env = new Env([{ env: ENV.SANDBOX_KOVENA, url: 'https://api-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX, url: 'https://api-sandbox.' }, { env: ENV.PROD, url: 'https://api.' }, { env: ENV.STAGING, url: 'https://apista.' }, { env: ENV.STAGING_2, url: 'https://apista-2.' }, { env: ENV.STAGING_3, url: 'https://apista-3.' }, { env: ENV.STAGING_4, url: 'https://apista-4.' }, { env: ENV.STAGING_5, url: 'https://apista-5.' }, { env: ENV.STAGING_6, url: 'https://apista-6.' }, { env: ENV.STAGING_7, url: 'https://apista-7.' }, { env: ENV.STAGING_8, url: 'https://apista-8.' }, { env: ENV.STAGING_9, url: 'https://apista-9.' }, { env: ENV.STAGING_10, url: 'https://apista-10.' }, { env: ENV.STAGING_11, url: 'https://apista-11.' }, { env: ENV.STAGING_12, url: 'https://apista-12.' }, { env: ENV.STAGING_13, url: 'https://apista-13.' }, { env: ENV.STAGING_14, url: 'https://apista-14.' }, { env: ENV.STAGING_15, url: 'https://apista-15.' }, { env: ENV.STAGING_CBA, url: 'https://api-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://api-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://api-cba.' }]);
|
|
2387
|
+
this.env = new Env([{ env: ENV.SANDBOX_KOVENA, url: 'https://api-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX, url: 'https://api-sandbox.' }, { env: ENV.PROD, url: 'https://api.' }, { env: ENV.STAGING, url: 'https://apista.' }, { env: ENV.STAGING_1, url: 'https://apista-1.' }, { env: ENV.STAGING_2, url: 'https://apista-2.' }, { env: ENV.STAGING_3, url: 'https://apista-3.' }, { env: ENV.STAGING_4, url: 'https://apista-4.' }, { env: ENV.STAGING_5, url: 'https://apista-5.' }, { env: ENV.STAGING_6, url: 'https://apista-6.' }, { env: ENV.STAGING_7, url: 'https://apista-7.' }, { env: ENV.STAGING_8, url: 'https://apista-8.' }, { env: ENV.STAGING_9, url: 'https://apista-9.' }, { env: ENV.STAGING_10, url: 'https://apista-10.' }, { env: ENV.STAGING_11, url: 'https://apista-11.' }, { env: ENV.STAGING_12, url: 'https://apista-12.' }, { env: ENV.STAGING_13, url: 'https://apista-13.' }, { env: ENV.STAGING_14, url: 'https://apista-14.' }, { env: ENV.STAGING_15, url: 'https://apista-15.' }, { env: ENV.STAGING_CBA, url: 'https://api-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://api-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://api-cba.' }]);
|
|
2382
2388
|
}
|
|
2383
2389
|
|
|
2384
2390
|
createClass(HttpCore, [{
|
|
@@ -2879,7 +2885,7 @@
|
|
|
2879
2885
|
this.background.onTrigger(TRIGGER$1.CLOSE, function () {
|
|
2880
2886
|
return _this.stop();
|
|
2881
2887
|
});
|
|
2882
|
-
this.widgetEnv = new Env([{ env: ENV.SANDBOX, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_KOVENA, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://widget-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://widget-sandbox-demo.' }, { env: ENV.PROD, url: 'https://widget.' }, { env: ENV.STAGING, url: 'https://widsta.' }, { env: ENV.STAGING_2, url: 'https://widsta-2.' }, { env: ENV.STAGING_3, url: 'https://widsta-3.' }, { env: ENV.STAGING_4, url: 'https://widsta-4.' }, { env: ENV.STAGING_5, url: 'https://widsta-5.' }, { env: ENV.STAGING_6, url: 'https://widsta-6.' }, { env: ENV.STAGING_7, url: 'https://widsta-7.' }, { env: ENV.STAGING_8, url: 'https://widsta-8.' }, { env: ENV.STAGING_9, url: 'https://widsta-9.' }, { env: ENV.STAGING_10, url: 'https://widsta-10.' }, { env: ENV.STAGING_11, url: 'https://widsta-11.' }, { env: ENV.STAGING_12, url: 'https://widsta-12.' }, { env: ENV.STAGING_13, url: 'https://widsta-13.' }, { env: ENV.STAGING_14, url: 'https://widsta-14.' }, { env: ENV.STAGING_15, url: 'https://widsta-15.' }, { env: ENV.STAGING_CBA, url: 'https://widget-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://widget-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://widget-cba.' }]);
|
|
2888
|
+
this.widgetEnv = new Env([{ env: ENV.SANDBOX, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_KOVENA, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://widget-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://widget-sandbox-demo.' }, { env: ENV.PROD, url: 'https://widget.' }, { env: ENV.STAGING, url: 'https://widsta.' }, { env: ENV.STAGING_1, url: 'https://widsta-1.' }, { env: ENV.STAGING_2, url: 'https://widsta-2.' }, { env: ENV.STAGING_3, url: 'https://widsta-3.' }, { env: ENV.STAGING_4, url: 'https://widsta-4.' }, { env: ENV.STAGING_5, url: 'https://widsta-5.' }, { env: ENV.STAGING_6, url: 'https://widsta-6.' }, { env: ENV.STAGING_7, url: 'https://widsta-7.' }, { env: ENV.STAGING_8, url: 'https://widsta-8.' }, { env: ENV.STAGING_9, url: 'https://widsta-9.' }, { env: ENV.STAGING_10, url: 'https://widsta-10.' }, { env: ENV.STAGING_11, url: 'https://widsta-11.' }, { env: ENV.STAGING_12, url: 'https://widsta-12.' }, { env: ENV.STAGING_13, url: 'https://widsta-13.' }, { env: ENV.STAGING_14, url: 'https://widsta-14.' }, { env: ENV.STAGING_15, url: 'https://widsta-15.' }, { env: ENV.STAGING_CBA, url: 'https://widget-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://widget-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://widget-cba.' }]);
|
|
2883
2889
|
}
|
|
2884
2890
|
|
|
2885
2891
|
createClass(Runner, [{
|
|
@@ -3979,7 +3985,7 @@
|
|
|
3979
3985
|
_this.checkout = null;
|
|
3980
3986
|
_this.runs = false;
|
|
3981
3987
|
_this.eventEmitter = new EventEmitter();
|
|
3982
|
-
_this.echoEnv = new Env([{ env: ENV.SANDBOX, url: 'https://api-sandbox.' }, { env: ENV.SANDBOX_KOVENA, url: 'https://api-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://api-sandbox-demo.' }, { env: ENV.PROD, url: 'https://api.' }, { env: ENV.STAGING, url: 'https://apista.' }, { env: ENV.STAGING_2, url: 'https://apista-2.' }, { env: ENV.STAGING_3, url: 'https://apista-3.' }, { env: ENV.STAGING_4, url: 'https://apista-4.' }, { env: ENV.STAGING_5, url: 'https://apista-5.' }, { env: ENV.STAGING_6, url: 'https://apista-6.' }, { env: ENV.STAGING_7, url: 'https://apista-7.' }, { env: ENV.STAGING_8, url: 'https://apista-8.' }, { env: ENV.STAGING_9, url: 'https://apista-9.' }, { env: ENV.STAGING_10, url: 'https://apista-10.' }, { env: ENV.STAGING_11, url: 'https://apista-11.' }, { env: ENV.STAGING_12, url: 'https://apista-12.' }, { env: ENV.STAGING_13, url: 'https://apista-13.' }, { env: ENV.STAGING_14, url: 'https://apista-14.' }, { env: ENV.STAGING_15, url: 'https://apista-15.' }, { env: ENV.STAGING_CBA, url: 'https://api-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://api-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://api-cba.' }]);
|
|
3988
|
+
_this.echoEnv = new Env([{ env: ENV.SANDBOX, url: 'https://api-sandbox.' }, { env: ENV.SANDBOX_KOVENA, url: 'https://api-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://api-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://api-sandbox-demo.' }, { env: ENV.PROD, url: 'https://api.' }, { env: ENV.STAGING, url: 'https://apista.' }, { env: ENV.STAGING_1, url: 'https://apista-1.' }, { env: ENV.STAGING_2, url: 'https://apista-2.' }, { env: ENV.STAGING_3, url: 'https://apista-3.' }, { env: ENV.STAGING_4, url: 'https://apista-4.' }, { env: ENV.STAGING_5, url: 'https://apista-5.' }, { env: ENV.STAGING_6, url: 'https://apista-6.' }, { env: ENV.STAGING_7, url: 'https://apista-7.' }, { env: ENV.STAGING_8, url: 'https://apista-8.' }, { env: ENV.STAGING_9, url: 'https://apista-9.' }, { env: ENV.STAGING_10, url: 'https://apista-10.' }, { env: ENV.STAGING_11, url: 'https://apista-11.' }, { env: ENV.STAGING_12, url: 'https://apista-12.' }, { env: ENV.STAGING_13, url: 'https://apista-13.' }, { env: ENV.STAGING_14, url: 'https://apista-14.' }, { env: ENV.STAGING_15, url: 'https://apista-15.' }, { env: ENV.STAGING_CBA, url: 'https://api-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://api-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://api-cba.' }]);
|
|
3983
3989
|
return _this;
|
|
3984
3990
|
}
|
|
3985
3991
|
|
|
@@ -4144,7 +4150,7 @@
|
|
|
4144
4150
|
classCallCheck(this, Dispatcher);
|
|
4145
4151
|
|
|
4146
4152
|
this.messageSource = messageSource;
|
|
4147
|
-
this.env = new Env([{ env: ENV.SANDBOX, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_KOVENA, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://widget-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://widget-sandbox-demo.' }, { env: ENV.PROD, url: 'https://widget.' }, { env: ENV.STAGING, url: 'https://widsta.' }, { env: ENV.STAGING_2, url: 'https://widsta-2.' }, { env: ENV.STAGING_3, url: 'https://widsta-3.' }, { env: ENV.STAGING_4, url: 'https://widsta-4.' }, { env: ENV.STAGING_5, url: 'https://widsta-5.' }, { env: ENV.STAGING_6, url: 'https://widsta-6.' }, { env: ENV.STAGING_7, url: 'https://widsta-7.' }, { env: ENV.STAGING_8, url: 'https://widsta-8.' }, { env: ENV.STAGING_9, url: 'https://widsta-9.' }, { env: ENV.STAGING_10, url: 'https://widsta-10.' }, { env: ENV.STAGING_11, url: 'https://widsta-11.' }, { env: ENV.STAGING_12, url: 'https://widsta-12.' }, { env: ENV.STAGING_13, url: 'https://widsta-13.' }, { env: ENV.STAGING_14, url: 'https://widsta-14.' }, { env: ENV.STAGING_15, url: 'https://widsta-15.' }, { env: ENV.STAGING_CBA, url: 'https://widget-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://widget-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://widget-cba.' }]);
|
|
4153
|
+
this.env = new Env([{ env: ENV.SANDBOX, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_KOVENA, url: 'https://widget-sandbox.' }, { env: ENV.SANDBOX_DEMO, url: 'https://widget-sandbox-demo.' }, { env: ENV.SANDBOX_DEMO_KOVENA, url: 'https://widget-sandbox-demo.' }, { env: ENV.PROD, url: 'https://widget.' }, { env: ENV.STAGING, url: 'https://widsta.' }, { env: ENV.STAGING_1, url: 'https://widsta-1.' }, { env: ENV.STAGING_2, url: 'https://widsta-2.' }, { env: ENV.STAGING_3, url: 'https://widsta-3.' }, { env: ENV.STAGING_4, url: 'https://widsta-4.' }, { env: ENV.STAGING_5, url: 'https://widsta-5.' }, { env: ENV.STAGING_6, url: 'https://widsta-6.' }, { env: ENV.STAGING_7, url: 'https://widsta-7.' }, { env: ENV.STAGING_8, url: 'https://widsta-8.' }, { env: ENV.STAGING_9, url: 'https://widsta-9.' }, { env: ENV.STAGING_10, url: 'https://widsta-10.' }, { env: ENV.STAGING_11, url: 'https://widsta-11.' }, { env: ENV.STAGING_12, url: 'https://widsta-12.' }, { env: ENV.STAGING_13, url: 'https://widsta-13.' }, { env: ENV.STAGING_14, url: 'https://widsta-14.' }, { env: ENV.STAGING_15, url: 'https://widsta-15.' }, { env: ENV.STAGING_CBA, url: 'https://widget-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://widget-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://widget-cba.' }]);
|
|
4148
4154
|
}
|
|
4149
4155
|
|
|
4150
4156
|
createClass(Dispatcher, [{
|
|
@@ -4281,7 +4287,7 @@
|
|
|
4281
4287
|
this.getElement().document.write(".");
|
|
4282
4288
|
var body = this.getElement().document.body || this.getElement().document.getElementsByTagName('body')[0];
|
|
4283
4289
|
body.innerHTML = STYLE$1 + TEMPLATE;
|
|
4284
|
-
if (this.env !== ENV.STAGING || this.env !== ENV.STAGING_2 || this.env !== ENV.STAGING_3 || this.env !== ENV.STAGING_4 || this.env !== ENV.STAGING_5 || this.env !== ENV.STAGING_6 || this.env !== ENV.STAGING_7 || this.env !== ENV.STAGING_8 || this.env !== ENV.STAGING_9 || this.env !== ENV.STAGING_10 || this.env !== ENV.STAGING_11 || this.env !== ENV.STAGING_12 || this.env !== ENV.STAGING_13 || this.env !== ENV.STAGING_14 || this.env !== ENV.STAGING_15) return;
|
|
4290
|
+
if (this.env !== ENV.STAGING || this.env !== ENV.STAGING_1 || this.env !== ENV.STAGING_2 || this.env !== ENV.STAGING_3 || this.env !== ENV.STAGING_4 || this.env !== ENV.STAGING_5 || this.env !== ENV.STAGING_6 || this.env !== ENV.STAGING_7 || this.env !== ENV.STAGING_8 || this.env !== ENV.STAGING_9 || this.env !== ENV.STAGING_10 || this.env !== ENV.STAGING_11 || this.env !== ENV.STAGING_12 || this.env !== ENV.STAGING_13 || this.env !== ENV.STAGING_14 || this.env !== ENV.STAGING_15) return;
|
|
4285
4291
|
var clickCount = 0;
|
|
4286
4292
|
Event.subscribe('click', body, function () {
|
|
4287
4293
|
clickCount++;
|
|
@@ -5660,21 +5666,10 @@
|
|
|
5660
5666
|
|
|
5661
5667
|
_this.latestShippingData.shippingContact = shippingContact;
|
|
5662
5668
|
var shippingOptionMethod = (_a = _this.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.type;
|
|
5669
|
+
var cardNameFromShippingContact = [shippingContact === null || shippingContact === void 0 ? void 0 : shippingContact.givenName, shippingContact === null || shippingContact === void 0 ? void 0 : shippingContact.familyName].join(' ').trim();
|
|
5663
5670
|
_this.eventEmitter.emit(WALLET_EVENT.PAYMENT_METHOD_SELECTED, {
|
|
5664
5671
|
data: _extends({ customer: {
|
|
5665
|
-
payment_source: {
|
|
5666
|
-
wallet_type: WALLET_TYPE.APPLE,
|
|
5667
|
-
card_name: token.paymentMethod.displayName,
|
|
5668
|
-
type: token.paymentMethod.type,
|
|
5669
|
-
card_scheme: token.paymentMethod.network,
|
|
5670
|
-
address_line1: billingContact === null || billingContact === void 0 ? void 0 : billingContact.addressLines[0],
|
|
5671
|
-
address_line2: billingContact === null || billingContact === void 0 ? void 0 : billingContact.addressLines[1],
|
|
5672
|
-
address_country: billingContact === null || billingContact === void 0 ? void 0 : billingContact.countryCode,
|
|
5673
|
-
address_city: billingContact === null || billingContact === void 0 ? void 0 : billingContact.locality,
|
|
5674
|
-
address_postcode: billingContact === null || billingContact === void 0 ? void 0 : billingContact.postalCode,
|
|
5675
|
-
address_state: billingContact === null || billingContact === void 0 ? void 0 : billingContact.administrativeArea,
|
|
5676
|
-
ref_token: token.paymentData ? JSON.stringify(token.paymentData) : ''
|
|
5677
|
-
}
|
|
5672
|
+
payment_source: _extends(_extends({ wallet_type: WALLET_TYPE.APPLE }, cardNameFromShippingContact && { card_name: cardNameFromShippingContact }), { type: token.paymentMethod.type, card_scheme: token.paymentMethod.network, address_line1: billingContact === null || billingContact === void 0 ? void 0 : billingContact.addressLines[0], address_line2: billingContact === null || billingContact === void 0 ? void 0 : billingContact.addressLines[1], address_country: billingContact === null || billingContact === void 0 ? void 0 : billingContact.countryCode, address_city: billingContact === null || billingContact === void 0 ? void 0 : billingContact.locality, address_postcode: billingContact === null || billingContact === void 0 ? void 0 : billingContact.postalCode, address_state: billingContact === null || billingContact === void 0 ? void 0 : billingContact.administrativeArea, ref_token: token.paymentData ? JSON.stringify(token.paymentData) : '' })
|
|
5678
5673
|
} }, _this.meta.request_shipping && shippingContact && {
|
|
5679
5674
|
shipping: _extends(_extends(_extends({}, shippingOptionMethod && { method: shippingOptionMethod }), _this.hasShippingOptions() && { options: _this.meta.shipping_options }), { address_line1: shippingContact.addressLines[0], address_line2: shippingContact.addressLines[1], address_country: shippingContact.countryCode, address_city: shippingContact.locality, address_postcode: shippingContact.postalCode, address_state: shippingContact.administrativeArea, contact: {
|
|
5680
5675
|
first_name: shippingContact.givenName,
|
|
@@ -6124,15 +6119,17 @@
|
|
|
6124
6119
|
var shippingAddressLine2 = (_h = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _h === void 0 ? void 0 : _h.address2;
|
|
6125
6120
|
var shippingOptionMethod = (_j = this.selectedShippingOption) === null || _j === void 0 ? void 0 : _j.type;
|
|
6126
6121
|
return new Promise(function (resolve) {
|
|
6127
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v
|
|
6122
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
6128
6123
|
return _this4.eventEmitter.emit(WALLET_EVENT.PAYMENT_METHOD_SELECTED, {
|
|
6129
6124
|
data: _extends({ customer: {
|
|
6130
|
-
payment_source: _extends(_extends(_extends(_extends({ wallet_type: WALLET_TYPE.GOOGLE,
|
|
6125
|
+
payment_source: _extends(_extends(_extends(_extends({ wallet_type: WALLET_TYPE.GOOGLE,
|
|
6126
|
+
// card_name: paymentData.shippingAddress?.name, // TODO: Do we want to use this value? Point 2 at https://paydock.atlassian.net/browse/P2-7209?focusedCommentId=60202
|
|
6127
|
+
type: paymentData.paymentMethodData.type, card_scheme: (_b = (_a = paymentData.paymentMethodData) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.cardNetwork }, billingAddressLine1 && { address_line1: billingAddressLine1 }), billingAddressLine2 && { address_line2: billingAddressLine2 }), billingAddressLine2 && { address_line2: billingAddressLine2 }), { address_country: (_e = (_d = (_c = paymentData.paymentMethodData) === null || _c === void 0 ? void 0 : _c.info) === null || _d === void 0 ? void 0 : _d.billingAddress) === null || _e === void 0 ? void 0 : _e.countryCode, address_city: (_h = (_g = (_f = paymentData.paymentMethodData) === null || _f === void 0 ? void 0 : _f.info) === null || _g === void 0 ? void 0 : _g.billingAddress) === null || _h === void 0 ? void 0 : _h.locality, address_postcode: (_l = (_k = (_j = paymentData.paymentMethodData) === null || _j === void 0 ? void 0 : _j.info) === null || _k === void 0 ? void 0 : _k.billingAddress) === null || _l === void 0 ? void 0 : _l.postalCode, address_state: (_p = (_o = (_m = paymentData.paymentMethodData) === null || _m === void 0 ? void 0 : _m.info) === null || _o === void 0 ? void 0 : _o.billingAddress) === null || _p === void 0 ? void 0 : _p.administrativeArea, ref_token: paymentData.paymentMethodData.tokenizationData.token })
|
|
6131
6128
|
} }, _this4.isShippingRequired() && {
|
|
6132
|
-
shipping: _extends(_extends(_extends(_extends(_extends({}, shippingOptionMethod && { method: shippingOptionMethod }), _this4.hasShippingOptions() && { options: _this4.meta.shipping_options }), shippingAddressLine1 && { address_line1: shippingAddressLine1 }), shippingAddressLine2 && { address_line2: shippingAddressLine2 }), { address_country: (
|
|
6133
|
-
first_name: (
|
|
6129
|
+
shipping: _extends(_extends(_extends(_extends(_extends({}, shippingOptionMethod && { method: shippingOptionMethod }), _this4.hasShippingOptions() && { options: _this4.meta.shipping_options }), shippingAddressLine1 && { address_line1: shippingAddressLine1 }), shippingAddressLine2 && { address_line2: shippingAddressLine2 }), { address_country: (_q = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _q === void 0 ? void 0 : _q.countryCode, address_city: (_r = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _r === void 0 ? void 0 : _r.locality, address_postcode: (_s = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _s === void 0 ? void 0 : _s.postalCode, address_state: (_t = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _t === void 0 ? void 0 : _t.administrativeArea, contact: {
|
|
6130
|
+
first_name: (_u = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _u === void 0 ? void 0 : _u.name,
|
|
6134
6131
|
email: paymentData === null || paymentData === void 0 ? void 0 : paymentData.email,
|
|
6135
|
-
phone: (
|
|
6132
|
+
phone: (_v = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _v === void 0 ? void 0 : _v.phoneNumber
|
|
6136
6133
|
} })
|
|
6137
6134
|
}),
|
|
6138
6135
|
onSuccess: function onSuccess() {
|
|
@@ -6274,7 +6271,7 @@
|
|
|
6274
6271
|
|
|
6275
6272
|
this.auth = auth;
|
|
6276
6273
|
this.authType = authType || this.setAuthType();
|
|
6277
|
-
this.env = new Env([{ env: ENV.SANDBOX, url: 'https://api-sandbox.' }, { env: ENV.PROD, url: 'https://api.' }, { env: ENV.STAGING, url: 'https://apista.' }, { env: ENV.STAGING_2, url: 'https://apista-2.' }, { env: ENV.STAGING_3, url: 'https://apista-3.' }, { env: ENV.STAGING_4, url: 'https://apista-4.' }, { env: ENV.STAGING_5, url: 'https://apista-5.' }, { env: ENV.STAGING_6, url: 'https://apista-6.' }, { env: ENV.STAGING_7, url: 'https://apista-7.' }, { env: ENV.STAGING_8, url: 'https://apista-8.' }, { env: ENV.STAGING_9, url: 'https://apista-9.' }, { env: ENV.STAGING_10, url: 'https://apista-10.' }, { env: ENV.STAGING_11, url: 'https://apista-11.' }, { env: ENV.STAGING_12, url: 'https://apista-12.' }, { env: ENV.STAGING_13, url: 'https://apista-13.' }, { env: ENV.STAGING_14, url: 'https://apista-14.' }, { env: ENV.STAGING_15, url: 'https://apista-15.' }, { env: ENV.STAGING_CBA, url: 'https://api-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://api-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://api-cba.' }]);
|
|
6274
|
+
this.env = new Env([{ env: ENV.SANDBOX, url: 'https://api-sandbox.' }, { env: ENV.PROD, url: 'https://api.' }, { env: ENV.STAGING, url: 'https://apista.' }, { env: ENV.STAGING_1, url: 'https://apista-1.' }, { env: ENV.STAGING_2, url: 'https://apista-2.' }, { env: ENV.STAGING_3, url: 'https://apista-3.' }, { env: ENV.STAGING_4, url: 'https://apista-4.' }, { env: ENV.STAGING_5, url: 'https://apista-5.' }, { env: ENV.STAGING_6, url: 'https://apista-6.' }, { env: ENV.STAGING_7, url: 'https://apista-7.' }, { env: ENV.STAGING_8, url: 'https://apista-8.' }, { env: ENV.STAGING_9, url: 'https://apista-9.' }, { env: ENV.STAGING_10, url: 'https://apista-10.' }, { env: ENV.STAGING_11, url: 'https://apista-11.' }, { env: ENV.STAGING_12, url: 'https://apista-12.' }, { env: ENV.STAGING_13, url: 'https://apista-13.' }, { env: ENV.STAGING_14, url: 'https://apista-14.' }, { env: ENV.STAGING_15, url: 'https://apista-15.' }, { env: ENV.STAGING_CBA, url: 'https://api-staging-cba.' }, { env: ENV.SANDBOX_CBA, url: 'https://api-sandbox-cba.' }, { env: ENV.PROD_CBA, url: 'https://api-cba.' }]);
|
|
6278
6275
|
}
|
|
6279
6276
|
/**
|
|
6280
6277
|
* Current method can change environment. By default environment = sandbox.
|