Skip to content

Latest commit

 

History

History
20 lines (19 loc) · 593 Bytes

README.md

File metadata and controls

20 lines (19 loc) · 593 Bytes

Example

 Future<void> makePayment() async {
    dynamic platformVersion;
    PaymentItem paymentItems = PaymentItem(label: 'Label', amount: 51.0);
    try {
      platformVersion = await FlutterApplePay.makePayment(
        countryCode: "US",
        currencyCode: "USD",
        paymentNetworks: [PaymentNetwork.visa, PaymentNetwork.mastercard],
        merchantIdentifier: "merchant.stripeApplePayTest",
        paymentItems: [paymentItems],
      );
      print(platformVersion);
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }
  }