INNER CODE UNIT · TypeScript

getPaymentFormSettings

Cezerin2/Cezerin2 · src/server/paymentGateways/index.ts:32

const getPaymentFormSettings = async (orderID: string) => {
  const options = await getOptions(orderID)

  switch (options.gateway) {
    case "paypal-checkout":
      return PayPalCheckout.getPaymentFormSettings(options)
    case "liqpay":
      return LiqPay.getPaymentFormSettings(options)
    case "stripe-elements":
      return StripeElements.getPaymentFormSettings(options)
    default:
      return Promise.reject("Invalid gateway")
  }
}

const paymentNotification = async (ctx: RouterContext, gateway) => {
  const gatewaySettings = await PaymentGatewaysService.getGateway(gateway)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…