Php 2CheckOut-错误:错误请求-参数错误

Php 2CheckOut-错误:错误请求-参数错误,php,laravel,payment-gateway,2checkout,Php,Laravel,Payment Gateway,2checkout,向TwoCheckOut请求数据: 来自TwoCheckOut的响应。 { "error": "Bad request - parameter error" } 这是代码 $charge = Twocheckout_Charge::auth(array( "sellerId" => '250252449886', "merchantOrderId" => $orderID, "token"

向TwoCheckOut请求数据:

来自TwoCheckOut的响应。

{
    "error": "Bad request - parameter error"
}
这是代码

     $charge = Twocheckout_Charge::auth(array(
            "sellerId" => '250252449886',
            "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代码

请不要提你的建议

"demo" => 'Y'
演示密钥应为“Y”不是真的是这里的问题吗

TCO.loadPubKey('production');

loadPubKey应该是“production”,它不应该是空的

看看那些答案,可能是那些可以帮助你的答案。所有答案都很旧,2 checkout最近更新了它们的库,并对它们的流程进行了修改