@fat-zebra/sdk 1.5.7-beta.2 → 1.5.8-beta.1
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/.tool-versions +1 -0
- package/dist/applepay/applepay.d.ts +1 -0
- package/dist/applepay/applepay.js +6 -2
- package/dist/local/fatzebra.js +19659 -14945
- package/dist/local/fatzebra.js.map +1 -1
- package/dist/main.js +3 -3
- package/dist/production/fatzebra.js +1 -1
- package/dist/production/fatzebra.js.LICENSE.txt +2 -0
- package/dist/react/ApplePayButton.js +1 -1
- package/dist/sca/index.js +2 -2
- package/dist/sca/scenarios/enrollment.js +2 -2
- package/dist/sca/scenarios/validation.js +3 -3
- package/dist/shared/types.d.ts +1 -0
- package/dist/staging/fatzebra.js +11812 -11211
- package/dist/staging/fatzebra.js.map +1 -1
- package/package.json +8 -8
package/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodejs 22.0.0
|
|
@@ -24,9 +24,10 @@ export class ApplePay {
|
|
|
24
24
|
this.username = config.username;
|
|
25
25
|
}
|
|
26
26
|
load(config) {
|
|
27
|
-
var _a, _b;
|
|
27
|
+
var _a, _b, _c;
|
|
28
28
|
this.domain_name = (_b = (_a = config === null || config === void 0 ? void 0 : config.options) === null || _a === void 0 ? void 0 : _a.domain_name) !== null && _b !== void 0 ? _b : window.location.hostname;
|
|
29
29
|
this.iframe = document.createElement('iframe');
|
|
30
|
+
this.react_sdk = (_c = config.options.react_sdk) !== null && _c !== void 0 ? _c : false;
|
|
30
31
|
document.getElementById(config.containerId).appendChild(this.iframe);
|
|
31
32
|
const applePayUrl = this.getPayNowUrl(config.options);
|
|
32
33
|
this.iframe.setAttribute("src", applePayUrl);
|
|
@@ -70,6 +71,9 @@ export class ApplePay {
|
|
|
70
71
|
if (options === null || options === void 0 ? void 0 : options.apple_button_locale) {
|
|
71
72
|
query.append('apple_button_locale', options.apple_button_locale.toString());
|
|
72
73
|
}
|
|
74
|
+
if (options === null || options === void 0 ? void 0 : options.react_sdk) {
|
|
75
|
+
query.append('react_sdk', 'true');
|
|
76
|
+
}
|
|
73
77
|
query.append('domain_name', this.domain_name);
|
|
74
78
|
return `${base}?${query.toString()}`;
|
|
75
79
|
}
|
|
@@ -127,7 +131,7 @@ export class ApplePay {
|
|
|
127
131
|
});
|
|
128
132
|
this.applePaySession.onpaymentauthorized = (event) => __awaiter(this, void 0, void 0, function* () {
|
|
129
133
|
try {
|
|
130
|
-
const result = yield payNow.authorizePayment(Object.assign(Object.assign({}, payNowPaymentAttributes), { merchant: this.username, token: event.payment.token, domain_name: this.domain_name }), `${this.fzPayNowDomain}${purchaseTokenPath}`);
|
|
134
|
+
const result = yield payNow.authorizePayment(Object.assign(Object.assign({}, payNowPaymentAttributes), { merchant: this.username, token: event.payment.token, domain_name: this.domain_name }), `${this.fzPayNowDomain}${purchaseTokenPath}?react_sdk=${this.react_sdk}`);
|
|
131
135
|
this.applePaySession.completePayment(window.ApplePaySession.STATUS_SUCCESS);
|
|
132
136
|
const payload = {
|
|
133
137
|
message: 'Payment successful.',
|