flutter_kushki 0.0.1 flutter_kushki: ^0.0.1 copied to clipboard
A new flutter plugin project.
flutter_kushki #
Kushki frontend payment gateway integration for Flutter
Installing #
-
Add dependency to
pubspec.yaml
Get the latest version in the 'Installing' tab on pub.dartlang.org
dependencies:
flutter_kushki: ^0.0.1
- Import the package
import 'package:flutter_credit_card/flutter_credit_card.dart';
Usage #
Instantiate the class
try {
kushki = new Kushki(
publicMerchantId: '<your_merchant_id>',
currency: 'USD',
environment: KushkiEnvironment.TESTING,
regional: false
);
await kushki.init;
} on PlatformException {
print('Failied to instantiate class');
}
Create the card data
final _card = KushkiCard();
_card.name = 'Kushki Test';
_card.number = '4381082002222866';
_card.cvv = '633';
_card.expiryMonth = '07';
_card.expiryYear = '21';
_card.totalAmount = 30.52;
Get the card token
try {
final transaction = await kushki.requestToken(_card);
print(transaction);
} on PlatformException catch (e) {
print(e.toString());
}
TODO: #
- requestToken()
- getBinInfo()
- requestSubscriptionToken()
- requestCardAsyncToken()
- getBankList()
- requestTransferSubscriptionToken()
- requestSecureValidation()
- requestCashToken()
- requestCashOutToken()
- requestTransferToken()