@fat-zebra/sdk 2.0.7-beta.1 → 2.0.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/dist/main.js +7 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -332,15 +332,20 @@ export default FatZebra;
|
|
|
332
332
|
__decorate([
|
|
333
333
|
logMethod({
|
|
334
334
|
mapArgs: (args) => {
|
|
335
|
-
var _a, _b, _c;
|
|
335
|
+
var _a, _b, _c, _d, _e, _f;
|
|
336
336
|
const params = args[0];
|
|
337
337
|
setTransactionReference((_b = (_a = params.paymentIntent) === null || _a === void 0 ? void 0 : _a.payment) === null || _b === void 0 ? void 0 : _b.reference);
|
|
338
338
|
setFlowId(undefined);
|
|
339
|
+
let cardToken;
|
|
340
|
+
if (((_c = params === null || params === void 0 ? void 0 : params.paymentMethod) === null || _c === void 0 ? void 0 : _c.type) === 'card_on_file') {
|
|
341
|
+
cardToken = (_e = (_d = params === null || params === void 0 ? void 0 : params.paymentMethod) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.token;
|
|
342
|
+
}
|
|
339
343
|
return [
|
|
340
344
|
{
|
|
341
345
|
merchant_username: window.MerchantUsername,
|
|
342
346
|
payment_intent: params === null || params === void 0 ? void 0 : params.paymentIntent,
|
|
343
|
-
payment_method: (
|
|
347
|
+
payment_method: (_f = params === null || params === void 0 ? void 0 : params.paymentMethod) === null || _f === void 0 ? void 0 : _f.type,
|
|
348
|
+
card_token: cardToken,
|
|
344
349
|
options: params === null || params === void 0 ? void 0 : params.options,
|
|
345
350
|
},
|
|
346
351
|
];
|