UNPKG

react-native-paypal-bridge-sdk

Version:

A React Native library for the paypal sdk for both android and ios.

52 lines (44 loc) 1.07 kB
declare module "react-native-paypal-bridge-sdk" { export interface ENVIRONMENT { NO_NETWORK: number; SANDBOX: number; PRODUCTION: number; } export interface INTENT { SALE: number; AUTHORIZE: number; ORDER: number; } export interface PayPalPayment { environment: string; paypal_sdk_version: string; platform: string; product_name: string; } export interface ProofOfPayment { create_time: string; id: string; intent: string; state: string; } export interface PaymentConfirmation { client: PayPalPayment; response: ProofOfPayment; response_type: string; } export interface PaymentParams { clientId: string; environment: ENVIRONMENT; intent: INTENT; price: number; currency: string; description: string; acceptCreditCards: boolean; } export class RNPaypalSdk { static paymentRequest(params: PaymentParams): Promise<PaymentConfirmation>; static ENVIRONMENT: ENVIRONMENT; static INTENT: INTENT; } export default RNPaypalSdk; }