UNPKG

@tutorbot/payment-interface

Version:

Payment API Library for Tutor Platform

70 lines (69 loc) 2.05 kB
import BaseInterface from './base'; export interface IdramOrderAuthenticityConfirmation { EDP_PRECHECK?: string; EDP_BILL_NO?: string; EDP_REC_ACCOUNT?: string; EDP_AMOUNT?: string | number; } export interface IdramPaymentConfirmation { EDP_BILL_NO?: string; EDP_REC_ACCOUNT?: string; EDP_PAYER_ACCOUNT?: string; EDP_AMOUNT?: string | number; EDP_TRANS_ID?: string | number; EDP_TRANS_DATE?: string; EDP_CHECKSUM?: string; } export declare enum edpPreCheckValues { YES = "YES" } export default class IdramInterface extends BaseInterface { languages: string[]; currencies: string[]; testPayAmount: number; constructor(); get successUrl(): string; get failUrl(): string; get resultUrl(): string; get email(): string; get edpRecAccount(): string; private get secretKey(); protected productionConfigs(): { formSubmitUrl: string; secretKey: string; email: string; edpRecAccount: string; resultUrl: string; successUrl: string; failUrl: string; }; protected developmentConfigs(): { formSubmitUrl: string; secretKey: string; email: string; edpRecAccount: string; resultUrl: string; successUrl: string; failUrl: string; }; fetchTransactionId(queryParams: any): any; details(): Promise<{ redirectBackData: any; }>; submit(): Promise<{ transaction: string; formSubmitUrl: any; formFields: { EDP_LANGUAGE: any; EDP_REC_ACCOUNT: string; EDP_DESCRIPTION: any; EDP_AMOUNT: number; EDP_BILL_NO: any; EDP_EMAIL: string; transaction: string; }; }>; processIpn(data: IdramOrderAuthenticityConfirmation | IdramPaymentConfirmation): boolean; processOrderAuthenticityConfirmation(data: IdramOrderAuthenticityConfirmation): boolean; processPaymentConfirmation(data: IdramPaymentConfirmation): boolean; }