@paydock/client-sdk 1.11.5-beta → 1.11.9-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.
Files changed (43) hide show
  1. package/README.md +279 -271
  2. package/bundles/widget.umd.js +37 -30
  3. package/bundles/widget.umd.min.js +1 -1
  4. package/lib/api/api-base.js +11 -0
  5. package/lib/api/api-base.js.map +1 -1
  6. package/lib/api/api-charge-internal.d.ts +2 -2
  7. package/lib/canvas-3ds/services/gpayments-service.js +2 -0
  8. package/lib/canvas-3ds/services/gpayments-service.js.map +1 -1
  9. package/lib/checkout-button/index.d.ts +3 -1
  10. package/lib/checkout-button/index.js +3 -1
  11. package/lib/checkout-button/index.js.map +1 -1
  12. package/lib/checkout-button/runner.js +11 -0
  13. package/lib/checkout-button/runner.js.map +1 -1
  14. package/lib/checkout-button/zipmoney.runner.js +11 -0
  15. package/lib/checkout-button/zipmoney.runner.js.map +1 -1
  16. package/lib/components/dispatcher.js +11 -0
  17. package/lib/components/dispatcher.js.map +1 -1
  18. package/lib/components/env.d.ts +11 -0
  19. package/lib/components/env.js +11 -0
  20. package/lib/components/env.js.map +1 -1
  21. package/lib/components/http-core.js +11 -0
  22. package/lib/components/http-core.js.map +1 -1
  23. package/lib/components/link.js +11 -0
  24. package/lib/components/link.js.map +1 -1
  25. package/lib/components/param.d.ts +3 -1
  26. package/lib/components/param.js.map +1 -1
  27. package/lib/components/popup.js +3 -1
  28. package/lib/components/popup.js.map +1 -1
  29. package/lib/wallet-buttons/apple.wallet-service.js +2 -13
  30. package/lib/wallet-buttons/apple.wallet-service.js.map +1 -1
  31. package/lib/wallet-buttons/google.wallet-service.js +7 -5
  32. package/lib/wallet-buttons/google.wallet-service.js.map +1 -1
  33. package/lib/widget/configuration.d.ts +3 -1
  34. package/lib/widget/configuration.js +14 -1
  35. package/lib/widget/configuration.js.map +1 -1
  36. package/lib/widget/html-multi-widget.d.ts +2 -1
  37. package/lib/widget/html-multi-widget.js +2 -1
  38. package/lib/widget/html-multi-widget.js.map +1 -1
  39. package/lib/widget/html-widget.d.ts +3 -1
  40. package/lib/widget/html-widget.js +3 -1
  41. package/lib/widget/html-widget.js.map +1 -1
  42. package/package.json +1 -1
  43. package/slate.md +17 -16
@@ -227,10 +227,21 @@
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',
233
234
  STAGING_5: 'staging_5',
235
+ STAGING_6: 'staging_6',
236
+ STAGING_7: 'staging_7',
237
+ STAGING_8: 'staging_8',
238
+ STAGING_9: 'staging_9',
239
+ STAGING_10: 'staging_10',
240
+ STAGING_11: 'staging_11',
241
+ STAGING_12: 'staging_12',
242
+ STAGING_13: 'staging_13',
243
+ STAGING_14: 'staging_14',
244
+ STAGING_15: 'staging_15',
234
245
  STAGING_CBA: 'staging_cba',
235
246
  SANDBOX_CBA: 'sandbox_cba',
236
247
  PROD_CBA: 'production_cba'
@@ -351,7 +362,7 @@
351
362
  this.params = {};
352
363
  this.widgetId = Uuid.generate();
353
364
  this.linkResource = linkResource;
354
- 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_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.' }]);
355
366
  this.setParams({ widget_id: this.widgetId });
356
367
  }
357
368
 
@@ -555,7 +566,9 @@
555
566
  *
556
567
  * var config = new Configuration('gatewayId', 'bank_account', 'paymentSource'); // extend
557
568
  *
558
- * @param {string} [gatewayID=default] - gateway ID. By default or if put 'default', it will use the selected default gateway
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.
559
572
  * @param {string} paymentType - Type of payment source which shows in widget form. Available parameters [PAYMENT_TYPE]{@link PAYMENT_TYPE}
560
573
  * @param {string} purpose - Param which describes payment purpose. By default uses Available parameters [PURPOSE]{@link PURPOSE}
561
574
  **/
@@ -568,7 +581,7 @@
568
581
 
569
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');
570
583
  if (ObjectHelper.values(PURPOSE).indexOf(purpose) === -1) throw new Error('unsupported purpose');
