apple_pay_flutter 0.0.1 copy "apple_pay_flutter: ^0.0.1" to clipboard
apple_pay_flutter: ^0.0.1 copied to clipboard

outdated

Apple Pay (payment and digital wallet service by Apple Inc) to Flutter.

flutter_google_pay #

Accept Payments with Apple Pay.

Usage #

    import 'package:flutter_apple_pay/flutter_apple_pay.dart';

  Future<void> makePayment() async {

    // To store apple payment data
    dynamic applePaymentData;

    // List of items with label & price
    List<PaymentItem> paymentItems = [
      PaymentItem(label: 'Label', amount: 1.00)
    ];

    try {
        // initiate payment
        applePaymentData = await ApplePayFlutter.makePayment(
            countryCode: "US",
            currencyCode: "SAR",
            paymentNetworks: [
                PaymentNetwork.visa,
                PaymentNetwork.mastercard,
                PaymentNetwork.amex,
                PaymentNetwork.mada
            ],
            merchantIdentifier: "merchant.demo.tech.demoApplePayId",
            paymentItems: paymentItems,
            customerEmail: "[email protected]",
            customerName: "Demo User",
        );

        // This logs the Apple Pay response data
        print(applePaymentData.toString());

        } on PlatformException {
            print('Failed payment');
        }
     }

4
likes
0
points
159
downloads

Publisher

unverified uploader

Weekly Downloads

Apple Pay (payment and digital wallet service by Apple Inc) to Flutter.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on apple_pay_flutter

Packages that implement apple_pay_flutter