The issue is that when a PayPal payment is sent the payment is not protected with seller protection, because it is saying that the shipping address is unverified. This is something that makes selling with PayPal not easy. Any thoughts ?

Comments

andyg5000’s picture

Status: Active » Needs review
StatusFileSize
new1.42 KB

With WPS there are 3 options for collecting shipping info. This patch provides those three options in this modules WPS settings form. Another patch will need to be created to override the PayPal address if collected through Drupal Commerce.

rszrama’s picture

Title: Shipping information not passed to PayPal. Payment becomes unverified. » Add the option to collect a shipping address at PayPal
Category: support » feature

Recategorizing.

buttifabio’s picture

So is it possible to send to paypal the shipping address collected on my site? I think i have to code it, but i don't know if it's possible and wich is the variable i have to change. Probably i have to substitute the "no_shipping" with something else; where can i find those variables on paypal API?

Thank you for your help.

rszrama’s picture

Status: Needs review » Needs work
StatusFileSize
new1.47 KB

Just did a little testing on this and realized that I don't want to add it until we have support to create shipping profiles for users based on IPNs like we do billing profiles. Otherwise the information is only going to be accessible inside PayPal, which is basically incomplete. I've attached an updated patch as #1 was no longer applying cleanly.

Here's an example response form PayPal with a shipping address:

Array
(
    [mc_gross] => 30.00
    [invoice] => 2-1355688007
    [protection_eligibility] => Eligible
    [address_status] => confirmed
    [item_number1] => 
    [payer_id] => ----
    [tax] => 0.00
    [address_street] => 1 Main St
    [payment_date] => 12:01:56 Dec 16, 2012 PST
    [option_selection1_1] => 1
    [payment_status] => Completed
    [charset] => windows-1252
    [address_zip] => 95131
    [mc_shipping] => 0.00
    [mc_handling] => 0.00
    [first_name] => Joe
    [mc_fee] => 1.17
    [address_country_code] => US
    [address_name] => Joe Buyer
    [notify_version] => 3.7
    [custom] => 
    [payer_status] => verified
    [business] => ----
    [address_country] => United States
    [num_cart_items] => 1
    [mc_handling1] => 0.00
    [address_city] => San Jose
    [payer_email] => ----
    [verify_sign] => ----
    [mc_shipping1] => 0.00
    [tax1] => 0.00
    [option_name1_1] => Product count
    [txn_id] => ----
    [payment_type] => instant
    [last_name] => Buyer
    [address_state] => CA
    [item_name1] => Order 2 at Commerce Kickstart
    [receiver_email] => ----
    [payment_fee] => 1.17
    [quantity1] => 1
    [receiver_id] => ----
    [txn_type] => cart
    [mc_gross_1] => 30.00
    [mc_currency] => USD
    [residence_country] => US
    [test_ipn] => 1
    [transaction_subject] => Shopping CartOrder 2 at Commerce Kickstart
    [payment_gross] => 30.00
)

This will likely need to wait until we switch to 2.x development, but the attached patch will work fine for now for anyone who wants the feature and doesn't mind only having access to the shipping addresses at PayPal.

thatoneguy’s picture

Just a quick note -- the original issue posed by bmx appears to be an issue with PayPal, not Commerce. Shipping addresses are obtained by PayPal from the buyer, not the merchant. The merchant has the option of required shipping addresses provided by the buyer to be verified. Or, the merchant can accept whatever the buyer provides, even if it isn't verified. If the addresses are showing as unverified in PayPal, that's because the merchant's account isn't set up to require verified addresses and the buyer didn't provide an address that verifies.

bmx269’s picture

@thatoneguy, the issue is, that if the information is not sent to paypal, seller protection is not given, as it can not confirm a verified address. You do not want to have a customer enter the information 2 times.

thatoneguy’s picture

