Hello all,

After being directed to the paypal servers when using WPS and the user does NOT have a paypal account the billing address information is not being integrated from what they already entered on the checkout page. Is this something that has be configured being that a user could potentially have different customer profiles with address fields and/or something that is just not implemented yet?

Thank you.

Nick

CommentFileSizeAuthor
#9 1230304.create_billing_profile.patch3.21 KBrszrama
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

carn1x’s picture

Subscribe

ABaier’s picture

Subscribe

rszrama’s picture

In my case, I simply didn't enable the Billing pane locally. There was no reason to collect it, since that's the reason for PayPal in the first place. : D

That said, if you do need to collect billing information on-site, it would be a fine feature to have. Additionally, in cases where you don't collect billing information on-site, I'd really like the PayPal module to go ahead and create a profile using the first and last name returned from PayPal in the IPN. So consider this my stamp of approval on the feature request. ; )

Pomliane’s picture

rszrama’s picture

Title: Customer Billing Address Integrated to WPS » Create a Billing information customer profile when IPN is received for an order with no profile

For the most part. Let's repurpose this one to just focus on my additional request in #3.

andyg5000’s picture

Component: PayPal WPS » PayPal / IPN
andyg5000’s picture

From what I can tell, PayPal only returns address values in the IPN when a shipping address is specified. This functionality would require #1494586: Add the option to collect a shipping address at PayPal to be applied and then we'd need to decide which type of profile to create. Since it's returning a shipping address I don't think we'd want to create a billing profile for the customer. Thoughts?

rszrama’s picture

It doesn't return a full address, but it does return the first and last name of the customer and the country:

Array
(
    [mc_gross] => 21.20
    [invoice] => 150-1327288914
    ...
    [first_name] => Test
    ...
    [last_name] => User
    ...
    [residence_country] => US
    [test_ipn] => 1
)

That information is enough to create the profile and won't cause any problem on the order edit form where we strip the requirements from profile field values anyways.

rszrama’s picture

Status: Active » Needs review
FileSize
3.21 KB

I'm attaching the patch I've created for this. I'll test it in my live site using the sandbox tomorrow and commit if all goes well. : )

rszrama’s picture

Status: Needs review » Fixed

Had a couple of stupid bugs in the patch; was looking for a setting on $payment_method instead of in $payment_method['settings'] and for some reason used !empty() instead of empty() when checking to make sure we had first and last names in the IPN. C'est la vie. Fixed, tested, and committed.

Commit: http://drupalcode.org/project/commerce_paypal.git/commitdiff/451acc2

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.