apple_pay_mimic 0.1.0
apple_pay_mimic: ^0.1.0 copied to clipboard

Mimics to PassKit API

Apple Pay Mimic #

Apple Pay Mimic contains flexible mimics to PassKit

Getting Started #

Requires iOS 10 #

  • Add apple_pay_mimic dependency to your pubspec.yaml
  • Call await ApplePayMimic.init() for plugin initialization
  • You are ready

Table of Mimics #

Enums #

PassKitApplePayMimic
PKPaymentNetworkPKPaymentNetwork
PKMerchantCapabilityPKMerchantCapability
PKShippingTypePKShippingType
PKContactFieldPKContactField
PKPaymentSummaryItemTypePKPaymentSummaryItemType
PKPaymentMethodTypePKPaymentMethodType

Structures #

PassKitApplePayMimic
PKPaymentSummaryItemPKPaymentSummaryItem
PKShippingMethodPKShippingMethod
PKContactPKContact
PKPaymentTokenPKPaymentToken
PKPaymentMethodPKPaymentMethod
PKPaymentPKPayment
PersonNameComponentsPersonNameComponents
CNPostalAddressCNPostalAddress

Actions #

PassKitApplePayMimic
PKPaymentRequest.availableNetworksApplePayMimic.availableNetworks
PKPaymentAuthorizationController.canMakePaymentsApplePayMimic.canMakePayments
PKPaymentAuthorizationController.presentApplePayMimic.processPayment

Widgets #

PassKitApplePayMimic
PKPaymentButtonApplePayButton

Usage #

Look at the example: https://github.com/urusai88/apple_pay_mimic/tree/master/example This example fills some conditions:

  • You are book and stationery store.
  • You have two shipping types, a slow for free, and a fast for 5$
  • You want to charge payment with two items - a Harry Potter book and a Pencil case
  • You can process shipping only in Germany and Russia countries
  • You provide to Germany users free bonus item - a Tape