Re: 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:
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.
Re: PP Express shipping question
Quote:
Originally Posted by
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:
Re: PP Express shipping question
Quote:
Originally Posted by
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 .
Re: PP Express shipping question
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.
Re: PP Express shipping question
Quote:
Originally Posted by
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:
Code:
/**
* Ask PayPal for the token with which to initiate communications
*/
$response = $doPayPal->SetExpressCheckout(number_format($order_amount, 2), $return_url, $cancel_url, $options);
(line 1668 or so of my includes/modules/payment/paypalwpp.php)
Just ABOVE it add:
Code:
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
Re: PP Updating my shipping address
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:(
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.
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
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