paymob-pixel-alpha 1.1.30 → 1.1.31
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/main.js +4 -0
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -23993,6 +23993,7 @@ const CardElement = /*#__PURE__*/(0,react.forwardRef)(({
|
|
|
23993
23993
|
const selectedCardId = selectedCard == null ? void 0 : selectedCard.id;
|
|
23994
23994
|
const [discountAppliedMessage, setDiscountAppliedMessage] = (0,react.useState)(null);
|
|
23995
23995
|
const [discountErrorMessage, setDiscountErrorMessage] = (0,react.useState)('');
|
|
23996
|
+
console.log("🚀 ~ discountErrorMessage:", discountErrorMessage);
|
|
23996
23997
|
const [totalAmount, setTotalAmount] = (0,react.useState)('');
|
|
23997
23998
|
const {
|
|
23998
23999
|
displayCurrency,
|
|
@@ -24274,9 +24275,11 @@ const CardElement = /*#__PURE__*/(0,react.forwardRef)(({
|
|
|
24274
24275
|
const discountIntegrationId = discounts == null || (_discounts$data = discounts.data) == null || (_discounts$data = _discounts$data.find(discount => (discount == null ? void 0 : discount.integration_id) === integrationId)) == null ? void 0 : _discounts$data.integration_id;
|
|
24275
24276
|
if (!hasDiscount || !discountIntegrationId) return;
|
|
24276
24277
|
const res = await checkDiscount(paymentToken, discountIntegrationId, identifier, savedCardType);
|
|
24278
|
+
console.log("🚀 ~ handleSavedCardDiscount ~ res:", res);
|
|
24277
24279
|
handleDiscount(res);
|
|
24278
24280
|
};
|
|
24279
24281
|
const handleDiscount = res => {
|
|
24282
|
+
console.log("🚀 ~ handleDiscount ~ res:", res);
|
|
24280
24283
|
handleResetDiscountMessages();
|
|
24281
24284
|
if (!res) return;
|
|
24282
24285
|
if (res.status === 200) {
|
|
@@ -24307,6 +24310,7 @@ const CardElement = /*#__PURE__*/(0,react.forwardRef)(({
|
|
|
24307
24310
|
setTotalAmount(totalAmount);
|
|
24308
24311
|
}
|
|
24309
24312
|
} else {
|
|
24313
|
+
console.log("🚀 ~ getErrorMsg(res):", getErrorMsg(res));
|
|
24310
24314
|
setDiscountErrorMessage(getErrorMsg(res));
|
|
24311
24315
|
}
|
|
24312
24316
|
};
|