Jump to content

Paypal Error payment ---> Shipping Address State Empty


Recommended Posts

Bonjour,

 

Voici bientôt 3 semaines (depuis la mise à jour de Paypal) que je reçois un nombre incalculable de Payment Error de paypal.

 

Voici la dernière reçu il y 10 min : 

 

PayPal response:TIMESTAMP -> 2015-10-20T03:36:27ZL_ERRORCODE0 -> 10723L_SHORTMESSAGE0 -> Shipping Address State EmptyL_LONGMESSAGE0 -> The field Shipping Address State is requiredL_SEVERITYCODE0 -> Error

 

je precise que cette erreur est pour un client resident en Thailande.

 

Je m'occupe de 3 sites internet Prestashop dont 2 sont en Prestacloud et ce problème est sur les 3 sites.

Je precise tous sont en version 1.6

 

Je vend en international et cela arrive sur plein de pays comme par exemple le Brésil

j'ai donc contacté le support technique de Paypal qui m'ont répondu cela :

 

You are passing the shipping address in the do express checkout api call as follows :

 
paymentrequest_0_paymentaction
"Sale"
paymentrequest_0_shiptoname
"Roberto camargo"
paymentrequest_0_shiptostreet
"1502 silva jardim"
paymentrequest_0_shiptocity
"curitiba"
paymentrequest_0_shiptozip
"80250200"
paymentrequest_0_shiptocountrycode
"BR"
 
The above payment request doesn't have the state field. The state filed should be as follows :
 
paymentrequest_0_shiptostate=PR
 
Please pass the state field with correct value in the api request from your website to paypal for avoiding this issue.
 
Je leur ai répondu que j'utilisai le module integré de Paypal et que je ne pouvais pas faire ces modification en cloud et il m'ont alors repondu ceci :
 
The modification will be done on your website at paypal integration section. Please get help from Prestashop support team for resolving this issue.

 

Je ne pense pas que je doit être le seul dans ce cas, et que beaucoup de monde doit avoir ce probleme

quelqu'un aurait une solution (un support team prestashop qui passerait dans le coin ? )

ou peut être une mise a jour du module paypal va régler ce problème ?

 

Merci pour votre aide

Cordialement

 

Link to comment
Share on other sites

  • 1 month later...

Bonjour,
 
j'ai eu le même soucis sur une commande cette semaine. Pour une cliente canadienne qui apparemment a payée avec le paiement express de paypal installé sur ma boutique. 

 
Il semblerai que cette erreur ressemble à l'erreur :
TIMESTAMP -> 2011-12-14T02:39:46Z
L_ERRORCODE0 -> 10729
L_SHORTMESSAGE0 -> Shipping Address State Empty
L_LONGMESSAGE0 -> The field Shipping Address State is required
L_SEVERITYCODE0 -> Error 
 
sauf que nous avons le code erreur 10723 au lieu de 10729, mais sinon les messages d'erreurs sont les mêmes.
 

En ayant fouillé, j'ai trouvé deux pistes :
1 - Télécharger le "pack de localisation" du Canada dans Localisation>localisation. Apparemment, il faudrait le faire pour tous les pays sur lesquels on rencontre le problème.

2 -  Modifier le code du fichier process.php dans modules\paypal\express_checkout\process.php
 
J'ai trouver un exemple  pour 
PAYPAL VERSION : 3.4.5
LINE 243

private function setShippingAddress(&$fields, $id_address)
{
$address = new Address($id_address);
$fields['ADDROVERRIDE'] = '1';
$fields['PAYMENTREQUEST_0_SHIPTOSTREET'] = $address->address1;
$fields['PAYMENTREQUEST_0_SHIPTOSTREET2'] = $address->address2;
$fields['PAYMENTREQUEST_0_SHIPTOCITY'] = $address->city;
if ($address->id_state)
{
$state = new State((int)$address->id_state);
$fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $state->iso_code;
}
$country = new Country((int)$address->id_country);
$fields['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $country->iso_code;
$fields['PAYMENTREQUEST_0_SHIPTOZIP'] = $address->postcode;
}

REPLACE WITH

private function setShippingAddress(&$fields, $id_address)
{
$address = new Address($id_address);
$fields['ADDROVERRIDE'] = '1';
$fields['PAYMENTREQUEST_0_SHIPTOSTREET'] = $address->address1;
$fields['PAYMENTREQUEST_0_SHIPTOSTREET2'] = $address->address2;
$fields['PAYMENTREQUEST_0_SHIPTOCITY'] = $address->city;
 
 
$country = new Country((int)$address->id_country);
$fields['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $country->iso_code;
 
if ($address->id_state)
{
$state = new State((int)$address->id_state);
$fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $state->iso_code;
} else {
$fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $country->iso_code;
}
 
$fields['PAYMENTREQUEST_0_SHIPTOZIP'] = $address->postcode;
}

La fonction existe toujours dans paypal 3.10.2 et la partie à modifier est identique, j'ai donc appliqué la modification

sur le fichier existant dans mon module :
 

PAYPAL VERSION : 3.10.2
LINE 265

 

private function setShippingAddress(&$fields, $id_address)
{
$address = new Address($id_address);


$fields['ADDROVERRIDE'] = '1';
$fields['EMAIL'] = $this->context->customer->email;
$fields['PAYMENTREQUEST_0_SHIPTONAME'] = $address->firstname.' '.$address->lastname;
$fields['PAYMENTREQUEST_0_SHIPTOPHONENUM'] = (empty($address->phone)) ? $address->phone_mobile : $address->phone;
$fields['PAYMENTREQUEST_0_SHIPTOSTREET'] = $address->address1;
$fields['PAYMENTREQUEST_0_SHIPTOSTREET2'] = $address->address2;
$fields['PAYMENTREQUEST_0_SHIPTOCITY'] = $address->city;


if ($address->id_state)
{
$state = new State((int)$address->id_state);
$fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $state->iso_code;
}


$country = new Country((int)$address->id_country);
$fields['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $country->iso_code;
$fields['PAYMENTREQUEST_0_SHIPTOZIP'] = $address->postcode;} 

REMPLACE PAR 

private function setShippingAddress(&$fields, $id_address)
{
$address = new Address($id_address);
$fields['ADDROVERRIDE'] = '1';
$fields['EMAIL'] = $this->context->customer->email;
$fields['PAYMENTREQUEST_0_SHIPTONAME'] = $address->firstname.' '.$address->lastname;
$fields['PAYMENTREQUEST_0_SHIPTOPHONENUM'] = (empty($address->phone)) ? $address->phone_mobile : $address->phone;
$fields['PAYMENTREQUEST_0_SHIPTOSTREET'] = $address->address1;
$fields['PAYMENTREQUEST_0_SHIPTOSTREET2'] = $address->address2;
$fields['PAYMENTREQUEST_0_SHIPTOCITY'] = $address->city;
$country = new Country((int)$address->id_country);
$fields['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $country->iso_code;


if ($address->id_state)
{
$state = new State((int)$address->id_state);
$fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $state->iso_code;
} else {
$fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $country->iso_code;
}


$fields['PAYMENTREQUEST_0_SHIPTOZIP'] = $address->postcode;
}
 
 
Voila, je ne sais pas encore si cela résoud réellement le problème car je ne suis pas au canada, mais je vais revenir vers ma cliente pour qu'elle tente de recommander et nous verrons si cela fonctionne. 
Si cela marche de votre coté merci de nous tenir informer ici.
 
la boutique en question de mon coté :
www.shop.sendthewoodmusic.com
Edited by sebpolok (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...