Create checkout weird error

Hi,
When I try to create a new Checkout I get a weird error!
code:500
message: Argument 1 passed to Api_Model_Checkout::create() must be of the type array, null given, called in \/var\/www\/seoshop\/seoshop\/app\/frontend\/code\/Core\/Api\/Controller\/Checkouts.php on line 6 and defined
Could you tell me what is wrong?
payload:
{
"mode": "guest",
"newsletter": 0,
"terms": 1,
"comment": "",
"billing_address": {
"zipcode": "*",
"number": "*",
"country": "*",
"address2": "",
"city": "*",
"address1": "*",
"name": "*"
},
"shipping_address": {
"zipcode": "*",
"number": "*",
"country": "*",
"address2": "",
"city": "*",
"address1": "*",
"name": "*",
"company": ""
},
"notifications": false,
"customer": {
"firstname": "*",
"birthdate": null,
"gender": null,
"mobile": "*",
"middlename": "",
"type": "private",
"lastname": "*",
"password": "",
"phone": "",
"company": "",
"vatnumber": "",
"cocnumber": "",
"email": "*"
}
}
ps: replaced all client info with a *
thx
4 comments
Hi @programmeuropwielen,
Thank you for contacting us.
This happens when you have invalid JSON syntax, please validate your JSON. I see that you are starting your payload with
{ }
which isn't the start of an array please use[ ]
Something like:
I hope this helps.
It had todo with special characters.. Iam not using the standard seoshop php lib :)
problem is solved
And only for checkout you don't need the array btw :)
@programmeuropwielen,
Okay perfect!