2 jours
1 jour

[Solved}Paypal Express Checkout Error? - The Field Shipping Address State Is Required - PayPal - PrestaShop Forums
Hi I have reset up my store again with Hostgator.. When I try to pay my testing product with express checkout, at the final stage 'I confirm my order', I receive this error.. Please try to contact the merchant: PayPal response: TIMESTAMP -> 2013-02-14T08:31:38Z L_ERRORCODE0 -> 10729 ..
https://www.prestashop.com/forums/topic/225187-solvedpaypal-express-checkout-error-the-field-shipping-address-state-is-required/
1 jour
Patch pour votre version (mais qui ne résoud pas le pb de la configuration de vos pays):
CODE
private function setShippingAddress(&$fields, $id_address)
{
$address = new Address($id_address);
//We allow address modification when using express checkout shortcut
if ($this->type != 'payment_cart') {
$fields['ADDROVERRIDE'] = '0';
$fields['NOSHIPPING'] = '0';
} else {
$fields['ADDROVERRIDE'] = '1';
}
$fields['EMAIL'] = $this->context->customer->email;
$fields['PAYMENTREQUEST_0_SHIPTONAME'] = trim($address->firstname . ' ' . $address->lastname);
$fields['PAYMENTREQUEST_0_SHIPTOPHONENUM'] = (empty($address->phone)) ? $address->phone_mobile : $address->phone;
$fields['PAYMENTREQUEST_0_SHIPTOSTREET'] = !empty($address->address1) ? trim($address->address1) : '';
$fields['PAYMENTREQUEST_0_SHIPTOSTREET2'] = !empty($address->address2) ? trim($address->address2) : '';
$fields['PAYMENTREQUEST_0_SHIPTOCITY'] = !empty($address->city) ? trim($address->city) : '';
$country = new Country((int) $address->id_country);
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_SHIPTOCOUNTRYCODE'] = $country->iso_code;
$fields['PAYMENTREQUEST_0_SHIPTOZIP'] = !empty($address->postcode) ? trim($address->postcode) : '';
}