UNPKG

@tecafrik/africa-payment-sdk

Version:

A single SDK to integrate all african payment providers seamlessly

19 lines (17 loc) 527 B
export class PaymentError extends Error { public readonly type: PaymentErrorType; constructor( message: string, type: PaymentErrorType = PaymentErrorType.UNKNOWN_ERROR ) { super(message); this.type = type; } } export enum PaymentErrorType { INVALID_AUTHORIZATION_CODE = "INVALID_AUTHORIZATION_CODE", UNSUPPORTED_PAYMENT_METHOD = "UNSUPPORTED_PAYMENT_METHOD", INVALID_PHONE_NUMBER = "INVALID_PHONE_NUMBER", UNKNOWN_ERROR = "UNKNOWN_ERROR", INVALID_OPERATION_CODE = "INVALID_OPERATION_CODE", }