Persist card network
What does this MR do and why?
This MR creates a Rails enum column to store the received credit card network (passed from https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/3953).
The groupcompliance team and the security team have confirmed that this is compliant with PCI standard to store credit card network name.
Small integer column is chosen because there are only limited number of networks.
How to set up and validate locally
- Go to your Zuora sandbox's hosted page (similar to https://apisandbox.zuora.com/apps/HostedPageLite.do?method=preview&id=2c92c0f8791c3b2301791ee64f6c4b89)
- In CustomersDot, check out
send-credit-card-type
branch - In CustomersDot, update secrets.yml
zuora_cc_validation_payment_page_id
to your new page id. - In Gitlab, make sure
Gitlab::SubscriptionPortal.subscriptons_url
matches the hosted domain in the zuora page you created (which will probably be ngrok). - Update https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/projects/settings/components/shared_runners_toggle.vue#L50-57 to always return
true
- Restart gitlab
- Create a new user, activate it from Rails console
- Log in, create new project
- Go to its CI/CD settings page (e.g. http://localhost:3000/foo1/bar1/-/settings/ci_cd#js-runners-settings)
- Expand the runner pane, and click on the verification button
- Enter credit card details
- Verify successfully created
Users::CreditCardValidation
in gitlab instance, and the card network is persisted correctly.
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.
Related to #342682 (and its parent #333177)
Edited by Mark Chao