• Resolved Pandananana

    (@andreaswendelboe)


    When i order a product and go to payment, and then press “cancel order” in the bottom, i get redirected to a weird page that shows some random unformatted posts, and the tab title says Page Not Found. This is the page: https://www.republiknu.dk/vipps-betaling/?ls=08cc21864da451453eadf07bedac1180bc3c289be77ee1d899b092c7e61e5f81&id=717

    I don’t know if i accidentally deleted this page? I tried to add a vipps-betaling page but that didn’t do anything. I also tried to use Rankmath redirect to redirect to the front page, but that did not work either.

    Is there any setting to change the Redirect URI?

    I am using Elementor

    Using this code I got the cancel order to redirect to the front page, but now it no longer redirects successful orders to the Thank you page:

    add_filter('woo_vipps_payment_return_url', 'custom_vipps_return_url', 10, 1);

    function custom_vipps_return_url($url) {
    // Replace with your desired return URL
    return home_url('/'); // This will redirect to your homepage
    }

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Iver Odin Kvello

    (@iverok)

    That page does not actually exist, it is a simulated page which we are using precisely to avoid risking it being deleted and so forth. Unfortunately some themes and tools absolutely require pages to exists in the database, and this may be the cause of your problem.

    Try creating a new blank page, then going to the settings for Vipps MobilePay and find the “Advanced” tab. On this tab, you will have the option of using a “real” page for the payment page mentioned above; select the new page you just created in that dropdown (instead of the simulated page). This should usually fix this issue.

    The filter you are mentioning will handle both cancelled and successful orders, and the page it redirects to needs to be able to handle both – I would not advise using it in your case. If you want to redirect failed orders only, you can instead use the 'woo_vipps_order_failed_redirect' filter. It takes two arguments, the first being the URL to redirect failed orders to, the second being the order id of the order. Successful orders should be handled by the default system preferably.

    Thread Starter Pandananana

    (@andreaswendelboe)

    Thank you very much! The blank page solution worked wonderfully.

    Plugin Author Iver Odin Kvello

    (@iverok)

    Great! Just let me know if you need some info on the filters and actions available.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.