Send idempotency key when purchasing new subscription
What does this MR do and why?
Sends idempotency key to the API when purchasing new subscription for a group
Related to https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/7448
Screenshots or screen recordings
Scenario | Screenshot |
---|---|
Idempotency key regeneration | Screen recordingScreen_Recording_2023-10-09_at_12.06.30_PM |
Successful purchase | Screen recordingScreen_Recording_2023-10-05_at_10.45.44_AM |
Successful purchase after using a card with insufficient funds | Screen recordingScreen_Recording_2023-10-05_at_11.03.36_AM |
Unprocessable Content - 422 | Screen recordingScreen_Recording_2023-10-05_at_10.34.57_AM |
Internal Server Error - 500 | Screen recordingScreen_Recording_2023-10-05_at_10.58.09_AM |
How to set up and validate locally
Application setup
- Customers Dot needs to be setup in order to view the billing page for a group
- Start GDK in SaaS mode
GITLAB_SIMULATE_SAAS=1 gdk start
Subscription purchase
- Create a Group
- Go to
Settings
>Billing
- Click on Upgrade CTA
Error scenarios
- Unprocessable content - 422
- Update
create
method here to be:def create respond_422 end
- Update
- Internal server error - 500
- Update
create
method here to be:def create render status: :service_unavailable end
- Update
- Card with insufficient funds -
4000000000009995
. More cards which will result in declined payment can be found here - https://stripe.com/docs/testing#declined-payments
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vamsi Vempati