ipaycheckout 0.1.6 ipaycheckout: ^0.1.6 copied to clipboard
iPay Web Checkout SDK. It enable merchant to collect via mobile and card.
iPay Checkout gateway is flutter package to enable businesses easily integrate with iPay payment solution. The package is dynamic to enable business to choose which payment channels they'd like to show their customers.
Features #
-
Generate Checkout URL that is be used in webview to access iPay multi-channel payment gateway e.g Mpesa, Mpesa Express, Vooma, Amex, Visa/Mastercard, Union Pay, Airtel money, Equitel, Bonga and more.
-
Dynamically enable payment channels as per your business need.
Getting started #
Usage #
Import the iPay package
import 'package:ipaycheckout/ipaycheckout.dart';
Then intialize the Ipay class object. it takes two arguments, vendorId and vendorSecurityKey (these are supplied to you by iPay)
final ipay = IPay(vendorId: vendorId, vendorSecurityKey: securityKey);
Then the call the chekoutUrl fuction wich takes the following arguments:
live, oid, inv, ttl, tel, eml, curr, cbk, cst, crl. Refere to iPay documentation for more details https://dev.ipayafrica.com
Future<String> generateUrl(String phoneNumber, String email, String amount) async {
// for testing, vendorId and vendorSecurityKey shounld be set to demo and demo respectively
final ipay = IPay(vendorId: vendorId, vendorSecurityKey: securityKey);
var oid = getRandomString(10);
var inv = oid;
var url = ipay.checkoutUrl(
live: live,
oid: oid,
inv: inv,
ttl: amount,
tel: phoneNumber,
eml: email,
curr: currency,
cbk: callBackUrl,
cst: cst,
crl: crl,
//enable the channels you need
mpesa: mpesa,
bonga: bonga,
airtel: airtel,
equity: equity,
mobilebanking: mobilebanking,
creditcard: creditcard,
mkoporahisi: mkoporahisi,
saida: saida,
elipa: elipa,
unionpay: unionpay,
mvisa: mvisa,
vooma: vooma,
pesalink: pesalink,
autopay: autopay,
//enable card recurring payment. By default it's disabled expect true or false
recurring: recurring,
//for testing sandbox should be set to true. By default it's disabled expect true or false
sandbox: sandbox,
);
return url;
}
This will generate a URL that can be embedded in a webview to facilitate payment using iPay multi-channel payment gateway. #
Recurring Payment and Card Tokenization (NEW) #
Recurring Payment enable the customer card to be tokenized and this enable the business to set frequency of payment.
Note #
- The recurring value is either a true or false.
- If Recurring is enabled, only card channels will be available i.e. VISA/MASTERCARD
Card Testing #
For Testing purposes for both card and other mobile payment, sandbox should be set to true. VendorId and VendorSecurityKey should be set as follow
Merchant #
- VendorId: demo
- VendorSecurityKey: demo
- live: 1
Card Details #
- card number: 4456530000001096
- cvv: 123
- date: 01/29
- name: John Doe
- otp: 1234
Example #
https://github.com/Deskola/ipay_sdk_example
.