This is a Flutter plugin that help developer to use Tappay.
Please check the official document of TapPay.
- iOS: https://github.com/TapPay/tappay-ios-example
- android: https://github.com/TapPay/tappay-android-example
Tappayflutterplugin.setupTappay(
appId: appId,
appKey: appKey,
serverType: TappayServerType.sandBox,
errorMessage: (error) {
print(error);
});
PrimeModel prime = await Tappayflutterplugin.getPrime(
cardNumber: cardNumber,
dueMonth: dueMonth,
dueYear: dueYear,
ccv: ccv,
);
bool isEasyWalletAvailable = await Tappayflutterplugin.isEasyWalletAvailable()
PrimeModel prime = await Tappayflutterplugin.getEasyWalletPrime(
universalLink: universalLink,
);
TPDEasyWalletResult result = await Tappayflutterplugin.redirectToEasyWallet(
universalLink: universalLink,
paymentUrl: paymentUrl,
);
- 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,
);
TPDEasyWalletResult result = await Tappayflutterplugin.getEasyWalletResult();
bool isLinePayAvailable = await Tappayflutterplugin.isLinePayAvailable()
PrimeModel prime = await Tappayflutterplugin.getLinePayPrime(
universalLink: universalLink,
);
- In android, you have to go to next step, to get result.
TPDLinePayResult result = await Tappayflutterplugin.redirectToLinePay(
universalLink: universalLink,
paymentUrl: paymentUrl,
);
- 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,
);
TPDLinePayResult result = await Tappayflutterplugin.getLinePayResult();