Integrating Apple Pay Web (not stripe), how do i stop the checkout page from redirecting when submitting?

Hello,

I’m integrating Apple Pay Web (not stripe, direct apple pay), when i select the apple pay method on the checkout page and click submit. I need to then load the apple payment sheet, however how do i stop the checkout page from redirecting when submitting in order to perform my payment sheet logic ?

Please, if someone can share the hook or function that i can use along with its intended location in the addon folder (app/addon/apple_pay/frontend/checkout,post.php etc) ?

Hello,
Can anyone please support ?

Hello!

In your payment script (app/addons/[your_addon]/payments/[payment].php), just do everything you need and use early exit, if you don’t require redirect.

Hi,

I’m controlling the apple payment sheet loading using the tpl template for the payment method and then there are frontend controllers used by ajax to process some logic. My issue is, after the user submits the checkout form, the apple payment sheet loads successfully but STILL the form attempts to redirect.

How can i stop this redirection when submit is clicked for the apple pay payment method ?

In this case, you must load the payment template before a customer clicks the Place order button.

If you haven’t read this article yet, I suggest you do so:
https://docs.cs-cart.com/latest/developer_guide/addons/tutorials/payment_processor_addon.html

Thats not possibe. We’re speaking about Apple Pay here, customer selects the payment button and clicks submit. How am i load to the payment sheet then submit ?

If you create the template specified in processor_template, it will be loaded on the checkout page when a customer selects this payment method.

I have been able to do a template successfully. But my issue, is how to load the template on the press of place order without the submitting the form ? As you are aware, Apple pay payment sheet should load on the click of the button. How do i manage this ?

Sorry, but I don’t have an answer for that :frowning_face: