2Checkout Bad request - parameter error

I am trying to work with sandboxed api, but I cannot figure out which parameter is causing the bad parameter error. Also, on the API side, I don't see any notifications about any missing parameters, etc. payload.

         $charge = Twocheckout_Charge::auth(array(

        "sellerId" => "*********",

        "merchantId" => "123",

        "token"      => $_POST['token'],

        "currency"   => 'USD',

        "lineitems" => array(

            "type" => 'product',

            "name" => 'Example Product',

            "recurrence" => '1 Month',

            "duration" => '1 Year',

            "price" => '1.00',

            "billingAddr" => array(

                "name" => 'Testing Tester',

                "addrLine1" => '123 Test St',

                "city" => 'Columbus',

                "state" => 'OH',

                "zipCode" => '43123',

                "country" => 'USA',

                "email" => 'testingtester@2co.com',

                "phoneNumber" => '555-555-5555'

            ),

            "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'

            )

        )));

      

+3


source to share





All Articles