Add common paymen systems and bank card validation rules (#219)

This commit is contained in:
Sergey Yelin 2021-09-20 16:52:18 +03:00 committed by GitHub
parent f89db6aee2
commit f249dd5a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1413,6 +1413,66 @@ FIXTURE=$(cat <<END
}
}
}}}},
{
"insert": {
"object": {
"payment_system": {
"ref": {
"id": "MASTERCARD"
},
"data": {
"name": "MASTERCARD",
"validation_rules": [
{"card_number": {"checksum": {"luhn": {}}}},
{"card_number": {"ranges": [{"lower": 16, "upper": 16}]}},
{"cvc": {"length": {"lower": 3, "upper": 3}}},
{"exp_date": {"exact_exp_date": {}}}
]
}
}
}
}
},
{
"insert": {
"object": {
"payment_system": {
"ref": {
"id": "NSPK MIR"
},
"data": {
"name": "NSPK MIR",
"validation_rules": [
{"card_number": {"checksum": {"luhn": {}}}},
{"card_number": {"ranges": [{"lower": 16, "upper": 16},{"lower": 19, "upper": 20}]}},
{"cvc": {"length": {"lower": 3, "upper": 3}}},
{"exp_date": {"exact_exp_date": {}}}
]
}
}
}
}
},
{
"insert": {
"object": {
"payment_system": {
"ref": {
"id": "VISA"
},
"data": {
"name": "VISA",
"validation_rules": [
{"card_number": {"checksum": {"luhn": {}}}},
{"card_number": {"ranges": [{"lower": 13, "upper": 13},{"lower": 16, "upper": 16}]}},
{"cvc": {"length": {"lower": 3, "upper": 3}}},
{"exp_date": {"exact_exp_date": {}}}
]
}
}
}
}
},
{"insert": {"object": {"payment_institution": {
"ref": {"id": 1},