INNER CODE UNIT · TypeScript

paymentNotification

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

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

  const options = {
    gateway: gateway,
    gatewaySettings: gatewaySettings,
    ctx,
  }

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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…