571
- 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_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.' }]);
572
585
  this.configs = {
573
586
  purpose: purpose,
574
587
  meta: {},
@@ -1863,7 +1876,8 @@
1863
1876
  * var widget = new MultiWidget('#widget', 'publicKey', new Configuration('gatewayId')); With Configuration
1864
1877
  *
1865
1878
  * var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
1866
- * Configuration() // default gateway_id,
1879
+ * Configuration(), // default gateway_id,
1880
+ * Configuration('not_configured'), // without gateway,
1867
1881
  * Configuration('gatewayId'),
1868
1882
  * Configuration('gatewayId', 'bank_account')
1869
1883
  * ]);
@@ -2223,9 +2237,11 @@
2223
2237
  *
2224
2238
  * var widget = new HtmlWidget('#widget', 'publicKey', 'gatewayID', 'bank_account', 'payment_source'); // extend
2225
2239
  *
2240
+ * var widget = new HtmlWidget('#widget', 'publicKey', 'not_configured'); // without gateway
2241
+ *
2226
2242
  * @param {string} selector - Selector of html element. Container for widget
2227
2243
  * @param {string} publicKey - PayDock users public key
2228
- * @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.
2229
2245
  * @param {string} [paymentType=card] - Type of payment source which shows in widget form. Available parameters : “card”, “bank_account”.
2230
2246
  * @param {string} [purpose=payment_source] - Purpose of widget form. Available parameters: ‘payment_source’, ‘card_payment_source_with_cvv’, ‘card_payment_source_without_cvv’
2231
2247
  **/
@@ -2368,7 +2384,7 @@
2368
2384
  function HttpCore() {
2369
2385
  classCallCheck(this, HttpCore);
2370
2386
 
2371
- 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_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.' }]);
2372
2388
  }
2373
2389
 
