📱Cowpay Flutter plugin
This document is a guide to the example project included in the plugin files. In addition, following the below steps will help you learn how to add and use (Cowpay plugin) in your flutter application.
1. REQUIREMENTS
Minimum Flutter version 2.5.0
2. INSTALLATION
You can find the latest version from here:
3. IMPORT
4. USAGE
Create a widget and just return Cowpay-plugin widget in the build function as:
5. VALUES DESCRIPTION
localizationCode
Select your language code enum value LocalizationCode.en for English, and LocalizationCode.ar if Arabic.
amount
two decimal value like "15.60", sent in case of partial capture
customerEmail
customer valid email
customerMobile
internationally formatted customer mobile (Should Start with country code (ex. +20 for Egypt Number))
customerLastName
customer last name being charged
customerFirstName
customer first name being charged
isFeesOnCustomer
is fees on customer or merchant
logoStringUrl
merchant logo url
merchantMobile
merchant mobile
description
charge request description that reserve the payment name
customerMerchantProfileId
ID of the customer being charged on your system
merchantReferenceId
Unique alphanumeric value required as identifier for the charge request
activeEnvironment
CowpayEnvironment.staging || CowpayEnvironment.production
merchantHashCode
Hash code that is presented in your panel.
merchantCode
Your code that is presented in your panel.
onSuccess
Call back function if transaction succeeds.
onError
Call back function when an error occurres.
onClosedByUser
Call back function if customer goes back before making a transaction.
Last updated