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

  • Posts: 39
  • Thank you received: 1
5 years 2 weeks 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: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 2 weeks 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.

  • Posts: 39
  • Thank you received: 1
3 years 7 months ago #323688

This is the checkout workflow - for delivery costs to be added (based on the persons address/country) what would need to be changed? It seems here that payment options are after address details?

Attachments:

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
3 years 7 months ago #323705

Hi,

Well, you would need to add the "shipping" view that you deleted to your checkout workflow. You can do that in the "green" new view area.
Also, if your products don't have a weight, you need to make sure that the "force shipping regardless of weight" setting is activated.
Also, as I understand, you want to only allow your customers to access the "pay with paypal express" button after the address/shipping has been entered. So you should add a second step to your checkout and move the "cart" view to that second step so that the paypal express button only appears on the second step, after the customer has his shipping fee calculated on the first step.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum