Giter Site home page Giter Site logo

Comments (7)

quasel avatar quasel commented on August 16, 2024

fixed with #67

from woocommerce-gateway-stripe.

roykho avatar roykho commented on August 16, 2024

Ok so my test was before token was checked again on this line https://github.com/woothemes/woocommerce-gateway-stripe/blob/master/assets/js/stripe.js#L73

That gave me false positives with the one implementation as it did indeed reduce the event being fired but not the one we want. My assumption currently is that WC "perhaps" re-generates the form on AJAX thus re-binding the event again and thus making any other logic moot such as off. This is just an assumption but will investigate more.

from woocommerce-gateway-stripe.

quasel avatar quasel commented on August 16, 2024

the reason it's fired twice comes is noted in my first post - but guess i'll take a look at how other gateways handle it :P - or why we need to watch on both events ^^

from woocommerce-gateway-stripe.

roykho avatar roykho commented on August 16, 2024

Actually in my test it is fired more than 4 times and using one solves the issue of cutting it in half which now fires once per event type as stated in the one documentation. However I have since removed that as that doesn't solve your original issue which I originally thought was the culprit. For example if you removed "submit" as one of the events, you will see it is still firing twice.

from woocommerce-gateway-stripe.

quasel avatar quasel commented on August 16, 2024

Thats intresting in my setup with storefront it's only fired twice - with and without the multi step checkout but had to tweak a check to pass the first submit of the multi step checkout ^^

from woocommerce-gateway-stripe.

roykho avatar roykho commented on August 16, 2024

Does onsubmit fire only twice for you? Or just the XHR call to Stripe?

from woocommerce-gateway-stripe.

quasel avatar quasel commented on August 16, 2024

if i remeber correctly from my js debugging for reporting the issue it was one XHR from submit one from checkout_place_order_stripe

from woocommerce-gateway-stripe.

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.