If this is your first visit, check our documentation. To post, register or login.
Forums / PayPal Website Payments Pro support / No address sent to PayPal via Payments Pro in 1.3.9e

No address sent to PayPal via Payments Pro in 1.3.9e

Locked

Started by mrsensible on 11 Aug 2010, 3:32 AM · Views: 3,293

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
11 Aug 2010, 3:32 AM
#1
mrsensible avatar

mrsensible

New Zenner

Join Date:
Mar 2010
Posts:
11
Plugin Contributions:
0

No address sent to PayPal via Payments Pro in 1.3.9e

I am unable to get customers' shipping (or billing) addresses to appear in PayPal's transaction reports, despite all such information being present in Admin/Orders.

Transactions are going through okay - including 3-D Secure for 'checkout without account' using a debit card.

What settings are required in the Payment Modules - or - is there a straightforward edit/rewrite to a php file?

I suspect includes/modules/payment/paypaldp.php is where something's not happening..

For example maybe here somewhere and further down (the rest not included here to save wasting space..)

  // Initialize the paypal caller object.
      $doPayPal = $this->paypal_init();
      $optionsAll = array_merge($options,
                    array('STREET'      => $order->billing['street_address'],
                          'ZIP'         => $order->billing['postcode'],
                          'CITY'        => $order->billing['city'],
                          'STATE'       => $order->billing['state'],
                          'STREET2'     => $order->billing['suburb'],
                          'COUNTRYCODE' => $order->billing['country']['iso_code_2'],
                          'EXPDATE'     => $cc_expdate_month . $cc_expdate_year,
                          'EMAIL'       => $order->customer['email_address'],
                          'PHONENUM'    => $order->customer['telephone']));

      $optionsShip = array();
      if (isset($order->delivery) && $order->delivery['street_address'] != '') {
        $optionsShip= array('SHIPTONAME'   => ($order->delivery['name'] == '' ? $order->delivery['firstname'] . ' ' . $order->delivery['lastname'] : $order->delivery['name']),
                            'SHIPTOSTREET' => $order->delivery['street_address'],
                            'SHIPTOSTREET2' => $order->delivery['suburb'],
                            'SHIPTOCITY'   => $order->delivery['city'],
                            'SHIPTOZIP'    => $order->delivery['postcode'],
                            'SHIPTOSTATE'  => $order->delivery['state'],
                            'SHIPTOCOUNTRYCODE'=> $order->delivery['country']['iso_code_2']);
      }
      // if these optional parameters are blank, remove them from transaction
      if (isset($optionsShip['SHIPTOSTREET2']) && trim($optionsShip['SHIPTOSTREET2']) == '') unset($optionsShip['SHIPTOSTREET2']);
      if ($optionsAll['STREET2'] == '') unset($optionsAll['STREET2']);
      if (isset($optionsShip['SHIPTOPHONE']) && trim($optionsShip['SHIPTOPHONE']) == '') unset($optionsShip['SHIPTOPHONE']);

etc etc

But somehow it doesn't tell PayPal the address - 'PayPal does not have it on file' - or words to that effect at PayPal's transaction report page..

I did have the latest FEC/CSLoader installed - but only by removing it was I able to get the Payments Pro module to actually get past the 'Your order is being processed' stage..

If any of the above makes sense to anyone - I'd be really grateful to hear any good ideas..

11 Aug 2010, 5:06 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,747
Plugin Contributions:
0

Re: No address sent to PayPal via Payments Pro in 1.3.9e

I did have the latest FEC/CSLoader installed - but only by removing it was I able to get the Payments Pro module to actually get past the 'Your order is being processed' stage..

Are you sure you restored the checkout pages completely after removing the addon?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

12 Aug 2010, 2:09 AM
#3
mrsensible avatar

mrsensible

New Zenner

Join Date:
Mar 2010
Posts:
11
Plugin Contributions:
0

Re: No address sent to PayPal via Payments Pro in 1.3.9e

Sorry to take a while to respond..

I didn't remove the addon - I deactivated it using Admin.

So I didn't (manually at least) modify the database either.

I think the FEC installation was messy in the first place - I had FEC 1.7 which was upgraded (probably badly) to 1.8.1.

Not sure whether it's possible to roll it all back to a state without FEC and start again without losing all sorts of things that shouldn't be lost. And I'm reluctant to start applying reverse updates to the database..

I'm not sure, either, whether not sending a shipping address is a 'design feature' of ZenCart/PaymentsPro or whether I have to write some code to make it happen..

As for restoring the checkout pages - do you mean there are checkout pages that are modified by FEC? I was hoping that it behaved itself and used 'extra_configures' and its own css, so that disabling it would leave the 'normal' checkout arrangements unaffected..

