Billing address not returned from PayPal

Created on 11 July 2021, almost 4 years ago
Updated 22 November 2024, 6 months ago

Problem/Motivation

I'm working on a checkout flow where we want to retrieve the user's address from PayPal, rather than have the user enter their billing info (again) in Drupal. However, it doesn't seem like the address is ever returned from PayPal.

From the wording of the ''Update the billing customer profile" option, I would expect that the address entered in the PayPal modal should get passed back to Drupal and used for the billing profile. However, only the name, email and country code get updated.

I've tried using the getOrder() method of the SDK to retrieve order data to check what's included, and the 'payer' address only contains country code there too.

The only time that a full address is returned seems to be when it was passed to PayPal in the first place, when using the 'Collect billing information' option. However the address returned is just the same address that was passed in, even if it was amended on the PayPal side.

Is this a change from the PayPal side, where the customer's full address is no longer returned? Or am I misunderstanding something and it's not intended to work like this anyway?

I saw this similar-sounding issue, although the fix was for collecting the billing info in Drupal:
#3178624: Billing address not saved when paying using the Smart payment buttons

Steps to reproduce

  • Set up a payment gateway using 'PayPal Checkout' as the plugin
    • Select the option "Accept PayPal with smart payment buttons"
    • Select the option to not ask for a shipping address
    • Select "Update the billing customer profile with address information the customer enters at PayPal"
  • Go through checkout and open the PayPal modal
    • Either login or complete payment as a guest, entering address details
  • Complete the order
  • Check the order in the backend and see that the address is empty.

Alternatively, select the 'Collect billing information' option. In this case the billing address fields are shown in Drupal, and whatever is entered here gets passed to PayPal. However if you amend the address in PayPal, the changes aren't passed back to Drupal and the address will be stored as whatever was originally entered.

💬 Support request
Status

Fixed

Version

1.0

Component

PayPal Checkout

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024