1 Attachment(s)
Paypal Shipping address strange behaviour
Zencart version 1.51 and 1.52
I have several Zen cart owners in the UK who from time to time see strange shipping address behaviour when items are purchased via PayPal Express Checkout.
The customers billing address is correct but sometimes the shipping address is given a different county/state name. The county/state will always be the same but different from one zen cart shop to the other. I think the issue might be that the customer making the purchase may not have filled out correctly all the fields in their PayPal account. As when you look at the admin area in Zen cart the common denominator appears to be :
Attachment 17148
So if in the field Address State the town or county/state appears i.e. worcester WR53SP the shipping address is correct, but if it appears as above GB WR53SP then the shipping address in the admin area is changed to random county/state which is always the same but different from one Zen cart to another.
Is this a bug in Zen cart or just that the customers have failed to fill out their PayPal details correctly?
Thanks
Re: Paypal Shipping address strange behaviour
Zen Cart simply responds to whatever PayPal sends back, which is based on what the customers entered.
2 Attachment(s)
Re: Paypal Shipping address strange behaviour
Quote:
Originally Posted by
DrByte
Zen Cart simply responds to whatever PayPal sends back, which is based on what the customers entered.
Thanks for the speedy response, but maybe I have not explained myself too well. If a customer purchases using PayPal express and pays by credit card then this happens all OK
Attachment 17150
But if a customer pays by PayPal and presumably has not entered the full information (State/County) this happens:
Attachment 17151
So zen cart adds the county Devon and with this zen cart always Devon, but another zen cart will use a different county name but always the same.
Re: Paypal Shipping address strange behaviour
Zen Cart can only work with the data that is provided to it.
So, if the customer gives the data in a certain format to your Zen Cart store, then Zen Cart will start with that.
However, if the customer gives the data to PayPal differently, then Zen Cart will display that.
The gray box area you're highlighting is data that comes directly from PayPal.
Re: Paypal Shipping address strange behaviour
I already understood that the grey area was data coming from PayPal. Thanks for the update. Still strange that when the state county is not in the data from PayPal shipping adds the incorrect county and is always the same.
Re: Paypal Shipping address strange behaviour
I just did a fresh search of all the source code in Zen Cart. There's no mention of "GB WR53SP" anywhere.
Perhaps it's coming from one of your settings? or plugins? or a combination of those?
Re: Paypal Shipping address strange behaviour
Quote:
Originally Posted by
DrByte
I just did a fresh search of all the source code in Zen Cart. There's no mention of "GB WR53SP" anywhere.
Perhaps it's coming from one of your settings? or plugins? or a combination of those?
Thanks for the guidance and help. Its very strange this happens on 6 sites that all use Paypal Express. The only time the shipping changes in state/county is when the customer has not filled in the PayPal details correctly. IE in State GB WR53SP (WR53SP is UK postal code) so another might be GB PL206NB
On each occasion that this happens the Shipping State is changed to an incorrect State/County each shop uses a different 'default' county one always uses Devon another uses Greater London.
All sites have similar plugins, but nothing obvious that would cause this issue.
Re: Paypal Shipping address strange behaviour
@DrByte
Thanks for the help, after some searching in the database I can see that the info sent and received from PayPal seems to be OK, when you check the PayPal table. However, if the customers fails to enter a state but just enters GB and postal code the shipping address always adds an incorrect state/county. I found that information in the orders table under delivery_state where would this information come from and do you have any ideas why it enters a 'default' incorrect state/county?
Thanks
Re: Paypal Shipping address strange behaviour
@DrByte
Thanks for the help, after some searching in the database I can see that the info sent and received from PayPal seems to be OK, when you check the PayPal table. However, if the customers fails to enter a state but just enters GB and postal code the shipping address always adds an incorrect state/county. I found that information in the orders table under delivery_state where would this information come from and do you have any ideas why it enters a 'default' incorrect state/county?
Thanks.
It looks like the error is coming from
admin/orders.php (using COWA but this customer used standard)
Around line 518
<td class="main" valign="top"><strong><?php echo ENTRY_SHIPPING_ADDRESS; ?></strong></td>
<td class="main"><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?></td>
Where is echo data coming from
PHP Code:
<?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'); ?>
If you can help me find this maybe I can find the error?
Re: Paypal Shipping address strange behaviour
The $order->delivery address is the Shipping Address supplied.