Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Stripe] Add system spec to save card during checkout #3952

Open
mkllnk opened this issue Jun 18, 2019 · 1 comment
Open

[Stripe] Add system spec to save card during checkout #3952

mkllnk opened this issue Jun 18, 2019 · 1 comment

Comments

@mkllnk
Copy link
Member

mkllnk commented Jun 18, 2019

What we should change and why (this is tech debt)

Follow up from #1723. A user can enter credit card details during checkout. They can also decide to store those details for later checkouts by ticking a box. This is not covered in our feature specs.

The difficulty is that the Stripe card form is loaded in an iframe and some Stripe Javascript is sending an API request from the browser to the Stripe API. We don't have any way to intercept that request at the moment. We need to add Puffing Billy to intercept and mock these requests. That would also enable us to deal with Google Maps offline.
https://github.com/oesmith/puffing-billy

The first failing web request:

POST https://api.stripe.com/v1/tokens

Described in https://stripe.com/docs/api/tokens/create_card.

Context

I'm investigating how a card is stored for #3727. I thought it's best done in a spec because that's easy to repeat. When trying to implement this spec I came across this difficulty.

Impact and timeline

This should be done before we refactor Stripe a lot. That's probably soon due to #3927.

@RachL RachL added this to [Automation] Feature Tests in Welcome New QAs! Jun 24, 2021
@RachL RachL added the QA label Aug 12, 2022
@RachL RachL added this to the Stripe test automation milestone Feb 15, 2024
@filipefurtad0 filipefurtad0 changed the title [Stripe] Add spec to save card during checkout [Stripe] Add system spec to save card during checkout Feb 21, 2024
@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Mar 27, 2024

We need to add Puffing Billy to intercept and mock these requests.

Noting that we've given up on this approach, since we could not deal with concurrent ports (puma vs. puffing-billy). Signalling this here in case we come up with a different approach to setup a proxy to intercept browser requests - I guess this is still a nice to have, so leaving the issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: All the things
Status: [Automation] Feature Tests
Welcome New QAs!
[Automation] Feature Tests
Development

No branches or pull requests

3 participants