【问题标题】:Where can I get my BrainTree Client Token?我在哪里可以获得我的 BrainTree 客户端令牌?
【发布时间】:2017-03-05 01:16:26
【问题描述】:

我正在我的应用程序中实现 BrainTree API 以进行信用卡交易。此功能需要我提供客户端令牌:

public void onBraintreeSubmit(View v) {

    DropInRequest dropInRequest = new DropInRequest()
            .clientToken(CLIENT_TOKEN);
    startActivityForResult(dropInRequest.getIntent(this), 0);
}

我正在使用 Parse-Server。我的客户令牌到底是什么?

【问题讨论】:

    标签: android parse-platform braintree


    【解决方案1】:

    全面披露:我在 Braintree 工作。如果您还有任何问题,请随时联系support

    来自 Braintree 文档:

    客户端令牌是一个签名的数据块,包括配置和 Braintree client SDK 所需的授权信息。这些 不应重复使用;应该为每个生成一个新的客户端令牌 发送到 Braintree 的请求。为了安全起见,我们将撤销客户 如果在短时间内过度重复使用令牌。1

    您的server 负责generating the client token。这是一个 Node.js 示例 from the Braintree docs

    app.get("/client_token", function (req, res) {
      gateway.clientToken.generate({}, function (err, response) {
        res.send(response.clientToken);
      });
    });
    

    【讨论】:

      猜你喜欢
      • 2019-09-30
      • 2013-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-09
      • 2020-11-01
      • 2013-04-08
      • 1970-01-01
      相关资源
      最近更新 更多