Hash param is missing in payU payment gateway android integration

后端 未结 4 1834
栀梦
栀梦 2021-01-23 21:09

I need to integrate payU payment gateway in my android app. But when app is trying to to get hash key it gives me error saying that

Hash param is missing

In de

4条回答
  •  时光说笑
    2021-01-23 21:45

    You have to use your own server URL to generate hash keys. In android app there are 3 mandatory hash keys you have to set else you will get error "mandatory hash key is missing".

    Make sure you have set this 3 keys to payuHashes object.

    1. payuHashes.setPaymentHash(response.getString("payment_hash"));
    2. payuHashes.setVasForMobileSdkHash(response.getString("vas_for_mobile_sdk_hash"));
    3. payuHashes.setPaymentRelatedDetailsForMobileSdkHash(response.getString("payment_related_details_for_mobile_sdk_hash"));

    Below three hashes are mandatory for payment flow and needs to be generated at merchant server: 1. Payment hash is one of the mandatory hashes that needs to be generated from merchant's server side. Below is formula for generating payment_hash - sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||SALT)

    1. vas_for_mobile_sdk_hash is one of the mandatory hashes that needs to be generated from merchant's server side. Below is formula for generating vas_for_mobile_sdk_hash -

    sha512(key|command|var1|salt)
    here, var1 will be "default"

    1. payment_related_details_for_mobile_sdk_hash is one of the mandatory hashes that needs to be generated from merchant's server side. Below is formula for generating payment_related_details_for_mobile_sdk_hash -

    sha512(key|command|var1|salt) here, var1 will be user credentials. If you are not using user_credentials then use "default".

    Refer sample sdk from here: https://github.com/payu-intrepos/Android-SDK-Sample-App/releases/

    For server side code refer this: https://github.com/payu-intrepos/Documentations/wiki/4.-Server-Side

提交回复
热议问题