Skip to content

Commit 26019f2

Browse files
committed
Committed for generating random Account Number.
1 parent 683f0ab commit 26019f2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

PaymentTransactions/credit-bank-account.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ function creditBankAccount(transactionId, callback) {
1515
var bankAccountType = new ApiContracts.BankAccountType();
1616
bankAccountType.setAccountType(ApiContracts.BankAccountTypeEnum.SAVINGS);
1717
bankAccountType.setRoutingNumber('121042882');
18-
bankAccountType.setAccountNumber('123456789');
18+
var bankAccountNum = Math.floor(Math.random() * 9999999999) + 10000;
19+
bankAccountType.setAccountNumber(bankAccountNum.toString());
1920
bankAccountType.setNameOnAccount('John Doe');
2021
paymentType.setBankAccount(bankAccountType);
2122

@@ -86,7 +87,7 @@ function creditBankAccount(transactionId, callback) {
8687
}
8788

8889
if (require.main === module) {
89-
creditBankAccount('2259770464', function(){
90+
creditBankAccount("MerchantID-0001", function(){
9091
console.log('creditBankAccount call complete.');
9192
});
9293
}

PaymentTransactions/debit-bank-account.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ function debitBankAccount(callback) {
1313
var bankAccountType = new ApiContracts.BankAccountType();
1414
bankAccountType.setAccountType(ApiContracts.BankAccountTypeEnum.SAVINGS);
1515
bankAccountType.setRoutingNumber('121042882');
16-
bankAccountType.setAccountNumber('123456789');
16+
var bankAccountNum = Math.floor(Math.random() * 9999999999) + 10000;
17+
bankAccountType.setAccountNumber(bankAccountNum.toString());
1718
bankAccountType.setNameOnAccount('John Doe');
1819

1920
var paymentType = new ApiContracts.PaymentType();

0 commit comments

Comments
 (0)