1

We are successfully integrated payU sdk, and it is working with sample app with test credential, but while we are using production enviroment and generated hash key for php server and using it in mobile sdk it throwing invalid hash key, I go thorough code and see that payment_related_details_for_mobile_sdk has should be pass.

I have generated all required hash key using own server and passed paymentParam obj to PayUWebServiceResponse. But getting response as The data couldn’t be read because it isn’t in the correct format.

what would be the problem?

Balasubramanian
  • 5,274
  • 6
  • 33
  • 62

1 Answers1

1

I got solution by doing little search.

Just generate all required hashes using own server. After getting all required hashes we need to make PayuHashes Obj using this hashes and pass this Obj in intent like this

( or )

go through this link .. Generate MD5 hash from Objective-C object

Community
  • 1
  • 1
Purushothaman
  • 358
  • 4
  • 22
  • 1
    Hi, Thanx for comment. I got payment_hash from php server. I'm calling this generateHashFromServer: and passing paymentParam. But getting message as "could not get hash key for ". What would be the problem ? I have crossed checked merchant key and its production env. – Balasubramanian Nov 21 '16 at 12:13
  • 1
    Getting "The data couldn’t be read because it isn’t in the correct format" as response. – Balasubramanian Nov 21 '16 at 14:12
  • @Balasubramanian, did you get any solution for your problem, I am facing the same issue. Getting "The data couldn’t be read because it isn’t in the correct format" on `getPayUPaymentRelatedDetail` – Nikhil Manapure Dec 28 '17 at 14:14
  • 1
    @NikhilManapure Actually my mistake was that didn't use the correct production Salt (provided by PayU). Please recheck your merchant key and salt before trying anything. – Balasubramanian Dec 28 '17 at 16:05
  • ok sure I will do that @Balasubramanian. Just a small doubt, the backend api is test and correctly working for Android, so I am skeptical if there is some need to change for iOS on backend. So is hash calculation same for iOS and Android? – Nikhil Manapure Dec 29 '17 at 06:39
  • Hi can someone guide or show me all the hashes required to pass or needed. Whats the meaning of each and documentation. I couldn't find one. – Amber K Nov 14 '18 at 07:05
  • @NikhilManapure Like you faced, even I am facing the problem that in Android the creds are working fine and iOS not, did you have to anything specifically different for iOS? Or how did your issue get solved – Sharath Shenoy P May 13 '19 at 10:08