Seamless
Using your UI
Initial Setup
To integrate with iOS SDK, download the latest SDK from here.
Drag and drop PayUBizCoreSDK.framework into your project
Import our SDK as below:
#import <PayUBizCoreKit/PayUBizCoreKit.h>Get all the required parameters
Create an object of PayUModelPaymentParams and set all the parameter in it
@property (strong, nonatomic) PayUModelPaymentParams *paymentParamForPassing;
self.paymentParamForPassing = [PayUModelPaymentParams new];
self.paymentParamForPassing.key = @"0MQaQP";
self.paymentParamForPassing.transactionID = @"Ywism0Q9XC88qvy";
self.paymentParamForPassing.amount = @"10.0";
self.paymentParamForPassing.productInfo = @"Nokia";
self.paymentParamForPassing.firstName = @"Ram";
self.paymentParamForPassing.email = @"email@testsdk1.com";
self.paymentParamForPassing.userCredentials = @"ra:ra";
self.paymentParamForPassing.phoneNumber = @"1111111111";
self.paymentParamForPassing.SURL = @"https://payu.herokuapp.com/ios_success";
self.paymentParamForPassing.FURL = @"https://payu.herokuapp.com/ios_failure";
self.paymentParamForPassing.udf1 = @"u1";
self.paymentParamForPassing.udf2 = @"u2";
self.paymentParamForPassing.udf3 = @"u3";
self.paymentParamForPassing.udf4 = @"u4";
self.paymentParamForPassing.udf5 = @"u5";
self.paymentParamForPassing.environment= ENVIRONMENT_PRODUCTION;
self.paymentParamForPassing.offerKey = @"offertest@1411";
//You don't need to set udf1-5 in case you are not using them email and firstname can be empty strings "" if you don't want to use them For store user card feature you need to set userCredentialsFor offers you need to set offerKey
For any other payment default param (like phone and others)
Get the required hashes by using your own server. Set the hashes as below
Generating URLRequest (and post parameters) for Payment
To get request, create an object of class PayUCreateRequest as below. The callbacks give your URLRequest as well as post parameters (NSString format). You can use these post parameters to initialize Custom Browser Instance.
CC/DC
To Pay using CCDC, we need to set CCDC parameter as below:
After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below
StoredCard
To Pay using StoredCard, we need to set StoredCard parameter as below:
After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below
Tokenisation
For cards tokenised outside PayU platform merchant needs to pass below parameters.
After setting the above parameters, you can get the request by using createRequestWithPaymentParam.
NetBanking
To Pay using NetBanking, we need to set NetBanking parameter as below:
After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below
CashCard
To Pay using CashCard, we need to set cashcard parameter as below:
After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below
EMI
To Pay using EMI, you need to set EMI parameter as below:
After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below
Cardless EMI
To Pay using Cardless EMI, you need to set parameter as below:
After setting the above parameters, you can get the request by using createRequestWithPaymentParam
PayUMoney
To Pay using PayUMoney, we need to set only the mandatory payment param and we can get the request by using createRequestWithPaymentParam method as below:
Subvention EMI
Pay via Subvention EMI
To Pay using Subvention EMI, we need to set subventionAmount parameter of paymentParams
After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below:
Hash Calculation
If subventionAmount is passed than hash formula for payment hash will be
Otherwise it will remain same as earlier.
Fetch List
To get list of No Cost EMI supporting banks, pass subventionEligibility as "all" in Fetch Payment Option WebService.
LazyPay
To Pay using LazyPay, we need to set the below parameters :
Notify Url – Callback URL of merchant where a notification of transaction status will be sent on completion of transaction. It should be HTTPS.
After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below
TwidPay
To Pay using TwidPay, create the post data with CASH_CARD_TWID :
After a successful payment, you would get the Twid customer hash in the field5 param of PayuResponse, which can be used in next transactions to skip authentication.
Sodexo
To Pay using Sodexo, create the post data with PAYMENT_PG_SODEXO :
After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below
After a successful payment, you would get the Sodexo source id in the field3 param of PayuResponse, which can be used to show and get stored Sodexo card details and also can be used for initiate payment.
Last updated
Was this helpful?