【问题标题】:How to generate Payment Token in GooglePay & ApplePay for Authorize.net (In Mobile App Transaction)?如何在 Google Pay 和 Apple Pay 中为 Authorize.net 生成支付令牌(在移动应用交易中)?
【发布时间】:2021-09-24 07:48:58
【问题描述】:

这是通过谷歌支付和ApplePay处理支付的上述API。在 OpaqueValues 下,数据值是 base64 令牌。我的问题是如何从 googlePay 和 ApplePay 生成这个令牌,以便我们可以在 Flutter 中处理付款。

【问题讨论】:

    标签: flutter payment-gateway authorize.net applepay google-pay


    【解决方案1】:

    浏览 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()))
    

    提交createTransactionRequest API 调用。将dataDescriptor 字段设置为COMMON.GOOGLE.INAPP.PAYMENT,并将dataValue 字段设置为Base64 编码的blob。

    【讨论】:

    • 是的,我也读过这篇文章,但我不知道这个 paymentData.getPaymentMethodToken 方法来自哪里以及发送到哪里以便我们获得令牌??
    • 如果你使用的是Pay Flutter plugin,它来自onPaymentResult callback
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-18
    • 2021-09-09
    • 2019-11-20
    • 2020-01-03
    • 2022-07-26
    • 2021-01-13
    相关资源
    最近更新 更多