simple_flutter_apple_pay 0.0.5 simple_flutter_apple_pay: ^0.0.5 copied to clipboard
Simple Flutter Apple Pay
Basic apple pay #
This is basic implemention of apple pay for Flutter.
TODO #
- better read me
- payment networks
- merchant capabilities settings
Example #
Future<void> makePayment() async {
PaymentResult result;
PaymentItem paymentItems =
PaymentItem(label: 'Label', amount: 51.0, isFinal: true);
try {
result = await FlutterApplePay.startPayment(
countryCode: "CZ",
currencyCode: "CZK",
paymentNetworks: [PaymentNetwork.visa, PaymentNetwork.mastercard],
merchantIdentifier: "merchant.example.mcc.cz",
paymentItems: [paymentItems],
);
print(result);
} on Exception {
// Exception thrown OS isn't iOS
}
}