[PS-1122] Adds Mir payment system (#3079)
* Adds Mir payment system * Fixes Mir regex pattern and formatting * Changes Mir logos to Russian ones * Localize Mir in select
This commit is contained in:
parent
a302f08a7c
commit
0a4b8b15bc
|
@ -1973,5 +1973,8 @@
|
|||
},
|
||||
"disabledOrganizationFilterError" : {
|
||||
"message" : "Items in disabled Organizations cannot be accessed. Contact your Organization owner for assistance."
|
||||
},
|
||||
"cardBrandMir": {
|
||||
"message": "Mir"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1972,5 +1972,8 @@
|
|||
},
|
||||
"neverLockWarning": {
|
||||
"message": "Are you sure you want to use the \"Never\" option? Setting your lock options to \"Never\" stores your vault's encryption key on your device. If you use this option you should ensure that you keep your device properly protected."
|
||||
}
|
||||
},
|
||||
"cardBrandMir": {
|
||||
"message": "Mir"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5267,5 +5267,8 @@
|
|||
},
|
||||
"on": {
|
||||
"message": "On"
|
||||
},
|
||||
"cardBrandMir": {
|
||||
"message": "Mir"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ export class AddEditComponent implements OnInit {
|
|||
{ name: "Maestro", value: "Maestro" },
|
||||
{ name: "UnionPay", value: "UnionPay" },
|
||||
{ name: "RuPay", value: "RuPay" },
|
||||
{ name: i18nService.t("cardBrandMir"), value: "Mir" },
|
||||
{ name: i18nService.t("other"), value: "Other" },
|
||||
];
|
||||
this.cardExpMonthOptions = [
|
||||
|
|
|
@ -20,6 +20,7 @@ const cardIcons: Record<string, string> = {
|
|||
Maestro: "card-maestro",
|
||||
UnionPay: "card-union-pay",
|
||||
RuPay: "card-ru-pay",
|
||||
Mir: "card-mir",
|
||||
};
|
||||
|
||||
@Component({
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 505 B |
Binary file not shown.
After Width: | Height: | Size: 644 B |
|
@ -25,6 +25,12 @@ const numberFormats: Record<string, CardRuleEntry[]> = {
|
|||
{ cardLength: 19, blocks: [6, 13] },
|
||||
],
|
||||
Amex: [{ cardLength: 15, blocks: [4, 6, 5] }],
|
||||
Mir: [
|
||||
{ cardLength: 16, blocks: [4, 4, 4, 4] },
|
||||
{ cardLength: 17, blocks: [5, 4, 4, 4] },
|
||||
{ cardLength: 18, blocks: [6, 4, 4, 4] },
|
||||
{ cardLength: 19, blocks: [7, 4, 4, 4] },
|
||||
],
|
||||
Other: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],
|
||||
};
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ $card-icons: (
|
|||
"mastercard": $card-icons-base + "mastercard-light.png",
|
||||
"union-pay": $card-icons-base + "union_pay-light.png",
|
||||
"ru-pay": $card-icons-base + "ru_pay-light.png",
|
||||
"mir": $card-icons-base + "mir-light.png",
|
||||
);
|
||||
|
||||
$card-icons-dark: (
|
||||
|
@ -21,6 +22,7 @@ $card-icons-dark: (
|
|||
"mastercard": $card-icons-base + "mastercard-dark.png",
|
||||
"union-pay": $card-icons-base + "union_pay-dark.png",
|
||||
"ru-pay": $card-icons-base + "ru_pay-dark.png",
|
||||
"mir": $card-icons-base + "mir-dark.png",
|
||||
);
|
||||
|
||||
.credit-card-icon {
|
||||
|
|
|
@ -301,6 +301,12 @@ export abstract class BaseImporter {
|
|||
return "Visa";
|
||||
}
|
||||
|
||||
// Mir
|
||||
re = new RegExp("^220[0-4]");
|
||||
if (cardNum.match(re) != null) {
|
||||
return "Mir";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue