TPV Integration

For TPV transactions, you need to have different merchantID. Please contact your key account manager for same.

You can integrate TPV with BizSDK framework in below steps:

Hash Calculation

For TPV transaction, hash calculation formula is different from normal type of payment:

For multiple account number, account number should be pipe separated and max 4 account numbers are allowed.

Hash Formula:

// For single account number
beneficiarydetail = "{'beneficiaryAccountNumber':'123456789'}"
// For multiple account number
beneficiarydetail = "{'beneficiaryAccountNumber':'123456789|54321234|98765673|34767988'}"
// Hash calculation
Hash = sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||beneficiarydetail|SALT)

Make Payment

To get request, create an object of class PayUCreateRequest as below. The callbacks give you NSURLRequest as well as post parameters (in String). You can use these post parameters to initialize Custom Browser Instance.

@property (nonatomic, strong) PayUCreateRequest *createRequest;

For NetBanking

To Pay using NetBanking, we need to set NetBanking parameter as below:

self.paymentParamForPassing.beneficiaryAccountNumbers = @"123456789";
self.paymentParamForPassing.bankCode = @"AXNBTPV"; //BankCode

After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below

self.createRequest = [PayUCreateRequest new];
[self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_NET_BANKING withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
    if (error == nil) {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    }
    else{
        //Something went wrong with Parameter, error contains the error Message string
    }
}];

For UPI

To Pay using UPI, we need to set UPI parameter as below:

// For single account number
self.paymentParamForPassing.beneficiaryAccountNumbers = @"123456789";
// For multiple account number
self.paymentParamForPassing.beneficiaryAccountNumbers = @"123456789|54321234|98765673|34767988";
// Set BankCode
self.paymentParamForPassing.bankCode = @"UPITPV"; // UPITPV or TEZTPV
// Set VPA
self.paymentParamForPassing.vpa = @"umang@axis";

After setting the above parameters, you can get the request by using createRequestWithPaymentParam method as below

self.createRequest = [PayUCreateRequest new];
[self.createRequest createRequestWithPaymentParam:self.paymentParamForPassing forPaymentType:PAYMENT_PG_UPI withCompletionBlock:^(NSMutableURLRequest *request, NSString *postParam, NSString *error) {
    if (error == nil) {
        //It is good to go state. You can use request parameter in webview to open Payment Page
    }
    else{
        //Something went wrong with Parameter, error contains the error Message string
    }
}];

Response Handling

It is same as you are handling for other payment option.

Last updated