我正在使用信用卡的平衡付款(1.1版)进行付款。

我遵循了https://github.com/balanced/balanced-ios中给出的示例

我能够从中获得href

[balanced createCardWithNumber:[tfCardNumber text]
               expirationMonth:[[tfExpMonth text] integerValue]
                expirationYear:[[tfExpYear text] integerValue]
                     onSuccess:^(NSDictionary *responseParams) {
                         response = responseParams;
                         [tvResponseView setText:[response description]];
                         NSLog(@"%@", response);

                         [self setActivityIndicatorEnabled:NO];
                         [self setResetButton];
                         tvResponseView.alpha = 0.0;
                         [UIView animateWithDuration:0.5 animations:^{
                             [tvResponseView setHidden:NO];
                             tvResponseView.alpha = 1.0;
                         }];
                     }
                       onError:^(NSError *error) {
                           [tvResponseView setText:[response description]];
                           NSLog(@"%@", [error description]);

                           [self setActivityIndicatorEnabled:NO];
                           [self setResetButton];
                       }
                optionalFields:optionalFields];


我想知道如何将href发送到服务器以及付款过程是什么。

任何帮助或建议继续进行。

最佳答案

您正在使用的库仅用于标记信用卡。它会生成您需要收取费用的令牌(href)。

您需要在后端执行此操作。您不应该直接在您的应用程序中收费,因为您需要从那里发送凭据,否则凭据可能会被拦截。

Balanced具有C#,PHP,Node.js,Python,Ruby和Java的库。您还可以发出CURL请求https://docs.balancedpayments.com/1.1/api/cards/#charge-a-card

10-08 07:29