[Fixed v1.5.1] Virtual products: PayPal has unexpectedly returned a blank address
Hi,
I have a Zen Shop (1.3.9) up & running with activated PayPal Express module for payment.
If a customer is not registering manually, but directly bypassing the whole registration part by using the paypal express method, everything works fine. Cashflow works, Account is created, Email to the customer... all good!
But if an already registered customer chooses 'PayPal' as payment method at the end of the order process it does not work. Paypal login page will load as it should, but after entering the customer paypal credentials Zen-Cart returns the following error message:
Quote:
Originally Posted by Error message text
PROBLEM: We're sorry. PayPal has unexpectedly returned a blank address. <br />In order to complete your purchase, please provide your address by clicking the "Sign Up" button below to create an account in our store. Then you may select PayPal again when you continue with checkout. We apologize for the inconvenience. If you have any trouble with checkout, please click the Contact Us link to explain the details to us so we can help you with your purchase and prevent the problem in the future. Thanks.'
Any idea where the root cause is located? I already reviewed some threads and learned that there were some issues with Zen 1.3.8 and the blank adress, but those should be fixed in Zen 1.3.9.
Thanks for any idea, where I can approach to do some more bugfixing / testing. The IPN configuration looks good to me as long as the express registration & payment works, or am I mistaking?
Looking forward to some answers of the specialists...
Best regards,
Michael
Re: PayPal has unexpectedly returned a blank address
My ZC>Paypal was working during testing with PP.
Then I moved to a sub-domain for permanent location and tested checkout without PP and all was well. ZC also works with 100% off coupon while logged in. However, when logged in to ZC, PP express fails with the same above message.
ZC 1.5.0 RC3.
Added flexible attributes.
Made some changes to ZC admin email accounts.
Adjusted some attributes.
Solutions tried:
Re-pasted API info.
Uninstalled PP module and reinstalled.
It appears to have something to do with the ZC customer address being lost during the transaction.
When it ask for you to sign up, you are still logged in and the good are still in the cart???
Re: PayPal has unexpectedly returned a blank address
May have found a bug in virtual products handling, by virtue of the way PayPal handles addresses for virtual items.
Try setting your product as "Product Is Virtual" = Yes, Skip Shipping Address.
And make this small code change by adding in the new highlighted line exactly as shown:
/includes/modules/payment/paypalwpp.php, line 1661 (v1.5.0)
Code:
// Check for blank address -- if address received from PayPal is blank, ask the customer to register in the store first and then resume checkout
if ($_SESSION['cart']->get_content_type() != 'virtual')
if ($response['SHIPTONAME'] . $response['SHIPTOSTREET'] . $response['SHIPTOSTREET2'] . $response['SHIPTOCITY'] . $response['SHIPTOSTATE'] . $response['SHIPTOZIP'] . $response['SHIPTOCOUNTRYCODE'] == '') {
This fix will be added to a future version.
Re: PayPal has unexpectedly returned a blank address