Giter Site home page Giter Site logo

Comments (9)

aheckler avatar aheckler commented on August 17, 2024 1

@strategio You are correct that it currently is not possible to connect our Stripe extension to a test mode only Stripe.com account, i.e. an account created with just an email, and where live mode is unavailable.

Screenshot taken on 2024-06-24 at 14 26 18 UTC@2x

We are discussing internally what to do about this given our long-term plans for the extension.

Internal link: p1719233249354419-slack-CHG7MTCAF

from woocommerce-gateway-stripe.

strategio avatar strategio commented on August 17, 2024

Thanks for looking into this @aheckler.

If I may suggest one more thing, it would be OK for us if just have to set a constant in wp-config.php. It could be a WC Gateway Stripe constant, or maybe a specific value for the environment type on WordPress.

See also https://developer.wordpress.org/reference/functions/wp_get_environment_type/.

from woocommerce-gateway-stripe.

aheckler avatar aheckler commented on August 17, 2024

You might be able to use the wc_stripe_settings filter shown here to manually adjust values for the following:

  • test_publishable_key
  • test_secret_key
  • test_webhook_secret

However, that's not something I've tried myself, so I can't guarantee that everything will work 100% seamlessly. You'd need to do a bit of testing.

from woocommerce-gateway-stripe.

strategio avatar strategio commented on August 17, 2024

Thanks @aheckler,

The purpose of our automated end-to-end tests is to have a context very close to what the final user would have.
We click on buttons, fill forms, ... like the final user.
If we have to set custom filters (through a custom plugin), we are already diverging from what a real user would do.

And beyond that, I am not sure the filter hook you suggested will allow us to override all the needed settings.

In short, we don't want to hack the plugin just to have our test running.
Ideally, we just want to follow a user workflow, even if we end up using a discreet GUI element (like the link "Enter account keys (advanced)" that we used to have before 8.0.0).

from woocommerce-gateway-stripe.

aheckler avatar aheckler commented on August 17, 2024

@strategio Could you take a look at Step 3 from these instructions? I wasn't aware of this before, but if you start the connection flow then back out back to wp-admin, you can apparently still use the old keys interface. Does that work for you?

from woocommerce-gateway-stripe.

aheckler avatar aheckler commented on August 17, 2024

#2936 may be one to follow too. :)

from woocommerce-gateway-stripe.

strategio avatar strategio commented on August 17, 2024

Thanks @aheckler!

I've followed the workflow from #2936 (comment): temporarily downgrade to 7.9.3 in order to set the test keys, then update to the latest version to continue our tests.

At least that will allow us to restore our automated test.

However, it would be great if you could offer an alternative with the latest version.
I think this ticket still makes sense.

from woocommerce-gateway-stripe.

aheckler avatar aheckler commented on August 17, 2024

However, it would be great if you could offer an alternative with the latest version.

Did you try the steps explained in Step 3 here? Those should work with the latest version I think.

from woocommerce-gateway-stripe.

strategio avatar strategio commented on August 17, 2024

Hi @aheckler!

Sorry for my late reply, I was away from work for some time...

We ended up using version 7.9.3 to setup our test site and then update the addon to the latest version to continue the execution of the test.

This is far from optimal but good enough for now...

Thanks!

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.