yandex_checkout_flutter 1.0.0+4 yandex_checkout_flutter: ^1.0.0+4 copied to clipboard
Implementation Yandex Checkout SDK for Flutter.
YandexCheckout #
Implementation Yandex Checkout SDK for Flutter. Official documentation for native lib (Android)
Use official documentation for settings Yandex.Login feature
Plugin not supported for IOS!
Feature #
Example #
Demonstrated how use plugin features.
Test checkout #
void checkout() async{
final PaymentParameters param = PaymentParameters(
amount: Amount(currency: Currency.RUB, value: 20.99),
title: 'Anything',
subTitle: 'Subtitle anything',
clientApplicationKey: 'test_token',
paymentMethodTypes: {
PaymentMethodType.SBERBANK,
PaymentMethodType.BANK_CARD,
PaymentMethodType.GOOGLE_PAY,
},
googlePayParameters: {
GooglePayParameters.MASTERCARD,
GooglePayParameters.VISA
},
shopId: '000000');
final Result result = await YandexCheckout().startTestCheckout(param);
if(result.hasError){
//If checkout process ended with error
}
else if(result.hasData){
//Take TokenizationResult result.data
}
else{
//If checkout process cancel
}
}
Default checkout #
void checkout() async{
final Result result = await YandexCheckout().startCheckout(
PaymentParameters(
amount: Amount(currency: Currency.RUB, value: 20.99),
title: 'Anything',
subTitle: 'Subtitle anything',
clientApplicationKey: 'YOUR_TOKEN',
shopId: 'YOUR_SHOP_ID')
);
result.whenWithResult<void>((result){
//Success
}, (){
//Cancel
}, (){
//Error
});
}
3Ds checkout #
void checkout() async{
final Result3Ds result = await YandexCheckout().start3DsCheckout('YOUR_3DS_URL');
//Handle result...
}