1
我正在使用支付網關API。 並製作演示項目。 這是我的代碼。我打電話給3d安全URL但我正在收到崩潰日誌。 CFNetwork SSLHandshake失敗(-9806)這個問題的解決方案是什麼。iOS網絡視圖中的3d安全網址給出錯誤CFNetwork SSLHandshake失敗(-9806)?
- (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.
}