Merge pull request #470 from stripe/bg-custom-example

Update ObjC example to use /charge_card endpoint
This commit is contained in:
Ben Guo 2016-10-03 10:20:08 -04:00 committed by GitHub
commit 541a69f8a7
1 changed files with 2 additions and 2 deletions

View File

@ -173,11 +173,11 @@
NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
NSURLSession *session = [NSURLSession sessionWithConfiguration:config];
NSString *urlString = [BackendChargeURLString stringByAppendingPathComponent:@"charge"];
NSString *urlString = [BackendChargeURLString stringByAppendingPathComponent:@"charge_card"];
NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];
request.HTTPMethod = @"POST";
NSString *postBody = [NSString stringWithFormat:@"stripeToken=%@&amount=%@", token.tokenId, @1000];
NSString *postBody = [NSString stringWithFormat:@"stripe_token=%@&amount=%@", token.tokenId, @1000];
NSData *data = [postBody dataUsingEncoding:NSUTF8StringEncoding];
NSURLSessionUploadTask *uploadTask = [session uploadTaskWithRequest:request