Paypal Express Payments - how to return to Hikashop to add postage

  • Posts: 31
  • Thank you received: 1
  • Hikashop Business
2 weeks 23 hours ago #305674

-- HikaShop version -- : HikaShop Business 4.0.2
-- Joomla version -- : 3.6.5
-- PHP version -- : PHP 7.0.33
-- Browser(s) name and version -- : Chrome

I am told it is possible to add postage to an order before final payment is made (paypal tech support). But I have no idea how to implement this. Is there a guide or information regarding this aspect as without it the express checkout is rather pointless if you need to add postage based on address (country) that is calculated in Hikashop.

Paypal say:

"If Express checkout is in the early position (before any form filling)- shipping should be added after returning from PayPal to the return_url parameter that is set in SetExpresssCheckout API call.
The final DoExpressCheckout API call figure is then amended if necessary and buyer clicks “confirm order” to complete.


When Express checkout is added at the end of the checkout all the billing & shipping information entered on the site is passed in directly and the address can then not be changed when they redirect.


This is the way it is integrated for all of our partners , of which hikashop is one. As you can see when it is in the early or shortcut position it removes form filling for buyers."

Please Log in or Create an account to join the conversation.

  • Posts: 65411
  • Thank you received: 9529
  • MODERATOR
2 weeks 10 hours ago #305694

Hi,

The PayPal Express checkout plugin we developed already add the shipping fee to the setExpressCheckout API call provided that your cart already has the shipping fee added to it.
I looked at your website checkout, and I can see that the shipping fee is only added after the customer has entered his address on your checkout. So you should display the PayPal Express button on your checkout only after that.
Normally, to do that, you want to have the "cart" view in a step after the step where you have login/address views in your HikaShop Checkout workflow. However, from what I see on your checkout, you have all the views in the same step which lead to the people being able to express checkout before HikaShop is able to add the shipping to the cart.

Now if you want to allow customers to express checkout before they enter their address on your checkout, it requires the implementation of the PayPal Instant Update / Callback API to send the shipping rules to PayPal so that they can be charged dynamically by PayPal:
stackoverflow.com/questions/8647278/payp...shipping-calculation
However, the structure accepted for the shipping rules won't allow for a generic solution and is complex to implement. So most payment plugins (for Hikashop or other ecommerce solutions) don't implement it and it's done as a custom development if necessary.

Note that if you want to allow People to pay with PayPal while only allowing them to access the PayPal payment after the shipping fees are added, while not changing your checkout structure, I would recommend to go with the PayPal standard payment method instead of the Express checkout. That's because the goal of the Express checkout API of PayPal is precisely to skip the checkout on your website, but in your case, you apparently don't want to skip the checkout on your website since you need your checkout to calculate the shipping fees. In that case, PayPal standard is more adapted.

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum