zaid.naom Posted October 20, 2015 Share Posted October 20, 2015 Fatal error: Uncaught exception 'PrestaShopException' with message 'Can't save Order' in /home/p495/domains/p495.nl/public_html/bezorg/override/classes/PaymentModule.php:182Stack trace:#0 /home/p495/domains/p495.nl/public_html/bezorg/classes/order/Order.php(1463): PaymentModule->validateOrder('1355', '12', '1.5', 'Contant', NULL, Array, NULL, false, NULL)#1 /home/p495/domains/p495.nl/public_html/bezorg/classes/webservice/WebserviceRequest.php(1563): OrderCore->addWs()#2 /home/p495/domains/p495.nl/public_html/bezorg/classes/webservice/WebserviceRequest.php(1354): WebserviceRequestCore->saveEntityFromXml(201)#3 /home/p495/domains/p495.nl/public_html/bezorg/classes/webservice/WebserviceRequest.php(523): WebserviceRequestCore->executeEntityPost()#4 /home/p495/domains/p495.nl/public_html/bezorg/webservice/dispatcher.php(90): WebserviceRequestCore->fetch('GIP2G2C9W11CD8K...', 'POST', 'orders', Array, false, '<prestashop>?<o...')#5 {main} thrown in /home/p495/domains/p495.nl/public_html/bezorg/override/classes/PaymentModule.php on line 182 I get the error above when sending this POST request: POST http://bezorg.p495.nl/api/orders HTTP/1.1Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXAccept: application/json, application/xml, text/json, text/x-json, text/javascript, text/xml, text/htmlUser-Agent: RestSharp/105.2.3.0Content-Type: application/xmlHost: bezorg.p495.nlContent-Length: 1888Accept-Encoding: gzip, deflate<prestashop><order> <id_address_delivery>256</id_address_delivery> <id_address_invoice>256</id_address_invoice> <id_cart>1355</id_cart> <id_currency>1</id_currency> <id_lang>1</id_lang> <id_customer>601</id_customer> <id_carrier>1</id_carrier> <current_state>1003</current_state> <module>cashondelivery</module> <invoice_number>0</invoice_number> <delivery_number>0</delivery_number> <valid>1</valid> <id_shop_group>1</id_shop_group> <id_shop>1</id_shop> <payment>Contant</payment> <recyclable>0</recyclable> <gift>0</gift> <mobile_theme>0</mobile_theme> <total_discounts>0</total_discounts> <total_discounts_tax_incl>0</total_discounts_tax_incl> <total_discounts_tax_excl>0</total_discounts_tax_excl> <total_paid>1.5</total_paid> <total_paid_tax_incl>0</total_paid_tax_incl> <total_paid_tax_excl>0</total_paid_tax_excl> <total_paid_real>1.5</total_paid_real> <total_products>1.5</total_products> <total_products_wt>1.5</total_products_wt> <total_shipping>0</total_shipping> <total_shipping_tax_incl>0</total_shipping_tax_incl> <total_shipping_tax_excl>0</total_shipping_tax_excl> <carrier_tax_rate>0</carrier_tax_rate> <total_wrapping>0</total_wrapping> <total_wrapping_tax_incl>0</total_wrapping_tax_incl> <total_wrapping_tax_excl>0</total_wrapping_tax_excl> <conversion_rate>1.0</conversion_rate> <associations> <order_rows> <order_row> <product_id>77</product_id> <product_attribute_id>17954</product_attribute_id> <product_quantity>1</product_quantity> <product_name>Aa-drink</product_name> <product_price>1.5</product_price> <unit_price_tax_incl>1.5</unit_price_tax_incl> <unit_price_tax_excl>0</unit_price_tax_excl> </order_row> </order_rows> </associations></order></prestashop> What is wrong here? Why this is not working? Any help would be appreciated!! Link to comment Share on other sites More sharing options...
zaid.naom Posted October 23, 2015 Author Share Posted October 23, 2015 UP! Can someone explain this please? Link to comment Share on other sites More sharing options...
zaid.naom Posted October 28, 2015 Author Share Posted October 28, 2015 UP, seriously how does someone add a new order via the API? there is not even a bit of documentation about adding orders!! Please check what is wrong with the request I am making and why I am getting this error. thanks in advance! Link to comment Share on other sites More sharing options...
massimopasquali Posted October 29, 2015 Share Posted October 29, 2015 Hello! I trying to add a products by API, but I have a problem of unautorized. I using C# and prestaaharp like DLL to interface with presta. Which language do you use to connect at presta? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now