@paydock/client-sdk 1.102.0-beta → 1.102.1-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 +8 -2
- package/bundles/widget.umd.js +24 -22
- package/bundles/widget.umd.min.js +1 -1
- package/lib/canvas-3ds/canvas-3ds.d.ts +1 -1
- package/lib/canvas-3ds/canvas-3ds.js +1 -1
- package/lib/canvas-3ds/canvas-3ds.js.map +1 -1
- package/lib/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -1
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js +1 -1
- package/lib/checkout-button/afterpay/afterpay-checkout-button.js.map +1 -1
- package/lib/checkout-button/checkout-button.d.ts +1 -1
- package/lib/checkout-button/checkout-button.js +1 -1
- package/lib/checkout-button/checkout-button.js.map +1 -1
- package/lib/checkout-button/paypal/paypal-checkout-button.d.ts +1 -1
- package/lib/checkout-button/paypal/paypal-checkout-button.js +1 -1
- package/lib/checkout-button/paypal/paypal-checkout-button.js.map +1 -1
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -1
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js +1 -1
- package/lib/checkout-button/zipmoney/zipmoney-checkout-button.js.map +1 -1
- package/lib/components/background.d.ts +1 -1
- package/lib/components/background.js +4 -4
- package/lib/components/background.js.map +1 -1
- package/lib/components/param.d.ts +0 -4
- package/lib/components/param.js.map +1 -1
- package/lib/configs/sdk.js +1 -1
- package/lib/payment-source-widget/html-payment-source-widget.d.ts +1 -1
- package/lib/payment-source-widget/html-payment-source-widget.js +1 -1
- package/lib/payment-source-widget/html-payment-source-widget.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 +1 -1
- package/lib/payment-source-widget/payment-source-widget.js.map +1 -1
- package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +1 -1
- package/lib/secure-remote-commerce/secure-remote-commerce.js +1 -1
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -1
- package/lib/vault-display-widget/vault-display-widget.d.ts +1 -1
- package/lib/vault-display-widget/vault-display-widget.js +1 -1
- package/lib/vault-display-widget/vault-display-widget.js.map +1 -1
- package/lib/wallet-buttons/wallet-buttons.d.ts +4 -2
- package/lib/wallet-buttons/wallet-buttons.js +4 -2
- package/lib/wallet-buttons/wallet-buttons.js.map +1 -1
- package/lib/widget/configuration.d.ts +3 -3
- package/lib/widget/configuration.js +5 -5
- package/lib/widget/configuration.js.map +1 -1
- package/lib/widget/html-multi-widget.d.ts +1 -1
- package/lib/widget/html-multi-widget.js +1 -1
- package/lib/widget/html-multi-widget.js.map +1 -1
- package/lib/widget/html-widget.d.ts +1 -1
- package/lib/widget/html-widget.js +1 -1
- package/lib/widget/html-widget.js.map +1 -1
- package/lib/widget/multi-widget.d.ts +1 -1
- package/lib/widget/multi-widget.js +1 -1
- package/lib/widget/multi-widget.js.map +1 -1
- package/package.json +1 -1
- package/slate.md +6 -2
package/README.md
CHANGED
|
@@ -2398,7 +2398,7 @@ _(Required `meta` fields: - . Optional `meta` fields: `request_shipping`, `pay_l
|
|
|
2398
2398
|
|
|
2399
2399
|
This example shows how to use these functions for **Flypay v2 Wallet**.
|
|
2400
2400
|
_(Required `meta` fields: - . Optional `meta` fields: -)_
|
|
2401
|
-
### Full example
|
|
2401
|
+
### Flypay V2 Full example
|
|
2402
2402
|
```html
|
|
2403
2403
|
<!DOCTYPE html>
|
|
2404
2404
|
<html lang="en">
|
|
@@ -2415,12 +2415,16 @@ _(Required `meta` fields: - . Optional `meta` fields: -)_
|
|
|
2415
2415
|
let button = new paydock.WalletButtons(
|
|
2416
2416
|
"#widget",
|
|
2417
2417
|
charge_token,
|
|
2418
|
-
{
|
|
2418
|
+
{
|
|
2419
|
+
access_token: 'TOKEN',
|
|
2420
|
+
refresh_token: 'TOKEN',
|
|
2421
|
+
},
|
|
2419
2422
|
);
|
|
2420
2423
|
button.setEnv('sandbox');
|
|
2421
2424
|
button.onUnavailable(() => console.log("No wallet buttons available"));
|
|
2422
2425
|
button.onPaymentSuccessful((data) => console.log("The payment was successful"));
|
|
2423
2426
|
button.onPaymentError((data) => console.log("The payment was not successful"));
|
|
2427
|
+
button.onAuthTokensChanged((data) => console.log('Authentication tokens changed'));
|
|
2424
2428
|
button.load();
|
|
2425
2429
|
</script>
|
|
2426
2430
|
</html>
|
|
@@ -2677,6 +2681,8 @@ Interface of data used by the wallet checkout and payment proccess.
|
|
|
2677
2681
|
| [request_payer_name] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
|
2678
2682
|
| [request_payer_email] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
|
2679
2683
|
| [request_payer_phone] | <code>boolean</code> | Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets. |
|
|
2684
|
+
| [access_token] | <code>string</code> | Used for Flypay V2 express flow. Optional for [Flypay V2]. N/A for other wallets. |
|
|
2685
|
+
| [refresh_token] | <code>string</code> | Used for Flypay V2 express flow. Optional for [Flypay V2]. N/A for other wallets. |
|
|
2680
2686
|
| [request_shipping] | <code>boolean</code> | Used to request or not shipping address in the Wallet checkout, being able to handle amount changes via the `update` event. Optional for [FlyPay, PayPal, ApplePay, GooglePay]. N/A for [Flypay V2, Stripe, Afterpay]. |
|
|
2681
2687
|
| [shipping_options] | [<code>Array.<IApplePayShippingOption></code>](#IApplePayShippingOption) \| [<code>Array.<IPayPalShippingOption></code>](#IPayPalShippingOption) | Used to provide available shipping options.(To use shipping_options the request_shipping flag should be true). Optional for [ApplePay]. N/A for the other wallets. |
|
|
2682
2688
|
| [merchant_name] | <code>string</code> | Merchant Name used for GooglePay integration via MPGS. Required for [GooglePay]. N/A for other wallets. |
|
package/bundles/widget.umd.js
CHANGED
|
@@ -684,7 +684,7 @@
|
|
|
684
684
|
// the empty string is set in case if version not provided.
|
|
685
685
|
//
|
|
686
686
|
// e.g: grunt build --sdk-version=v1.0.0
|
|
687
|
-
SDK._version = 'v1.102.
|
|
687
|
+
SDK._version = 'v1.102.1-beta';
|
|
688
688
|
|
|
689
689
|
var ENV = {
|
|
690
690
|
SANDBOX: 'sandbox',
|
|
@@ -1182,7 +1182,7 @@
|
|
|
1182
1182
|
* @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.
|
|
1183
1183
|
* @param {string} paymentType - Type of payment source which shows in widget form. Available parameters [PAYMENT_TYPE]{@link PAYMENT_TYPE}
|
|
1184
1184
|
* @param {string} purpose - Param which describes payment purpose. By default uses Available parameters [PURPOSE]{@link PURPOSE}
|
|
1185
|
-
|
|
1185
|
+
*/
|
|
1186
1186
|
var Configuration = /*#__PURE__*/function () {
|
|
1187
1187
|
function Configuration() {
|
|
1188
1188
|
var gatewayID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
|
|
@@ -1199,8 +1199,8 @@
|
|
|
1199
1199
|
predefined_fields: {
|
|
1200
1200
|
gateway_id: gatewayID,
|
|
1201
1201
|
type: paymentType,
|
|
1202
|
-
|
|
1203
|
-
|
|
1202
|
+
card_scheme: null,
|
|
1203
|
+
card_processing_network: null
|
|
1204
1204
|
}
|
|
1205
1205
|
};
|
|
1206
1206
|
}
|
|
@@ -1376,8 +1376,8 @@
|
|
|
1376
1376
|
value: function setGiftCardSchemeData(giftCardScheme, processingNetwork) {
|
|
1377
1377
|
if (this.configs.predefined_fields.type !== PAYMENT_TYPE.GIFT_CARD) throw new Error('unsupported payment type');
|
|
1378
1378
|
if (!giftCardScheme || !processingNetwork) throw new Error('');
|
|
1379
|
-
this.configs.predefined_fields.
|
|
1380
|
-
this.configs.predefined_fields.
|
|
1379
|
+
this.configs.predefined_fields.card_scheme = giftCardScheme;
|
|
1380
|
+
this.configs.predefined_fields.card_processing_network = processingNetwork;
|
|
1381
1381
|
}
|
|
1382
1382
|
}], [{
|
|
1383
1383
|
key: "createEachToken",
|
|
@@ -1616,7 +1616,7 @@
|
|
|
1616
1616
|
* Configuration('gatewayId'),
|
|
1617
1617
|
* Configuration('gatewayId', 'bank_account')
|
|
1618
1618
|
* ]);
|
|
1619
|
-
|
|
1619
|
+
*/
|
|
1620
1620
|
var MultiWidget = /*#__PURE__*/function () {
|
|
1621
1621
|
function MultiWidget(accessToken, conf) {
|
|
1622
1622
|
_classCallCheck(this, MultiWidget);
|
|
@@ -2513,7 +2513,7 @@
|
|
|
2513
2513
|
* Configuration('gatewayId'),
|
|
2514
2514
|
* Configuration('gatewayId', 'bank_account')
|
|
2515
2515
|
* ]);
|
|
2516
|
-
|
|
2516
|
+
*/
|
|
2517
2517
|
var HtmlMultiWidget = /*#__PURE__*/function (_MultiWidget) {
|
|
2518
2518
|
_inherits(HtmlMultiWidget, _MultiWidget);
|
|
2519
2519
|
var _super = _createSuper(HtmlMultiWidget);
|
|
@@ -2854,7 +2854,7 @@
|
|
|
2854
2854
|
* @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.
|
|
2855
2855
|
* @param {string} [paymentType=card] - Type of payment source which shows in widget form. Available parameters : “card”, “bank_account”.
|
|
2856
2856
|
* @param {string} [purpose=payment_source] - Purpose of widget form. Available parameters: ‘payment_source’, ‘card_payment_source_with_cvv’, ‘card_payment_source_without_cvv’
|
|
2857
|
-
|
|
2857
|
+
*/
|
|
2858
2858
|
var HtmlWidget = /*#__PURE__*/function (_HtmlMultiWidget) {
|
|
2859
2859
|
_inherits(HtmlWidget, _HtmlMultiWidget);
|
|
2860
2860
|
var _super = _createSuper(HtmlWidget);
|
|
@@ -3337,13 +3337,13 @@
|
|
|
3337
3337
|
FOCUS: 'focus'
|
|
3338
3338
|
};
|
|
3339
3339
|
var TEMPLATE$1 = "\n <div class=\"checkout-container\">\n <strong class=\"checkout-title\" data-title>{{title}}</strong>\n <p data-description>{{description}}</p>\n <a href=\"#\" data-continue>Continue</a>\n <a href=\"#\" data-close>Close</a>\n </div>\n";
|
|
3340
|
-
var STYLES = "\n .hide-continue-button [data-continue] {\n display: none;\n }\n
|
|
3340
|
+
var STYLES = "\n .hide-continue-button [data-continue] {\n display: none;\n }\n\n .checkout-overlay .cs-loader-inner {\n color: #ddd;\n }\n\n .checkout-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0,0,0, 0.5);\n text-align: center;\n color: #fff;\n opacity: 0;\n }\n .checkout-overlay.display {\n opacity: 1;\n transition: opacity 0.7s ease-out;\n }\n .checkout-overlay a { color: #00f; }\n .checkout-container {\n position: absolute;\n top: 50%;\n left: 0;\n width: 100%;\n margin-top: -{{width}}px;\n }\n .checkout-title {\n font-size: 24px;\n display: block;\n text-transform: uppercase;\n }\n [data-close] {\n position: fixed;\n right: 32px;\n top: 32px;\n width: 32px;\n height: 32px;\n opacity: 0.3;\n overflow: hidden;\n text-indent: -9999px;\n }\n [data-close]:hover { opacity: 1; }\n [data-close]:before, [data-close]:after {\n position: absolute;\n left: 15px;\n content: ' ';\n height: 33px;\n width: 2px;\n background-color: #00f;\n }\n [data-close]:before { transform: rotate(45deg); }\n [data-close]:after { transform: rotate(-45deg); }\n";
|
|
3341
3341
|
/**
|
|
3342
3342
|
* Class Background create overlay for checkout
|
|
3343
3343
|
*
|
|
3344
3344
|
* @example
|
|
3345
3345
|
* var overlay = new Background();
|
|
3346
|
-
|
|
3346
|
+
*/
|
|
3347
3347
|
var Background = /*#__PURE__*/function () {
|
|
3348
3348
|
function Background() {
|
|
3349
3349
|
_classCallCheck(this, Background);
|
|
@@ -6016,7 +6016,7 @@
|
|
|
6016
6016
|
* @param {string} [type=PaypalClassic] - Type of gateway (PaypalClassic, Zipmoney)
|
|
6017
6017
|
* @example
|
|
6018
6018
|
* var widget = new CheckoutButton('#button', 'accessToken','gatewayId');
|
|
6019
|
-
|
|
6019
|
+
*/
|
|
6020
6020
|
var CheckoutButton = /*#__PURE__*/function () {
|
|
6021
6021
|
function CheckoutButton(selector, accessToken) {
|
|
6022
6022
|
var gatewayId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default';
|
|
@@ -6294,7 +6294,7 @@
|
|
|
6294
6294
|
* @param {string} [gatewayId=default] - Checkout mode, it could be set to 'contextual' or 'redirect'. By default it 'contextual'
|
|
6295
6295
|
* @example
|
|
6296
6296
|
* var widget = new ZipmoneyCheckoutButton('#button', 'publicKey','gatewayId');
|
|
6297
|
-
|
|
6297
|
+
*/
|
|
6298
6298
|
var ZipmoneyCheckoutButton = /*#__PURE__*/function (_CheckoutButton) {
|
|
6299
6299
|
_inherits(ZipmoneyCheckoutButton, _CheckoutButton);
|
|
6300
6300
|
var _super = _createSuper(ZipmoneyCheckoutButton);
|
|
@@ -6369,7 +6369,7 @@
|
|
|
6369
6369
|
* @param {string} [gatewayId=default] - PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway
|
|
6370
6370
|
* @example
|
|
6371
6371
|
* var widget = new AfterpayCheckoutButton('#button', 'access-token','gatewayId');
|
|
6372
|
-
|
|
6372
|
+
*/
|
|
6373
6373
|
var AfterpayCheckoutButton = /*#__PURE__*/function (_CheckoutButton) {
|
|
6374
6374
|
_inherits(AfterpayCheckoutButton, _CheckoutButton);
|
|
6375
6375
|
var _super = _createSuper(AfterpayCheckoutButton);
|
|
@@ -6426,7 +6426,7 @@
|
|
|
6426
6426
|
* @param {string} [gatewayId=default] - PayDock's gatewayId. By default or if put 'default', it will use the selected default gateway
|
|
6427
6427
|
* @example
|
|
6428
6428
|
* var widget = new PaypalCheckoutButton('#button', 'publicKey','gatewayId');
|
|
6429
|
-
|
|
6429
|
+
*/
|
|
6430
6430
|
var PaypalCheckoutButton = /*#__PURE__*/function (_CheckoutButton) {
|
|
6431
6431
|
_inherits(PaypalCheckoutButton, _CheckoutButton);
|
|
6432
6432
|
var _super = _createSuper(PaypalCheckoutButton);
|
|
@@ -8781,6 +8781,8 @@
|
|
|
8781
8781
|
* @param {boolean} [request_payer_name] Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets.
|
|
8782
8782
|
* @param {boolean} [request_payer_email] Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets.
|
|
8783
8783
|
* @param {boolean} [request_payer_phone] Used mainly for fraud purposes - recommended set to true. Optional for [Stripe]. N/A for other wallets.
|
|
8784
|
+
* @param {string} [access_token] Used for Flypay V2 express flow. Optional for [Flypay V2]. N/A for other wallets.
|
|
8785
|
+
* @param {string} [refresh_token] Used for Flypay V2 express flow. Optional for [Flypay V2]. N/A for other wallets.
|
|
8784
8786
|
* @param {boolean} [request_shipping] Used to request or not shipping address in the Wallet checkout, being able to handle amount changes via the `update` event. Optional for [FlyPay, PayPal, ApplePay, GooglePay]. N/A for [Flypay V2, Stripe, Afterpay].
|
|
8785
8787
|
* @param {IApplePayShippingOption[] | IPayPalShippingOption[]} [shipping_options] Used to provide available shipping options.(To use shipping_options the request_shipping flag should be true). Optional for [ApplePay]. N/A for the other wallets.
|
|
8786
8788
|
* @param {string} [merchant_name] Merchant Name used for GooglePay integration via MPGS. Required for [GooglePay]. N/A for other wallets.
|
|
@@ -8835,8 +8837,8 @@
|
|
|
8835
8837
|
*
|
|
8836
8838
|
* @param {string} selector - Selector of html element. Container for the WalletButtons.
|
|
8837
8839
|
* @param {string} chargeToken - token for the wallet transaction, created with a secure call to `POST charges/wallet`.
|
|
8838
|
-
* @param {IWalletMeta}
|
|
8839
|
-
|
|
8840
|
+
* @param {IWalletMeta} meta - data that configures the E-Wallet, which can be shown on checkout page and configures required customer information.
|
|
8841
|
+
*/
|
|
8840
8842
|
var WalletButtons = /*#__PURE__*/function () {
|
|
8841
8843
|
function WalletButtons(selector, chargeToken, meta) {
|
|
8842
8844
|
_classCallCheck(this, WalletButtons);
|
|
@@ -9343,7 +9345,7 @@
|
|
|
9343
9345
|
* var widget = new PaymentSourceWidget('publicKey','customerId');
|
|
9344
9346
|
* // or
|
|
9345
9347
|
* var widget = new PaymentSourceWidget('publicKey', customerReference, true);
|
|
9346
|
-
|
|
9348
|
+
*/
|
|
9347
9349
|
var PaymentSourceWidget = /*#__PURE__*/function () {
|
|
9348
9350
|
function PaymentSourceWidget(accessToken, queryToken) {
|
|
9349
9351
|
_classCallCheck(this, PaymentSourceWidget);
|
|
@@ -9594,7 +9596,7 @@
|
|
|
9594
9596
|
* @example
|
|
9595
9597
|
* * var widget = new HtmlPaymentSourceWidget('#widget', 'publicKey','queryToken');
|
|
9596
9598
|
|
|
9597
|
-
|
|
9599
|
+
*/
|
|
9598
9600
|
var HtmlPaymentSourceWidget = /*#__PURE__*/function (_PaymentSourceWidget) {
|
|
9599
9601
|
_inherits(HtmlPaymentSourceWidget, _PaymentSourceWidget);
|
|
9600
9602
|
var _super = _createSuper(HtmlPaymentSourceWidget);
|
|
@@ -9969,7 +9971,7 @@
|
|
|
9969
9971
|
* var widget = new Canvas3ds('#widget', 'token');
|
|
9970
9972
|
*
|
|
9971
9973
|
*
|
|
9972
|
-
|
|
9974
|
+
*/
|
|
9973
9975
|
var Canvas3ds = /*#__PURE__*/function () {
|
|
9974
9976
|
function Canvas3ds(selector, token) {
|
|
9975
9977
|
_classCallCheck(this, Canvas3ds);
|
|
@@ -10265,7 +10267,7 @@
|
|
|
10265
10267
|
*
|
|
10266
10268
|
* @param {string} selector - Selector of html element. Container for widget
|
|
10267
10269
|
* @param {string} token - One time token
|
|
10268
|
-
|
|
10270
|
+
*/
|
|
10269
10271
|
var VaultDisplayWidget = /*#__PURE__*/function () {
|
|
10270
10272
|
function VaultDisplayWidget(selector, token) {
|
|
10271
10273
|
_classCallCheck(this, VaultDisplayWidget);
|
|
@@ -10628,7 +10630,7 @@
|
|
|
10628
10630
|
* @example
|
|
10629
10631
|
* var SRC = new SRC('#checkoutButton', '#checkoutIframe', 'service_id', 'public_key', {});
|
|
10630
10632
|
*
|
|
10631
|
-
|
|
10633
|
+
*/
|
|
10632
10634
|
var SRC = /*#__PURE__*/function () {
|
|
10633
10635
|
function SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta) {
|
|
10634
10636
|
_classCallCheck(this, SRC);
|