Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
I must avoid entering letters on my digipas

I have a small problem. When I enter a new transfert of 269 euros with the account bank number BE072750044-35066. I have to introduce a code of confirmation. The code is 350269.

enter image description here

The figures 350 are the last 5 figures of the bank account number -> BE072750044-35066. And the 269 represents the amount for the new transfert.

Another example, if the new transfert was of 350 euros. We will have 350350.

enter image description here

Now my problem, if I have an account bank with a letter at the end. FR5940802053780006178110K61.

The problem is that I retrieve 10K269, but the user must enter only numbers on the digipas. How to avoid this problem for the user, please?

enter image description here

getTokenTwoAdd(nt) {
    var partOne, partTwo, absoluteAmount;
    partOne = (nt.iban.substr(nt.iban.length - 5)).substring(0, 3);
    absoluteAmount = Math.abs(nt.amount);
    absoluteAmount = parseInt(absoluteAmount);
    partTwo = ((absoluteAmount < 100) ? this.helpers.addLeadingZeroesLeft(absoluteAmount, 3) : absoluteAmount) + "";
    partTwo = partTwo.substring(0, 3);
    console.log("Iban number, slice => " + partOne);
    console.log("Iban number => " + nt.iban);
    console.log("Amount => " + absoluteAmount);

    return partOne + partTwo;
}

The variable partOne represents the account bank number with the slice

The variable nt.iban is the accout bank number

The variable absoluteAmount is the amount for the new transfert

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

To get rid of any characters that are not digits, you could use

partOne = nt.iban.replace(/\D+/g, '').substr(-5, 3);

where \D+ matches one or more non-digit characters.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!