#rob.clayton

1 messages · Page 1 of 1 (latest)

snow flowerBOT
past hull
#

I think it could be possible yes, but what exactly is the error you are facing? Do you have a request id req_xxx

snow flowerBOT
hexed sail
#

Hi, sorry

#

I'm a bit confused as to what I need to do, Orakaro

tepid jackal
#

Hi @hexed sail I'm taking over this thread

hexed sail
#

I've been trying a few different things, but basically I just want to use test data, with an existing account with an existing subscription with a new phase that will have this new default ach payment method and I want it to automatically suceed.

#

I'm fine with adding the phase with a test credit card, but not with an ach payment for testing

#

that is a us bank account

#

I have appropriate line items and a payment method.
"pm_card_visa" works fine ... but I can't work out how to test from the BE (python) for ach us bank accounts

tepid jackal
hexed sail
#

Yes, because I want to make repeated tests, and creating the environment means I use a test clock, add the data, configure everything, then forward the clock.
Very tiresome to actually have to manually setup this test environment.

tepid jackal
hexed sail
#

So I prepare everything through python code by:

creating a test clock
adding a customer
creating a subscription
adding a phase
forwarding time to when the phase will be migrated to the subscription to see how our webhook works

#

That won't work for the actual webhook call we are actually testing though

tepid jackal
#

I still don't understand why you want to test against Stripe API?

hexed sail
#

what I'm actually testing is the webhook we are implementing on an ach payment_intent where we need to do some custome work.
So I need a valid payment intent, and I felt the best way to process everything was using stripe in test mode and actually going through each step and receiving a "real" webhook call for a "real" customer behind a time clock

tepid jackal
#

Then why not testing with mocked webhook events? so that your tests doesn't need to rely on external API

hexed sail
#

These aren't unit or integration tests, I'm wanting to test in a "real" environment to see how things interact with a full environment.

However, if I just want mocked data, what's the best way to get a "valid" set of data to trigger to my webhook?

tepid jackal
#

You can just copy the data from an existing webhook event and use it in your test.

hexed sail
#

yeahhhh ... part of why what I've been using successfully with a fake credit card is all the time data is correct for what my test clock is set to with the data.

So I take it I can't use the BE in a stripe test environment to get back an automatically validated US bank account?

If not, I'll do as you suggest

tepid jackal
#

You can, but it just require more work.