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
    }
  }

Libraries

simple_flutter_apple_pay