tappayflutterplugin

This is a Flutter plugin that help developer to use Tappay.

Getting Started

How to setup

Please check the official document of TapPay.

Usage

Direct Pay

1. Set up your environment

Tappayflutterplugin.setupTappay(
                         appId: appId,
                         appKey: appKey,
                         serverType: TappayServerType.sandBox,
                         errorMessage: (error) {
                           print(error);
                         });

2. Get prime

PrimeModel prime = await Tappayflutterplugin.getPrime(
                    cardNumber: cardNumber,
                    dueMonth: dueMonth,
                    dueYear: dueYear,
                    ccv: ccv,
                  );

Easy wallet

IsEasyWalletAvailable

bool isEasyWalletAvailable = await Tappayflutterplugin.isEasyWalletAvailable()

Get prime

PrimeModel prime = await Tappayflutterplugin.getEasyWalletPrime(
                    universalLink: universalLink,
                  );

Redirect to Easy wallet

TPDEasyWalletResult result = await Tappayflutterplugin.redirectToEasyWallet(
                    universalLink: universalLink,
                    paymentUrl: paymentUrl,
                  );

Parse to Easy wallet result

  • After finished the payment process, tappay will give you an uri from onNewIntent in android. Use this uri to query LinePay result.
TPDEasyWalletResult result = await Tappayflutterplugin.parseToEasyWalletResult(
                    universalLink: universalLink,
                    uri: uri,
                  );

Get Easy wallet result

TPDEasyWalletResult result = await Tappayflutterplugin.getEasyWalletResult();

LinePay

IsLinePayAvailable

bool isLinePayAvailable = await Tappayflutterplugin.isLinePayAvailable()

Get prime

PrimeModel prime = await Tappayflutterplugin.getLinePayPrime(
                    universalLink: universalLink,
                  );

Redirect to LinePay

  • In android, you have to go to next step, to get result.
TPDLinePayResult result = await Tappayflutterplugin.redirectToLinePay(
                    universalLink: universalLink,
                    paymentUrl: paymentUrl,
                  );

Parse to LinePay result

  • After finished the payment process, tappay will give you an uri from onNewIntent in android. Use this uri to query LinePay result.
TPDLinePayResult result = await Tappayflutterplugin.parseToLinePayResult(
                    universalLink: universalLink,
                    uri: uri,
                  );

Get LinePay result

TPDLinePayResult result = await Tappayflutterplugin.getLinePayResult();

Libraries

tappayflutterplugin