react-native-apple-payment
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.1 • Public • Published

    react-native-apple-payment

    Apple Pay implementation for React Native (Only IOS)

    img1 img2 img3

    Installation

    yarn add react-native-apple-payment
    
    cd ios && pod install

    Usage

    Types

    type Network = 'Visa' | 'MasterCard' | 'AmEx';
    
    export type SupportedNetworks = Network[];
    
    export interface MethodData {
        countryCode: string;
        currencyCode: string;
        supportedNetworks: SupportedNetworks;
        merchantIdentifier: string;
    }
    
    export interface Detail {
        label: string;
        amount: number;
    }
    
    export interface DetailsData {
        total: Detail;
    }
    
    export type TransactionIdentifier = string;

    Code

    import ApplePay, { MethodData, DetailsData } from "react-native-apple-payment";
    
    const payment = new ApplePay(method as MethodData, details as DetailsData);
    
    const canMakePayment: boolean = await payment.canMakePayments()
    
    const paymentResponse: TransactionIdentifier = await payment.initApplePay()

    Contributing

    See the contributing guide to learn how to contribute to the repository and the development workflow.

    License

    MIT

    Install

    npm i react-native-apple-payment

    DownloadsWeekly Downloads

    11

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    37.1 kB

    Total Files

    14

    Last publish

    Collaborators

    • yevheniionipko