@fractalpay/fractalpay-next-dev 0.0.301 → 0.0.303
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/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var require_package = __commonJS({
|
|
|
39
39
|
"package.json"(exports, module) {
|
|
40
40
|
module.exports = {
|
|
41
41
|
name: "@fractalpay/fractalpay-next-dev",
|
|
42
|
-
version: "0.0.
|
|
42
|
+
version: "0.0.303",
|
|
43
43
|
private: false,
|
|
44
44
|
type: "module",
|
|
45
45
|
scripts: {
|
|
@@ -3616,11 +3616,11 @@ var DataCapFields = ({
|
|
|
3616
3616
|
};
|
|
3617
3617
|
}, []);
|
|
3618
3618
|
useEffect7(() => {
|
|
3619
|
-
|
|
3619
|
+
return () => {
|
|
3620
3620
|
datacapInitializing = false;
|
|
3621
3621
|
datacapInitialized = false;
|
|
3622
|
-
}
|
|
3623
|
-
}, [
|
|
3622
|
+
};
|
|
3623
|
+
}, []);
|
|
3624
3624
|
return (
|
|
3625
3625
|
// <iframe
|
|
3626
3626
|
// id={iframeId}
|
|
@@ -5219,9 +5219,10 @@ function GetPaymentPage(props) {
|
|
|
5219
5219
|
const merchantName = (paymentData == null ? void 0 : paymentData.bname) || (paymentData == null ? void 0 : paymentData.customer_name) || "the merchant";
|
|
5220
5220
|
const invoiceNo = String((props == null ? void 0 : props.orderID) || "").replace(/^\s*invoice\s*#?\s*/i, "").trim();
|
|
5221
5221
|
const invoiceLabel = invoiceNo ? `Invoice #${invoiceNo}` : "Invoice";
|
|
5222
|
-
const baseAmount = Number(
|
|
5222
|
+
const baseAmount = Number(cashDiscount && cashDiscount > 0 ? cashDiscount : (_a = props == null ? void 0 : props.amount) != null ? _a : 0);
|
|
5223
5223
|
const fundingType = (_b = surchargeResult == null ? void 0 : surchargeResult.card_issue_type) == null ? void 0 : _b.toLowerCase();
|
|
5224
|
-
const
|
|
5224
|
+
const lookupApproximated = !!surchargeResult && (surchargeResult.surcharge_lookup_status === "approximated" || !!surchargeResult.engine_error);
|
|
5225
|
+
const surchargeBlocked = !!surchargeResult && (fundingType === "debit" || fundingType === "prepaid" || !lookupApproximated && fundingType !== "unknown" && (surchargeResult.surcharge_allowed === false || !(Number(surchargeResult.max_surcharge_percent) > 0)));
|
|
5225
5226
|
const cardTotal = surchargeBlocked ? baseAmount : Number((props == null ? void 0 : props.amount) || 0);
|
|
5226
5227
|
const surchargeFee = Math.max(cardTotal - baseAmount, 0);
|
|
5227
5228
|
const isBankView = activetab === "ach";
|