apple_pay_flutter

Last updated:

0 purchases

apple_pay_flutter Image
apple_pay_flutter Images
Add to Cart

Description:

apple pay flutter

apple_pay_flutter #
Accept Payments with Apple Pay.
Usage #
import 'package:apple_pay_flutter/apple_pay_flutter.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,shippingcharge: 2.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",
companyName: "Demo Company",

);

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

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

copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.