dgepay 1.0.0
dgepay: ^1.0.0 copied to clipboard
DGePay is the first licensed Payment System Operator (PSO) in Bangladesh from Bangladesh Bank for White Label Merchant Acquiring (WLMA). We are building the largest merchant payment network allowing s [...]
DGePay flutter package #
This is the official DGePay flutter package for merchants to integrate our payment system with their Flutter applications.
DGePay flutter package makes the payment system easier for you with just two method calls:
makePayment()checkStatus()
And that's all! To know more about its usage please check the details below.
Adding a package dependency to an app #
- Open the
pubspec.yamlfile located inside the app folder and adddgepay: ^1.0.0under dependencies. - Run command
flutter pub getto pull and download dependencies.
Usage #
-
First, you must create object of DGePayConfigs before using any function and passing the environment type and merchant credentials as a parameter.
Example:
DGePayConfigs dGePayConfigs = DGePayConfigs( env: DGePayEnvironmentType.UAT, // Testing Enviornment clientID: 'b20699df06a7456fbd251d0b98530dd4', // Test Client ID clientSecretKey: '98c055a82a0efe19', // Test Client Secret Key clientAPIKey: '6bed50b19c1340f4b61ed376b22ec243' // Test Client API Key ); -
After that, you can start using our package the way you want based on your application. Here we are providing a basic example code snip for you.
Example
//Create a DGePay object. DGePay dGePay = DGePay(); //Create payment request model and initialize values. DGePayPaymentReqModel paymentReqMode = DGePayPaymentReqModel( amount: 10.00, customerToken: null, note: 'Note', // Payment Description uniqueTxnId: generateHexId(32), dialCode: '+88', phoneNumber: 01721111111, // 11 Digits dGePayConfigs: dGePayConfigs); //Create a payment response model object to store the makePayment() method results. DGePayPaymentRespModel paymentRespModel = DGePayPaymentRespModel(); //Calling makePayment() method to initiate payment process. paymentRespModel = await dGePay.makePayment( context: context, dGePayConfigs: dGePayConfigs, dGePayPaymentReqModel: paymentReqMode); //Check the response. if (paymentRespModel.status == true) { print(paymentRespModel.status); print(paymentRespModel.message); print(paymentRespModel.dGePayOrderId); }
That's all! Now you are ready to use our DGePay flutter package to make your payment system easy and smooth.
License #
This code is under the MIT open source License.
Please contact with DGePay team for more detail.
Copyright ©️2025 DGePay Services Limited.