Handling credit cards and IOS
- by Susan Jackie
I am using NSUrlConnection asyncronous request to transmit credit card information to a secure third party server.
I do the following:
I get the credit card number, cvv, etc from the uitextfields.
Encode the credit card information into a json format. Set as httpd body of the nsurlconnection request as follows:
NSURL * url = [[NSURL URLWithString: "https://www.example.com"];
NSMutableURLRequest * request = [[NSMutableURLRequest alloc] initWithURL: url];
[request setHTTPMethod: @"POST"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody: [NSJSONSerialization dataWithJSONObject: params options: kNilOptions error: &parseError]];
Send this information via asynchronous request to a secure third party server:
[NSURLConnection sendAsynchronousRequest:request
queue: queue
completionHandler:^(NSURLResponse *response, NSData *data, NSError * requestError) {
What should I be considering to send user credit card information to a third party server using nsurlconnection asynchronous request?