support sanctions compliance

This commit is contained in:
Josh Harvey 2018-05-03 20:18:13 +03:00
parent 80e851fb59
commit d904c8391e
5 changed files with 108 additions and 25 deletions

18
dev/ofac-match.js Normal file
View file

@ -0,0 +1,18 @@
const compliance = require('../lib/compliance')
const ofac = require('../lib/ofac/index')
const [firstName, lastName, dateOfBirth] = process.argv.slice(2)
const customer = {
idCardData: {firstName, lastName, dateOfBirth}
}
const config = {
sanctionsVerificationActive: true
}
console.log('DEBUG100')
ofac.load()
.then(() => compliance.validateCustomer(config, customer))
.then(() => console.log('SUCCESS!'))
.catch(err => console.log(err))