AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager POST:@“http://<whereyouhavethefiles>/finish_payment.php" parameters:@{@"payment-method-nonce": paymentMethodNonce, @"amount": @"250", } success:^(AFHTTPRequestOperation *operation, id responseObject) { NSString *transactionID = [[NSString alloc] initWithString:responseObject[@"transaction_id"]]; self.labelInView.text = [[NSString alloc] initWithFormat:@"OK: %@-%@", transactionID,token ]; } failure:^(AFHTTPRequestOperation *operation, NSError *error) { self.labelInView.text = [[NSString alloc] initWithFormat:@"KO: %@", error ]; }]; } - (void)postNonceToServer:(NSString *)paymentMethodNonce { AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager POST:@“http://<whereyouhavethefiles>/finish_payment.php" parameters:@{@"payment-method-nonce": paymentMethodNonce, @"amount": @"250", } success:^(AFHTTPRequestOperation *operation, id responseObject) { NSString *transactionID = [[NSString alloc] initWithString:responseObject[@"transaction_id"]]; self.labelInView.text = [[NSString alloc] initWithFormat:@"OK: %@-%@", transactionID,token ]; } failure:^(AFHTTPRequestOperation *operation, NSError *error) { self.labelInView.text = [[NSString alloc] initWithFormat:@"KO: %@", error ]; }]; }