#dom_________
1 messages · Page 1 of 1 (latest)
Hi there! The CLI uses files called "fixtures" to execute a sequence of API requests that ultimately result in triggering an event or set of events
What you could do in this case is edit the fixture for the payment_method.attached event and change the path for payment_method_attach: https://github.com/stripe/stripe-cli/blob/master/pkg/fixtures/triggers/payment_method.attached.json
You'll run stripe trigger payment_method.attached --edit, which should open the fixture file in your editor. Then, edit the path for payment_method_attach to use one of our test bank accounts. The new path would look like this:
"path": "/v1/payment_methods/pm_usBankAccount_success/attach"
When you close your editor, the trigger command will complete and you'll see the payment_method.attached event will include us_bank_account
Hey! Ty for the detailed instructions
I can't seem to edit the file for some reason. I ran the stripe trigger payment_method.attached --edit command as instructed, but when attempting to edit the path line, I am unable to type anything. Do I have to change the perms of the file that opened? Or did I miss something?
Hello! I'm taking over and catching up...
For sure, ty!
Ah, okay, your default editor is probably set to vi or something with an unfamiliar interface. Let me find you some instructions...
You're likely in command mode.
Ty, fixed it : )))
The other thing you can do is switch your default editor to something else with a less, ahem, convoluted interface. You would do that by changing your shell configuration.
Yea, I changed it to nano
Ah, perfect. 🙂
Hmm, I close the editor and reopen the file and it seems to have gone from
/v1/payment_methods/pm_usBankAccount_success/attach to /v1/payment_methods/pm_card_visa/attach
I did save the file
Hm, that's strange.
The other approach would be to copy that fixture to a brand new file and then use the new fixture file explicitly: https://stripe.com/docs/cli/fixtures