@paydock/client-sdk 1.116.0-beta → 1.117.0-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 +0 -39
- package/bundles/index.cjs +32 -92
- package/bundles/index.cjs.d.ts +2 -2
- package/bundles/index.mjs +32 -92
- package/bundles/index.mjs.d.ts +2 -2
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/additionals.d.ts +1 -1
- package/bundles/types/checkout/layout-widgets/additionals.d.ts.map +1 -1
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts +0 -1
- package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -1
- package/bundles/types/components/iframe.d.ts +2 -2
- package/bundles/types/components/iframe.d.ts.map +1 -1
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts +0 -1
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.interfaces.d.ts.map +1 -1
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts +0 -1
- package/bundles/types/paypal-save-payment-source/paypal-save-payment-source.service.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +0 -1
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +1 -5
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -1
- package/bundles/widget.umd.js +32 -92
- package/bundles/widget.umd.js.d.ts +2 -2
- package/bundles/widget.umd.js.min.d.ts +2 -2
- package/bundles/widget.umd.min.js +6 -6
- package/docs/click-to-pay-examples.md +0 -36
- package/docs/click-to-pay.md +0 -3
- package/package.json +1 -1
- package/slate.md +0 -36
package/README.md
CHANGED
|
@@ -7629,42 +7629,6 @@ src.setStyles({
|
|
|
7629
7629
|
});
|
|
7630
7630
|
```
|
|
7631
7631
|
|
|
7632
|
-
## Recognition token
|
|
7633
|
-
|
|
7634
|
-
In order to store user information for further payments, click to pay provides a recognition token that is used to load user information.
|
|
7635
|
-
If you already have a recognitionToken stored, you can use it in meta to load the user information.
|
|
7636
|
-
|
|
7637
|
-
### Storage suggestions
|
|
7638
|
-
Merchant can store the tokens by dropping the token as a 1st party cookie in the browser, and must ensure to manage all the security aspects around dropping/storing the cookie by following the security standards:
|
|
7639
|
-
|
|
7640
|
-
- `Expiration Date=` cookie should be set to expire at a max 180 days
|
|
7641
|
-
- `Secure` flag
|
|
7642
|
-
- `httpOnly` flag
|
|
7643
|
-
- `sameSite=` strict
|
|
7644
|
-
- `Value=` recognition token JWT
|
|
7645
|
-
|
|
7646
|
-
### Example code
|
|
7647
|
-
|
|
7648
|
-
```javascript
|
|
7649
|
-
var src = new paydock.ClickToPay(
|
|
7650
|
-
"#checkoutIframe",
|
|
7651
|
-
"service_id",
|
|
7652
|
-
"paydock_public_key",
|
|
7653
|
-
{
|
|
7654
|
-
"recognition_token": "eyJraWQiOiIy...",
|
|
7655
|
-
},
|
|
7656
|
-
);
|
|
7657
|
-
src.on('recognitionTokenRequested', (data) => {
|
|
7658
|
-
console.log('Recognition token was found: ' + data.data.recognitionToken);
|
|
7659
|
-
// Add recognition token to your store
|
|
7660
|
-
});
|
|
7661
|
-
|
|
7662
|
-
src.on('recognitionTokenDropped', () => {
|
|
7663
|
-
console.log('Recognition token was droped');
|
|
7664
|
-
// Delete recognition token from your store
|
|
7665
|
-
});
|
|
7666
|
-
```
|
|
7667
|
-
|
|
7668
7632
|
## Classes
|
|
7669
7633
|
|
|
7670
7634
|
<dl>
|
|
@@ -7745,7 +7709,6 @@ Interface of data used for the Mastercard Checkout. For further information refe
|
|
|
7745
7709
|
| [customer.phone.country_code] | <code>string</code> | Customer phone country code (example "1" for US). |
|
|
7746
7710
|
| [customer.phone.phone] | <code>string</code> | Customer phone number. |
|
|
7747
7711
|
| [unaccepted_card_type] | <code>string</code> | Used to block a specific card type. Options are 'CREDIT', 'DEBIT'. |
|
|
7748
|
-
| [recognition_token] | <code>string</code> | Used for Click to Pay to load user information and preferences. |
|
|
7749
7712
|
|
|
7750
7713
|
<a name="EventData" id="EventData" href="#EventData"> </a>
|
|
7751
7714
|
|
|
@@ -7988,8 +7951,6 @@ List of available event's name in the Click To Pay checkout lifecycle
|
|
|
7988
7951
|
| CHECKOUT_POPUP_CLOSE | <code>string</code> | <code>"checkoutPopupClose"</code> | Event sent when Click To Pay checkout flow is closed, regardless of embedded or windowed mode. |
|
|
7989
7952
|
| CHECKOUT_COMPLETED | <code>string</code> | <code>"checkoutCompleted"</code> | Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information. |
|
|
7990
7953
|
| CHECKOUT_ERROR | <code>string</code> | <code>"checkoutError"</code> | Event sent on error checkout by customer. Check [data](#EventData) for more information. |
|
|
7991
|
-
| RECOGNITION_TOKEN_REQUESTED | <code>string</code> | <code>"recognitionTokenRequested"</code> | Event sent when a recognition token was found on the mastercard SDK response. |
|
|
7992
|
-
| RECOGNITION_TOKEN_DROPPED | <code>string</code> | <code>"recognitionTokenDropped"</code> | Event sent when a recognition token needs to be dropped for user be no longer remembered. |
|
|
7993
7954
|
|
|
7994
7955
|
<a name="EVENT_DATA_TYPE" id="EVENT_DATA_TYPE" href="#EVENT_DATA_TYPE"> </a>
|
|
7995
7956
|
|
package/bundles/index.cjs
CHANGED
|
@@ -891,7 +891,7 @@ SDK.headerKeys = Object.freeze({
|
|
|
891
891
|
version: 'x-sdk-version',
|
|
892
892
|
type: 'x-sdk-type'
|
|
893
893
|
});
|
|
894
|
-
SDK._version = 'v1.
|
|
894
|
+
SDK._version = 'v1.117.0-beta';
|
|
895
895
|
|
|
896
896
|
/******************************************************************************
|
|
897
897
|
Copyright (c) Microsoft Corporation.
|
|
@@ -4223,6 +4223,10 @@ var ApiBase = /*#__PURE__*/function () {
|
|
|
4223
4223
|
request.onreadystatechange = function () {
|
|
4224
4224
|
if (_this2.stoppedPooling) return;
|
|
4225
4225
|
if (request.readyState === 4) {
|
|
4226
|
+
if (request.status === 403) {
|
|
4227
|
+
_this2.stoppedPooling = true;
|
|
4228
|
+
return;
|
|
4229
|
+
}
|
|
4226
4230
|
if (request.status === 200 || request.status === 201) {
|
|
4227
4231
|
var data = JSON.parse(request.responseText);
|
|
4228
4232
|
if (SessionHelper.sessionId !== data.resource.data.intent_id) {
|
|
@@ -4666,20 +4670,24 @@ var IFrame = /*#__PURE__*/function () {
|
|
|
4666
4670
|
key: "load",
|
|
4667
4671
|
value: function load(link) {
|
|
4668
4672
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4673
|
+
var iframeClass = arguments.length > 2 ? arguments[2] : undefined;
|
|
4669
4674
|
if (!this.container.isExist() || this.isExist()) return;
|
|
4670
4675
|
var iFrame = document.createElement('iframe');
|
|
4671
4676
|
iFrame.setAttribute('src', link);
|
|
4672
4677
|
if (options.title) iFrame.title = options.title;
|
|
4678
|
+
if (iframeClass) iFrame.classList.add(iframeClass);
|
|
4673
4679
|
this.container.getElement().appendChild(iFrame);
|
|
4674
4680
|
}
|
|
4675
4681
|
}, {
|
|
4676
4682
|
key: "loadFromHtml",
|
|
4677
4683
|
value: function loadFromHtml(content) {
|
|
4678
4684
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4685
|
+
var iframeClass = arguments.length > 2 ? arguments[2] : undefined;
|
|
4679
4686
|
if (!this.container.isExist() || this.isExist()) return;
|
|
4680
4687
|
var iFrame = document.createElement('iframe');
|
|
4681
4688
|
iFrame.setAttribute('height', '100%');
|
|
4682
4689
|
iFrame.setAttribute('width', '100%');
|
|
4690
|
+
if (iframeClass) iFrame.classList.add(iframeClass);
|
|
4683
4691
|
if (options.title) iFrame.title = options.title;
|
|
4684
4692
|
var template = "<html><head><style>html, body {margin: 0;} iframe {border: 0; width: 100%}</style><title></title></head><body>{{content}}</body></html>";
|
|
4685
4693
|
this.container.getElement().appendChild(iFrame);
|
|
@@ -5325,9 +5333,9 @@ var Canvas3ds = /*#__PURE__*/function () {
|
|
|
5325
5333
|
function load() {
|
|
5326
5334
|
if (this.token.format === TOKEN_FORMAT.HTML) this.iFrame.loadFromHtml(this.token.content, {
|
|
5327
5335
|
title: '3d secure authentication'
|
|
5328
|
-
});else if (this.token.format === TOKEN_FORMAT.URL) this.iFrame.load(this.token.content, {
|
|
5336
|
+
}, 'threeDSecure-iframe');else if (this.token.format === TOKEN_FORMAT.URL) this.iFrame.load(this.token.content, {
|
|
5329
5337
|
title: '3d secure authentication'
|
|
5330
|
-
});else if (this.token.format === TOKEN_FORMAT.STANDALONE_3DS) this.standalone3dsService.load(this.token.content, {
|
|
5338
|
+
}, 'threeDSecure-iframe');else if (this.token.format === TOKEN_FORMAT.STANDALONE_3DS) this.standalone3dsService.load(this.token.content, {
|
|
5331
5339
|
title: '3d secure authentication'
|
|
5332
5340
|
});else console.error('Token contain unsupported payload');
|
|
5333
5341
|
}
|
|
@@ -9107,8 +9115,6 @@ var HtmlPaymentSourceWidget = /*#__PURE__*/function (_PaymentSourceWidget) {
|
|
|
9107
9115
|
* @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when Click To Pay checkout flow is closed, regardless of embedded or windowed mode.
|
|
9108
9116
|
* @param {string} CHECKOUT_COMPLETED=checkoutCompleted Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information.
|
|
9109
9117
|
* @param {string} CHECKOUT_ERROR=checkoutError Event sent on error checkout by customer. Check [data](#EventData) for more information.
|
|
9110
|
-
* @param {string} RECOGNITION_TOKEN_REQUESTED=recognitionTokenRequested Event sent when a recognition token was found on the mastercard SDK response.
|
|
9111
|
-
* @param {string} RECOGNITION_TOKEN_DROPPED=recognitionTokenDropped Event sent when a recognition token needs to be dropped for user be no longer remembered.
|
|
9112
9118
|
*/
|
|
9113
9119
|
var EVENT$3;
|
|
9114
9120
|
(function (EVENT) {
|
|
@@ -9118,8 +9124,6 @@ var EVENT$3;
|
|
|
9118
9124
|
EVENT["CHECKOUT_ERROR"] = "checkoutError";
|
|
9119
9125
|
EVENT["CHECKOUT_POPUP_OPEN"] = "checkoutPopupOpen";
|
|
9120
9126
|
EVENT["CHECKOUT_POPUP_CLOSE"] = "checkoutPopupClose";
|
|
9121
|
-
EVENT["RECOGNITION_TOKEN_REQUESTED"] = "recognitionTokenRequested";
|
|
9122
|
-
EVENT["RECOGNITION_TOKEN_DROPPED"] = "recognitionTokenDropped";
|
|
9123
9127
|
})(EVENT$3 || (EVENT$3 = {}));
|
|
9124
9128
|
/**
|
|
9125
9129
|
* List of available event data types
|
|
@@ -9196,13 +9200,6 @@ var ClickToPaySRC = /*#__PURE__*/function () {
|
|
|
9196
9200
|
var data = _ref5.data;
|
|
9197
9201
|
_this.eventEmitter.emit(EVENT$3.CHECKOUT_ERROR, data);
|
|
9198
9202
|
});
|
|
9199
|
-
this.iFrameEvent.on(EVENT$3.RECOGNITION_TOKEN_REQUESTED, widgetId, function (_ref6) {
|
|
9200
|
-
var data = _ref6.data;
|
|
9201
|
-
_this.eventEmitter.emit(EVENT$3.RECOGNITION_TOKEN_REQUESTED, data);
|
|
9202
|
-
});
|
|
9203
|
-
this.iFrameEvent.on(EVENT$3.RECOGNITION_TOKEN_DROPPED, widgetId, function () {
|
|
9204
|
-
_this.eventEmitter.emit(EVENT$3.RECOGNITION_TOKEN_DROPPED);
|
|
9205
|
-
});
|
|
9206
9203
|
if (this.autoResize) this.useAutoResize(true);
|
|
9207
9204
|
}
|
|
9208
9205
|
}, {
|
|
@@ -9250,8 +9247,8 @@ var ClickToPaySRC = /*#__PURE__*/function () {
|
|
|
9250
9247
|
this.autoResize = true;
|
|
9251
9248
|
var params = this.link.getParams();
|
|
9252
9249
|
if (!(params === null || params === void 0 ? void 0 : params.widget_id)) return;
|
|
9253
|
-
this.iFrameEvent.on('resize', params.widget_id, function (
|
|
9254
|
-
var data =
|
|
9250
|
+
this.iFrameEvent.on('resize', params.widget_id, function (_ref6) {
|
|
9251
|
+
var data = _ref6.data;
|
|
9255
9252
|
var _a, _b;
|
|
9256
9253
|
var iframeElement = _this3.iFrame.getElement();
|
|
9257
9254
|
if (iframeElement) {
|
|
@@ -14701,7 +14698,7 @@ var PaymentMethods = /*#__PURE__*/function () {
|
|
|
14701
14698
|
_iterator.s();
|
|
14702
14699
|
case 4:
|
|
14703
14700
|
if ((_step = _iterator.n()).done) {
|
|
14704
|
-
_context.next =
|
|
14701
|
+
_context.next = 11;
|
|
14705
14702
|
break;
|
|
14706
14703
|
}
|
|
14707
14704
|
method = _step.value;
|
|
@@ -14709,46 +14706,30 @@ var PaymentMethods = /*#__PURE__*/function () {
|
|
|
14709
14706
|
_context.next = 8;
|
|
14710
14707
|
break;
|
|
14711
14708
|
}
|
|
14712
|
-
return _context.abrupt("continue",
|
|
14709
|
+
return _context.abrupt("continue", 9);
|
|
14713
14710
|
case 8:
|
|
14714
|
-
_context.t0 = method === PAYMENTS_METHODS.GOOGLE_PAY;
|
|
14715
|
-
if (!_context.t0) {
|
|
14716
|
-
_context.next = 13;
|
|
14717
|
-
break;
|
|
14718
|
-
}
|
|
14719
|
-
_context.next = 12;
|
|
14720
|
-
return this.isGooglePaySupported();
|
|
14721
|
-
case 12:
|
|
14722
|
-
_context.t0 = !_context.sent;
|
|
14723
|
-
case 13:
|
|
14724
|
-
if (!_context.t0) {
|
|
14725
|
-
_context.next = 15;
|
|
14726
|
-
break;
|
|
14727
|
-
}
|
|
14728
|
-
return _context.abrupt("continue", 16);
|
|
14729
|
-
case 15:
|
|
14730
14711
|
paymentMethodsAllowed.push(PAYMENT_METHOD[method]);
|
|
14731
|
-
case
|
|
14712
|
+
case 9:
|
|
14732
14713
|
_context.next = 4;
|
|
14733
14714
|
break;
|
|
14734
|
-
case
|
|
14735
|
-
_context.next =
|
|
14715
|
+
case 11:
|
|
14716
|
+
_context.next = 16;
|
|
14736
14717
|
break;
|
|
14737
|
-
case
|
|
14738
|
-
_context.prev =
|
|
14739
|
-
_context.
|
|
14740
|
-
_iterator.e(_context.
|
|
14741
|
-
case
|
|
14742
|
-
_context.prev =
|
|
14718
|
+
case 13:
|
|
14719
|
+
_context.prev = 13;
|
|
14720
|
+
_context.t0 = _context["catch"](2);
|
|
14721
|
+
_iterator.e(_context.t0);
|
|
14722
|
+
case 16:
|
|
14723
|
+
_context.prev = 16;
|
|
14743
14724
|
_iterator.f();
|
|
14744
|
-
return _context.finish(
|
|
14745
|
-
case
|
|
14725
|
+
return _context.finish(16);
|
|
14726
|
+
case 19:
|
|
14746
14727
|
resolve(paymentMethodsAllowed.join(' '));
|
|
14747
|
-
case
|
|
14728
|
+
case 20:
|
|
14748
14729
|
case "end":
|
|
14749
14730
|
return _context.stop();
|
|
14750
14731
|
}
|
|
14751
|
-
}, _callee, this, [[2,
|
|
14732
|
+
}, _callee, this, [[2, 13, 16, 19]]);
|
|
14752
14733
|
}));
|
|
14753
14734
|
});
|
|
14754
14735
|
initState.then(function (content) {
|
|
@@ -14814,45 +14795,6 @@ var PaymentMethods = /*#__PURE__*/function () {
|
|
|
14814
14795
|
value: function isApplePaySupported() {
|
|
14815
14796
|
return window.ApplePaySession && ApplePaySession.canMakePayments();
|
|
14816
14797
|
}
|
|
14817
|
-
}, {
|
|
14818
|
-
key: "isGooglePaySupported",
|
|
14819
|
-
value: function isGooglePaySupported() {
|
|
14820
|
-
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
14821
|
-
var paymentRequest;
|
|
14822
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
14823
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
14824
|
-
case 0:
|
|
14825
|
-
_context2.prev = 0;
|
|
14826
|
-
if (window.PaymentRequest) {
|
|
14827
|
-
_context2.next = 3;
|
|
14828
|
-
break;
|
|
14829
|
-
}
|
|
14830
|
-
return _context2.abrupt("return", false);
|
|
14831
|
-
case 3:
|
|
14832
|
-
paymentRequest = new PaymentRequest([{
|
|
14833
|
-
supportedMethods: 'https://google.com/pay'
|
|
14834
|
-
}], {
|
|
14835
|
-
total: {
|
|
14836
|
-
label: 'Test',
|
|
14837
|
-
amount: {
|
|
14838
|
-
currency: 'USD',
|
|
14839
|
-
value: '0.00'
|
|
14840
|
-
}
|
|
14841
|
-
}
|
|
14842
|
-
});
|
|
14843
|
-
return _context2.abrupt("return", paymentRequest.canMakePayment());
|
|
14844
|
-
case 7:
|
|
14845
|
-
_context2.prev = 7;
|
|
14846
|
-
_context2.t0 = _context2["catch"](0);
|
|
14847
|
-
console.error('Error google pay check support:');
|
|
14848
|
-
return _context2.abrupt("return", false);
|
|
14849
|
-
case 11:
|
|
14850
|
-
case "end":
|
|
14851
|
-
return _context2.stop();
|
|
14852
|
-
}
|
|
14853
|
-
}, _callee2, null, [[0, 7]]);
|
|
14854
|
-
}));
|
|
14855
|
-
}
|
|
14856
14798
|
}, {
|
|
14857
14799
|
key: "setStylesToStandaloneWidget",
|
|
14858
14800
|
value: function setStylesToStandaloneWidget() {
|
|
@@ -15373,7 +15315,7 @@ function getVersionInstructions(version) {
|
|
|
15373
15315
|
}
|
|
15374
15316
|
}
|
|
15375
15317
|
|
|
15376
|
-
var additional = "\n<style>\n #standaloneWidget iframe, #list iframe {\n display: block;\n max-width: 640px;\n min-width: 320px;\n width: 100%;\n border-width: 0;\n }\n .spinner-wrapper {\n position: absolute;\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n }\n \n .spinner-wrapper svg {\n position: absolute;\n\n height: 50px;\n width: 50px;\n z-index: 1000;\n }\n \n .spinner-wrapper .background {\n margin: 0 !important;\n background: #f9f9f9;\n color: #f9f9f9;\n word-break: break-all;\n white-space: pre-wrap;\n width: 100%;\n height: 100%;\n }\n \n .spinner-wrapper--hidden {\n display: none;\n }\n #standaloneWidget .paypal-buttons {\n padding-bottom: 12px;\n right: 40px;\n max-width: 290px;\n }\n #standaloneWidget #gpay-button-online-api-id {\n max-width: 311px;\n margin-bottom: 11px;\n right: 11px;\n }\n #standaloneWidget .paydock-apple-container {\n max-width: 300px;\n margin-right: 10px;\n margin-bottom: 10px\n }\n</style>\n<div id=\"spinner\" class=\"spinner-wrapper spinner-wrapper--hidden\">\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><radialGradient id='a5' cx='.66' fx='.66' cy='.3125' fy='.3125' gradientTransform='scale(1.5)'><stop offset='0' stop-color='#191919'></stop><stop offset='.3' stop-color='#191919' stop-opacity='.9'></stop><stop offset='.6' stop-color='#191919' stop-opacity='.6'></stop><stop offset='.8' stop-color='#191919' stop-opacity='.3'></stop><stop offset='1' stop-color='#191919' stop-opacity='0'></stop></radialGradient><circle transform-origin='center' fill='none' stroke='url(#a5)' stroke-width='30' stroke-linecap='round' stroke-dasharray='200 1000' stroke-dashoffset='0' cx='100' cy='100' r='70'><animateTransform type='rotate' attributeName='transform' calcMode='spline' dur='1' values='360;0' keyTimes='0;1' keySplines='0 0 1 1' repeatCount='indefinite'></animateTransform></circle><circle transform-origin='center' fill='none' opacity='.2' stroke='#191919' stroke-width='30' stroke-linecap='round' cx='100' cy='100' r='70'></circle></svg>\n <pre class=\"background\"></pre>\n</div>\n";
|
|
15318
|
+
var additional = "\n<style>\n #standaloneWidget iframe[title=\"3d secure authentication\"],\n #standaloneWidget .threeDSecure-iframe {\n height: 420px;\n }\n #standaloneWidget iframe, #list iframe {\n display: block;\n max-width: 640px;\n min-width: 320px;\n width: 100%;\n border-width: 0;\n }\n .spinner-wrapper {\n position: absolute;\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n }\n \n .spinner-wrapper svg {\n position: absolute;\n\n height: 50px;\n width: 50px;\n z-index: 1000;\n }\n \n .spinner-wrapper .background {\n margin: 0 !important;\n background: #f9f9f9;\n color: #f9f9f9;\n word-break: break-all;\n white-space: pre-wrap;\n width: 100%;\n height: 100%;\n }\n \n .spinner-wrapper--hidden {\n display: none;\n }\n #standaloneWidget .paypal-buttons {\n padding-bottom: 12px;\n right: 40px;\n max-width: 290px;\n }\n #standaloneWidget #gpay-button-online-api-id {\n max-width: 311px;\n margin-bottom: 11px;\n right: 11px;\n }\n #standaloneWidget .paydock-apple-container {\n max-width: 300px;\n margin-right: 10px;\n margin-bottom: 10px\n }\n</style>\n<div id=\"spinner\" class=\"spinner-wrapper spinner-wrapper--hidden\">\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><radialGradient id='a5' cx='.66' fx='.66' cy='.3125' fy='.3125' gradientTransform='scale(1.5)'><stop offset='0' stop-color='#191919'></stop><stop offset='.3' stop-color='#191919' stop-opacity='.9'></stop><stop offset='.6' stop-color='#191919' stop-opacity='.6'></stop><stop offset='.8' stop-color='#191919' stop-opacity='.3'></stop><stop offset='1' stop-color='#191919' stop-opacity='0'></stop></radialGradient><circle transform-origin='center' fill='none' stroke='url(#a5)' stroke-width='30' stroke-linecap='round' stroke-dasharray='200 1000' stroke-dashoffset='0' cx='100' cy='100' r='70'><animateTransform type='rotate' attributeName='transform' calcMode='spline' dur='1' values='360;0' keyTimes='0;1' keySplines='0 0 1 1' repeatCount='indefinite'></animateTransform></circle><circle transform-origin='center' fill='none' opacity='.2' stroke='#191919' stroke-width='30' stroke-linecap='round' cx='100' cy='100' r='70'></circle></svg>\n <pre class=\"background\"></pre>\n</div>\n";
|
|
15377
15319
|
|
|
15378
15320
|
var EVENT$1 = {
|
|
15379
15321
|
PAYMENT_SUCCESSFUL: "paymentSuccessful",
|
|
@@ -16603,7 +16545,7 @@ var PayPalSavePaymentSourceService = /*#__PURE__*/function () {
|
|
|
16603
16545
|
_this2.paypal = window.paypal;
|
|
16604
16546
|
var button = _this2.paypal.Buttons(_extends(_extends({
|
|
16605
16547
|
createVaultSetupToken: function createVaultSetupToken() {
|
|
16606
|
-
return _this2.getSetupToken(
|
|
16548
|
+
return _this2.getSetupToken();
|
|
16607
16549
|
},
|
|
16608
16550
|
onApprove: function onApprove(_ref) {
|
|
16609
16551
|
var vaultSetupToken = _ref.vaultSetupToken;
|
|
@@ -16643,11 +16585,10 @@ var PayPalSavePaymentSourceService = /*#__PURE__*/function () {
|
|
|
16643
16585
|
}
|
|
16644
16586
|
}, {
|
|
16645
16587
|
key: "getSetupToken",
|
|
16646
|
-
value: function getSetupToken(
|
|
16588
|
+
value: function getSetupToken() {
|
|
16647
16589
|
var _this3 = this;
|
|
16648
16590
|
return this.api.getClientPromise('POST', PAYPAL_SETUP_TOKEN_ROUTE).send({
|
|
16649
|
-
gateway_id: this.gatewayId
|
|
16650
|
-
token: accessToken
|
|
16591
|
+
gateway_id: this.gatewayId
|
|
16651
16592
|
}).then(function (responseSetupToken) {
|
|
16652
16593
|
return responseSetupToken.setup_token;
|
|
16653
16594
|
})["catch"](function (error) {
|
|
@@ -16694,7 +16635,6 @@ var PayPalSavePaymentSourceService = /*#__PURE__*/function () {
|
|
|
16694
16635
|
gateway_id: this.gatewayId
|
|
16695
16636
|
}).then(function (data) {
|
|
16696
16637
|
_this5.idToken = data.id_token;
|
|
16697
|
-
_this5.accessToken = data.access_token;
|
|
16698
16638
|
})["catch"](function (error) {
|
|
16699
16639
|
_this5.eventEmitter.emit(PAYPAL_SAVE_PAYMENT_EVENTS.ON_ERROR, _extends({
|
|
16700
16640
|
error_code: ErrorCodes.ON_GET_ID_TOKEN_ERROR
|
package/bundles/index.cjs.d.ts
CHANGED
|
@@ -661,10 +661,10 @@ declare class IFrame {
|
|
|
661
661
|
constructor(container: Container);
|
|
662
662
|
load(link: string, options?: {
|
|
663
663
|
title?: string;
|
|
664
|
-
}): void;
|
|
664
|
+
}, iframeClass?: string): void;
|
|
665
665
|
loadFromHtml(content: string, options?: {
|
|
666
666
|
title?: string;
|
|
667
|
-
}): void;
|
|
667
|
+
}, iframeClass?: string): void;
|
|
668
668
|
remove(): void;
|
|
669
669
|
show(): void;
|
|
670
670
|
hide(saveSize?: boolean): void;
|
package/bundles/index.mjs
CHANGED
|
@@ -889,7 +889,7 @@ SDK.headerKeys = Object.freeze({
|
|
|
889
889
|
version: 'x-sdk-version',
|
|
890
890
|
type: 'x-sdk-type'
|
|
891
891
|
});
|
|
892
|
-
SDK._version = 'v1.
|
|
892
|
+
SDK._version = 'v1.117.0-beta';
|
|
893
893
|
|
|
894
894
|
/******************************************************************************
|
|
895
895
|
Copyright (c) Microsoft Corporation.
|
|
@@ -4221,6 +4221,10 @@ var ApiBase = /*#__PURE__*/function () {
|
|
|
4221
4221
|
request.onreadystatechange = function () {
|
|
4222
4222
|
if (_this2.stoppedPooling) return;
|
|
4223
4223
|
if (request.readyState === 4) {
|
|
4224
|
+
if (request.status === 403) {
|
|
4225
|
+
_this2.stoppedPooling = true;
|
|
4226
|
+
return;
|
|
4227
|
+
}
|
|
4224
4228
|
if (request.status === 200 || request.status === 201) {
|
|
4225
4229
|
var data = JSON.parse(request.responseText);
|
|
4226
4230
|
if (SessionHelper.sessionId !== data.resource.data.intent_id) {
|
|
@@ -4664,20 +4668,24 @@ var IFrame = /*#__PURE__*/function () {
|
|
|
4664
4668
|
key: "load",
|
|
4665
4669
|
value: function load(link) {
|
|
4666
4670
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4671
|
+
var iframeClass = arguments.length > 2 ? arguments[2] : undefined;
|
|
4667
4672
|
if (!this.container.isExist() || this.isExist()) return;
|
|
4668
4673
|
var iFrame = document.createElement('iframe');
|
|
4669
4674
|
iFrame.setAttribute('src', link);
|
|
4670
4675
|
if (options.title) iFrame.title = options.title;
|
|
4676
|
+
if (iframeClass) iFrame.classList.add(iframeClass);
|
|
4671
4677
|
this.container.getElement().appendChild(iFrame);
|
|
4672
4678
|
}
|
|
4673
4679
|
}, {
|
|
4674
4680
|
key: "loadFromHtml",
|
|
4675
4681
|
value: function loadFromHtml(content) {
|
|
4676
4682
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4683
|
+
var iframeClass = arguments.length > 2 ? arguments[2] : undefined;
|
|
4677
4684
|
if (!this.container.isExist() || this.isExist()) return;
|
|
4678
4685
|
var iFrame = document.createElement('iframe');
|
|
4679
4686
|
iFrame.setAttribute('height', '100%');
|
|
4680
4687
|
iFrame.setAttribute('width', '100%');
|
|
4688
|
+
if (iframeClass) iFrame.classList.add(iframeClass);
|
|
4681
4689
|
if (options.title) iFrame.title = options.title;
|
|
4682
4690
|
var template = "<html><head><style>html, body {margin: 0;} iframe {border: 0; width: 100%}</style><title></title></head><body>{{content}}</body></html>";
|
|
4683
4691
|
this.container.getElement().appendChild(iFrame);
|
|
@@ -5323,9 +5331,9 @@ var Canvas3ds = /*#__PURE__*/function () {
|
|
|
5323
5331
|
function load() {
|
|
5324
5332
|
if (this.token.format === TOKEN_FORMAT.HTML) this.iFrame.loadFromHtml(this.token.content, {
|
|
5325
5333
|
title: '3d secure authentication'
|
|
5326
|
-
});else if (this.token.format === TOKEN_FORMAT.URL) this.iFrame.load(this.token.content, {
|
|
5334
|
+
}, 'threeDSecure-iframe');else if (this.token.format === TOKEN_FORMAT.URL) this.iFrame.load(this.token.content, {
|
|
5327
5335
|
title: '3d secure authentication'
|
|
5328
|
-
});else if (this.token.format === TOKEN_FORMAT.STANDALONE_3DS) this.standalone3dsService.load(this.token.content, {
|
|
5336
|
+
}, 'threeDSecure-iframe');else if (this.token.format === TOKEN_FORMAT.STANDALONE_3DS) this.standalone3dsService.load(this.token.content, {
|
|
5329
5337
|
title: '3d secure authentication'
|
|
5330
5338
|
});else console.error('Token contain unsupported payload');
|
|
5331
5339
|
}
|
|
@@ -9105,8 +9113,6 @@ var HtmlPaymentSourceWidget = /*#__PURE__*/function (_PaymentSourceWidget) {
|
|
|
9105
9113
|
* @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when Click To Pay checkout flow is closed, regardless of embedded or windowed mode.
|
|
9106
9114
|
* @param {string} CHECKOUT_COMPLETED=checkoutCompleted Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information.
|
|
9107
9115
|
* @param {string} CHECKOUT_ERROR=checkoutError Event sent on error checkout by customer. Check [data](#EventData) for more information.
|
|
9108
|
-
* @param {string} RECOGNITION_TOKEN_REQUESTED=recognitionTokenRequested Event sent when a recognition token was found on the mastercard SDK response.
|
|
9109
|
-
* @param {string} RECOGNITION_TOKEN_DROPPED=recognitionTokenDropped Event sent when a recognition token needs to be dropped for user be no longer remembered.
|
|
9110
9116
|
*/
|
|
9111
9117
|
var EVENT$3;
|
|
9112
9118
|
(function (EVENT) {
|
|
@@ -9116,8 +9122,6 @@ var EVENT$3;
|
|
|
9116
9122
|
EVENT["CHECKOUT_ERROR"] = "checkoutError";
|
|
9117
9123
|
EVENT["CHECKOUT_POPUP_OPEN"] = "checkoutPopupOpen";
|
|
9118
9124
|
EVENT["CHECKOUT_POPUP_CLOSE"] = "checkoutPopupClose";
|
|
9119
|
-
EVENT["RECOGNITION_TOKEN_REQUESTED"] = "recognitionTokenRequested";
|
|
9120
|
-
EVENT["RECOGNITION_TOKEN_DROPPED"] = "recognitionTokenDropped";
|
|
9121
9125
|
})(EVENT$3 || (EVENT$3 = {}));
|
|
9122
9126
|
/**
|
|
9123
9127
|
* List of available event data types
|
|
@@ -9194,13 +9198,6 @@ var ClickToPaySRC = /*#__PURE__*/function () {
|
|
|
9194
9198
|
var data = _ref5.data;
|
|
9195
9199
|
_this.eventEmitter.emit(EVENT$3.CHECKOUT_ERROR, data);
|
|
9196
9200
|
});
|
|
9197
|
-
this.iFrameEvent.on(EVENT$3.RECOGNITION_TOKEN_REQUESTED, widgetId, function (_ref6) {
|
|
9198
|
-
var data = _ref6.data;
|
|
9199
|
-
_this.eventEmitter.emit(EVENT$3.RECOGNITION_TOKEN_REQUESTED, data);
|
|
9200
|
-
});
|
|
9201
|
-
this.iFrameEvent.on(EVENT$3.RECOGNITION_TOKEN_DROPPED, widgetId, function () {
|
|
9202
|
-
_this.eventEmitter.emit(EVENT$3.RECOGNITION_TOKEN_DROPPED);
|
|
9203
|
-
});
|
|
9204
9201
|
if (this.autoResize) this.useAutoResize(true);
|
|
9205
9202
|
}
|
|
9206
9203
|
}, {
|
|
@@ -9248,8 +9245,8 @@ var ClickToPaySRC = /*#__PURE__*/function () {
|
|
|
9248
9245
|
this.autoResize = true;
|
|
9249
9246
|
var params = this.link.getParams();
|
|
9250
9247
|
if (!(params === null || params === void 0 ? void 0 : params.widget_id)) return;
|
|
9251
|
-
this.iFrameEvent.on('resize', params.widget_id, function (
|
|
9252
|
-
var data =
|
|
9248
|
+
this.iFrameEvent.on('resize', params.widget_id, function (_ref6) {
|
|
9249
|
+
var data = _ref6.data;
|
|
9253
9250
|
var _a, _b;
|
|
9254
9251
|
var iframeElement = _this3.iFrame.getElement();
|
|
9255
9252
|
if (iframeElement) {
|
|
@@ -14699,7 +14696,7 @@ var PaymentMethods = /*#__PURE__*/function () {
|
|
|
14699
14696
|
_iterator.s();
|
|
14700
14697
|
case 4:
|
|
14701
14698
|
if ((_step = _iterator.n()).done) {
|
|
14702
|
-
_context.next =
|
|
14699
|
+
_context.next = 11;
|
|
14703
14700
|
break;
|
|
14704
14701
|
}
|
|
14705
14702
|
method = _step.value;
|
|
@@ -14707,46 +14704,30 @@ var PaymentMethods = /*#__PURE__*/function () {
|
|
|
14707
14704
|
_context.next = 8;
|
|
14708
14705
|
break;
|
|
14709
14706
|
}
|
|
14710
|
-
return _context.abrupt("continue",
|
|
14707
|
+
return _context.abrupt("continue", 9);
|
|
14711
14708
|
case 8:
|
|
14712
|
-
_context.t0 = method === PAYMENTS_METHODS.GOOGLE_PAY;
|
|
14713
|
-
if (!_context.t0) {
|
|
14714
|
-
_context.next = 13;
|
|
14715
|
-
break;
|
|
14716
|
-
}
|
|
14717
|
-
_context.next = 12;
|
|
14718
|
-
return this.isGooglePaySupported();
|
|
14719
|
-
case 12:
|
|
14720
|
-
_context.t0 = !_context.sent;
|
|
14721
|
-
case 13:
|
|
14722
|
-
if (!_context.t0) {
|
|
14723
|
-
_context.next = 15;
|
|
14724
|
-
break;
|
|
14725
|
-
}
|
|
14726
|
-
return _context.abrupt("continue", 16);
|
|
14727
|
-
case 15:
|
|
14728
14709
|
paymentMethodsAllowed.push(PAYMENT_METHOD[method]);
|
|
14729
|
-
case
|
|
14710
|
+
case 9:
|
|
14730
14711
|
_context.next = 4;
|
|
14731
14712
|
break;
|
|
14732
|
-
case
|
|
14733
|
-
_context.next =
|
|
14713
|
+
case 11:
|
|
14714
|
+
_context.next = 16;
|
|
14734
14715
|
break;
|
|
14735
|
-
case
|
|
14736
|
-
_context.prev =
|
|
14737
|
-
_context.
|
|
14738
|
-
_iterator.e(_context.
|
|
14739
|
-
case
|
|
14740
|
-
_context.prev =
|
|
14716
|
+
case 13:
|
|
14717
|
+
_context.prev = 13;
|
|
14718
|
+
_context.t0 = _context["catch"](2);
|
|
14719
|
+
_iterator.e(_context.t0);
|
|
14720
|
+
case 16:
|
|
14721
|
+
_context.prev = 16;
|
|
14741
14722
|
_iterator.f();
|
|
14742
|
-
return _context.finish(
|
|
14743
|
-
case
|
|
14723
|
+
return _context.finish(16);
|
|
14724
|
+
case 19:
|
|
14744
14725
|
resolve(paymentMethodsAllowed.join(' '));
|
|
14745
|
-
case
|
|
14726
|
+
case 20:
|
|
14746
14727
|
case "end":
|
|
14747
14728
|
return _context.stop();
|
|
14748
14729
|
}
|
|
14749
|
-
}, _callee, this, [[2,
|
|
14730
|
+
}, _callee, this, [[2, 13, 16, 19]]);
|
|
14750
14731
|
}));
|
|
14751
14732
|
});
|
|
14752
14733
|
initState.then(function (content) {
|
|
@@ -14812,45 +14793,6 @@ var PaymentMethods = /*#__PURE__*/function () {
|
|
|
14812
14793
|
value: function isApplePaySupported() {
|
|
14813
14794
|
return window.ApplePaySession && ApplePaySession.canMakePayments();
|
|
14814
14795
|
}
|
|
14815
|
-
}, {
|
|
14816
|
-
key: "isGooglePaySupported",
|
|
14817
|
-
value: function isGooglePaySupported() {
|
|
14818
|
-
return __awaiter(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
14819
|
-
var paymentRequest;
|
|
14820
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
14821
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
14822
|
-
case 0:
|
|
14823
|
-
_context2.prev = 0;
|
|
14824
|
-
if (window.PaymentRequest) {
|
|
14825
|
-
_context2.next = 3;
|
|
14826
|
-
break;
|
|
14827
|
-
}
|
|
14828
|
-
return _context2.abrupt("return", false);
|
|
14829
|
-
case 3:
|
|
14830
|
-
paymentRequest = new PaymentRequest([{
|
|
14831
|
-
supportedMethods: 'https://google.com/pay'
|
|
14832
|
-
}], {
|
|
14833
|
-
total: {
|
|
14834
|
-
label: 'Test',
|
|
14835
|
-
amount: {
|
|
14836
|
-
currency: 'USD',
|
|
14837
|
-
value: '0.00'
|
|
14838
|
-
}
|
|
14839
|
-
}
|
|
14840
|
-
});
|
|
14841
|
-
return _context2.abrupt("return", paymentRequest.canMakePayment());
|
|
14842
|
-
case 7:
|
|
14843
|
-
_context2.prev = 7;
|
|
14844
|
-
_context2.t0 = _context2["catch"](0);
|
|
14845
|
-
console.error('Error google pay check support:');
|
|
14846
|
-
return _context2.abrupt("return", false);
|
|
14847
|
-
case 11:
|
|
14848
|
-
case "end":
|
|
14849
|
-
return _context2.stop();
|
|
14850
|
-
}
|
|
14851
|
-
}, _callee2, null, [[0, 7]]);
|
|
14852
|
-
}));
|
|
14853
|
-
}
|
|
14854
14796
|
}, {
|
|
14855
14797
|
key: "setStylesToStandaloneWidget",
|
|
14856
14798
|
value: function setStylesToStandaloneWidget() {
|
|
@@ -15371,7 +15313,7 @@ function getVersionInstructions(version) {
|
|
|
15371
15313
|
}
|
|
15372
15314
|
}
|
|
15373
15315
|
|
|
15374
|
-
var additional = "\n<style>\n #standaloneWidget iframe, #list iframe {\n display: block;\n max-width: 640px;\n min-width: 320px;\n width: 100%;\n border-width: 0;\n }\n .spinner-wrapper {\n position: absolute;\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n }\n \n .spinner-wrapper svg {\n position: absolute;\n\n height: 50px;\n width: 50px;\n z-index: 1000;\n }\n \n .spinner-wrapper .background {\n margin: 0 !important;\n background: #f9f9f9;\n color: #f9f9f9;\n word-break: break-all;\n white-space: pre-wrap;\n width: 100%;\n height: 100%;\n }\n \n .spinner-wrapper--hidden {\n display: none;\n }\n #standaloneWidget .paypal-buttons {\n padding-bottom: 12px;\n right: 40px;\n max-width: 290px;\n }\n #standaloneWidget #gpay-button-online-api-id {\n max-width: 311px;\n margin-bottom: 11px;\n right: 11px;\n }\n #standaloneWidget .paydock-apple-container {\n max-width: 300px;\n margin-right: 10px;\n margin-bottom: 10px\n }\n</style>\n<div id=\"spinner\" class=\"spinner-wrapper spinner-wrapper--hidden\">\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><radialGradient id='a5' cx='.66' fx='.66' cy='.3125' fy='.3125' gradientTransform='scale(1.5)'><stop offset='0' stop-color='#191919'></stop><stop offset='.3' stop-color='#191919' stop-opacity='.9'></stop><stop offset='.6' stop-color='#191919' stop-opacity='.6'></stop><stop offset='.8' stop-color='#191919' stop-opacity='.3'></stop><stop offset='1' stop-color='#191919' stop-opacity='0'></stop></radialGradient><circle transform-origin='center' fill='none' stroke='url(#a5)' stroke-width='30' stroke-linecap='round' stroke-dasharray='200 1000' stroke-dashoffset='0' cx='100' cy='100' r='70'><animateTransform type='rotate' attributeName='transform' calcMode='spline' dur='1' values='360;0' keyTimes='0;1' keySplines='0 0 1 1' repeatCount='indefinite'></animateTransform></circle><circle transform-origin='center' fill='none' opacity='.2' stroke='#191919' stroke-width='30' stroke-linecap='round' cx='100' cy='100' r='70'></circle></svg>\n <pre class=\"background\"></pre>\n</div>\n";
|
|
15316
|
+
var additional = "\n<style>\n #standaloneWidget iframe[title=\"3d secure authentication\"],\n #standaloneWidget .threeDSecure-iframe {\n height: 420px;\n }\n #standaloneWidget iframe, #list iframe {\n display: block;\n max-width: 640px;\n min-width: 320px;\n width: 100%;\n border-width: 0;\n }\n .spinner-wrapper {\n position: absolute;\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n }\n \n .spinner-wrapper svg {\n position: absolute;\n\n height: 50px;\n width: 50px;\n z-index: 1000;\n }\n \n .spinner-wrapper .background {\n margin: 0 !important;\n background: #f9f9f9;\n color: #f9f9f9;\n word-break: break-all;\n white-space: pre-wrap;\n width: 100%;\n height: 100%;\n }\n \n .spinner-wrapper--hidden {\n display: none;\n }\n #standaloneWidget .paypal-buttons {\n padding-bottom: 12px;\n right: 40px;\n max-width: 290px;\n }\n #standaloneWidget #gpay-button-online-api-id {\n max-width: 311px;\n margin-bottom: 11px;\n right: 11px;\n }\n #standaloneWidget .paydock-apple-container {\n max-width: 300px;\n margin-right: 10px;\n margin-bottom: 10px\n }\n</style>\n<div id=\"spinner\" class=\"spinner-wrapper spinner-wrapper--hidden\">\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><radialGradient id='a5' cx='.66' fx='.66' cy='.3125' fy='.3125' gradientTransform='scale(1.5)'><stop offset='0' stop-color='#191919'></stop><stop offset='.3' stop-color='#191919' stop-opacity='.9'></stop><stop offset='.6' stop-color='#191919' stop-opacity='.6'></stop><stop offset='.8' stop-color='#191919' stop-opacity='.3'></stop><stop offset='1' stop-color='#191919' stop-opacity='0'></stop></radialGradient><circle transform-origin='center' fill='none' stroke='url(#a5)' stroke-width='30' stroke-linecap='round' stroke-dasharray='200 1000' stroke-dashoffset='0' cx='100' cy='100' r='70'><animateTransform type='rotate' attributeName='transform' calcMode='spline' dur='1' values='360;0' keyTimes='0;1' keySplines='0 0 1 1' repeatCount='indefinite'></animateTransform></circle><circle transform-origin='center' fill='none' opacity='.2' stroke='#191919' stroke-width='30' stroke-linecap='round' cx='100' cy='100' r='70'></circle></svg>\n <pre class=\"background\"></pre>\n</div>\n";
|
|
15375
15317
|
|
|
15376
15318
|
var EVENT$1 = {
|
|
15377
15319
|
PAYMENT_SUCCESSFUL: "paymentSuccessful",
|
|
@@ -16601,7 +16543,7 @@ var PayPalSavePaymentSourceService = /*#__PURE__*/function () {
|
|
|
16601
16543
|
_this2.paypal = window.paypal;
|
|
16602
16544
|
var button = _this2.paypal.Buttons(_extends(_extends({
|
|
16603
16545
|
createVaultSetupToken: function createVaultSetupToken() {
|
|
16604
|
-
return _this2.getSetupToken(
|
|
16546
|
+
return _this2.getSetupToken();
|
|
16605
16547
|
},
|
|
16606
16548
|
onApprove: function onApprove(_ref) {
|
|
16607
16549
|
var vaultSetupToken = _ref.vaultSetupToken;
|
|
@@ -16641,11 +16583,10 @@ var PayPalSavePaymentSourceService = /*#__PURE__*/function () {
|
|
|
16641
16583
|
}
|
|
16642
16584
|
}, {
|
|
16643
16585
|
key: "getSetupToken",
|
|
16644
|
-
value: function getSetupToken(
|
|
16586
|
+
value: function getSetupToken() {
|
|
16645
16587
|
var _this3 = this;
|
|
16646
16588
|
return this.api.getClientPromise('POST', PAYPAL_SETUP_TOKEN_ROUTE).send({
|
|
16647
|
-
gateway_id: this.gatewayId
|
|
16648
|
-
token: accessToken
|
|
16589
|
+
gateway_id: this.gatewayId
|
|
16649
16590
|
}).then(function (responseSetupToken) {
|
|
16650
16591
|
return responseSetupToken.setup_token;
|
|
16651
16592
|
})["catch"](function (error) {
|
|
@@ -16692,7 +16633,6 @@ var PayPalSavePaymentSourceService = /*#__PURE__*/function () {
|
|
|
16692
16633
|
gateway_id: this.gatewayId
|
|
16693
16634
|
}).then(function (data) {
|
|
16694
16635
|
_this5.idToken = data.id_token;
|
|
16695
|
-
_this5.accessToken = data.access_token;
|
|
16696
16636
|
})["catch"](function (error) {
|
|
16697
16637
|
_this5.eventEmitter.emit(PAYPAL_SAVE_PAYMENT_EVENTS.ON_ERROR, _extends({
|
|
16698
16638
|
error_code: ErrorCodes.ON_GET_ID_TOKEN_ERROR
|
package/bundles/index.mjs.d.ts
CHANGED
|
@@ -661,10 +661,10 @@ declare class IFrame {
|
|
|
661
661
|
constructor(container: Container);
|
|
662
662
|
load(link: string, options?: {
|
|
663
663
|
title?: string;
|
|
664
|
-
}): void;
|
|
664
|
+
}, iframeClass?: string): void;
|
|
665
665
|
loadFromHtml(content: string, options?: {
|
|
666
666
|
title?: string;
|
|
667
|
-
}): void;
|
|
667
|
+
}, iframeClass?: string): void;
|
|
668
668
|
remove(): void;
|
|
669
669
|
show(): void;
|
|
670
670
|
hide(saveSize?: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-base.d.ts","sourceRoot":"","sources":["../../src/api/api-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE9C,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAmB,MAAM,iDAAiD,CAAC;AAG1H,oBAAY,aAAa;IACrB,UAAU,IAAI;IACd,KAAK,IAAI;CACZ;AAID,qBAAa,OAAO;IAChB,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,aAAa,CAAC;IAExB,OAAO,CAAC,cAAc,CAAS;gBAEnB,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa;IAMlD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO;IAM5C,qBAAqB,CAAC,GAAG,SAAS,MAAM,EAAE,GAAG,EAChD,MAAM,EAAE,KAAK,GAAG,MAAM,EACtB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,GAAG,EAChB,SAAS,EAAE,MAAM,EACjB,iBAAiB,GAAE,MAAa,GACjC,UAAU,CAAC,GAAG,CAAC;IAMlB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,KAAA,EAAE,IAAI,KAAA,EAAE,IAAI,KAAA,EAAE,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,iBAAiB,KAAA;
|
|
1
|
+
{"version":3,"file":"api-base.d.ts","sourceRoot":"","sources":["../../src/api/api-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE9C,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAmB,MAAM,iDAAiD,CAAC;AAG1H,oBAAY,aAAa;IACrB,UAAU,IAAI;IACd,KAAK,IAAI;CACZ;AAID,qBAAa,OAAO;IAChB,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,aAAa,CAAC;IAExB,OAAO,CAAC,cAAc,CAAS;gBAEnB,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa;IAMlD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO;IAM5C,qBAAqB,CAAC,GAAG,SAAS,MAAM,EAAE,GAAG,EAChD,MAAM,EAAE,KAAK,GAAG,MAAM,EACtB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,GAAG,EAChB,SAAS,EAAE,MAAM,EACjB,iBAAiB,GAAE,MAAa,GACjC,UAAU,CAAC,GAAG,CAAC;IAMlB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,KAAA,EAAE,IAAI,KAAA,EAAE,IAAI,KAAA,EAAE,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,iBAAiB,KAAA;IA0CnG,kBAAkB;IAIlB,WAAW;IAMX,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,EAAE,KAAK,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM;;+BAKhD,CAAC,IAAI,KAAK,IAAI,mBAAmB,GAAG;;IAuB9D,gBAAgB,CAAC,GAAG,SAAS,MAAM,EAAE,GAAG,EACpC,MAAM,EAAE,OAAO,CAAC,iBAAiB,EAAE,KAAK,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,GACjE;QACC,MAAM,EAAE,cAAc,CAAC;QACvB,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;KACrC;IA6BD,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,EAAE,KAAA,EAAE,OAAO,KAAA;IAkBtE,aAAa,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAkBpF,WAAW,EAAE,aAAa,CAExB;IAEF,WAAW,EAAE,aAAa,CAExB;IAEF,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,EAAE,KAAK,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM;IAmBxF,SAAS,KAAK,GAAG;;;;MAMhB;CACJ"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const _default: "\n<style>\n #standaloneWidget iframe, #list iframe {\n display: block;\n max-width: 640px;\n min-width: 320px;\n width: 100%;\n border-width: 0;\n }\n .spinner-wrapper {\n position: absolute;\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n }\n \n .spinner-wrapper svg {\n position: absolute;\n\n height: 50px;\n width: 50px;\n z-index: 1000;\n }\n \n .spinner-wrapper .background {\n margin: 0 !important;\n background: #f9f9f9;\n color: #f9f9f9;\n word-break: break-all;\n white-space: pre-wrap;\n width: 100%;\n height: 100%;\n }\n \n .spinner-wrapper--hidden {\n display: none;\n }\n #standaloneWidget .paypal-buttons {\n padding-bottom: 12px;\n right: 40px;\n max-width: 290px;\n }\n #standaloneWidget #gpay-button-online-api-id {\n max-width: 311px;\n margin-bottom: 11px;\n right: 11px;\n }\n #standaloneWidget .paydock-apple-container {\n max-width: 300px;\n margin-right: 10px;\n margin-bottom: 10px\n }\n</style>\n<div id=\"spinner\" class=\"spinner-wrapper spinner-wrapper--hidden\">\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><radialGradient id='a5' cx='.66' fx='.66' cy='.3125' fy='.3125' gradientTransform='scale(1.5)'><stop offset='0' stop-color='#191919'></stop><stop offset='.3' stop-color='#191919' stop-opacity='.9'></stop><stop offset='.6' stop-color='#191919' stop-opacity='.6'></stop><stop offset='.8' stop-color='#191919' stop-opacity='.3'></stop><stop offset='1' stop-color='#191919' stop-opacity='0'></stop></radialGradient><circle transform-origin='center' fill='none' stroke='url(#a5)' stroke-width='30' stroke-linecap='round' stroke-dasharray='200 1000' stroke-dashoffset='0' cx='100' cy='100' r='70'><animateTransform type='rotate' attributeName='transform' calcMode='spline' dur='1' values='360;0' keyTimes='0;1' keySplines='0 0 1 1' repeatCount='indefinite'></animateTransform></circle><circle transform-origin='center' fill='none' opacity='.2' stroke='#191919' stroke-width='30' stroke-linecap='round' cx='100' cy='100' r='70'></circle></svg>\n <pre class=\"background\"></pre>\n</div>\n";
|
|
1
|
+
declare const _default: "\n<style>\n #standaloneWidget iframe[title=\"3d secure authentication\"],\n #standaloneWidget .threeDSecure-iframe {\n height: 420px;\n }\n #standaloneWidget iframe, #list iframe {\n display: block;\n max-width: 640px;\n min-width: 320px;\n width: 100%;\n border-width: 0;\n }\n .spinner-wrapper {\n position: absolute;\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n top: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n }\n \n .spinner-wrapper svg {\n position: absolute;\n\n height: 50px;\n width: 50px;\n z-index: 1000;\n }\n \n .spinner-wrapper .background {\n margin: 0 !important;\n background: #f9f9f9;\n color: #f9f9f9;\n word-break: break-all;\n white-space: pre-wrap;\n width: 100%;\n height: 100%;\n }\n \n .spinner-wrapper--hidden {\n display: none;\n }\n #standaloneWidget .paypal-buttons {\n padding-bottom: 12px;\n right: 40px;\n max-width: 290px;\n }\n #standaloneWidget #gpay-button-online-api-id {\n max-width: 311px;\n margin-bottom: 11px;\n right: 11px;\n }\n #standaloneWidget .paydock-apple-container {\n max-width: 300px;\n margin-right: 10px;\n margin-bottom: 10px\n }\n</style>\n<div id=\"spinner\" class=\"spinner-wrapper spinner-wrapper--hidden\">\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><radialGradient id='a5' cx='.66' fx='.66' cy='.3125' fy='.3125' gradientTransform='scale(1.5)'><stop offset='0' stop-color='#191919'></stop><stop offset='.3' stop-color='#191919' stop-opacity='.9'></stop><stop offset='.6' stop-color='#191919' stop-opacity='.6'></stop><stop offset='.8' stop-color='#191919' stop-opacity='.3'></stop><stop offset='1' stop-color='#191919' stop-opacity='0'></stop></radialGradient><circle transform-origin='center' fill='none' stroke='url(#a5)' stroke-width='30' stroke-linecap='round' stroke-dasharray='200 1000' stroke-dashoffset='0' cx='100' cy='100' r='70'><animateTransform type='rotate' attributeName='transform' calcMode='spline' dur='1' values='360;0' keyTimes='0;1' keySplines='0 0 1 1' repeatCount='indefinite'></animateTransform></circle><circle transform-origin='center' fill='none' opacity='.2' stroke='#191919' stroke-width='30' stroke-linecap='round' cx='100' cy='100' r='70'></circle></svg>\n <pre class=\"background\"></pre>\n</div>\n";
|
|
2
2
|
export default _default;
|
|
3
3
|
//# sourceMappingURL=additionals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"additionals.d.ts","sourceRoot":"","sources":["../../../src/checkout/layout-widgets/additionals.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"additionals.d.ts","sourceRoot":"","sources":["../../../src/checkout/layout-widgets/additionals.ts"],"names":[],"mappings":";AAAA,wBAkEC"}
|