gpt4 book ai didi

ios - 如何在 iOS 中使用平衡支付将 href 发送到服务器进行支付处理

转载 作者:行者123 更新时间:2023-11-29 02:16:17 25 4
gpt4 key购买 nike

我正在使用平衡支付(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发送到服务器以及付款流程是什么。

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

最佳答案

您使用的库仅用于标记信用卡。它会生成您需要进行收费的 token (href)。

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

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

关于ios - 如何在 iOS 中使用平衡支付将 href 发送到服务器进行支付处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28715452/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com