payumoney_pro_unofficial

Last updated:

0 purchases

payumoney_pro_unofficial Image
payumoney_pro_unofficial Images
Add to Cart

Description:

payumoney pro unofficial

Flutter PayUMoney Pro SDK #

Flutter Plugin to implement PayUMoney Latest CheckoutPro SDK in Android & iOS App. #
Screenshots

Note: This Plugin is in initial release. Please test it well before using it in production app. #
Step 1: Android Implementation #
There are few steps you need to follow to implement PayUMoney SDK:


Open file android/app/build.gradle in your flutter project and update minSdkVersion under "defaultConfig" to 21 (if greater than leave)


Open AndroidManifest.xml located at android/app/src/main and add following code:



xmlns:tools="http://schemas.android.com/tools"

copied to clipboard

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:tools="http://schemas.android.com/tools" <--- paste here

package="yourPackageName">

copied to clipboard
also add this code:

tools:replace="android:label"

copied to clipboard

<application

android:name="io.flutter.app.FlutterApplication"

android:label="YourAppName"

tools:replace="android:label" <-- Paste here

android:icon="@mipmap/ic_launcher">

copied to clipboard
Step 2: iOS Implementation #
<-- No additional steps required for iOS -->
Step 3: Flutter Implementation #
Run this command in project terminal to add dependency
flutter pub add payumoney_pro_unofficial
or add manually to pubspecs.yaml
payumoney_pro_unofficial: ^0.0.9
Get latest packages
flutter pub get
Import package to by adding this line at the top

import 'package:payumoney_pro_unofficial/payumoney_pro_unofficial.dart';

copied to clipboard
Copy and paste this code

Future<void> initializePayment() async{

final response= await PayumoneyProUnofficial.payUParams(

email: '<Customer Email>',

firstName: '<Customer Name>',

merchantName: '<Merchant Name>',

isProduction: true,

merchantKey: '<Merchant Key>',

merchantSalt: '<Merchant Salt Version 1>',

amount: '<Amount in Rs>',

hashUrl:'<Checksum URL to generate dynamic hashes>', //nodejs code is included. Host the code and update its url here.

productInfo: '<Product Name>',

transactionId: '<Unique ID>',

showExitConfirmation:true,

showLogs:false, // true for debugging, false for production

userCredentials:'<Merchant Key>:' + '<Customer Email or User ID>',

userPhoneNumber: phone

);



if (response['status'] == PayUParams.success)

handlePaymentSuccess();

if (response['status'] == PayUParams.failed)

handlePaymentFailure(response['message']);

}



handlePaymentSuccess(){

//Implement Your Success Logic

}



handlePaymentFailure(String errorMessage){

print(errorMessage);

//Implement Your Failed Payment Logic

}



copied to clipboard
Tested Devices:



Device Name
Status




iPhoneX



iPhone 11



iPhone 12



iPhone 12 mini



Google Pixel



Android Emulator(v10)




Pro Tip: #


Always make sure you validate Phone number(Must be 10 Digits) else payment page might not appear.


Avoid hardcoded credentials.


Always generate unique transaction id for each transaction.


Store Transaction & Details to database for later analysis or usage.


For any issue please write to [email protected]
To Connect on Instagram | Youtube | Business Inqury

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.