feat: create card for children

This commit is contained in:
Abdalhameed Ahmad
2025-08-24 20:01:07 +03:00
parent 3222aa4a66
commit 740135051d
12 changed files with 174 additions and 21 deletions

View File

@ -1,3 +1,11 @@
function getRandomWithDigits(digits: number): string {
const min = Math.pow(10, digits - 1); // e.g. 1000 for 4 digits
const max = Math.pow(10, digits) - 1; // e.g. 9999 for 4 digits
const result = Math.floor(Math.random() * (max - min + 1)) + min;
return result.toString();
}
export const CREATE_APPLICATION_MOCK = {
ResponseHeader: {
Version: '1.0.0',
@ -673,9 +681,9 @@ export const CREATE_APPLICATION_MOCK = {
},
AccountDetailsList: [
{
Id: 21017,
Id: getRandomWithDigits(5),
InstitutionCode: '1100',
AccountNumber: '6899999999999999',
AccountNumber: getRandomWithDigits(16),
Currency: {
CurrCode: '682',
AlphaCode: 'SAR',
@ -704,10 +712,10 @@ export const CREATE_APPLICATION_MOCK = {
{
pvv: null,
ResponseCardIdentifier: {
Id: 28595,
Id: getRandomWithDigits(5),
Pan: 'DDDDDDDDDDDDDDDDDDD',
MaskedPan: '999999_9999',
VPan: '1100000000000000',
VPan: getRandomWithDigits(16),
Seqno: 0,
},
ExpiryDate: '2031-09-30',