amelie13 Posted January 28, 2013 Share Posted January 28, 2013 Bonjour à tous, J'ai configuré Prestashop et les webservices. J'ai voulu utiliser ce kit tout fait pour pouvoir commencer à comprendre le système : https://github.com/PrestaShop/PrestaShop-webservice-lib Et j'ai aussi lu la doc : http://doc.prestashop.com/display/PS15/Chapter+3+-+First+steps+-+Access+the+Web+service+and+list+client J'ai prestashop 1.5.3.1 Pourtant quand je souhaite créer un client, j'ai tout bien paramétéré la clé et l'url, alors que la liste marche nickel, j'ai une épouvantable erreur 500 ... hormis les deux params et le require de la librairie (remonté d'un cran) je n'ai pas touché au code pouvez-vous m'aider SVP ? Merci ! Link to comment Share on other sites More sharing options...
amelie13 Posted January 29, 2013 Author Share Posted January 29, 2013 (edited) Voici ma réponse : HTTP REQUEST HEADER GET /api/customers?schema=blank HTTP/1.1 Authorization: Basic R05XTDM2NzUwSkhKNTBDVkdCWlg5TlhPVENNTldWMzA6 Host: prestashop.monhost.com Accept: */* HTTP RESPONSE HEADER HTTP/1.1 200 OK Date: Tue, 29 Jan 2013 09:31:11 GMT Server: Apache/2.2.16 (Debian) Access-Time: 1359451871 X-Powered-By: PrestaShop Webservice PSWS-Version: 1.5.3.1 Execution-Time: 0.004 Content-Sha1: 6acce20c38cc9287e48ca635f56933f144f68dfb Set-Cookie: 3f99a2f33f7744ef0eca694ec6b1a644=fydXAkHEWKCYz8z%2FOPuV4d2%2FE2174LZyC%2B1ZuHIZYJmc4NsHtk5wnITJvDsKkXd2vAIsO%2FIUXzD2DlUjbHDXqA%3D%3D000060; expires=Mon, 18-Feb-2013 09:31:11 GMT; path=/; domain=prestashop.pixtory-redmine.reseaux.info; httponly Vary: Authorization,Host Transfer-Encoding: chunked Content-Type: text/xml;charset=utf-8 RETURN HTTP BODY <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <customer> <id></id> <id_default_group></id_default_group> <newsletter_date_add></newsletter_date_add> <ip_registration_newsletter></ip_registration_newsletter> <last_passwd_gen></last_passwd_gen> <secure_key></secure_key> <deleted></deleted> <passwd></passwd> <lastname></lastname> <firstname></firstname> <email></email> <id_gender></id_gender> <birthday></birthday> <newsletter></newsletter> <optin></optin> <website></website> <company></company> <siret></siret> <ape></ape> <outstanding_allow_amount></outstanding_allow_amount> <show_public_prices></show_public_prices> <id_risk></id_risk> <max_payment_days></max_payment_days> <active></active> <note></note> <is_guest></is_guest> <id_shop></id_shop> <id_shop_group></id_shop_group> <date_add></date_add> <date_upd></date_upd> <associations> <groups> <group> <id></id> </group> </groups> </associations> </customer> </prestashop> HTTP REQUEST HEADER POST /api/customers HTTP/1.1 Authorization: Basic R05XTDM2NzUwSkhKNTBDVkdCWlg5TlhPVENNTldWMzA6 Host: prestashop.monhost.com Accept: */* Content-Length: 1174 Content-Type: application/x-www-form-urlencoded HTTP RESPONSE HEADER HTTP/1.1 500 Internal Server Error Date: Tue, 29 Jan 2013 09:31:11 GMT Server: Apache/2.2.16 (Debian) Access-Time: 1359451871 X-Powered-By: PrestaShop Webservice PSWS-Version: 1.5.3.1 Execution-Time: 0.003 Set-Cookie: 3f99a2f33f7744ef0eca694ec6b1a644=fydXAkHEWKCYz8z%2FOPuV4d2%2FE2174LZyC%2B1ZuHIZYJmc4NsHtk5wnITJvDsKkXd2vAIsO%2FIUXzD2DlUjbHDXqA%3D%3D000060; expires=Mon, 18-Feb-2013 09:31:11 GMT; path=/; domain=prestashop.pixtory-redmine.reseaux.info; httponly Vary: Authorization,Host Connection: close Transfer-Encoding: chunked Content-Type: text/xml;charset=utf-8[/size] XML SENT xml=<?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <customer> <id></id> <id_default_group>3</id_default_group> <newsletter_date_add>2013-01-24 16:54:56</newsletter_date_add> <ip_registration_newsletter></ip_registration_newsletter> <last_passwd_gen>2013-01-24 10:54:15</last_passwd_gen> <secure_key>5e8bcd008f30db7b1cf44e58c94088a4</secure_key> <deleted>0</deleted> <passwd>f71dbe52628a3f83a77ab494817525c6</passwd> <lastname>TEST</lastname> <firstname>Amélie</firstname> <email>[email protected]</email> <id_gender>3</id_gender> <birthday>1982-09-10</birthday> <newsletter>1</newsletter> <optin>1</optin> <website>http://www.mysite.com</website> <company>Pixtory</company> <siret></siret> <ape></ape> <outstanding_allow_amount>0.000000</outstanding_allow_amount> <show_public_prices>0</show_public_prices> <id_risk>0</id_risk> <max_payment_days>0</max_payment_days> <active>1</active> <note></note> <is_guest>0</is_guest> <id_shop>1</id_shop> <id_shop_group>1</id_shop_group> <date_add></date_add> <date_upd></date_upd> <associations></associations> </customer> </prestashop> RETURN HTTP BODY <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <message><![CDATA[internal error. To see this error please display the PHP errors.]]></message> </error> <error> <message><![CDATA[internal error. To see this error please display the PHP errors.]]></message> </error> <error> <message><![CDATA[internal error. To see this error please display the PHP errors.]]></message> </error> <error> <message><![CDATA[internal error. To see this error please display the PHP errors.]]></message> </error> </errors> </prestashop> Edited January 29, 2013 by amelie13 (see edit history) 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