问题描述
我开发了一个需要支付网关的应用程序。我已经开始研究Paypal了。它很成功,现在我需要整合另一个支付网关,即ccavenue。任何人都可以帮助我如何整合那个?
谢谢。
Hi,
I have developed an application which needs payment gateway. I have already worked on "Paypal". It was successful and now i need to integrate another payment gateway that is "ccavenue". Can anybody help me how to integrate that one?
Thanks.
推荐答案
由于CCAvenue显示服务器我们需要连接到Web视图并加载可与iphone屏幕兼容的ccavenue网关的侧面选项。
在我们的应用程序中,我们需要执行以下小操作
Since the CCAvenue shows server side options we need to connect to web view and load the ccavenue gateway which is compatable with iphone screens.Here in Our application we need to do small things as follows
首先创建与您的ccavenue网关相关的html文件和参数
First create the html file and parameters related to your ccavenue gateway
<html>
<body>
<form name='form2' method='post' action='UR URL HERE'>
<input type="text" name='Merchant_Id'><br>
<input type="text" name='Amount'><br>
<input type="text" name='Order_Id'><br>
<input type="text" name='Redirect_Url'><br>
<input type="text" name='Checksum'><br>
<input type="text" name='billing_cust_name'><br>
<input type="text" name='billing_cust_address'><br>
<input type="text" name='billing_cust_address'><br>
<input type="text" name='billing_cust_tel'><br>
<input type="text" name='billing_cust_email'><br>
<input type="text" name='delivery_cust_name'><br>
<input type="text" name='delivery_cust_address'><br>
<input type="text" name='delivery_cust_tel'><br>
<input type="text" name='delivery_cust_notes'><br>
<input type="text" name='Merchant_Param'><br>
</form>
</body>
加载网页视图后在屏幕上
After that load the web view on your screen
NSURL *url = [NSURL URLWithString: @"https://www.ccavenue.com/shopzone/cc_details.jsp"];
webView.delegate = self;
webView.scalesPageToFit = YES;
NSString *strUsername = [[NSUserDefaults standardUserDefaults] objectForKey:@"userName"];
NSString *body = [NSString stringWithFormat: @"Merchant_Id=%@&Amount=%@&Order_Id=%@&Redirect_Url=%@&Checksum=%@&billing_cust_name=%@&billing_cust_address=%@&billing_cust_country=%@&billing_cust_tel=%@&billing_cust_email=%@&delivery_cust_name=%@&delivery_cust_address=%@&delivery_cust_tel=%@&delivery_cust_notes=%@&Merchant_Param=%@",@"XXXXX",@"10",@"123456",@"http://us2guntur.com/us2guntur/CCAvenueredirecturl.jsp",@"1234567890",@"Test",@"Hyderabad",@"India",@"1357896437",@"Test1000",@"Guntur",@"234567896",@"",@""];
NSLog(@"%@",body);
NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL: url];
[request setHTTPMethod: @"POST"];
[request setHTTPBody: [body dataUsingEncoding: NSUTF8StringEncoding]];
[webView loadRequest: request];
这篇关于适用于ios应用程序的CCAvenue Gateway集成工具包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!