LukeH Posted July 8, 2010 Share Posted July 8, 2010 HiPS Version: 1.3.1 running on Localhost test server.I am trying to setup PayPal API to work with my store, and so far I am getting mixed results. I have created a Sandbox PayPal account and everything seems to work OK i.e. Order goes to PayPal – Payment goes through – Order shows in BO – Order shows in user history.My problem is that I have setup custom countries such as, UK Mainland, UK Scottish Highlands & Islands, UK Isle of Man etc.... I use these countries instead of United Kingdom so that the correct shipping options are applied depending on location of customer rather than a blanket cost for all UK customers.If a user with one of the countries above selects PayPal to pay, it errors at the final stage as attached;I appreciate that I could just go back to using United Kingdom as the country but this would then mean that I would be charging the same shipping fees for all UK customers regardless of whether they’re in the highlands or mainland, which could prove to be very costly for me.Help would be appreciated.Luke. Link to comment Share on other sites More sharing options...
LukeH Posted July 8, 2010 Author Share Posted July 8, 2010 I think I have fixed the problem and here is how I did for those that experience the same problem.I set the ISO code on all of my custom countries to 'GB' so UK Mainland = GB, UK Ireland = GB etc..... The users address can still be set to UK Mainland but as far as PayPal is concerned it it United Kingdom.I took a look at the PayPal API post method and it would seem that it uses the ISO code to post to PayPal if the country is not detected properly. So in summary, a customer with a custom country e.g. UK Mainland will be charged the correct postage based on my custom shipping options. Their address will show UK Mainland in their account and within PrestaShop. The order will be passed to PayPal using the API and PayPal will default to United Kingdom using the ISO code GB. The order passes back to PrestaShop and completes properly.I hope this helps.Luke. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now