Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Paypal Express Checkout not finding shipping options  (Read 9343 times)

Offline sharon

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Paypal Express Checkout not finding shipping options
« on: July 15, 2014, 06:30:25 PM »
I'm having problems with PayPal Express Checkout and weight based shipping. I am currently using the Paypal Sandbox Test environment
Case 1
All is OK when I use Paypal Express via the route
1. View Cart
2. Checkout button
3. Guest Checkout option
4. Guest Checkout Step 2 Page - This displays all shipping options correctly.

Case 2
However when I use the Paypal Express button from anywhere (for example on the view cart page) and complete the paypal payment screen, on return to
the Guest Checkout - Step 2 Page I get the error message
Error: No Shipping Options available.

The correct procesing of the Case 1 shows that the locations/zones/weights are set correctly.

In trying to debug this, I note that the SQL for selecting the zone_to_locations is different in the two cases as follows

Debug log
/var/www/html/shop/core/engine/extensions.php   LIne 821
Case 1
SELECT * FROM zones_to_locations WHERE location_id = '4' AND country_id = '222' AND (zone_id = '3534' OR zone_id = '0')
(where 222 is UK and zone_id 3534 is a correct the county for the address)

Case 2
SELECT * FROM zones_to_locations WHERE location_id = '2' AND country_id = '222' AND (zone_id = '0' OR zone_id = '0')
(where we have zone_id = 0 on both selections. There is no zone_id 0 setup in the tables)

I am presuming that the zone_id is not getting picked up correctly on return from paypal express processing and hence no shipping options can be found.

Could you shed any light on this as to a way forward for me.
Thanks


Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5819
  • Karma: +274/-2
    • View Profile
Re: Paypal Express Checkout not finding shipping options
« Reply #1 on: July 16, 2014, 04:46:44 AM »
Hello.

in CASE 2 shipping address used from PayPal account (because you skip shipping section). Make sure address entered on PayPal side is same with shipping address from CASE 1.
Say you have configured Weight Based shipping to work with UK only and in paypal account you have USA address (or incorrect UK). in case 2 if you skip shipping methods selection and go directly to PayPal  - then USA address (or incorrect UK) used for shipping and Weight Based shipping can not be applied.

If You think that this is a bug please report we will try to find solution.
Please post more details if possible: address from case1 and case 2 (PayPal side address)

Offline sharon

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Paypal Express Checkout not finding shipping options
« Reply #2 on: July 16, 2014, 05:48:54 PM »
Hi,
On futher investigation I think it maybe a bug as the addresses used on both the guest login and the paypal side are the same.
To try and debug a little I put a debug statment in the program shop/extensions/paypal_express_checkout/storefront/model/extension/paypal_express_checkout.php at line 51. as follows

$var= "ADDRESS KEYS:".print_r(array_keys($address),true)." ADDRESS VALUES: ".print_r(array_values($address),true);
ADebug::checkpoint($var);

and then ran Case 1 and Case 2 and captured the results from the Checkout Step 2 screen.

The attachments show  - the paypal addresses and checkout screens and the results for the debug statment for  case 1 (guest checkout) and case 2 (paypal express) . In the debug addresses, the  zone, zone_code and country_id are the same but in case 2 there is no zone_id.

Thanks for your quick response.

« Last Edit: July 16, 2014, 06:25:33 PM by sharon »

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Paypal Express Checkout not finding shipping options
« Reply #3 on: July 17, 2014, 06:01:49 AM »
can you replace file public_html/extensions/paypal_express_checkout/storefront/controller/responses/extension/paypal_express_checkout.php
and test is zone adds to address?
« Last Edit: July 17, 2014, 07:15:15 AM by abolabo »
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline sharon

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Paypal Express Checkout not finding shipping options
« Reply #4 on: July 18, 2014, 01:26:45 PM »
Thanks for the program. installed it as requested, cleared all cache (browser and AbanteCart) but the error is still occuring.
On return to step 2 from paypal express checkout the address still has the zone_id as blank - See attached address dump.
Thanks
Sharon


Offline timlo

  • Newbie
  • *
  • Posts: 32
  • Karma: +3/-0
    • View Profile
Re: Paypal Express Checkout not finding shipping options
« Reply #5 on: September 01, 2014, 12:33:47 AM »
I am using Paypal standard, and i think there is no IPN URL, and order payment cant return, so I install paypal express.

but when I getting 2 orders and using Weight Based Shipping.

It seems the shipping country isnt return or pass correctly. My store location is set to Hong Kong.

and both orders are from USA.

But in the order detail, there is indicated with Hong Kong country shipping, but invoice shipping address is USA.

This is nightmare for both paypal standard / express having this issue.

Please tell me how to fixed it.

Offline timlo

  • Newbie
  • *
  • Posts: 32
  • Karma: +3/-0
    • View Profile
Re: Paypal Express Checkout not finding shipping options
« Reply #6 on: September 01, 2014, 12:39:19 AM »
Just more information

you can see the address and shipping country are different

 

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.