Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vipps on same mobile device opens directly; leaves checkout page hanging #75

Open
iverok opened this issue Nov 25, 2021 · 4 comments
Open
Assignees
Labels
in progress In progress

Comments

@iverok
Copy link
Collaborator

iverok commented Nov 25, 2021

Affects both Woo Checkout and Express Checkout. Probably won't affect Vipps Checkout.

The issue is that when using Vipps on the same device, the app opens directly without going through a Vipps Landing Page. As a result, the checkout page(s) will stay in a "spinning" state. If the user returns to the browser directly, or completes the payment or aborts it, a new tab will open for the result. Thus the old tab will stay spinning until it reloads.

@iverok iverok self-assigned this Nov 25, 2021
@iverok
Copy link
Collaborator Author

iverok commented Nov 25, 2021

For express checkout: just do a redirect to home-url or the waiting page for the order after the window.location.replace that starts the deeplink. This will only do anything if the system started the external app.

@iverok
Copy link
Collaborator Author

iverok commented Nov 25, 2021

For new versions (5.2.0) of the Woo checkout, there is 'checkout_place_order_success' triggered on success. It does exist since version 4, but without access to the result. So one can augment the result with a method and a deeplink-thing with

  checkout_form.on( 'checkout_place_order_success', function(e, result) {
     if (result['method']) ..
  • but of course this doesn't work with the Gutenberg Checkout block.

@iverok iverok added the in progress In progress label Nov 26, 2021
@iverok
Copy link
Collaborator Author

iverok commented Nov 26, 2021

For the Gutenberg block, it should suffice to check props.checkoutStatus.isComplete && props.paymentStatus.isSuccessful in the Vipps payment method node. But this at least knows what payment method was chosen. Normal checkout doesn't (though it can check the page itself); however it is safe to augment the result-object from the payment gateway to provide more metainfo.

So anyway, with these three hooks/places, add a setTimeout call that after ~10 seconds redirects to some other page, preferrably the waiting page incase the user uses the "return to app" thing.

Scheduled for 1.7.22

@iverok
Copy link
Collaborator Author

iverok commented Nov 7, 2022

Much delayed, and absolutely not planned for 1.7.22 any more.

iverok pushed a commit that referenced this issue Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress In progress
Projects
None yet
Development

No branches or pull requests

1 participant