【问题标题】:2CheckOut - Error : Bad Request - Parameter error2CheckOut - 错误:错误请求 - 参数错误
【发布时间】:2020-09-24 23:03:06
【问题描述】:

向 TwoCheckOut 请求数据:

来自 TwoCheckOut 的回应。

{
    "error": "Bad request - parameter error"
}

这是代码

     $charge = Twocheckout_Charge::auth(array(
            "sellerId" => '*HIDDEN*',
            "merchantOrderId" => $orderID,
            "token"      => $token,
            "currency"   => $currency,
            "total"      => $itemPrice,
            "billingAddr" => array(
                "name" => $name,
                "addrLine1" => $addrLine1,
                "city" => $city,
                "state" => $state,
                "zipCode" => $zipCode,
                "country" => $country,
                "email" => $email,
                "phoneNumber" => $phoneNumber
            ),
            "shippingAddr" => array(
            "name" => 'Testing Tester',
            "addrLine1" => '123 Test St',
            "city" => 'Columbus',
            "state" => 'OH',
            "zipCode" => '43123',
            "country" => 'USA',
            "email" => 'testingtester@2co.com',
            "phoneNumber" => '555-555-5555'
            ),
            "demo" => true

        ));

如果我发送错误的“令牌”密钥,我会得到未经身份验证

编辑:

我的视图 JS 代码

欢迎提出您的建议

【问题讨论】:

标签: php laravel payment-gateway 2checkout


【解决方案1】:
"demo" => 'Y'

Demo key 应该是 'Y' 不是真的是这里的问题

【讨论】:

    【解决方案2】:
    TCO.loadPubKey('production');
    

    loadPubKey 应该是 'production' 它不应该是空的

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-08-04
      • 2015-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多