2CheckOut - Error : Bad Request - Parameter error

2CheckOut - Error : Bad Request - Parameter error

向 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

        ));

如果我发送错误的 'token' 密钥,我会得到 未验证

编辑:

我查看 JS 代码

随时提出您的建议

"demo" => 'Y'

演示密钥应该是'Y'这里的问题不是真的

TCO.loadPubKey('production');

loadPubKey 应该是 'production' 不能为空