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

2.6 KB
Raw Blame
import { getCustomExchange } from "./Modifiers";

export const connectorDetails = {
  pay_later_pm: {
    AutoCapture: getCustomExchange({
      Configs: {
        TRIGGER_SKIP: true,
      },
    }),
    ManualCapture: getCustomExchange({
      Configs: {
        TRIGGER_SKIP: true,
      },
    }),
    Klarna: getCustomExchange({
      Configs: {
        TRIGGER_SKIP: true,
      },
    }),
    CaptureOnWrongStatus: getCustomExchange({
      Configs: {
        TRIGGER_SKIP: true,
      },
    }),
    ConfirmWithoutPmData: getCustomExchange({
      Configs: {
        TRIGGER_SKIP: true,
      },
    }),
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    PaymentIntent: (_paymentMethodType) =>
      getCustomExchange({
        Request: {
          currency: "ZAR",
          amount: 10000,
        },
        Response: {
          status: 200,
          body: {
            status: "requires_payment_method",
          },
        },
      }),
    Payjustnowinstore: getCustomExchange({
      Configs: {
        skipPaymentMethodStatusAssertion: true,
      },
      Request: {
        payment_method: "pay_later",
        payment_method_type: "payjustnow",
        return_url: "https://example.com/return",
        payment_method_data: {
          pay_later: {
            payjustnow_redirect: {},
          },
        },
        billing: {
          email: "[email protected]",
          address: {
            line1: "123 Main Street",
            line2: "",
            line3: "",
            city: "Johannesburg",
            state: "Gauteng",
            zip: "2001",
            country: "ZA",
            first_name: "Test",
            last_name: "Customer",
          },
        },
        shipping: {
          email: "[email protected]",
          address: {
            line1: "123 Main Street",
            line2: "",
            line3: "",
            city: "Johannesburg",
            state: "Gauteng",
            zip: "2001",
            country: "ZA",
            first_name: "Test",
            last_name: "Customer",
          },
        },
        order_details: [
          {
            product_name: "Test Product",
            quantity: 1,
            amount: 10000,
          },
        ],
      },
      Response: {
        status: 200,
        body: {
          status: "requires_customer_action",
        },
      },
    }),
    Refund: getCustomExchange({
      Configs: {
        TRIGGER_SKIP: true,
      },
    }),
    PartialRefund: getCustomExchange({
      Configs: {
        TRIGGER_SKIP: true,
      },
    }),
    SyncRefund: getCustomExchange({
      Configs: {
        TRIGGER_SKIP: true,
      },
    }),
  },
};