Hi I have a web service which is hosted at the url which starts with
HTTPS
I am trying to post data to this url from IOS Iphone.
But not able to hit to server.
Do i need to Confirm security Certificates or anything.
Thanks for the help in advance.
FYI Below is the code.
url=@"https://dev-jayporec.netsolutions.in/apicallback/cart/makePayment";
NSString *combinedDataStr = [NSString stringWithFormat:@"{\"Shipping\":{\"mode\":\"%@\",\"firstname\":\"%@\",\"lastname\":\"%@\",\"company\":\"%@\",\"street\":\"%@\",\"city\":\"%@\",\"region\":\"%@\",\"region_id\":\"%@\",\"postcode\":\"%@\",\"country_id\":\"%@\",\"telephone\":\"%@\",\"fax\":\"%@\",\"is_default_shipping\":\"%@\",\"is_default_billing\":\"%@\"},\"Billing\":{\"mode\":\"%@\",\"firstname\":\"%@\",\"lastname\":\"%@\",\"company\":\"%@\",\"street\":\"%@\",\"city\":\"%@\",\"region\":\"%@\",\"region_id\":\"%@\",\"postcode\":\"%@\",\"country_id\":\"%@\",\"telephone\":\"%@\",\"fax\":\"%@\",\"is_default_shipping\":\"%@\",\"is_default_billing\":\"%@\"},\"userId\":\"%@\",\"cartId\":\"%@\",\"cardToken\":\"%@\",\"isNew\":\"%@\",\"cc_exp_year\":\"%@\",\"cc_exp_month\":\"%@\",\"cc_type\":\"%@\",\"cc_number\":\"%@\",\"cc_exp_date\":\"%@\",\"cc_cid\":\"%@\",\"user_credit\":\"%@\"}",@"shipping",ShippingFirstName,ShippingLastName,@"",ShippingAddress,ShippingCity,ShippingState,ShippingRegionID,ShippingZipCode,ShippingCountry,@"000",@"",@"0",@"0",@"billing",BillingFirstName,BillingLastName,@"",BillingAddress,BillingCity,BillingState,BillingRegionID,BillingZipCode,BillingCountry,@"000",@"",@"0",@"0",UserID,CartID,CardToken,IsNew,ExpYear,ExpMonth,CCType,CCNo,CCNoExpDate,CCNoCVV,UserCredit];
NSMutableURLRequest *request =nil;
if(!delegate)
delegate =(AppDelegate *)[[UIApplication sharedApplication]delegate];
NSString *req=[NSString stringWithFormat:@"%@/device/%@",recievedRequestURL,delegate.deviceType];
request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:req]];
[request setHTTPMethod:requestType];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
if([requestType isEqualToString:@"POST"])
{
NSData* requestData = [combinedDataStr dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody: requestData];
}
A Normal HTTP request is working but not the HTTPS..
Regards.