tappayflutterplugin 0.0.48 tappayflutterplugin: ^0.0.48 copied to clipboard
This is a Flutter plugin that help developer to use Tappay.
tappayflutterplugin #
This is a Flutter plugin that help developer to use Tappay.
Getting Started #
How to setup #
Please check the official document of TapPay.
- iOS: https://github.com/TapPay/tappay-ios-example
- android: https://github.com/TapPay/tappay-android-example
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();