@bmx269 I certainly understand the desire for seller protection. Unfortunately, I don't see a way to obtain it without forcing the customer to enter their shipping address during the PayPal checkout process. The only way to keep the buyer from entering their shipping address twice is to stop requesting it on your site and start requiring it during checkout at PayPal.

The only way to send PayPal the shipping address is to require the buyer to provide it during checkout. There is an option to control whether the buyer may or must supply a shipping address; the patch in #4 lets you control this. There is also an option to block payments from buyer's with unconfirmed addresses, but doing so requires you to change a setting in your PayPal account. Commerce cannot change that. In either case, the only way to stop requiring the buyer to enter their shipping address twice is to stop asking for on on your site and start requiring it (through the patch) during checkout at PayPal.

diwant’s picture

Are we able to bring that shipping address back to Commerce's Order? Right now I get the customer name and country from the billing info entered at PayPal. I'm collecting billing and shipping info at PayPal and not on my site so PayPal account holders can just sign in and not enter all of that if it is saved in their PayPal account. But I'd like that info back so I can print packaging slips and personalized thank yous.

torgospizza’s picture

I have also noticed that, for example in our case where we sell digital products (no shipping address required) if I use PayPal EC and return to Review the order, it's also returning a blank shipping address. Not sure if it's completely related but thought I'd mention it here.

diwant’s picture

Hi Erik,

Did you apparate the shipping address back from PayPal yet?

Diwant

jcisio’s picture

StatusFileSize
new1.33 KB

This is an important feature, without it sellers do not have protection eligibility. So I share a patch (to put in a custom module, because I made a lot of modification to work with French version of WPS). I know that there is a security hole with this patch, but at least it is safer than without.

thatoneguy’s picture

The patch in #11 assumes the field commerce_customer_shipping exists, which may not be the case for sites that don't collect shipping addresses. Even those that do may not put the shipping address in commerce_customer_shipping.

Another issue is that, after reading up on some PayPal documentation for address handling, Commerce PayPal seems to get things a bit wrong (and even I misunderstood it in previous comments). The shipping address is the only address that can be sent to PayPal, and PayPal will return the shipping address in the IPN. The billing address is provided by the customer to PayPal, but PayPal doesn't provide it to the merchant.

Unfortunately, Commerce PayPal seems to conflate the two. Billing profiles can be created with the address returned by PayPal in the IPN, but that is actually the shipping address. Because of that, I think there are some bigger problems with this issue.

jcisio’s picture

Sure, the problem with modified shipping address given in IPN was mentionned in #4. However currently there is also a bug (confirmed by PayPal France technical support) in PayPal so that the buyer can always modify the shipping address sent to PayPal. There is no way we can send the shipping address to PayPal and tell it not to let buyer modify it.

benjarlett’s picture

My clients would really like the shipping address to be collected at paypal. I don't mind whether this is collected on the site or on paypal, I'd just like it to be there. I guess the best would be if it was collected on the site and transmitted to paypal.

IckZ’s picture

mh.. just found this post: https://drupal.org/node/2169027

I did not read much about this topic yet but isn't it the same issue as here?! Looks like it provides both: the shipping adress in drupal and in paypal or?

thatoneguy’s picture

#2169027: Add shipping address parameters to PayPal API request if available is for WPP, this is for WPS. It would seem to be as similar issue but for the other module.

benjarlett’s picture

Looks like a solution here for WPS: https://drupal.org/node/1872804
but not sure where to put the code.

  • rszrama committed ddd6cd9 on 7.x-2.x authored by hadsie
    Issue #1494586 by hadsie: related fix to pass 0 value properties to...
aprilr’s picture

Issue summary: View changes

Patch #4 worked great! Thanks!

  • rszrama committed ddd6cd9 on 8.x-1.x authored by hadsie
    Issue #1494586 by hadsie: related fix to pass 0 value properties to...
stevieb’s picture

Patch in #4 works thanks

tomtech’s picture

Status: Needs work » Closed (outdated)

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.