Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
/ Mad-Pay-Flutter Public archive
forked from dagba/Mad-Pay-Flutter

Mad Pay will help you make payments through Apple Pay and Google Pay

License

Notifications You must be signed in to change notification settings

smmarty/Mad-Pay-Flutter

 
 

Repository files navigation

Flutter Mad Pay

Easy integration with Google Pay and Apple Pay for your flutter app.

Apple Pay API Documentation.

Google Pay API Documentation.

SDK Features

  • Pay with Apple Pay and Google Pay
  • Checking payment availability on your device
  • Checking the user's active cards

Installing

Add this to your package's pubspec.yaml file:

dependencies:
  mad_pay: 1.0.0

Usage

To start using payment you need to get Merchant Identifier:

final MadPay pay = MadPay();

// To find out if payment is available on this device
await pay.checkPayments();

// If you need to check if user has at least one active card
await pay.checkActiveCard(
  paymentNetworks: <PaymentNetwork>[
    PaymentNetwork.visa,
    PaymentNetwork.mastercard,
  ],
);

// To pay with Apple Pay or Google Pay
await pay.processingPayment(
  google: GoogleParameters(
    gatewayName: 'Your Gateway',
    gatewayMerchantId: 'Your id',
  ),
  apple: AppleParameters(
    merchantIdentifier: 'Your id',
  ),
  currencyCode: 'USD',
  countryCode: 'US',
  paymentItems: <PaymentItem>[
    PaymentItem(name: 'T-Shirt', price: 2.98),
    PaymentItem(name: 'Trousers', price: 15.24),
  ],
  paymentNetworks: <PaymentNetwork>[
    PaymentNetwork.visa,
    PaymentNetwork.mastercard,
  ],
);

Example

The Example is in the corresponding folder

Payment Network matrix

Payment Network iOS Android
Visa + +
MasterCard + +
American Express + +
Interac + +
Discover + +
JCB + +
Maestro +
Electron +
Cartes Bancarries +
Union Pay +
EftPos +
Elo +
ID Credit +
Mada +
Private Label +
Quic Pay +
Suica +
V Pay +
Mir Pay

About

Mad Pay will help you make payments through Apple Pay and Google Pay

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 52.5%
  • Swift 31.6%
  • Kotlin 13.4%
  • Ruby 1.8%
  • Other 0.7%