Giter VIP home page Giter VIP logo

mad-pay-flutter's Introduction

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: 2.0.2

For Android: set minSdkVersion to 21

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

mad-pay-flutter's People

Contributors

antol avatar mit-73 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.