2374
2390
  createClass(HttpCore, [{
@@ -2869,7 +2885,7 @@
2869
2885
  this.background.onTrigger(TRIGGER$1.CLOSE, function () {
2870
2886
  return _this.stop();
2871
2887
  });
2872
- 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_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.' }]);
2873
2889
  }
2874
2890
 
2875
2891
  createClass(Runner, [{
@@ -3969,7 +3985,7 @@
3969
3985
  _this.checkout = null;
3970
3986
  _this.runs = false;
3971
3987
  _this.eventEmitter = new EventEmitter();
3972
- _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_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.' }]);
3973
3989
  return _this;
3974
3990
  }
3975
3991
 
@@ -4134,7 +4150,7 @@
4134
4150
  classCallCheck(this, Dispatcher);
4135
4151
 
4136
4152
  this.messageSource = messageSource;
4137
- 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_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.' }]);
4138
4154
  }
4139
4155
 
4140
4156
  createClass(Dispatcher, [{
@@ -4271,7 +4287,7 @@
4271
4287
  this.getElement().document.write(".");
4272
4288
  var body = this.getElement().document.body || this.getElement().document.getElementsByTagName('body')[0];
4273
4289
  body.innerHTML = STYLE$1 + TEMPLATE;
4274
- 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) 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;
4275
4291
  var clickCount = 0;
4276
4292
  Event.subscribe('click', body, function () {
4277
4293
  clickCount++;
@@ -5650,21 +5666,10 @@
5650
5666
 
5651
5667
  _this.latestShippingData.shippingContact = shippingContact;
5652
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();
5653
5670
  _this.eventEmitter.emit(WALLET_EVENT.PAYMENT_METHOD_SELECTED, {
5654
5671
  data: _extends({ customer: {
5655
- payment_source: {
5656
- wallet_type: WALLET_TYPE.APPLE,
5657
- card_name: token.paymentMethod.displayName,
5658
- type: token.paymentMethod.type,
5659
- card_scheme: token.paymentMethod.network,
5660
- address_line1: billingContact === null || billingContact === void 0 ? void 0 : billingContact.addressLines[0],
5661
- address_line2: billingContact === null || billingContact === void 0 ? void 0 : billingContact.addressLines[1],
5662
- address_country: billingContact === null || billingContact === void 0 ? void 0 : billingContact.countryCode,
5663
- address_city: billingContact === null || billingContact === void 0 ? void 0 : billingContact.locality,
5664
- address_postcode: billingContact === null || billingContact === void 0 ? void 0 : billingContact.postalCode,
5665
- address_state: billingContact === null || billingContact === void 0 ? void 0 : billingContact.administrativeArea,
5666
- ref_token: token.paymentData ? JSON.stringify(token.paymentData) : ''
5667
- }
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) : '' })
5668
5673
  } }, _this.meta.request_shipping && shippingContact && {
5669
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: {
5670
5675
  first_name: shippingContact.givenName,
@@ -6114,15 +6119,17 @@
6114
6119
  var shippingAddressLine2 = (_h = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _h === void 0 ? void 0 : _h.address2;
6115
6120
  var shippingOptionMethod = (_j = this.selectedShippingOption) === null || _j === void 0 ? void 0 : _j.type;
6116
6121
  return new Promise(function (resolve) {
6117
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
6122
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
6118
6123
  return _this4.eventEmitter.emit(WALLET_EVENT.PAYMENT_METHOD_SELECTED, {
6119
6124
  data: _extends({ customer: {
6120
- payment_source: _extends(_extends(_extends(_extends({ wallet_type: WALLET_TYPE.GOOGLE, card_name: (_a = paymentData.paymentMethodData) === null || _a === void 0 ? void 0 : _a.description, type: paymentData.paymentMethodData.type, card_scheme: (_c = (_b = paymentData.paymentMethodData) === null || _b === void 0 ? void 0 : _b.info) === null || _c === void 0 ? void 0 : _c.cardNetwork }, billingAddressLine1 && { address_line1: billingAddressLine1 }), billingAddressLine2 && { address_line2: billingAddressLine2 }), billingAddressLine2 && { address_line2: billingAddressLine2 }), { address_country: (_f = (_e = (_d = paymentData.paymentMethodData) === null || _d === void 0 ? void 0 : _d.info) === null || _e === void 0 ? void 0 : _e.billingAddress) === null || _f === void 0 ? void 0 : _f.countryCode, address_city: (_j = (_h = (_g = paymentData.paymentMethodData) === null || _g === void 0 ? void 0 : _g.info) === null || _h === void 0 ? void 0 : _h.billingAddress) === null || _j === void 0 ? void 0 : _j.locality, address_postcode: (_m = (_l = (_k = paymentData.paymentMethodData) === null || _k === void 0 ? void 0 : _k.info) === null || _l === void 0 ? void 0 : _l.billingAddress) === null || _m === void 0 ? void 0 : _m.postalCode, address_state: (_q = (_p = (_o = paymentData.paymentMethodData) === null || _o === void 0 ? void 0 : _o.info) === null || _p === void 0 ? void 0 : _p.billingAddress) === null || _q === void 0 ? void 0 : _q.administrativeArea, ref_token: paymentData.paymentMethodData.tokenizationData.token })
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 })
6121
6128
  } }, _this4.isShippingRequired() && {
6122
- 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: (_r = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _r === void 0 ? void 0 : _r.countryCode, address_city: (_s = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _s === void 0 ? void 0 : _s.locality, address_postcode: (_t = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _t === void 0 ? void 0 : _t.postalCode, address_state: (_u = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _u === void 0 ? void 0 : _u.administrativeArea, contact: {
6123
- first_name: (_v = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _v === void 0 ? void 0 : _v.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,
6124
6131
  email: paymentData === null || paymentData === void 0 ? void 0 : paymentData.email,
6125
- phone: (_w = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _w === void 0 ? void 0 : _w.phoneNumber
6132
+ phone: (_v = paymentData === null || paymentData === void 0 ? void 0 : paymentData.shippingAddress) === null || _v === void 0 ? void 0 : _v.phoneNumber
6126
6133
  } })
6127
6134
  }),
6128
6135
  onSuccess: function onSuccess() {
@@ -6264,7 +6271,7 @@
6264
6271
 
6265
6272
  this.auth = auth;
6266
6273
  this.authType = authType || this.setAuthType();
6267
- 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_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.' }]);
6268
6275
  }
6269
6276
  /**
6270
6277
  * Current method can change environment. By default environment = sandbox.
@@ -7399,7 +7406,7 @@
7399
7406
  var _this = this;
7400
7407
 
7401
7408
  this.iFrameEvent.on(EVENT.CHARGE_AUTH, widgetId, function (data) {
7402
- if (data.status === "MethodSkipped" /* SKIPPED */ || data.status === "MethodFinished" /* FINISHED */) _this.performAuthentication(data);
7409
+ if (data.status === "MethodSkipped" /* SKIPPED */ || data.status === "MethodFinished" /* FINISHED */) _this.performAuthentication(data);else if (data.status === "AuthTimedOut" /* TIMEOUT */ || data.status === "invalid_event" /* INVALID */) _this.eventEmitter.emit(GPAYMENTS_EVENT.AUTH_ERROR, _this.parseHandleResponse({ status: data.status }, data.charge_3ds_id));
7403
7410
  });
7404
7411
  this.iFrameEvent.on(EVENT.CHARGE_AUTH_SUCCESS, widgetId, function (data) {
7405
7412
  _this.processResult(data.charge_3ds_id);