Git Product home page Git Product logo

Comments (4)

DanielMarklund avatar DanielMarklund commented on July 4, 2024

I've been doing some debugging on this issue when the error happens. I'll post my findings and tests here.

Var dumping BCO_WC()->api->request_get_checkout( WC()->session->get( 'bco_wc_hash' ) ); shows the following error code:
Billmate Error Code: 50015. Checkout: Hash var tom

The session data is missing following keys:
bco_wc_number
bco_wc_checkout_url
bco_wc_hash

The session data still has the following set:
bco_wc_temp_order_id


Proposal
If bco_wc_hash is missing in user session data, init a new checkout and set a new hash. Would it be possible @NiklasHogefjord ? I'm trying to fix this temporarily myself as a lot of customers are reporting this issue (losing sales).

Edit:
I added the following in at the start of bco_init_checkout() in bco-functions.php to try and recreate the issue:

WC()->session->__unset( 'bco_wc_temp_order_id' );
WC()->session->__unset( 'bco_wc_hash' );
WC()->session->__unset( 'bco_wc_checkout_url' );
WC()->session->__unset( 'bco_wc_number' );

it seems that you're already doing what I proposed as these variables were set again even after unsetting them.

Edit 2:
In function bco_init_checkout(), if bco_wc_hash is missing, the following variable gets set to false:
$billmate_order = BCO_WC()->api->request_init_checkout();

Is this by design, or an error?

Edit 3:
I've cleared cache, opcache, redis and restarted Apache2. The error still occurs after those so I can rule those factors out.

Edit 4:
The "hash missing" error is gone if I go into the cart page and change quantities. So something requires a cart refresh when this error occurs. Not sure what's going on really. I'm thinking of adding a wc_fragment_refresh before loading BCO. Will try this later if I get the error again.

from billmate-checkout-for-woocommerce.

andyjohansson avatar andyjohansson commented on July 4, 2024

We need to discuss this some more @NiklasHogefjord.

from billmate-checkout-for-woocommerce.

NiklasHogefjord avatar NiklasHogefjord commented on July 4, 2024

Is this still an issue for you @DanielMarklund? We have released a couple of new versions and I can not reproduce this issue anymore.

from billmate-checkout-for-woocommerce.

NiklasHogefjord avatar NiklasHogefjord commented on July 4, 2024

Closing this for now. Please feel free to re-open it if it happens again.

from billmate-checkout-for-woocommerce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.