gpt4 book ai didi

php - 在 php 中生成随机数

转载 作者:可可西里 更新时间:2023-10-31 23:46:28 26 4
gpt4 key购买 nike

我是 braintree 的新手。试图在 php 中集成 braintree。遵循以下步骤:

  1. 创建客户。

    $customerParams = Braintree_Customer::create(array(
    'firstName' => $firstName,
    'lastName' => $lastName,
    ));
  2. 然后生成clientToken

    Braintree_ClientToken::generate(array(
    "customerId" => $customerParams->customer->id
    ));
  3. 然后借助api在js中成功生成nonce:

    var client = new braintree.api.Client({clientToken: ctoken});
    client.tokenizeCard({
    ...
    ...
    });

我卡在了我试图在 php 中生成 nonce 的部分。我可以在 php 而不是 js 中实现 nonce 部分吗?

最佳答案

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

不增加你的 PCI burden . Generating the nonce on the client side如果您想使用任何第三方提供商,这确实是正确的选择。

token 化的要点是您不会在过程中的任何时候在您的服务器上存储/处理原始信用卡,这 makes the PCI compliance process a lot easier .如果您认为需要直接处理信用卡,我建议您先直接与 Braintree 支持部门联系。

关于php - 在 php 中生成随机数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34431560/

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