I don't mind whether I use FEC or not - all that's required is the ability to take payment from customers without accounts, using debit cards such as Maestro and Visa, and having a shipping address appear in PayPal.

Thanks for showing an interest!

12 Aug 2010, 5:56 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: No address sent to PayPal via Payments Pro in 1.3.9e

MrSensible:

I am unable to get customers' shipping (or billing) addresses to appear in PayPal's transaction reports, despite all such information being present in Admin/Orders.

  1. Are you saying that the PayPal receipt does not contain the address?

  2. Or are you just saying that some "report" doesn't show the address?
    And is that report inside the regular PayPal account section? or is it specifically just in the PayPal Manager section?

  3. Do your PayPal debug logs show that the address was submitted?

If your answer to #1 and #3 show that the address is sent to and acknowledged by PayPal, then the issue in #2 is something you'll have to take up with PayPal directly, since that's a feature request you'll need to log with them. https://www.paypal.com/mts

.
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.

13 Aug 2010, 2:28 AM
#5
mrsensible avatar

mrsensible

New Zenner

Join Date:
Mar 2010
Posts:
11
Plugin Contributions:
0

Re: No address sent to PayPal via Payments Pro in 1.3.9e

Hello Dr Byte..

  1. Are you saying that the PayPal receipt does not contain the address?
    Yes.
  1. Or are you just saying that some "report" doesn't show the address?
    And is that report inside the regular PayPal account section? or is it specifically just in the PayPal Manager section?

Not sure what 'some report' means in this context. I'm talking about the 'receipt' page called 'Transaction Details' obtained when selecting a transaction to view from 'Account Activity' when logged in to a normal Business Account at PayPal. If the purchase originated, say, at eBay there is a shipping address shown. Orders via Payments Pro at the ZenCart site show no such address - instead, there is the phrase "We have no delivery address on file." Express Payment transactions do, however, show a shipping address at PayPal.

Payment goes through in either case.

  1. Do your PayPal debug logs show that the address was submitted?

Here are some quotes from the relevant 'paypaldp_Paypal_Action_... ' logfile:

The bits in red showed the correct data - I've just changed it to protect my 'privacy'.

...
Beginning DP mode
...
[PAYMENTACTION] => Sale
    
[SHIPTONAME] => correct name
   
[SHIPTOSTREET] => correct street address
    
[SHIPTOCITY] => correct city
    
[SHIPTOZIP] => correct postcode
    [SHIPTOSTATE] => correct UK county
    
[SHIPTOCOUNTRY] => GB
...

However - I can't tell from this whether the data was actually sent to PayPal - or was just being collected and used by ZenCart.

Other, shorter log files mention things like

[shipping] => 0.00

but I imagine that's because I have shipping costs to the UK set to zero.

These files (such as the CURL-related log file) have limited bits of the customer's address:

 [PHONENUM] => correct phone number
    [STATE] => correct UK county
    [STREET] => correct address first line

But I think this is just to do with card verification.

I also have a blizzard of diagnostic/debug emails but again - it's not clear to me what's being sent to PayPal and what's being just noted/looked at/used by ZenCart.

If your answer to #1 and #3 show that the address is sent to and acknowledged by PayPal, then the issue in #2 is something you'll have to take up with PayPal directly, since that's a feature request you'll need to log with them. https://www.paypal.com/mts

#3 results are inconclusive - but I'm thinking that if Express Checkout and transactions from eBay can cause PayPal to retain and display a shipping address then surely the Payments Pro module can manage the same trick if it's configured appropriately?

I guess I should try PayPal MTS as you suggest - would it mean 'suggesting a feature' for some future release - or do you reckon they can actually tell me what to tweak - or maybe tweak it themselves?

Another thought - when I disabled FEC in ZenCart Admin - should I undo all the associated DB 'updates' or will they do no harm as they are - come to that - should I delete all the FEC and CSLoader-associated files? I'm not confident that it didn't overwrite core Zen files - nor that any associated template files are innocent..

Sorry I haven't been very succinct - your interest has been much appreciated

13 Aug 2010, 2:54 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: No address sent to PayPal via Payments Pro in 1.3.9e

