vnpay_flutter

Creator: coderz1093

Last updated:

0 purchases

vnpay_flutter Image
vnpay_flutter Images

Languages

Categories

Add to Cart

Description:

vnpay flutter

VNPAY Flutter Package #
Introduction #
This is a package help interactive with VNPAY
Installation #
Add this to you package's pubspec.yaml file:
dependencies:
vnpay_flutter: ^1.0.0
copied to clipboard
Run pub get command
flutter pub get
copied to clipboard
Usage/Examples #
final paymentUrl = VNPAYFlutter.instance.generatePaymentUrl(
url: 'https://sandbox.vnpayment.vn/paymentv2/vpcpay.html', //vnpay url, default is https://sandbox.vnpayment.vn/paymentv2/vpcpay.html
version: '2.0.1', //version of VNPAY, default is 2.0.1
tmnCode: 'XXX', //vnpay tmn code, get from vnpay
txnRef: DateTime.now().millisecondsSinceEpoch.toString(), //ref code, default is timestamp
orderInfo: 'Pay 30.000 VND', //order info, default is Pay Order
amount: 30000, //amount
returnUrl: 'https://abc.com/return', //https://sandbox.vnpayment.vn/apis/docs/huong-dan-tich-hop/#code-returnurl
ipAdress: '192.168.10.10', //Your IP address
vnpayHashKey: 'XXX', //vnpay hash key, get from vnpay
vnPayHashType: VNPayHashType
.HMACSHA512, //hash type. Default is HmacSHA512, you can chang it in: https://sandbox.vnpayment.vn/merchantv2
);
VNPAYFlutter.instance.show(
paymentUrl: paymentUrl,
onPaymentSuccess: (params) {}, //on mobile transaction success
onPaymentError: (params) {}, //on mobile transaction error
onWebPaymentComplete: (){} //only use in web
);
copied to clipboard
Authors #

@justaboy-dev

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.