-2

I am calculating hash from server and passed it to payUbiz hash object. When hash value passed to hash object of payUbiz it binds as optional value i.e. Optional(*hashValue*). I have tried to convert optional string to string, but it won't worked. It gives Invalid Parameter error. Below is my hash value response from server:

{
    errorMessage = "Success.";
    lastSyncDateTime = "<null>";
    result = {
              furl = "http://192.168.3.2:93/PayU/AppointmentResponse";
              hash = 4875a6096814ee1fbe19110582ea0a1564f81880ae66539b94384d3d332106855a00132332919724f085d02d64cffb6d47ff98f3ac4eb7d5e2bb31b4022e3f06;
              merchantKey = gtKFFx;
              mobileSDKHASH = 110f85b862578214e5c38637762a6fce9c34bd5e2d78bc34a486f0ee2e3e5d0fada221795de4b67952ec2cff6b4d0fe8877506e7a5480bbdbfdf9045521d8523;
              payURequestArea = 1;
              profileID = 7;
              surl = "http://192.168.3.2:93/PayU/AppointmentResponse";
              txnID = 62604613a06163c02ddd;
              userID = 18;
              vasMobileSDKHASH = 7da0f4fef5bab0e5034f37f9503bdcbede00cc2cd0cf6cbb4e43baa9d57f05680305885199e2b0d38e8cf12895fd06f4d3dd3fb422535feeb555adc58e2cf3cc;
             };
    statusCode = 200;
}

This is hashvalue printed from payUbiz

paymentHash: Optional("4875a6096814ee1fbe19110582ea0a1564f81880ae66539b94384d3d332106855a00132332919724f085d02d64cffb6d47ff98f3ac4eb7d5e2bb31b4022e3f06")

vasForMobileSDKHash: Optional("7da0f4fef5bab0e5034f37f9503bdcbede00cc2cd0cf6cbb4e43baa9d57f05680305885199e2b0d38e8cf12895fd06f4d3dd3fb422535feeb555adc58e2cf3cc")

paymentRelatedDetailsHash: Optional("110f85b862578214e5c38637762a6fce9c34bd5e2d78bc34a486f0ee2e3e5d0fada221795de4b67952ec2cff6b4d0fe8877506e7a5480bbdbfdf9045521d8523")

Please give solution on this

Harshal Bhavsar
  • 1,598
  • 15
  • 35
ashwini
  • 102
  • 1
  • 10

1 Answers1

2

I have faced same issue a month ago. I think Optional value is not cause of issue. The response itself say's that "Invalid Parameters" means there are some invalid parameters passed to Payment gateway.

Please check following parameters are provided or not:

    paymentParam.key = *Your key*;

    paymentParam.transactionID = *Transaction ID*
    paymentParam.amount = *Amount*
    paymentParam.productInfo = *Product Info*;
    paymentParam.surl = *Success URL*;
    paymentParam.furl = *Failure URL*;
    paymentParam.firstName = "";
    paymentParam.email = "";
    paymentParam.udf1 = "";
    paymentParam.udf2 = "";
    paymentParam.udf3 = "";
    paymentParam.udf4 = "";
    paymentParam.udf5 = "";        
    paymentParam.hashes = hashes;  //**Important**
    paymentParam.userCredentials = "default";  **//This was the issue in my case, i have accidentally deleted this parameter**
    // ENVIRONMENT_TEST for test environment:
    paymentParam.environment = ENVIRONMENT_TEST;        
    // Set this property if you want to give offer:
    paymentParam.offerKey = "";

Please check for paymentParam.userCredentials = "default" parameter, because after adding this parameter i have solved my issue.

Hope this will help you.

Suraj Sonawane
  • 2,044
  • 1
  • 14
  • 24