UNPKG

medusa-payment-comgate-jc

Version:
46 lines (45 loc) 1.31 kB
import { PaymentProcessorError, PaymentProcessorSessionResponse, PaymentSessionStatus } from "@medusajs/medusa"; import { StatusResponseStatus } from "comgate-node/dist/types/endpoints/status"; export interface ComgatePaymentOptions { merchant: number; secret: string; test: boolean; debug: boolean; } export declare const PaymentProviderKeys: { COMGATE_CARD: string; COMGATE_BANK: string; COMGATE: string; }; export type ComgatePaymentProcessorSessionResponse = Omit<PaymentProcessorSessionResponse, "session_data"> & { session_data: ComgateSessionData; }; export type ComgateSessionData = { status: PaymentSessionStatus; comgateData: { transId: string | null; status: "INITIATED" | "CREATED" | "ERROR" | StatusResponseStatus; redirect: string | null; error: PaymentProcessorError | null; }; }; export type ComgateStatusRequest = { merchant: string; test: boolean; price: number; curr: string; label: string; refId: string; email: string; transId: string; secret: string; status: "PAID" | "CANCELLED" | "AUTHORIZED"; payerId?: string; payerName?: string; payerAcc?: string; method?: string; account?: string; phone?: string; name?: string; fee?: string; };