Can you zip up those log files, then upload the zip to someplace on your server and PM me with a link to the zip file so I can analyse them?
(And I hope you're talking about actual files, not emails.)

.
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.

13 Aug 2010, 3:29 AM
#7
mrsensible avatar

mrsensible

New Zenner

Join Date:
Mar 2010
Posts:
11
Plugin Contributions:
0

Re: No address sent to PayPal via Payments Pro in 1.3.9e

Let me know when you've downloaded them - then I can take them off..

And yes - 10,000 debug emails would probably not be required..

Mr S

14 Aug 2010, 11:14 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: No address sent to PayPal via Payments Pro in 1.3.9e

So, you've got your Website Payments Pro module set up as "UK" mode, right?

.
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.

14 Aug 2010, 11:20 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: No address sent to PayPal via Payments Pro in 1.3.9e

Let's try a small edit ...
Try changing this line (775) from /includes/modules/payment/paypaldp.php from$optionsAll, array_merge($optionsNVP, $optionsShip));to```
array_merge($optionsAll, $optionsShip), $optionsNVP);

.
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.

15 Aug 2010, 3:13 AM
#10
mrsensible avatar

mrsensible

New Zenner

Join Date:
Mar 2010
Posts:
11
Plugin Contributions:
0

Re: No address sent to PayPal via Payments Pro in 1.3.9e

Website Payments Pro module is in UK mode - in fact the name of the module even comes up as 'Website Payments Pro (UK)' in the module listing at ZenCart admin.

Payments in UK currency go through perfectly - it's just that it would be good to have PayPal receive a shipping address, as that's where the user goes to get shipping addresses for his eBay sales..

Will try your first edit when I've recovered from an arduous 18 hours of pyrotechnics..

Your continued assistance is much appreciated - some of that firework money will be in the donation box at some point..

Paul

16 Aug 2010, 2:59 AM
#11
mrsensible avatar

mrsensible

New Zenner

Join Date:
Mar 2010
Posts:
11
Plugin Contributions:
0

Re: No address sent to PayPal via Payments Pro in 1.3.9e

I carried out your suggested edit to paypaldp.php - it has not caused a shipping address to appear.

I've pm'd you with a link to where you can download the new log files should you need them..

There's a newly discovered issue (not the result of this edit, it happened before the edit) - PayPal, although it displays a shipping address for 'Express Checkout' payments, fails to say what the actual product is!

For that matter, no information about what product has been ordered appears at PayPal when using 'Payments Pro' either..

I think these things may all turn out to be 'features' rather than bugs..

All required information is there in Admin->Customers->Orders so it's only a matter of convenience whether or not PayPal shows the info..

Sorry if I've duplicated some of this message in the pm I sent you - I thought this thread would make more sense to other readers if I included the info here.

I notice a thread at http://www.zen-cart.com/forum/showthread.php?t=88416&page=4 which addresses a similar problem with PayPal IPN. My IPN module is currently uninstalled, so I'm not sure if it's relevant to this. Unless Payments Pro and/or ExpressCheckout use components from the Standard IPN module even if it's not activated?

16 Aug 2010, 3:05 AM
#12
drbyte avatar

drbyte

Sensei

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

Re: No address sent to PayPal via Payments Pro in 1.3.9e

IPN is a different animal from Express and Pro. Any sentiments of "solutions" for IPN-related feature limitations are not applicable to Express or Pro code.

Zen Cart cannot send line-item order details if it detects anything wrong with the math adding up the values after accounting for taxes and shipping as well as coupons/discounts. It also can't send the details if the order is placed using a currency that is not the default currency or whose exchange rate is not 1.00000 because PayPal's math won't add up to Zen Cart's math in such a case. So, as you say, the lack of such details being passed is not a bug, but rather a safety feature to prevent the order from being rejected because of a mismatch in PayPal's US-centric view of advanced arithmetic.

.
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.

16 Aug 2010, 6:49 AM
#13
drbyte avatar

drbyte

Sensei

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

Re: No address sent to PayPal via Payments Pro in 1.3.9e

MrSensible:

I carried out your suggested edit to paypaldp.php - it has not caused a shipping address to appear.
But ... the code change did cause the shipping address to be sent.
It's possible that PayPal isn't using the information from inside your PayPal Manager screen, but the details could be in your PayPal account transaction detail. PayPal handles some information differently between those two systems.

Data from your logs (obscured slightly for privacy):```
[FIRSTNAME] => P***
[LASTNAME] => W***
[STREET] => 3***** V**** T****
[CITY] => T****
[STATE] => S********
[ZIP] => T****H
[COUNTRY] => GB

[SHIPTONAME] => P**** W****
[SHIPTOSTREET] => 3***** V **** T****
[SHIPTOSTATE] => S*******
[SHIPTOCITY] => T*****
[SHIPTOZIP] => T****H
[SHIPTOCOUNTRY] => GB


And, it *is* actually sending the line-item details too:```
    [L_AMT0] => 0.50
    [L_NAME0] => Miller ICE 25C Pack of 5, 5
    [L_NUMBER0] => 
    [L_QTY0] => 1
```Granted, this is a "Website Payments Pro" transaction, and not Express Checkout.


I'm puzzled why it wouldn't be showing these details on PayPal's side, unless it's because you're viewing the details from the wrong system.

.
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.