Forums / PayPal Express Checkout support / Missing Shipping address (sometimes) with PPExpress

Missing Shipping address (sometimes) with PPExpress

Started by largomike1 on 29 May 2011, 3:03 AM · Views: 1,188

Results 1 to 2 of 2
29 May 2011, 3:03 AM
#1
largomike1 avatar

largomike1

New Zenner

Join Date:
Apr 2009
Posts:
25
Plugin Contributions:
0

Missing Shipping address (sometimes) with PPExpress

Every now and then, we receive an order processed through PayPal Express and the shipping address is missing. We've conversed with Paypal and they sent me an interesting reply which I've pasted into this posting. I've attempted a fix based on the technicians comments and I was wondering what you thought of my "fix". Here is some background, and the email from the tech is below. Thanks for your guidance. ps. I could not find a posting from anyone else about this problem (with my version of ZC).

Version: 1.3.9h (upgraded a few weeks ago).
Site has been customized a lot, however, I've never modified the payment modules (until now). I try to only modify using the template system (no core files) whenever possible.

Problem seemed to have started a couple weeks after the upgrade. Only happens less than 5% of the time.

Here is the email from the PayPal Tech:

"After reviewing the logs within your PayPal account I was able to notice the variable (NOSHIPPING) was not provided in the order which makes a shipping address optional. Due to using Zen cart this should be a setting that is easily configured within the module. If possible please reach out to your website developer to make this change and all future payments will allow you to view the shipping address.

If you have any further questions, please feel free to respond to this ticket. To do so, please follow the response directions located near the start of this message.

Thank you,

Matt
Merchant Technical Support
Merchant L1 Specialist"

So, I decided to look for a 'variable' of NOSHIPPING and I found some code in includes/modules/payment/paypalwpp.php . I added this one line at line 1462 (where commented).

if ($_SESSION['cart']->get_content_type() == 'virtual' && isset($_SESSION['customer_id']) && $_SESSION['customer_id'] > 0) {
$this->zcLog('ec-step1-addr_check', "cart contents is virtual and customer is logged in ... therefore options['NOSHIPPING']=1");
$options['NOSHIPPING'] = 1;
} else {
//MStein - 05/28/2011 - added Noshipping=0 because paypal was not sending us shipping address sometimes
$options['NOSHIPPING'] = 0;
$this->zcLog('ec-step1-addr_check'

================================
I tested 2 transactions in production mode. One with paypal express and the other with regular paypal wpp. Both worked OK. I've checked my paypal logs and sure enough, the NOSHIPPING option is found in the log like this:
[NOSHIPPING] => 0
It seems having this line in there prevents Paypal from 'optionally' leaving out the shipping address.
Does this sound like a good course of action? Thanks again.

29 May 2011, 4:03 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Missing Shipping address (sometimes) with PPExpress

Perhaps you can get Matt to explain why if NOSHIPPING is specifically listed in PayPal's documentation as OPTIONAL and they only describe what "1" does, then why are they suddenly requiring the NOSHIPPING parameter for things to work correctly? Furthermore, the documentation does NOT explain anything about your problem in connection with the NOSHIPPING parameter: > NOSHIPPING - (Optional) The value 1 indicates that on the PayPal pages, no shipping address fields should be displayed whatsoever.

Character length and limitations: One single-byte numeric character.
Allowable values: 0, 1

Citation: PP_NVPAPI_DeveloperGuide as published for the PayPal integration version used in ZC v1.3.9h

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.