phplaravelpayment-gateway2checkout

2CheckOut - Error : Bad Request - Parameter error


Request Data to TwoCheckOut :

Request Data

Response from TwoCheckOut.

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

Here is the Code

     $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

        ));

Althought i am getting unauthenticated if i send wrong 'token' key.

EDIT :

MY VIEW JS CODE front end code

Feel free to drop your suggestions


Solution

  • "demo" => 'Y'
    

    Demo key should be 'Y' not true was the issue here