Skip to content

Card match to exclude holder name, but include network name

Mark Chao requested to merge 342682-ui into master

What does this MR do and why?

For admin user credit card matches page, stop matching card holder name because card holder name can also change.

Display card network.

Screenshots or screen recordings

Screenshot_2021-10-19_at_12-22-15_foo_bar___All_users_with_matching_cards___Admin_Area

Screenshot_2021-10-19_at_12-20-00_foo_bar___Users___Admin_Area

How to set up and validate locally

Update code lib/gitlab.rb so self.com? returns true.

Choose a few user_ids and create CreditCardValidation. Here I start with id 1 (root user)

user_id = 1
time = 1.year.from_now
expiration_date =  1.year.from_now.to_date

Users::CreditCardValidation.create(
  {"user_id"=>user_id, "credit_card_validated_at"=>time, "expiration_date"=>expiration_date, "last_digits"=>111, "holder_name"=>"foo bar", "network"=>"visa"}
)

Log in as admin, visit http://localhost:3000/admin/users/root/card_match

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #342682

Edited by Jiaan Louw

Merge request reports