@paydock/client-sdk 1.10.82-beta → 1.10.83-beta-02
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 +1 -1
- package/bundles/widget.umd.js +29 -17
- package/bundles/widget.umd.min.js +1 -1
- package/inicialization-guide.md +7 -0
- package/lib/api/api-base.js +3 -0
- package/lib/api/api-base.js.map +1 -1
- package/lib/canvas-3ds/services/gpayments-service.js +1 -1
- package/lib/canvas-3ds/services/gpayments-service.js.map +1 -1
- package/lib/checkout-button/runner.js +3 -0
- package/lib/checkout-button/runner.js.map +1 -1
- package/lib/checkout-button/zipmoney.runner.js +5 -1
- package/lib/checkout-button/zipmoney.runner.js.map +1 -1
- package/lib/components/dispatcher.js +3 -0
- package/lib/components/dispatcher.js.map +1 -1
- package/lib/components/env.d.ts +3 -0
- package/lib/components/env.js +3 -0
- package/lib/components/env.js.map +1 -1
- package/lib/components/http-core.js +3 -0
- package/lib/components/http-core.js.map +1 -1
- package/lib/components/link.js +3 -0
- package/lib/components/link.js.map +1 -1
- package/lib/components/param.d.ts +2 -0
- package/lib/components/param.js.map +1 -1
- package/lib/payment-source-widget/payment-source-widget.d.ts +1 -1
- package/lib/payment-source-widget/payment-source-widget.js +3 -2
- package/lib/payment-source-widget/payment-source-widget.js.map +1 -1
- package/lib/wallet-buttons/flypay.wallet-service.js +2 -2
- package/lib/wallet-buttons/flypay.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/google.wallet-service.js +2 -3
- package/lib/wallet-buttons/google.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/mastercard.wallet-service.d.ts +1 -0
- package/lib/wallet-buttons/mastercard.wallet-service.js +4 -0
- package/lib/wallet-buttons/mastercard.wallet-service.js.map +1 -1
- package/lib/wallet-buttons/wallet-buttons.js +2 -2
- package/lib/wallet-buttons/wallet-buttons.js.map +1 -1
- package/lib/wallet-buttons/wallet-service.d.ts +1 -0
- package/lib/wallet-buttons/wallet-service.js.map +1 -1
- package/lib/widget/configuration.js +3 -0
- package/lib/widget/configuration.js.map +1 -1
- package/package.json +1 -1
- package/slate.md +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The SDK supports methods for customization of widget by your needs (styling, for
|
|
|
8
8
|
|
|
9
9
|
## Other information
|
|
10
10
|
|
|
11
|
-
To work with the widget you will need public_key ([see Authentication](https://docs.paydock.com/#authentication))
|
|
11
|
+
To work with the widget you will need public_key or access_token ([see Authentication](https://docs.paydock.com/#authentication))
|
|
12
12
|
|
|
13
13
|
Also you will need added gateway ([see API Reference by gateway](https://docs.paydock.com/#gateways))
|
|
14
14
|
|
package/bundles/widget.umd.js
CHANGED
|
@@ -230,7 +230,10 @@
|
|
|
230
230
|
STAGING_2: 'staging_2',
|
|
231
231
|
STAGING_3: 'staging_3',
|
|
232
232
|
STAGING_4: 'staging_4',
|
|
233
|
-
STAGING_5: 'staging_5'
|
|
233
|
+
STAGING_5: 'staging_5',
|
|
234
|
+
STAGING_CBA: 'staging_cba',
|
|
235
|
+
SANDBOX_CBA: 'sandbox_cba',
|
|
236
|
+
PROD_CBA: 'production_cba'
|
|
234
237
|
};
|
|
235
238
|
var KOVENA_ENV = [ENV.SANDBOX_KOVENA, ENV.SANDBOX_DEMO_KOVENA];
|
|
236
239
|
var REGEX_ALIAS = '^([a-zA-Z0-9](?:(?:[a-zA-Z0-9-.]*(?!-)\\.(?![-.]))*[a-zA-Z0-9]+)?)$';
|
|
@@ -347,7 +350,7 @@
|
|
|
347
350
|
this.params = {};
|
|
348
351
|
this.widgetId = Uuid.generate();
|
|
349
352
|
this.linkResource = linkResource;
|
|
350
|
-
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.' }]);
|
|
353
|
+
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.' }]);
|
|
351
354
|
this.setParams({ widget_id: this.widgetId });
|
|
352
355
|
}
|
|
353
356
|
|
|
@@ -559,7 +562,7 @@
|
|
|
559
562
|
|
|
560
563
|
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');
|
|
561
564
|
if (ObjectHelper.values(PURPOSE).indexOf(purpose) === -1) throw new Error('unsupported purpose');
|
|
562
|
-
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.' }]);
|
|
565
|
+
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.' }]);
|
|
563
566
|
this.configs = {
|
|
564
567
|
purpose: purpose,
|
|
565
568
|
meta: {},
|
|
@@ -2357,7 +2360,7 @@
|
|
|
2357
2360
|
function HttpCore() {
|
|
2358
2361
|
classCallCheck(this, HttpCore);
|
|
2359
2362
|
|
|
2360
|
-
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.' }]);
|
|
2363
|
+
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.' }]);
|
|
2361
2364
|
}
|
|
2362
2365
|
|
|
2363
2366
|
createClass(HttpCore, [{
|
|
@@ -2858,7 +2861,7 @@
|
|
|
2858
2861
|
this.background.onTrigger(TRIGGER$1.CLOSE, function () {
|
|
2859
2862
|
return _this.stop();
|
|
2860
2863
|
});
|
|
2861
|
-
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.' }]);
|
|
2864
|
+
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.' }]);
|
|
2862
2865
|
}
|
|
2863
2866
|
|
|
2864
2867
|
createClass(Runner, [{
|
|
@@ -3958,7 +3961,7 @@
|
|
|
3958
3961
|
_this.checkout = null;
|
|
3959
3962
|
_this.runs = false;
|
|
3960
3963
|
_this.eventEmitter = new EventEmitter();
|
|
3961
|
-
_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.' }]);
|
|
3964
|
+
_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.' }]);
|
|
3962
3965
|
return _this;
|
|
3963
3966
|
}
|
|
3964
3967
|
|
|
@@ -3981,7 +3984,7 @@
|
|
|
3981
3984
|
this.background.clear();
|
|
3982
3985
|
this.checkout = checkoutData;
|
|
3983
3986
|
var checkoutLink = String(ECHO_LINK);
|
|
3984
|
-
checkoutLink = Url.extendSearchParams(checkoutLink, 'public_key', this.publicKey);
|
|
3987
|
+
checkoutLink = Url.extendSearchParams(checkoutLink, AccessToken.validateJWT(this.publicKey) ? 'access_token' : 'public_key', this.publicKey);
|
|
3985
3988
|
checkoutLink = Url.extendSearchParams(checkoutLink, 'json_body', encodeURIComponent(JSON.stringify({
|
|
3986
3989
|
redirect_uri: this.checkout.link
|
|
3987
3990
|
})));
|
|
@@ -4114,7 +4117,7 @@
|
|
|
4114
4117
|
classCallCheck(this, Dispatcher);
|
|
4115
4118
|
|
|
4116
4119
|
this.messageSource = messageSource;
|
|
4117
|
-
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.' }]);
|
|
4120
|
+
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.' }]);
|
|
4118
4121
|
}
|
|
4119
4122
|
|
|
4120
4123
|
createClass(Dispatcher, [{
|
|
@@ -5060,12 +5063,13 @@
|
|
|
5060
5063
|
currency = meta.currency,
|
|
5061
5064
|
id = meta.id,
|
|
5062
5065
|
gateway_mode = meta.gateway_mode,
|
|
5066
|
+
reference = meta.reference,
|
|
5063
5067
|
request_shipping = meta.request_shipping;
|
|
5064
5068
|
|
|
5065
5069
|
_this.link.setParams(_extends({ token: token,
|
|
5066
5070
|
amount: amount,
|
|
5067
5071
|
currency: currency,
|
|
5068
|
-
gateway_mode: gateway_mode, credentials: id }, request_shipping ? { request_shipping: request_shipping } : {}));
|
|
5072
|
+
gateway_mode: gateway_mode, credentials: reference || id }, request_shipping ? { request_shipping: request_shipping } : {}));
|
|
5069
5073
|
_this.token = token;
|
|
5070
5074
|
_this.event = new FlypayIframeEvent(window);
|
|
5071
5075
|
return _this;
|
|
@@ -5987,7 +5991,7 @@
|
|
|
5987
5991
|
googlePayJs.src = "https://pay.google.com/gp/p/js/pay.js";
|
|
5988
5992
|
googlePayJs.async = true;
|
|
5989
5993
|
googlePayJs.onload = function () {
|
|
5990
|
-
var _a, _b, _c;
|
|
5994
|
+
var _a, _b, _c, _d;
|
|
5991
5995
|
if (!window.google) {
|
|
5992
5996
|
_this2.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE, { wallet: WALLET_TYPE.GOOGLE });
|
|
5993
5997
|
reject();
|
|
@@ -6003,7 +6007,7 @@
|
|
|
6003
6007
|
onPaymentDataChanged: function onPaymentDataChanged(intermediatePaymentData) {
|
|
6004
6008
|
return _this2.onPaymentDataChanged(intermediatePaymentData);
|
|
6005
6009
|
}
|
|
6006
|
-
}) }, _this2.
|
|
6010
|
+
}) }, ((_d = _this2.meta) === null || _d === void 0 ? void 0 : _d.gateway_mode) === 'live' ? { environment: "PRODUCTION" } : { environment: "TEST" }));
|
|
6007
6011
|
_this2.checkAvailability().then(function (available) {
|
|
6008
6012
|
if (!available) {
|
|
6009
6013
|
_this2.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE, { wallet: WALLET_TYPE.GOOGLE });
|
|
@@ -6213,6 +6217,14 @@
|
|
|
6213
6217
|
value: function getGatewayName() {
|
|
6214
6218
|
return WALLET_GATEWAY.MASTERCARD;
|
|
6215
6219
|
}
|
|
6220
|
+
}, {
|
|
6221
|
+
key: "setEnv",
|
|
6222
|
+
value: function setEnv(env) {
|
|
6223
|
+
this.childWallets.forEach(function (child) {
|
|
6224
|
+
return child.setEnv(env);
|
|
6225
|
+
});
|
|
6226
|
+
return this;
|
|
6227
|
+
}
|
|
6216
6228
|
}, {
|
|
6217
6229
|
key: "update",
|
|
6218
6230
|
value: function update(data) {
|
|
@@ -6235,7 +6247,7 @@
|
|
|
6235
6247
|
|
|
6236
6248
|
this.auth = auth;
|
|
6237
6249
|
this.authType = authType || this.setAuthType();
|
|
6238
|
-
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.' }]);
|
|
6250
|
+
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.' }]);
|
|
6239
6251
|
}
|
|
6240
6252
|
/**
|
|
6241
6253
|
* Current method can change environment. By default environment = sandbox.
|
|
@@ -6493,13 +6505,13 @@
|
|
|
6493
6505
|
this.service = new StripeWalletService(tokenMeta.credentials.client_auth, _extends(_extends({}, meta), { amount: tokenMeta.charge.amount, currency: tokenMeta.charge.currency }));
|
|
6494
6506
|
break;
|
|
6495
6507
|
case WALLET_GATEWAY.FLYPAY:
|
|
6496
|
-
this.service = new FlypayWalletService(chargeToken, _extends(_extends({}, meta), { id: tokenMeta.charge.id, gateway_mode: tokenMeta.gateway.mode, amount: tokenMeta.charge.amount, currency: tokenMeta.charge.currency }));
|
|
6508
|
+
this.service = new FlypayWalletService(chargeToken, _extends(_extends({}, meta), { id: tokenMeta.charge.id, gateway_mode: tokenMeta.gateway.mode, amount: tokenMeta.charge.amount, currency: tokenMeta.charge.currency, reference: tokenMeta.charge.reference }));
|
|
6497
6509
|
break;
|
|
6498
6510
|
case WALLET_GATEWAY.PAYPAL:
|
|
6499
6511
|
this.service = new PaypalWalletService(tokenMeta.credentials.client_auth, _extends(_extends({}, meta), { id: tokenMeta.charge.id, gateway_mode: tokenMeta.gateway.mode, amount: tokenMeta.charge.amount, currency: tokenMeta.charge.currency, capture: tokenMeta.charge.capture }));
|
|
6500
6512
|
break;
|
|
6501
6513
|
case WALLET_GATEWAY.MASTERCARD:
|
|
6502
|
-
this.service = new MastercardWalletService('', _extends(_extends({}, meta), { credentials: tokenMeta.gateway.credentials, amount: tokenMeta.charge.amount, currency: tokenMeta.charge.currency }));
|
|
6514
|
+
this.service = new MastercardWalletService('', _extends(_extends({}, meta), { credentials: tokenMeta.gateway.credentials, amount: tokenMeta.charge.amount, currency: tokenMeta.charge.currency, gateway_mode: tokenMeta.gateway.mode }));
|
|
6503
6515
|
break;
|
|
6504
6516
|
}
|
|
6505
6517
|
}
|
|
@@ -6915,13 +6927,13 @@
|
|
|
6915
6927
|
* var widget = new PaymentSourceWidget('publicKey', customerReference, true);
|
|
6916
6928
|
**/
|
|
6917
6929
|
var PaymentSourceWidget = function () {
|
|
6918
|
-
function PaymentSourceWidget(
|
|
6930
|
+
function PaymentSourceWidget(accessToken, queryToken) {
|
|
6919
6931
|
classCallCheck(this, PaymentSourceWidget);
|
|
6920
6932
|
|
|
6921
6933
|
this.configs = [];
|
|
6922
6934
|
this.configTokens = [];
|
|
6923
6935
|
this.link = new Link(PAYMENT_SOURCE_LINK);
|
|
6924
|
-
this.link.setParams({
|
|
6936
|
+
this.link.setParams(_extends({ query_token: queryToken }, AccessToken.validateJWT(accessToken) ? { access_token: accessToken } : { public_key: accessToken }));
|
|
6925
6937
|
}
|
|
6926
6938
|
/**
|
|
6927
6939
|
* Object contain styles for widget
|
|
@@ -7343,7 +7355,7 @@
|
|
|
7343
7355
|
var _this = this;
|
|
7344
7356
|
|
|
7345
7357
|
this.iFrameEvent.on(EVENT.CHARGE_AUTH, widgetId, function (data) {
|
|
7346
|
-
if (data.status === "MethodSkipped" /* SKIPPED */) _this.performAuthentication(data);
|
|
7358
|
+
if (data.status === "MethodSkipped" /* SKIPPED */ || data.status === "MethodFinished" /* FINISHED */) _this.performAuthentication(data);
|
|
7347
7359
|
});
|
|
7348
7360
|
this.iFrameEvent.on(EVENT.CHARGE_AUTH_SUCCESS, widgetId, function (data) {
|
|
7349
7361
|
_this.processResult(data.charge_3ds_id);
|