paymob-pixel-alpha 1.1.49 → 1.1.50
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 +5 -4
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -81224,12 +81224,13 @@ function Knet(props) {
|
|
|
81224
81224
|
})
|
|
81225
81225
|
}), !disablePay && /*#__PURE__*/(0,jsx_runtime.jsx)(Button_Button, {
|
|
81226
81226
|
id: "pay-button",
|
|
81227
|
-
label: `${(_customStyle$knetText7 = customStyle == null || (_customStyle$knetText8 = customStyle.knetText) == null ? void 0 : _customStyle$knetText8.PAY_KNET_BUTTON) != null ? _customStyle$knetText7 : t('PAY')} ${
|
|
81227
|
+
label: `${(_customStyle$knetText7 = customStyle == null || (_customStyle$knetText8 = customStyle.knetText) == null ? void 0 : _customStyle$knetText8.PAY_KNET_BUTTON) != null ? _customStyle$knetText7 : t('PAY')} ${KnetCurrency || currency} ${displayAmount}`,
|
|
81228
81228
|
fullWidth: true,
|
|
81229
81229
|
color: 'primary',
|
|
81230
81230
|
customStyle: customStyle == null ? void 0 : customStyle.button,
|
|
81231
81231
|
onClick: onPaySubmit,
|
|
81232
|
-
disabled: loading || errorMessage !== null
|
|
81232
|
+
disabled: loading || errorMessage !== null,
|
|
81233
|
+
loading: loading
|
|
81233
81234
|
}), errorMessage && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
81234
81235
|
className: "mt-4 [&>div]:mb-0",
|
|
81235
81236
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ErrorMessageViewTwo_ErrorMessage, {
|
|
@@ -81289,11 +81290,11 @@ function KnetElement({
|
|
|
81289
81290
|
const redirectionUrl = ((_res$data = res.data) == null ? void 0 : _res$data.redirection_url) || ((_res$data2 = res.data) == null ? void 0 : _res$data2.redirect_url);
|
|
81290
81291
|
if (res.status === 200 && redirectionUrl) {
|
|
81291
81292
|
window.location.href = redirectionUrl;
|
|
81293
|
+
return;
|
|
81292
81294
|
}
|
|
81295
|
+
setLoading(false);
|
|
81293
81296
|
} catch (error) {
|
|
81294
81297
|
console.error('Payment error:', error);
|
|
81295
|
-
} finally {
|
|
81296
|
-
setLoading(false);
|
|
81297
81298
|
}
|
|
81298
81299
|
};
|
|
81299
81300
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Knet, {
|