I'm making a private application for my Shopify store. The application is supposed to replace the standard checkout process. Everything works well, the order is sent to my Shopify store and I can see it in the admin area, the only problem I'm facing is that after the order is placed the cart properties will not reset (the customer's products are still present in the cart and the most important, the cart token does not change). Anyone has any idea why is this happening and how I can fix it? I was thinking that maybe I'm not sending enough information to the store but I might be wrong. This is what i'm sending:
$product = $shopify('POST /admin/orders.json', array(), array
(
'order' => array
(
"email" => $email,
"fulfilment_status" => "",
"send_receipt" => true,
"line_items" => $products,
'customer' => array
(
"first_name" => $firstName,
"last_name" => $name,
"email" => $email
),
'billing_address' => array
(
"first_name" => $firstName,
"last_name" => $name,
"address1" => $adress,
"phone" => $telefon,
"city" => $city,
"province" => $province,
"country" => $country,
"zip" => $zip
),
'note_attributes' => array (
array("name" => "Company", "value" => $company),
array("name" => "CUI","value" => $cui),
array("name" => "Registration","value" => $reg)
),
'shipping_address' => array
(
"first_name" => $firstName,
"last_name" => $name,
"address1" => $adress,
"phone" => $phone,
"city" => $city,
"province" => $province,
"province_code" => $provinceCode,
"name" => $firstName." ".$name,
"country_code" => $countryCode,
"country" => $country,
"zip" => $zip
),
'shipping_lines' => $shipping,
'financial_status' => 'pending'
)
));