Move Confirm Order API call from store to component
What does this MR do and why?
Move Confirm Order API call from store to component in new subscription purchase flow.
- No functionality or UI changes, purely a refactor
Related to #427094 (closed)
Screenshots or screen recordings
Scenario | Screenshot |
---|---|
Successful purchase | ScreenshotSuccess![]() ![]() ![]() Subscription created - https://apisandbox.zuora.com/platform/subscriptions/8ad083528adb8ef3018af410337769f1 |
Successful purchase with new group creation | ScreenshotScreen_Recording_2023-10-04_at_10.14.14_AM![]() ![]() ![]() Subscription created - https://apisandbox.zuora.com/platform/subscriptions/8ad093fb8adba1d9018af76452b878d9 |
Successful purchase as a new user | |
Email already taken error (with error attribute) | |
Server error (caught in catch block) | |
Error response with name key | |
Invalid promo code error | |
Loading state while confirming |
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
- Email already taken
- Unlink GitLab sign in for a customer on Customers Dot and sign in with that customer's email id on GitLab.com
- (or) Update
create
method here to be:def create render json: { error_attribute_map: { email: ["taken"] }, errors: "Email has already been taken" } end
- Promo code invalid
- Update
create
method here to be:def create render json: { errors: { message: 'Promo code is invalid', attributes: ['promo_code'], code: 'INVALID', } } end
- Update
- Response with name attribute
- Update
create
method here to be:def create render json: { name: ['Error_1', "Error ' 2"] } end
- Update
- 404 error when group not found
- Update this line to be
return not_found
- Update this line to be
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