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

向 TwoCheckOut 请求数据:

http://img2.mukewang.com/644b934f0001465f05220398.jpg

来自 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 代码


随意放弃你的建议



慕少森
浏览 95回答 2
2回答

qq_花开花谢_0

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

ibeautiful

TCO.loadPubKey('production');loadPubKey 应该是 'production' 它不应该是空的
打开App,查看更多内容
随时随地看视频慕课网APP