Viva Wallet POS Flutter
This is a Flutter plugin for Android and iOS integration with Viva Terminal.
You can download the POS app from:
For demo access, you must use the demo version of the Viva.com Terminal App. Contact Viva.com for demo access.
Feel free to contribute to this project on GitHub.
Installation
Add the package to your project:
flutter pub add viva_wallet_pos
This will add the latest compatible version of viva_wallet_pos to your pubspec.yaml.
Then run:
flutter pub get
Getting Started
Using the library
Please see the example project for basic usage.
Have a look at the official developer page:
https://developer.vivawallet.com/apis-for-point-of-sale/card-terminal-apps/android-app/
All function and parameter names in the plugin follow the official documentation.
Sample sale
import 'package:flutter/foundation.dart';
import 'package:viva_wallet_pos/viva_wallet_pos.dart';
final pos = VivaWalletPos();
try {
final response = await pos.sale(
clientTransactionId: 'Invoice 1234',
amount: 10.00,
showRating: false,
showReceipt: true,
showTransactionResult: false,
);
_resultMessage(response.message);
} catch (e) {
debugPrint(e.toString());
}
Sample ISV sale
import 'package:flutter/foundation.dart';
import 'package:viva_wallet_pos/viva_wallet_pos.dart';
final pos = VivaWalletPos();
try {
final response = await pos.isvSale(
amount: 10.0,
tipAmount: 0.2,
isvAmount: 0.1,
clientTransactionId: 'CLIENT_TRANS_ID',
isvClientId: 'ISV_CLIENT_ID',
isvClientSecret: 'ISV_CLIENT_SECRET',
isvMerchantId: 'ISV_MERCHANT_ID',
isvClientTransactionId: 'ISV_CLIENT_TRANS_ID',
);
_resultMessage(response.message);
} catch (e) {
debugPrint(e.toString());
}
Supported methods
xactivatePosxgetActivationCodexsetModexsetDecimalAmountModexresetTerminalxbatchxtransactionDetailsxfastRefundxsetPrintingSettingsxreprintTransactionxsendLogsxsalexisvSale — new, thanks to @jousis9. See https://github.com/drigler/viva_wallet_pos/pull/1xsaleVivaIsvFiscalGreece — new, thanks to @fotis-psarris. See https://github.com/drigler/viva_wallet_pos/pull/11xsaleRequestGreeceAade — new, thanks to @fotis-psarris. See https://github.com/drigler/viva_wallet_pos/pull/11xcancelVivaFiscalGreece — new, thanks to @fotis-psarris. See https://github.com/drigler/viva_wallet_pos/pull/11xcancelxabort
Unsupported methods - work in progress
preauth requestcapture pre-auth requestrebate request
Copyright
All trademarks, logos and brand names are the property of their respective owners. Use of these names, trademarks and brands does not imply endorsement.