#mizark
1 messages · Page 1 of 1 (latest)
pm_card_visa is only for simple testing on server. On client you will need to key in the card details
so there is no way to simulate a payment from the frontend via the stripe.js client?
Manually key in the test card detail?
yeah but with code not manually
Um that could be challenging. You could try auto-fill but would need to find the correct HTML fields
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
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
I need to test the payment failure ux flow and confirm flow
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
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
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