Forums / PayPal Express Checkout support / PP Express shipping question

PP Express shipping question

Locked

Started by tinypack on 18 Jul 2007, 4:48 PM · Views: 10,138

Results 21 to 31 of 31
This thread is locked. New replies are disabled.
19 Aug 2007, 9:10 PM
#21
duwane avatar

duwane

Zen Follower

Join Date:
Aug 2004
Location:
Auckland, New Zealand
Posts:
120
Plugin Contributions:
0

PP Express shipping question

I think it is the PayPal DB table I am looking for as the address details don't show up in the left hand column of the PayPal grey table on the Admin order edit screen (Under the code comment that says: <!-- BOF: pp admin transaction processing tools --> in the Zen admin edit screens HTML source code). The shipping address up the top (ZenCart one) is correct and the address details get entered correctly into the orders table.

Also the address status is entered into the PayPal table as "None" which is why I am guessing that I need to change something before it gets written there by replacing the empty response from PayPal with the ZenCart shipping address before it gets written so the address details will be displayed correctly on the order edit screen in admin.

Phew, does that make any sense :wacko:

20 Aug 2007, 2:30 AM
#22
drbyte avatar

drbyte

Sensei

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

Re: PP Express shipping question

The actual final address details that are stored in the order come from the address book entries in Zen Cart. The paypal table doesn't store full address info. In fact, it only stores meta-data about the transaction, and is largely used only as a reference to understand IPN history about the transaction.

The "correct" address needs to not only exist in Zen Cart, but also be tied to the order ... before the order is completed ... ie: before the confirmation page.

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

20 Aug 2007, 9:28 AM
#23
duwane avatar

duwane

Zen Follower

Join Date:
Aug 2004
Location:
Auckland, New Zealand
Posts:
120
Plugin Contributions:
0

Re: PP Express shipping question

DrByte:

The actual final address details that are stored in the order come from the address book entries in Zen Cart. The paypal table doesn't store full address info. In fact, it only stores meta-data about the transaction, and is largely used only as a reference to understand IPN history about the transaction.

The "correct" address needs to not only exist in Zen Cart, but also be tied to the order ... before the order is completed ... ie: before the confirmation page.

So if I understand you correctly, in this scenario we are talking about here, there is no real reason for me to worry about the address details not being entered into the PayPal table (seeing as it is only as a reference)? Is it not used anywhere else other than being displayed on the zenAdmin order edit screen? All the other details are still entered into the PayPal table and display correctly except for the address.

As I said before the ZenCart order itself looks 100% correct as far as billing, shipping and customer addresses so if we don't need the PayPal address for anything else then this may be a good workaround :unsure:

20 Aug 2007, 12:03 PM
#24
drbyte avatar

drbyte

Sensei

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

Re: PP Express shipping question

duwane:

So if I understand you correctly, in this scenario we are talking about here, there is no real reason for me to worry about the address details not being entered into the PayPal table (seeing as it is only as a reference)? Is it not used anywhere else other than being displayed on the zenAdmin order edit screen?Correct .

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

20 Aug 2007, 7:56 PM
#25
duwane avatar

duwane

Zen Follower

Join Date:
Aug 2004
Location:
Auckland, New Zealand
Posts:
120
Plugin Contributions:
0

Re: PP Express shipping question

Correct .

WooHoo! :clap:
Thanks for all your help DrByte.

I will do a bit more testing to make sure all totals, etc are correct and feed back here if I find any problems.

28 Sep 2007, 12:12 AM
#26
phil020782 avatar

phil020782

Zen Follower

Join Date:
Jul 2007
Posts:
158
Plugin Contributions:
0

Re: PP Express shipping question

duwane:

I think I finally may have found a viable solution but I need some help getting the data into the PayPal tables properly. This solution is independent of the one I posted earlier and seems much cleaner and less risky.

In my travels around the PayPal developer’s handbooks I found a new API function which I had not seen before. This function is "NOSHIPPING". When I came across it I new it was the answer:lookaroun. Basically this API call removes the customer’s option to change their shipping address on the PayPal screen. The code I wrote only runs if their selected shipping address is not the same as their default one and their account is not a temporary one.

Find this code:

/**
 * Ask PayPal for the token with which to initiate communications
 */
$response = $doPayPal->SetExpressCheckout(number_format($order_amount, 2), $return_url, $cancel_url, $options);
> 
> Just ABOVE it add:
> ```
if(isset($_SESSION['sendto']) && isset($_SESSION['customer_default_address_id'])
	&& $_SESSION['sendto'] != $_SESSION['customer_default_address_id'] && isset($_SESSION['customer_id'])){
	//This user has selected a shipping address other than their default address book entry
	$sql = "SELECT customers_paypal_ec
	      FROM " . TABLE_CUSTOMERS . "
	      WHERE customers_id = '".$_SESSION['customer_id']."' ";
	$check_customer = $db->Execute($sql);

	if (!$check_customer->EOF) {
		if ($check_customer->fields['customers_paypal_ec'] != '1') {
			//this is not a temporary account so hide the shipping detail on the PayPal screen
			$options['NOSHIPPING'] = 1;
		}
	}
}

This seems to work really well as far as I can see except that in our scenario (customer choosing different shipping address) it does not enter all address details correctly into the PayPal table as there is no address response from PayPal. The shipping address is entered into the Zen orders tables correctly and shows the correct shipping address.

DrByte I would appreciate if you could take a look at the code above and let me know if it is a viable workaround/patch as there seems to be many threads dealing with the same issue as we are here. Most of the other threads don't have any real answers and some contain custom hacks that don't look too sound to me.

I am having the same problem with paypal changing the shipping address on orders, I tried the solotion above and it made no difference, have there been any furthur developments with this issue?

Thanks

30 Nov 2007, 1:56 AM
#27
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: PP Express shipping question

Hi everyone,

I have a similar problem and before I go through all the changes described here, I thought I would add one more piece of the problem. Not only does PayPal update my shipping addres, but I use paypal to print shipping labels (don't know of a better way). So it's important that I have the correct shipping address in both arenas. I don't want the customer to have to update it in both places, so is there a solution for this? Is there a module to avoid paypal shipping labels?

Thanks:(

Vicky
Compass Web Services - Templates for Zen Cart
http://www.compasswebservices.com/

30 Nov 2007, 5:35 PM
#28
tinypack avatar

tinypack

New Zenner

Join Date:
Apr 2007
Location:
Spudville
Posts:
60
Plugin Contributions:
0

Re: PP Express shipping question

For the moment I have replaced the regular zen-cart button with a 1x1 gif. I only offer PayPal express as a payment option. Customers now have no choice but to go through paypal to enter shipping information. Information is only entered and confirmed once. That has temporarily solved the problem and sped up the checkout process.

www.PrairieRoses.com
A Country Sensibility

1 Dec 2007, 1:05 AM
#29
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Re: PP Express shipping question

I think I like that solution as well. I use Paypal for my shipping labels and wouldn't want to have to double check to see if they entered the correct information. It would be better if the two systems talked to one another better, but hey, can't have everything!

V

Vicky
Compass Web Services - Templates for Zen Cart
http://www.compasswebservices.com/

29 Feb 2008, 4:08 PM
#30
yorkshirepetshop avatar

yorkshirepetshop

New Zenner

Join Date:
Jun 2007
Posts:
12
Plugin Contributions:
0

Re: PP Express shipping question

Is there any solution for this problem yet. I've had quite a few customers not realising you have to change the address in Paypal and orders are going to the wrong address. I've tried everything in the thread, but had no joy.
If it can't be solved I'll have to revert back to the IPN module. :(

Many thanks

29 Feb 2008, 5:38 PM
#31
pinetreecandles avatar

pinetreecandles

Zen Follower

Join Date:
Feb 2008
Location:
West Virginia
Posts:
135
Plugin Contributions:
0

Re: PP Express shipping question

If your still having issues, you may want to look into 2checkout. I currently offer paypal express, 2checkout, and check/moneyorder. Only reason I added 2checkout is I have many customers that wont touch Paypal.

2checkout has recently added paypal as a payment option when checking out via 2checkout. In the two tests I have done the correct info is getting transmitted when using a different shipping/billing addresses. The seller only pays the 2checkout fees and not the paypal fees. In fact the seller doesn't even have to have a paypal account.

I would never had even known customers had that option if it weren't for me switching from a osc based cart to zen. It might be a solution to fix your problem.

Zen Cart: 1.3.8a
PHP: 5.2.4
MySQL: 5.0.45

Pine Tree Candles