UNPKG

@wepublish/api

Version:
29 lines (28 loc) 1.36 kB
import { BasePaymentProvider, CheckIntentProps, CreatePaymentIntentProps, Intent, IntentState, PaymentProviderProps, WebhookForPaymentIntentProps, WebhookResponse } from './payment-provider'; import { GatewayClient } from '../payrexx/gateway-client'; import { TransactionClient } from '../payrexx/transaction-client'; export interface PayrexxPaymentProviderProps extends PaymentProviderProps { gatewayClient: GatewayClient; transactionClient: TransactionClient; webhookApiKey: string; psp: number[]; pm: string[]; vatRate: number; } export declare class PayrexxPaymentProvider extends BasePaymentProvider { readonly gatewayClient: GatewayClient; readonly transactionClient: TransactionClient; readonly webhookApiKey: string; readonly psp: number[]; readonly pm: string[]; readonly vatRate: number; constructor(props: PayrexxPaymentProviderProps); webhookForPaymentIntent(props: WebhookForPaymentIntentProps): Promise<WebhookResponse>; createIntent(createPaymentIntentProps: CreatePaymentIntentProps): Promise<Intent>; checkIntentStatus({ intentID }: CheckIntentProps): Promise<IntentState>; private createOffsiteTransactionIntent; private createGatewayIntent; private checkTransactionIntentStatus; private checkGatewayIntentStatus; private mapPayrexxEventToPaymentStatus; }