【问题标题】:Braintree Drop-In UI v.zero how to retrieve the payment ID with PHP / to stay PCI QSA ABraintree Drop-In UI v.zero 如何使用 PHP 检索付款 ID / 以保持 PCI QSA A
【发布时间】:2016-07-14 03:10:25
【问题描述】:

我是 Braintree 的新手,我读到我们需要符合 PCI QSA... 有 QSA A 类型,因此 v.zero ( Drop-In UI ) 似乎是最好的方法。

我按照以下步骤操作:https://developers.braintreepayments.com/start/hello-client/javascript/v2

表单具有 action="/checkout"(或任何其他路径...),但本教程未提供检索付款状态所需的代码(例如已付款、交易 ID)。

我不想存储信用卡信息。

【问题讨论】:

    标签: braintree pci-compliance


    【解决方案1】:

    完全披露:我是 Braintree 的开发人员

    本教程的那部分概述了客户端如何将信用卡信息发送到 Braintree 服务器,该服务器通过 post 参数返回付款方式随机数。

    然后,您可以使用付款方式 nonce 创建和检查交易和付款方式,同时保持 PCI 合规性。例如,如果您有发布到 /checkout 的表单,您可以在结帐逻辑中执行以下操作:

    $amount = '10.00';    /* replace with the amount you want */
    $nonce = $_POST["payment_method_nonce"];
    
    $result = Braintree\Transaction::sale([
        'amount' => $amount,
        'paymentMethodNonce' => $nonce
    ]);
    
    if ($result->success){
        $transaction = $result->transaction;    
        /* inspect the transaction here */
    } else {
        /* handle any errors */
    }
    

    所有这些都在教程的下一部分中详细介绍,可以找到here,如果您有任何问题,您可以随时联系Braintree support

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-11-05
    • 1970-01-01
    • 2017-04-30
    • 2016-01-05
    • 2016-05-23
    • 2018-12-13
    • 1970-01-01
    相关资源
    最近更新 更多