#mizark

1 messages · Page 1 of 1 (latest)

finite tigerBOT
ivory mortar
#

pm_card_visa is only for simple testing on server. On client you will need to key in the card details

sturdy garnet
#

so there is no way to simulate a payment from the frontend via the stripe.js client?

ivory mortar
#

Manually key in the test card detail?

sturdy garnet
#

yeah but with code not manually

ivory mortar
#

Um that could be challenging. You could try auto-fill but would need to find the correct HTML fields

sturdy garnet
#

How would I do auto fill is there any code examples I can find the write elements in the on the DOM inside the Iframe and can change the DOM value but that does not seem to update the stripe elements value

ivory mortar
#

Yes that's why I mentioned it could be challenging. I think you shouldn't need to test it tho since it's UI provided by Stripe and heavily tested anw. You only need to test if you mounted that element correctly

sturdy garnet
#

I need to test the payment failure ux flow and confirm flow

ivory mortar
#

Yes but the logic often run based off receiving a webhook event, right? In that case you can simulate the webhook event via Stripe CLI

sturdy garnet
#

No I am waiting on the response from confirmPayment() to decide if it is paid or not and that function requires the elements and so I cannot call it unless they are filled

#

This seem like a standard use of the sdk unsure why this is purposely made so convoluted

finite tigerBOT
glacial lion
#

I'm afraid it's not possible to fill in the card details automatically in the UI for testing purpose. I'd recommend testing manually or use test card at server end to simulate the failure response