PayU biz Non Seamless integration in Android

PayU biz is a payment gateway aggregator who offer electronic payment services to merchant website through its partnerships with various banks and payment instrument companies. With PayU,customers can pay through various options like Credit cards, Debit cards, Net banking, EMI,Cash Cards,Email Invoicing, IVR, Cash on Delivery(COD).

Integration of PayU biz in android application is quiet easy as they provide there own SDK with UI, its on you you can use their UI (Non-Seamless method) or create your own(Seamless method). Here we will integrate the PayU with Non-Seamless method in our Android Application.

Step 1: Download and add PayU SDK and UI to our Project

Make sure you are registered with PayU biz and have your Merchant key and Salt if not, please get one for your website.

You can get the SDK from here and the Custom Browser from here which is required for the integration. Now when you have these put them as modules in your application and have a dependency to them from your application’s build.gradle as

Step 2: Making a Payment through PayU

Now whenever you want to make a payment you have to send all the values the SDK need to process your request. You can either get them from server or you can generate them in app by yourself. The earlier one is better as you should never put the Merchant key and Salt in your app for obvious security reasons. but here I am directly giving the values also the mode is STAGING_ENVIRONMENT, while going for release do change itd to PRODUCTION_ENVIRONMENT.

In case needed, the php code for generating hashes is as follows.

And you are ready for your test Payment. Be sure the hashes are same on both the ends server and mobile as they are matched at every point.
Source: https://developer.payubiz.in .

. . .

Comments (3)

Add Your Comment

  • Navaneetha krishnan R
    lets check….
  • Navaneetha krishnan R
    getHashesFromServer();

    what should i do in this function?

  • aastha gupta
    You have to call your server to get the hashes. The code for generating hashes on server is also included. Also if you dont want it from server, you can make a function in your class also in the same way as in php code.
  • css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again
    Close