@abdelrahman.rabie/payment-sdk-react-native
Version:
React Native SDK for payment processing with E_API and E_LINKS support
39 lines (38 loc) • 1.5 kB
TypeScript
import { HttpClient } from './httpClient';
import { EPaymentProduct, IEAPIPaymentInfoResponse, IELINKSPaymentInfoResponse, IRequestPaymentPayload, IApplePayResponse, IPaymentResult } from '../types/payment.types';
export declare class PaymentService {
private httpClient;
constructor(httpClient: HttpClient);
/**
* Validates payment token format based on product type
*/
private validatePaymentToken;
/**
* Get charge details for E_API product
*/
getChargeDetails(token: string): Promise<IEAPIPaymentInfoResponse>;
/**
* Get invoice details for E_LINKS product
*/
getInvoiceDetails(token: string): Promise<IELINKSPaymentInfoResponse>;
/**
* Get payment info based on product type
*/
getPaymentInfo(product: EPaymentProduct, token: string): Promise<IEAPIPaymentInfoResponse | IELINKSPaymentInfoResponse>;
/**
* Process payment for E_API product
*/
requestChargePay(token: string, payload: IRequestPaymentPayload): Promise<IPaymentResult>;
/**
* Process payment for E_LINKS product
*/
requestInvoicePay(token: string, payload: IRequestPaymentPayload): Promise<IPaymentResult>;
/**
* Process payment based on product type
*/
processPayment(product: EPaymentProduct, token: string, payload: IRequestPaymentPayload): Promise<IPaymentResult>;
/**
* Validate Apple Pay merchant
*/
validateApplePayMerchant(validationURL: string): Promise<IApplePayResponse>;
}