UNPKG

@spreeloop/orange_money

Version:
71 lines 2.16 kB
import Joi from 'joi'; import { LoggerInterface } from '../../utils/logging_interface'; import { TargetEnvironment } from '../../utils/utils'; import { OrangeMoneyPaymentStatus } from './constants'; /** * The provider generic response data of payment request of status verification request. */ export declare type GenericRequestResponseData = { message: string; data: { id: number; createtime: string | null; subscriberMsisdn: string; amount: number; payToken: string; txnid: string | null; txnmode: string | null; inittxnmessage: string; inittxnstatus: string; confirmtxnstatus: string | null; confirmtxnmessage: string | null; status: OrangeMoneyPaymentStatus; notifUrl: string | null; description: string | null; channelUserMsisdn: string; }; }; /** * The provider generic response data of payment request of status verification request. * We only make validation off fields that are required. */ export declare const genericRequestResponseSchema: Joi.ObjectSchema<GenericRequestResponseData>; export declare type InitPaymentBodySchema = { orderId: string; description: string; orangeMoneyVersion?: string; notifUrl: string; pin: string; payToken: string; amount: number; channelUserMsisdn: string; subscriberMsisdn: string; }; export declare const initPaymentBodySchema: Joi.ObjectSchema<InitPaymentBodySchema>; export interface OrangeMoneyPaymentConfigs { targetEnvironment: TargetEnvironment; logger: LoggerInterface; apiUserName: string; apiPassword: string; xAuthToken: string; orangeMoneyVersion?: string; } /** * The provider access token request response from the OM server. */ export declare type AccessTokenRequestResponse = { access_token: string; scope: string; token_type: string; expires_in: number; }; /** * The provider payToken request response from the OM server. */ export declare type PayTokenRequestResponse = { message: string; data: { payToken: string; }; }; //# sourceMappingURL=joi_schema.d.ts.map