Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    I need some more info on this one.

    Is the order correct in the Woo-backend? The payment has been registered to the correct order?

    And this is a reproducible error? Or did this happen only once?

    Is there anything in the woo-logs about this order?

    Thanks,

    P?l Martin, WP Hosting

    Thread Starter dungnm

    (@dungnm)

    Hi,

    The order is fine. The status had changed from pending to on hold https://i.imgur.com/lRbZTPU.png

    The error always appears when i finished a payment. And i don’t see any log say about that.

    I have a small demo in https://palmastore2.palmatonsberg.inbusinessclients.no/produkt/testprodukt-ikke-beregnet-for-salg/

    And the version of plugin is latest 1.0.4

    Plugin Author Iver Odin Kvello

    (@iverok)

    There are two ways for an order to be confirmed in the store, either via a callback from Vipps (which is what your log indicates was successful) and via polling from the store (which has to be implemented because the callback is not guaranteed, and which fails in your case).

    When returning from Vipps, the order id is not passed, so to find out what order we are waiting for the status on, we use the Woocommerce session to store the ‘currently pending order’ . In your case, this seems to be empty. The code that causes the error message is this in vipps_wait_for_payment:

            $orderid = WC()->session->get('_vipps_pending_order');
            $order = null;
            if ($orderid) {
                $order = new WC_Order($orderid);
            }
            if (!$order) wp_die(__('Unknown order', 'woo-vipps'));

    Do you have any plugins that could conceivably modify how Woo’s sessions work, or something that would block your cookies on return to the sites? (This could be done by front-end caching systems like Varnish as well). Otherwise, there should really be an active Woo-session with your order id stored.

    Unfortunately, in this case no information is passed from Vipps to the store as to which order we are waiting for, so there is no easy way to fail more softly here.

    Thread Starter dungnm

    (@dungnm)

    Hi @pmbakken,

    Thank you. I have fixed the session. So, it’s working, now.

    Plugin Author Iver Odin Kvello

    (@iverok)

    That’s great! I’ll mark this as resolved then.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unknown order after payment successful’ is closed to new replies.