@fractalpay/fractalpay-next-dev 0.0.299 → 0.0.300

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 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.299",
42
+ version: "0.0.300",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -4627,7 +4627,8 @@ function GetPaymentPage(props) {
4627
4627
  setLoading2(true);
4628
4628
  try {
4629
4629
  const formData = {
4630
- amount: `${props.amount || 0}`,
4630
+ // amount: `${props.amount || 0}`,
4631
+ amount: `${leftTotal}`,
4631
4632
  fractalpayPublicKey: fractalpayClientKey,
4632
4633
  orderId: props == null ? void 0 : props.orderID,
4633
4634
  customer_id: props == null ? void 0 : props.customerId,
@@ -4887,7 +4888,8 @@ function GetPaymentPage(props) {
4887
4888
  let resultofOrderCreate;
4888
4889
  if (!(card_type === "Bank")) {
4889
4890
  const formData = {
4890
- amount: `${props.amount || 0}`,
4891
+ // amount: `${props.amount || 0}`,
4892
+ amount: `${leftTotal}`,
4891
4893
  fractalpayPublicKey: fractalpayClientKey,
4892
4894
  orderId: props == null ? void 0 : props.orderID,
4893
4895
  customer_id: props == null ? void 0 : props.customerId,
@@ -5091,7 +5093,7 @@ function GetPaymentPage(props) {
5091
5093
  const invoiceLabel = invoiceNo ? `Invoice #${invoiceNo}` : "Invoice";
5092
5094
  const baseAmount = Number((_a = cashDiscount != null ? cashDiscount : props == null ? void 0 : props.amount) != null ? _a : 0);
5093
5095
  const fundingType = (_b = surchargeResult == null ? void 0 : surchargeResult.card_issue_type) == null ? void 0 : _b.toLowerCase();
5094
- const surchargeBlocked = !!surchargeResult && (surchargeResult.surcharge_allowed === false || !(Number(surchargeResult.max_surcharge_percent) > 0) || fundingType === "debit" || fundingType === "prepaid");
5096
+ const surchargeBlocked = !!surchargeResult && (fundingType === "debit" || fundingType === "prepaid" || fundingType !== "unknown" && (surchargeResult.surcharge_allowed === false || !(Number(surchargeResult.max_surcharge_percent) > 0)));
5095
5097
  const cardTotal = surchargeBlocked ? baseAmount : Number((props == null ? void 0 : props.amount) || 0);
5096
5098
  const surchargeFee = Math.max(cardTotal - baseAmount, 0);
5097
5099
  const isBankView = activetab === "ach";