Ola Money Developer Hub

Welcome to the Ola Money developer hub. You'll find comprehensive guides and documentation to help you start working with Ola Money as quickly as possible, as well as support if you get stuck.

Documentation

Integration Guide - iOS

This page outlines the integration steps of Ola Money wallet with iOS

You will have to download the OlaCabs proxy app, for the testing this feature.
Pls ask us for a test flight invite for this.

For loading money into the test app's wallet you can use the test card
5123 4567 8901 2346 with any CVV and expiry

Step 1: Incorporate a button for Ola Money

Inside your checkout flow, add a button - ‘Pay using Ola Money’, which will initiate the payment flow below once a user clicks on it.

Step 2: Set up the Merchant keys

Use the following code snippet for the same.

OMMerchantInfo *merchantInfo = [[OMMerchantInfo alloc] initWithMerchantAcessToken:@"ola_access_token"
notifiyUrl:@"http://myweb.com/mynotify_url.php"
returnUrl:@"http://sandbox.olamoney.com/olamoney/webview/dummy_return.jsp"
currencyType:@"INR"                  
enviornmentType:UserEnviornmentStage];
   [OMOlaMoneyClient setMerchantInfo:merchantInfo];

Step 3: Prepare the bill object

To prepare the bill object, just pass the respective bill params as per the code snippet.

OMBillParam *billParam = [[OMBillParam alloc] init];
    billParam.orderId = <Unique OrderId>;
    billParam.billAmount = <Amount>;
    billParam.comments = <Comments>;
    billParam.udf = <udf string>;
    billParam.paymentHash = <Generated hash from merchant backend>;

    NSString *couponCode = <Coupon code string>;

Step 4a: Webview Fallback

When the OlaCabs app is not installed or not logged in - a webview is launched for the transaction. For this please use this code, which will be invoked before webcheck out.

    NSString * (^phoneNumber)(void) =^(){
	NSString *phone = @“9686905410”;
      return phone;
    

**
This feature is optional - please follow the guidelines below for the logo you send. We will show a default Ola Money logo here in case you don't send us your logo details through the intent.

Step 5: Make Payment

You can send the bill with the code snippet attached here. This also will explain how to get the get the responses back.
For customization you can send you logo as well. the dimensions of this logo have to be Image dimension (204, 43)

    [OMOlaMoneyClient payWithOlaMoney:billParam phoneNumebr:phoneNumber merchantLogo:[UIImage imageNamed:@"MerchantImage"]paymentBlock:^(NSDictionary *paymentContext) {
        NSInteger actionType = [paymentContext[@"actionType"] integerValue];
        switch (actionType) {
            case OMPaymentActionUserCancelled:{
          
            }
                break;
    
    case OMPaymentActionPaymentSucceeded:{
    
    NSString *orderId = [paymentContext valueForKeyPath:@"response.transactionId"];
                NSString *amount = [paymentContext valueForKeyPath:@"response.amount"];
                    NSString *message = [NSString stringWithFormat:@"Payment Succeeded amount - %@ (%@)",amount, orderId];
            }
                
                break;
                
            case OMPaymentActionPaymentFailed:{
                
                NSError *error = paymentContext[@"error"];
                
                
            }
                
                break;
                
                
            default:
                break;
        }

Integration Guide - iOS

This page outlines the integration steps of Ola Money wallet with iOS