1

I am using payment Gateway API. And Making Demo Project. This is my code. i am calling 3d Secure URL But I am getting crash log. CFNetwork SSLHandshake failed (-9806) what is the solution of this problem.

  - (void)viewDidLoad
 {
     [super viewDidLoad];
self.data=[NSMutableData new];
NSURL *url = [NSURL URLWithString:[postDetail objectForKey:@"acsURL"]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setTimeoutInterval:60];
[request setHTTPMethod:@"POST"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"content-type"];

NSString *postString = [NSString stringWithFormat:@"MD=%@&TermUrl=%@&PaReq=%@",[postDetail objectForKey:@"xid"],[postDetail objectForKey:@"callBackURL"],[postDetail objectForKey:@"paReq"]];      NSData *data1 = [postString dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:data1];
[request setValue:[NSString stringWithFormat:@"%u", [data1 length]] forHTTPHeaderField:@"Content-Length"];
self.webView=[[UIWebView alloc]initWithFrame:self.view.frame];
[self.view addSubview:self.webView];
[self.webView loadRequest:request];
self.data=[NSMutableData new];

// Do any additional setup after loading the view.
 }
4

1 回答 1

0

您需要将数据作为表单数据发送(内容类型:multipart/form-data) 这个答案帮助我正确构建了我的 3DSecure POST 请求:https ://stackoverflow.com/a/24252378/2245917

于 2014-11-07T16:08:19.713 回答