Add new internal API for credit card validation
What does this MR do and why?
The MR would help create a new internal API from the CDot application to update the user's credit card validation. The expected response would be either success or failure.
How to set up and validate locally
- Checkout this branch and run the gdk server
- Go to CustomersDot and and open up console
bin/rails c
- Run the following commands
Client::GitlabApp.put("/api/v4/internal/gitlab_subscriptions/users/1/credit_card_validation",
{ token: Client::GitlabApp::ADMIN_API_TOKEN, format: :json, body: {
credit_card_validated_at: Time.utc(2020, 1, 1),
credit_card_expiration_year: 2034,
credit_card_expiration_month: 1,
credit_card_holder_name: "John Smith",
credit_card_type: "American Express",
credit_card_mask_number: "1111",
zuora_payment_method_xid: "abc123",
stripe_setup_intent_xid: "seti_abc123",
stripe_payment_method_xid: "pm_abc123",
stripe_card_fingerprint: "card123"
}})
=> {success: true}
Related to https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/9775
Edited by Shreyas Agarwal