For TPV transactions, you need to have different merchantID. Please contact your key account manager for same.
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.
// For single account numberbeneficiarydetail = "{'beneficiaryAccountNumber':'123456789'}"// For multiple account numberbeneficiarydetail = "{'beneficiaryAccountNumber':'123456789|54321234|98765673|34767988'}"// Hash calculationHash = sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||beneficiarydetail|SALT)
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;
let createRequest = PayUCreateRequest()
To Pay using NetBanking, we need to set NetBanking parameter as below:
self.paymentParamForPassing.beneficiaryAccountNumbers = @"123456789";self.paymentParamForPassing.bankCode = @"AXNBTPV"; //BankCode
paymentParamForPassing.beneficiaryAccountNumbers = "123456789"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}}];
createRequest.createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_NET_BANKING, withCompletionBlock: { request, postParam, error inif 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}})
To Pay using UPI, we need to set UPI parameter as below:
// For single account numberself.paymentParamForPassing.beneficiaryAccountNumbers = @"123456789";// For multiple account numberself.paymentParamForPassing.beneficiaryAccountNumbers = @"123456789|54321234|98765673|34767988";// Set BankCodeself.paymentParamForPassing.bankCode = @"UPITPV"; // UPITPV or TEZTPV// Set VPAself.paymentParamForPassing.vpa = @"[email protected]";
// For single account numberpaymentParamForPassing.beneficiaryAccountNumbers = "123456789"// For multiple account numberpaymentParamForPassing.beneficiaryAccountNumbers = "123456789|54321234|98765673|34767988"// Set BankCodepaymentParamForPassing.bankCode = "UPITPV" // UPITPV or TEZTPV// Set VPApaymentParamForPassing.vpa = "[email protected]"
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}}];
createRequest.createRequest(withPaymentParam: paymentParamForPassing, forPaymentType: PAYMENT_PG_UPI, withCompletionBlock: { request, postParam, error inif 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}})
It is same as you are handling for other payment option.