OlaMoney

This page describes how to integrate with OlaMoney SDK.

Gradle Dependency

Add below dependency in application's build.gradle.

implementation 'com.payu.olamoney:olamoney:1.1.0'

Callbacks

List of the callback function provided by PayU OlaMoney:

  1. onPaymentInitialisationSuccess() - Callback invoked if the customer is eligible for OlaMoney(Postpaid/Wallet).

  2. onPaymentInitialisationFailure(int errorCode, String description) - Callback invoked when there is some error in Customer eligibility.

Following are the errors which are received in onPaymentInitialisationFailure.

   - ErrorCode        : Description

   - 100              : Mandatory params are missing. Please check again! //Mandatory params for checking eligibility is missing.
       
   - 101              : Something Went Wrong!     

Checking OlaMoney Eligibility

Before proceeding with payment via OlaMoney payment mode merchant must check whether the customer is eligible for OlaMoney or not by using below method.

where object of PayUOlaMoneyParams can be created like below.

Kindly note that values that are set in PayUOlaMoneyParams must be the same that needs to be sent to PayU's backend in payment post-data.

Creating PayUOlaMoneyParams

where OlaMoney eligibility hash can be created as below

OlaMoney Eligibility Hash Generation

To generate OlaMoney eligibility hash use below method

Payment Post Data

Payment post data can be created as follows:

To generate payment hash visit here.

After generating the postdata above either post it to CustomBrowser or any webview.

Set up for Test/Sandbox Merchant

If you are using the SDK with a test merchant, please provide this metadata value to the manifest file else removed these lines below.

Last updated

Was this helpful?