- πΊπΈUnited States TomTech
Automatically closed because Drupal 7 security and bugfix support has ended β as of 5 January 2025. If the issue verifiably applies β to later versions, please reopen with details and update the version.
When a customer adds a shipping address to their order, the shipping address is not sent in the API request to PayPal.
Of course the shipping address exists and can be found on the order in Drupal Commerce, and then copied manually to PayPal to print shipping labels, but this takes a lot of extra time especially if there are a lot of orders.
I was able to temporarily get this working by adding the following lines to commerce_paypal_wpp.module, right before the api request line, but shouldn't this be a normal part of the module's function?
$shipping_address = $order_wrapper->commerce_customer_shipping->commerce_customer_address->value();
$nvp += array(
'SHIPTONAME' => substr($shipping_address['name_line'], 0, 25),
'SHIPTOSTREET' => substr($shipping_address['thoroughfare'], 0, 100),
'SHIPTOSTREET2' => substr($shipping_address['premise'], 0, 100),
'SHIPTOCITY' => substr($shipping_address['locality'], 0, 40),
'SHIPTOSTATE' => substr($shipping_address['administrative_area'], 0, 40),
'SHIPTOCOUNTRY' => $shipping_address['country'],
'SHIPTOZIP' => substr($shipping_address['postal_code'], 0, 20),
);
// Submit the request to PayPal.
$response = commerce_paypal_api_request($payment_method, $nvp, $order);
Thanks in advance!
Closed: outdated
2.0
PayPal WPP
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed because Drupal 7 security and bugfix support has ended β as of 5 January 2025. If the issue verifiably applies β to later versions, please reopen with details and update the version.