2Checkout / 2checkout-php

2Checkout PHP Library
MIT License
83 stars 66 forks source link

Bad request - parameter error #29

Open waqasasif9292 opened 7 years ago

waqasasif9292 commented 7 years ago

I have been trying to work with the sandbox api, but i am unable to determine which parameter is causing the bad parameter error.Also, in the API side i do not see any notification about any missing parameter etc.Below is our 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'

                )

            )));
jordymeow commented 7 years ago

Did you find anything? I am having the same issue.

waqasasif9292 commented 7 years ago

i solve the issue nothing wrong with the code its only the issue of account my sandbox account is not active that causes this issue 2 checkout sandbox processes are not working broken images as well as the process of account activation is also not working it took me more then 2 month to trace this issue

jordymeow commented 7 years ago

Actually, I am having this issue but not using the Sandbox API but in production.

waqasasif9292 commented 7 years ago

provide me your payload

maronaquillo commented 5 years ago

I'm still having this issue. Sandbox is working but not in Live or in Demo mode.

asifaliNixaam commented 4 years ago

how acount activated in 2checkout