【发布时间】:2021-09-24 07:48:58
【问题描述】:
这是通过谷歌支付和ApplePay处理支付的上述API。在 OpaqueValues 下,数据值是 base64 令牌。我的问题是如何从 googlePay 和 ApplePay 生成这个令牌,以便我们可以在 Flutter 中处理付款。
【问题讨论】:
标签: flutter payment-gateway authorize.net applepay google-pay
这是通过谷歌支付和ApplePay处理支付的上述API。在 OpaqueValues 下,数据值是 base64 令牌。我的问题是如何从 googlePay 和 ApplePay 生成这个令牌,以便我们可以在 Flutter 中处理付款。
【问题讨论】:
标签: flutter payment-gateway authorize.net applepay google-pay
浏览 Authorize.Net 的文档,发现如下:https://developer.authorize.net/api/reference/features/in-app.html#Google_Pay%E2%84%A2
使用支付网络令牌
从 Google Pay 获取支付网络令牌后,使用 Base64 对令牌的 blob 进行编码:
new String(Base64.encode(paymentData.getPaymentMethodToken().getToken().getBytes()))提交
createTransactionRequestAPI 调用。将dataDescriptor字段设置为COMMON.GOOGLE.INAPP.PAYMENT,并将dataValue字段设置为Base64 编码的blob。
【讨论】:
onPaymentResult callback