Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

996 B
Raw Blame
import { getCustomExchange } from "./Modifiers";

const bankRedirectEftData = {
  payment_method: "bank_redirect",
  payment_method_type: "eft",
  payment_method_data: {
    bank_redirect: {
      eft: {
        provider: "ozow",
      },
    },
  },
};

export const connectorDetails = {
  bank_redirect_pm: {
    PaymentIntent: (paymentMethodType) => {
      const currencyMap = { Eft: "ZAR" };
      return getCustomExchange({
        Request: {
          currency: currencyMap[paymentMethodType] || "USD",
        },
        Response: {
          status: 200,
          body: {
            status: "requires_payment_method",
          },
        },
      });
    },
    Eft: getCustomExchange({
      Request: {
        ...bankRedirectEftData,
        currency: "ZAR",
        customer_acceptance: null,
        setup_future_usage: "on_session",
      },
      Response: {
        status: 200,
        body: {
          status: "requires_customer_action",
        },
      },
    }),
  },
};