Playwright · Senior · Question 56 of 77
How would you test a payment flow in E2E?
- 1Pay with a real company card and refund it after each test
- 2Use the provider's sandbox and test cards, plus a few mocked edge cases
- 3Skip payments because third-party pages can't be tested
Show the answer
Correct answer: Use the provider's sandbox and test cards, plus a few mocked edge cases
Explanation
Sandboxes support success, decline and 3-D Secure flows. Mocks cover rare errors; one real smoke payment may run in production with care.