Question

I am developing an application that integrates a payment gateway. This works by opening the page "https://sis.sermepa.es/sis/realizarPago" passing some parameters by POST, from there the customer can make the payment.

My problem is that I can not find how to open the browser giving a URL and parameters. I've seen that open the browser using Intents but does not allow parameters and I have seen that you can send POST parameters to a URL and wait for the response, but not open the URL itself.

Does anyone have the solution to my problem?

Thank you very much.

Était-ce utile?

La solution

I've solved the problem, here you have the solution in case anyone else needs the answer.

NSString *code=codeTF.text;
NSString *price=priceTF.text;
NSString *email=emailTF.text;
NSString *body =  [NSString stringWithFormat:Code=%@&Price=%@&E-mail=%@", code, price, email];
NSURL *url = [NSURL URLWithString:@"https://***/index.php"];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL:url];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[body dataUsingEncoding:NSUTF8StringEncoding]];
//initialize the webViem in the *.h
// @property (nonatomic, retain) UIWebView *webView;
[webView loadRequest:request];
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top