mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 08:34:55 +00:00
feat: create card for children
This commit is contained in:
@ -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',
|
||||
|
||||
Reference in New Issue
Block a user