Closed nawanirakshit closed 4 years ago
Some error occurred is due to wrong/mismatch hash generation from server. Please get hash generator script from here. I got this script from PayUMoney. It will work for production environment. For sandbox, call payumoney customer care and ask them to issue test credential. Test credentials given in PayUMoney dashboard is not working. Customer Care Number is 01246793000. You can also refer this question. Also read comments. I think question and answer will definitely help you as it contain whole code.
Along with these all make sure :
Thank you for the kind reply but the issue is still there after using the above questions. i am attaching some of the Log Trace while debugging the application
D/SdkHelper: isvalidEmail : true
D/SdkHelper: isValidNumber : **********
D/SdkHelper: isValidNumber : true
D/hash: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
D/param :: key - 2t7VQBRU
D/param :: merchantId - 5986178
D/param :: txnid - 571514226794918
D/param :: amount - 50.0
D/param :: surl - http://skillforce.co.in/api/payuurl/
D/param :: furl - http://skillforce.co.in/api/payuurl/
D/param :: productInfo - WalletMoneyAdd
D/param :: email - abc@gmail.com
D/param :: firstName - RakshitNawani
D/param :: phone - **********
D/param :: udf1 -
D/param :: udf2 -
D/param :: udf3 -
D/param :: udf4 -
D/param :: udf5 -
D/param :: udf6 -
D/param :: udf7 -
D/param :: udf8 -
D/param :: udf9 -
D/param :: udf10 -
Params
key=*******&amount=50.00&txnid=571514226794918&email=abc@gmail.com&productinfo=WalletMoneyAdd&firstname=RakshitNawani&udf1=&udf2=&udf3=&udf4=&udf5=&salt=*******
Payment Hash (from server)
a75aa3e52673654438c157f3014a12100f8f04f010135eedf3c255fe7be0c962eaffe2c4680e267566f95684190dec389246f996eed6d51d5db39544786c7a93
Some More data from the PayU team
D/Clevertap: eventData : {"ts":1514226795,"identity":"abc@gmail.com","type":"event","evtData":{"MID":"5986178","d_lang":"English","d_biohw":false,"u_lat":"","sdk_build":"7.1.0","d_scrn_res":"1080 * 1920","uuid":"2d711a1f-2c6b-4aea-aed7-84fcdc2c51d9","d_osv":"7.0","app_name":"MS Online","env":"DEBUG","d_os":"Android","EventSource":"SDK","d_ccid":"in","Platform":"Android","d_ua":"Mozilla\/5.0 (Linux; Android 7.0; Redmi Note 4 Build\/NRD90M; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/63.0.3239.111 Mobile Safari\/537.36","d_nw_type":"4G","d_ss":"0","app_version_name":"1.0","d_make":"xiaomi","isUserLoggedIn":false,"d_model":"Redmi Note 4","u_lon":"","u_acu":"","app_id":"com.msonline.android","app_version_code":"1","d_mfg":"Xiaomi","package_name":"com.msonline.android","device_id":"c466e16c042e18f","d_rooted":false,"sdk_version":"9","d_locale":"en","ip":"192.168.43.1","d_scrn_sz":"5.5181430535431915"},"evtName":"SDKInit"}
More Code
I/Difference: [ main: SourceFile: 361: onResponse() ] --> URL=/payment/app/v1/addPaymentTime=658
V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 714
V/FA: Activity paused, time: 185214316
D/ADDING MONEY IN WALLET: request code 10000 resultcode 0
V/FA: Activity resumed, time: 185214348
D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=PayUmoneyActivity, firebase_previous_id(_pi)=2876489386981523138, firebase_screen_class(_sc)=AddMoneyActivity, firebase_screen_id(_si)=2876489386981523135}]
D/Clevertap: Response : { "status" : "success" , "processed" : 1 , "unprocessed" : [ ]}
D/Clevertap: OnClevertapEventsLoggedSuccessful : file deleted
Have you tried it for production environment ? If production environment is working then you need to call customer care and ask them for testing credential. If production environment gives error then again it is problem of hash mismatch.
Greetings, I have tried with production as well as with the sandbox environment I did this by using .setIsDebug(false) //tried with both true and false
I have uncommented the code as well as asked me to do and I have also set the proper sURL and fURL but the result is same, can you please review the code and do let me know and if possible instead of "Some Error Occurred" can you please change the response to something meaningful so that we can understand. Thanks
Debug will definitely help you. Please share your debug information of 3 things :
One more thing, also send value of $responseHashSeq from server. This all data will help to find out actual error. I know that either generated is wrong or it is mismached with payu's hash.
Hi,Actually still I am facing this issue "some error occured",In my side if it is the problem with the merchant key ,my old Application with the Pay u money SDK is working,Right now I am trying to implementing by using dependency (latest ) in android side .. Please help me what was the issue exactly
MY json object response is josnobject: {"status":0,"result":"e21b449e413a0e90e24fa7eca2aff010bb19b15f45ddbdf01654f7e17f38b05f0b8f059e84d2217dd503d1d6a9cc9edf02ff8c6025048008352c091e68bf4b7a","errorCode":null,"responseCode":null}
this JSON response id for SANDBOX ,even for SANDBOX also I am getting this issue For SANDBOX in onactivityResult I am getting ....../MainActivity: request code 10000 resultcode 0 For PRODUCTION also in onactivityResult I am getting ....../MainActivity: request code 10000 resultcode 0
Please ,help me out..by using latest dependency,I am facing this issue But my Old pay u money sdk is wokring fine with all the merchant details
@MNGsulochana does your problem solved please help same prob with me also log showing data but then getting closed
hi ,mayur i tried the hash generation script what u posted ,even with that also i am facing the same issue
private void calculateServerSideHashPayment1() {
String url = "http://demo.oriondigi.com/" + "payumoney_service?token=" + token + "&txnid=" + txnId + "&amount=" + amount + "&firstname=" + firstName + "&email=" + email + "&phone=" + phone + "&productinfo=" + productName ;
Toast.makeText(this, "Please wait... Generating hash from server ... ", Toast.LENGTH_LONG).show();
StringRequest jsonobjectreq=new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject jsonObject = new JSONObject(response);
if(jsonObject.has("status"))
{
String status=jsonObject.optString("status");
Log.d("ererorlistenr_status",status);
if(status!=null)
{
String hash=jsonObject.getString("result");
mPaymentParams.setMerchantHash(hash);
if (AppPreference.selectedTheme != -1) {
PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, MainActivity.this, AppPreference.selectedTheme, mAppPreference.isOverrideResultScreen());
} else {
PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, MainActivity.this, R.style.AppTheme_default, mAppPreference.isOverrideResultScreen());
}
}
else
{
Toast.makeText(MainActivity.this, jsonObject.getString("result"), Toast.LENGTH_SHORT).show();
}
}
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
if (error instanceof NoConnectionError) {
Toast.makeText(MainActivity.this,
"please check internet connection",
Toast.LENGTH_SHORT).show();
} else {
Log.d("ererorlistenr","erlistenr"+error.getMessage());
Toast.makeText(MainActivity.this, error.getMessage(), Toast.LENGTH_SHORT).show();
}
}
})
{
@Override
protected Map<String, String> getParams() throws AuthFailureError {
// return super.getParams();
Map<String, String> params = new HashMap<String, String>();
params.put(PayUmoneyConstants.KEY,mykey);
params.put(PayUmoneyConstants.AMOUNT,amount+"");
params.put(PayUmoneyConstants.TXNID,txnId);
params.put(PayUmoneyConstants.EMAIL,userEmail);
params.put(PayUmoneyConstants.PRODUCT_INFO,productName);
params.put(PayUmoneyConstants.FIRSTNAME,firstName);
params.put(PayUmoneyConstants.UDF1, udf1);
params.put(PayUmoneyConstants.UDF2,udf2);
params.put(PayUmoneyConstants.UDF3,udf3);
params.put(PayUmoneyConstants.UDF4,udf4);
params.put(PayUmoneyConstants.UDF5,udf5);
return params;
}
};
Volley.newRequestQueue(this).add(jsonobjectreq);
} this is the code i am using to post the values to server,the hash key what ever i am getting from server it is working with old sdk.. Is there any differrence to generate hash key for gradle dependency,,still I confused,& I tried the code what u mentioned for hash generation,still I face this isuue.. And from the logs I am getting my merchant key and merchant id..from the payumoney-sdk as log
In the server code it self I am using the merchant key and salt.. from android i am not sending these values.. Please help us Mayur sir
URL is wrong. You are already sending variables using post method. It should be
String url = "http://demo.oriondigi.com/hash.php
After that debug your app and share following information -
@MNGsulochana @ameetpawar00 If you are using sandbox mode, then use following test credentials. Test credentials from dashboard are not working.
MID : 4934580 Key : rjQUPktU Salt : e5iIg1jwi8
Below is the test card details for doing a test transaction in the testing mode.
Card No - 5123456789012346 Expiry - 05/2020 CVV - 123
thanks @mayur19 right now my code is working,
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') { transitive = true; } compile 'com.payumoney.sdkui:plug-n-play:1.0.0'
by using this gradle dependency is it possible to customize the UI
Yes. It is possible. Please read documentation.
with the documentation we are able to customize the titles and colours only,not whole UI.If I want to change the customize the whole thing is there any way ..please let me know.. If do u have any link please share
my how to work with the wallet money in this
apply plugin: 'com.android.application'
android { compileSdkVersion 27 buildToolsVersion '27.0.3' defaultConfig { applicationId "com.oriondigi.sia" minSdkVersion 19 targetSdkVersion 27 versionCode 10 versionName "DEMO-NEW-VERSION" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true flavorDimensions "versionCode" // Enabling multidex support. // multiDexEnabled true }
signingConfigs { dexOptions { // incremental true javaMaxHeapSize "4g" } }
buildTypes {
debug {
debuggable true
minifyEnabled false
useProguard true
/* applicationIdSuffix ".debug"*/
// buildConfigField 'boolean', 'ENABLE_CRASH', 'false'
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
debuggable false
shrinkResources true
minifyEnabled true
/* applicationIdSuffix ".release"*/
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// proguardFiles fileTree('proguard').asList().toArray()
}
}
productFlavors { noExtensions withExtensions } lintOptions { disable 'MissingTranslation' }
}
dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) //noinspection GradleCompatible // implementation 'com.android.support:appcompat-v7:27.0.2'
withExtensionsCompile project(path: ':extension-ffmpeg') implementation 'com.google.android.exoplayer:exoplayer-hls:2.6.1' implementation 'com.google.android.exoplayer:exoplayer:2.6.1' implementation files('src/main/jniLibs/wasabi.jar') //noinspection GradleCompatible implementation 'com.android.support:leanback-v17:27.0.2'
implementation 'com.squareup.picasso:picasso:2.5.2' implementation 'jp.wasabeef:glide-transformations:3.0.1' implementation 'com.github.bumptech.glide:glide:4.3.1'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'org.apache.directory.studio:org.apache.commons.io:2.4' implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.google.code.gson:gson:2.8.1' //noinspection GradleCompatible
// implementation 'com.android.support:support-v4:27.0.2' // compile 'com.android.support:cardview-v7:27.0.2'
testImplementation 'junit:junit:4.12'
// compile 'com.android.support:multidex:1.0.2' implementation 'com.squareup.okhttp3:okhttp:3.9.1' implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1' // annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1' / annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'/
implementation ('com.payumoney.sdkui:plug-n-play:1.0.0'){ transitive = true; exclude module: 'payumoney-sdk' }
implementation 'com.payumoney.core:payumoney-sdk:7.0.1'
}
This is my gradle file for the project after adding payumoney dependency I am getting the error like
Information:Gradle tasks [clean, :sia:generateNoExtensionsDebugSources, :sia:generateNoExtensionsDebugAndroidTestSources, :sia:mockableAndroidJar, :extension-ffmpeg:generateDebugSources, :extension-ffmpeg:generateDebugAndroidTestSources, :extension-ffmpeg:mockableAndroidJar] /home/sulochana/.gradle/caches/transforms-1/files-1.1/appcompat-v7-23.2.1.aar/881e020b641477421beb618a0a79354a/res/values/values.xml Error:(102, 5) error: duplicate value for resource 'attr/rowHeight' with config ''. Error:(102, 5) error: resource previously defined here. Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Information:BUILD FAILED in 34s Information:3 errors Information:0 warnings Information:See complete output in console
if any idea please help me
Hello, i need help!! I am Doing PayUMoney Integration in android in Test Mode. When i click on Pay Now Button after filling Credit Card Details then no action is performed for transaction....So where will the problem??
R u getting any toast message or any error?Is it working fine with Debit Card? check the hash key generation and the payment parameters what u r passing to the PayUMoneyFlowManager
I am doing in test mode ...when I fill all the details in credit card section and click on pay now button at that tym no action is performed...means successfully done type alert is not coming
On Wed, May 9, 2018, 22:11 MNGsulochana notifications@github.com wrote:
R u getting any toast message or any error?Is it working fine with Debit Card? check the hash key generation and the payment parameters what u r passing to the PayUMoneyFlowManager
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/payu-intrepos/payumoney-new-sample-app/issues/8#issuecomment-387801079, or mute the thread https://github.com/notifications/unsubscribe-auth/AkTdND4I4JlTtiirzfPoao5fDxs8MmMEks5twxxBgaJpZM4RMVeN .
R u getting any toast message or any error?Is it working fine with Debit Card? check the hash key generation and the payment parameters what u r passing to the PayUMoneyFlowManager
hi,how to handle network issues with payumoney..I mean afterr payment if n/w goes down or else before payment if n/w goes down.. or else while entering card details if n/w gone ...
Please help me
in which mode your env is
I don't understand why there are no proper error messages in the Android SDK. It took me some time to debug through the SDK to find out the key is invalid. Alias is there in the dashboard, but I didn't know that was the key until I looked inside the sample app.
Getting Hash Mismatch Error (Some error occur). Following is my hash sequence. key|txnid|amount|productinfo|firstname|email|||||||||||salt
The sample app doesn't work for sdk version 'com.payumoney.sdkui:plug-n-play:1.4.4.' It says 'Some error occured' on calling 'PayUmoneyFlowManager.startPayUMoneyFlow()'. But if I switch to version 'com.payumoney.sdkui:plug-n-play:1.2.0', it works.
Hello all, with sdk version 'com.payumoney.sdkui:plug-n-play:1.4.4.' some error occured on calling "PayUmoneyFlowManager.startPayUMoneyFlow()" & with sdk version 'com.payumoney.sdkui:plug-n-play:1.2.0' getting error like below on calling .startPayUMoenyFlow():
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.TracingController" on path: DexPathList[[zip file "/data/app/com.android.chrome-LQ0XkazOo1ShH5NWo0n48g==/base.apk"],nativeLibraryDirectories=[/data/app/com.android.chrome-LQ0XkazOo1ShH5NWo0n48g==/lib/arm64, /data/app/com.android.chrome-LQ0XkazOo1ShH5NWo0n48g==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
Kindly please help
thanks @mayur19 right now my code is working,
Please can you say what modification you did to make it work. Same problem with me "Some Error Occurred"
@smohapatra200 Have you gone through this question? Try to compare java functions for hash generation and make sure you are sending all necessary parameters to the PHP script.
@mayur19 Yes I have gone through it. i am using the PayUMoney PnP1.2.0 which i got from the PayUMoney documentation. The default sample app is running in test mode but when i change it to my credentials(key,id&salt) its not working in both sandbox/production mode(I also changed the url). The response from my url is {"result":"1c505cadbbea71fbedc5258d1816495d6f55974d9710c13d53848619c578b0aeac9b0976a53bfbe80bdc33d085bc3f6aff73f313623a94ec15","status":0,"errorCode":null,"responseCode":null} Is this correct? I have used your script to generate the hash
@smohapatra200 response is correct. I think there is issue with credentials. I remember that payU gave me universal credentials at that time. Sandbox was not working but production mode was working. I think it is better to schedule a meeting with payU support. They definitely will help you.
@mayur19 same problem with me "Some error occur"
I have issue with dependency implementation 'com.payumoney.sdkui:plug-n-play:1.6.0' not syncing with androidX How i can use it?
I have issue with dependency implementation 'com.payumoney.sdkui:plug-n-play:1.6.0' not syncing with androidX How i can use it? They have provided a new sample please check it's working https://github.com/payu-intrepos/payumoney-new-sample-app
@MNGsulochana @ameetpawar00 If you are using sandbox mode, then use following test credentials. Test credentials from dashboard are not working.
MID : 4934580 Key : rjQUPktU Salt : e5iIg1jwi8
Below is the test card details for doing a test transaction in the testing mode.
Card No - 5123456789012346 Expiry - 05/2020 CVV - 123
@mayur19 these credentials not working for me...any suggestions?
Closing this thread due to no activity
Hi... please any one give me the solution..... the problem is that i am not able to type card details in payumoney... i am using react.js
Greetings I am getting some error occurred error while debugging the application, can you please look into the code below of Android and server side Hash generation. The view is going to next page after generation and the displaying a Toast "Some Error Occurred"
It would be very nice of you to point out the issue Thanks in advance
Dependency used