3

I am trying to integrate PayUMoney in my application.

Application gives proper output if i use following test credentials;

String merchant_key = "kYz2vV"; 
String salt = "zhoXe53j"; 
String base_url = "https://test.payu.in/_payment"; 
String SUCCESS_URL = "https://www.payumoney.com/mobileapp/payumoney/success.php";
String FAILED_URL = "https://www.payumoney.com/mobileapp/payumoney/failure.php";

When I replace Key & salt with live credentials as;

String merchant_key = "gtKFFx"; 
String salt = "eCwWELxi";
String base_url = "https://secure.payu.in/_payment";
String SUCCESS_URL = "https://www.payumoney.com/mobileapp/payumoney/success.php";
String FAILED_URL = "https://www.payumoney.com/mobileapp/payumoney/failure.php";

Webview showing me error like;

enter image description here

In both cases I am sending following param;

"amount" -> "2.00"
"phone" -> "1234567899"
"service_provider" -> "payu_paisa"
"txnid" -> "d14c0152fd952498ebbf"
"email" -> "test@gmail.com"
"hash" -> "b7f634896ec080f9f31424bd7c189e440f4cba573ada744dc2069ac9c79fa2bb95f3c7dc48f65eb123b0dd3c70de0b3fedfedca0ee3c013eb7a52c55e7833b31"
"surl" -> "https://www.payumoney.com/mobileapp/payumoney/success.php"
"furl" -> "https://www.payumoney.com/mobileapp/payumoney/failure.php"
"firstname" -> "test"
"productinfo" -> "Test"
"key" -> "gtKFFx"(for live) / "kYz2vV"(for test)

Please give me some solution.

Thanks.

Priyanka
  • 81
  • 2
  • 11
  • what are you using payumoney credentials or payubiz credentials? – Abhishek Agarwal Oct 21 '16 at 10:28
  • @AbhishekAgarwal credentials means are you asking about merchant_key & salt? – Priyanka Oct 21 '16 at 10:33
  • @Priyanka, I am also wotking on payu payment intigration, are you able to run the demo app in emulator 4.3 ? – Jayesh Oct 21 '16 at 10:46
  • @Jayesh Yes. It's running on 4.3 emulator. – Priyanka Oct 21 '16 at 12:13
  • @Priyanka: How do you solve this issue: http://stackoverflow.com/questions/39995922/java-lang-classnotfoundexception-android-net-network – Jayesh Oct 21 '16 at 12:58
  • 1
    I think merchant_key and salt for live api should not be posted here – Nilabja Oct 24 '16 at 07:55
  • @Priyanka: I worked in PayU since last week and during this last week, I come to know that merchant key "gtKFFx" and salt "eCwWELxi" are used as a testing purpose, even if you use any live credential with environment other than PRODUCTION_ENV, then payu display that you can't use those live key and salt in DEV_ENV. In my case the demo is working fine with test key/salt but when I use live key/salt then it gives me error. – Jayesh Nov 08 '16 at 11:35
  • How to integeration payumoney in angular6/7/8 website? – Nila Vaani Jan 03 '20 at 17:22

2 Answers2

0

I have used this link sample code to integrate PayU https://github.com/payu-intrepos/Android-SDK-Sample-App

For more, You can checkout Android PayU SDK integration here https://github.com/payu-intrepos/Documentations/wiki/6.-Android-SDK-Integration

I think you doesn't have passed all parameters I have done it using below parameters like this

String merchantKey = "YOUR_KEY";

String mandatoryKeys[] = { PayuConstants.KEY, PayuConstants.AMOUNT, PayuConstants.PRODUCT_INFO,
    PayuConstants.FIRST_NAME, PayuConstants.EMAIL, PayuConstants.TXNID, PayuConstants.SURL,
    PayuConstants.FURL, PayuConstants.USER_CREDENTIALS, PayuConstants.UDF1, PayuConstants.UDF2,
    PayuConstants.UDF3, PayuConstants.UDF4, PayuConstants.UDF5, PayuConstants.ENV};

String mandatoryValues[] = { merchantKey, "10.0", "myproduct", "firstname", "me@itsmeonly.com",
        ""+System.currentTimeMillis(), "https://payu.herokuapp.com/success",
        "https://payu.herokuapp.com/failure", merchantKey+":payutest@payu.in",
        "udf1", "udf2", "udf3", "udf4", "udf5", ""+PayuConstants.PRODUCTION_ENV};
Mitul Varmora
  • 3,832
  • 1
  • 12
  • 21
  • is the payu support android version below 5.0 ? – Jayesh Oct 21 '16 at 11:35
  • Yes afcorse it support, I have checked sample app in that minimumSdkLevel is 9. – Mitul Varmora Oct 21 '16 at 12:24
  • Ya, that's right, but when I run the app in Android 4.3 emulator it gives me error like in this http://stackoverflow.com/questions/39995922/java-lang-classnotfoundexception-android-net-network – Jayesh Oct 21 '16 at 12:32
  • 1
    @ Mitul Varmora , I am sending all mandatory 11 parameters i.e amount,phone,service_provider,txnid,email,hash,surl,furl,firstname,productinfo,key..Remaining are optional. – Priyanka Oct 21 '16 at 12:43
  • How to integeration payumoney in angular6/7/8 website? – Nila Vaani Jan 03 '20 at 17:23
-1

I solved this issue using this ref;

https://wordpress.org/support/topic/how-to-fix-payumoney-payubiz-plugin-error/

I am using wrong Key & salt value for Live url.

And, secondly I have merchant account on PayUbiz so I need to pass empty value in "service_provider".

Priyanka
  • 81
  • 2
  • 11