Integrate Tamara Checkout Flow into Flutter App
- Add callback for checkout flows:
- onPaymentSuccess
- onPaymentFailed
- onPaymentCanceled
Add sdk to your pubspec.yaml file
dependencies:
flutter:
sdk: flutter
tamara_sdk: ^0.9.1
Your Back End must call our Api for generating:
- Checkout URL
- Success URL
- Failed URL
- Canceled URL
Include TamaraCheckout in your Widget builder
Expanded(
child: TamaraCheckout(
checkoutUrl
successUrl,
failedUrl,
canceledUrl,
onPaymentSuccess: () {
_onPaymentSuccess();
},
onPaymentFailed: () {
_onPaymentFailed();
},
onPaymentCanceled: () {
_onPaymentCanceled();
},
)
);