Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sp-nacha

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sp-nacha - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

23

lib/batch/index.js

@@ -17,3 +17,20 @@ // Batch

this.control = options.control ? _.merge(options.header, require('./control'), _.defaults) : _.cloneDeep(require('./control'));
if (options.standardEntryClassCode === 'ADV') {
delete this.control.reserved;
delete this.control.companyIdentification;
delete this.control.messageAuthenticationCode;
this.control.totalDebit.width = 20;
this.control.totalCredit.width = 20;
this.control.originatingDFI.position = 8;
this.control.batchNumber.position = 9;
this.control.achOperatorData = {
name: 'ACH Operator Data',
width: 19,
position: 7,
required: false,
type: 'alphanumeric',
blank: true,
value: ''
}
}
// Configure high-level overrides (these override the low-level settings if provided)

@@ -48,3 +65,3 @@ utils.overrideLowLevel(highLevelHeaderOverrides, options, this);

this.control.serviceClassCode.value = this.header.serviceClassCode.value;
this.control.companyIdentification.value = this.header.companyIdentification.value;
if (options.standardEntryClassCode !== 'ADV') this.control.companyIdentification.value = this.header.companyIdentification.value;
this.control.originatingDFI.value = this.header.originatingDFI.value;

@@ -98,3 +115,3 @@

let creditCodes = ['21', '22', '23', '24', '31', '32', '33', '34', '41', '42', '43', '44', '51', '52', '53', '54'];
let debitCodes = ['26','27', '28', '29', '36','37', '38', '39','46','47','48','49','55','56'];
let debitCodes = ['26', '27', '28', '29', '36', '37', '38', '39', '46', '47', '48', '49', '55', '56'];

@@ -101,0 +118,0 @@ async.each(this._entries, function (entry, done) {

@@ -19,2 +19,8 @@ // File

if (options.standardEntryClassCode === 'ADV') {
this.control.totalDebit.width = 20
this.control.totalCredit.width = 20
this.control.reserved.width = 23
}
// This is done to make sure we have a 9-digit routing number

@@ -21,0 +27,0 @@ if (options.immediateDestination) {

2

package.json
{
"name": "sp-nacha",
"description": "NACHA file format is a set of instructions that, when uploaded into a bank portal, successfully initiates a batch of ACH payments. NACHA file format is the protocol for structuring those instructions in a way that successfully initiates the payments. NACHA is a highly customizable Node.js module exposing a high & low-level API for generating ACH files for use within the ACH network.",
"version": "1.1.3",
"version": "1.1.4",
"keywords": [

@@ -6,0 +6,0 @@ "Seerportal Nacha",

@@ -13,2 +13,3 @@ let FS = require("fs")

"referenceCode": " ",
"standardEntryClassCode": "ADV",
"batchChildren": [{

@@ -72,3 +73,3 @@ "id": 72,

});
describe('Create ADV Entry', function () {
describe('Create ADV Entry File', function () {
it('should create an ADV entry successfully', function () {

@@ -75,0 +76,0 @@ queuedTransaction.forEach(({batchChildren, id, ...restField}) => {

@@ -12,2 +12,3 @@ const Moment = require('moment')

"immediateOriginName": "SUTTON BANK",
"standardEntryClassCode": "PPD",
"referenceCode": " ",

@@ -46,2 +47,3 @@ "batchChildren": [{

"immediateOriginName": "BROOKLINE BANK",
"standardEntryClassCode": "IAT",
"referenceCode": " ",

@@ -48,0 +50,0 @@ "batchChildren": [{

@@ -12,9 +12,10 @@ let chai = require('chai')

"immediateDestination": "231380104",
"immediateOrigin": "121042882",
"immediateOrigin": "121042882",
"immediateDestinationName": "CITADEL FED C U",
"immediateOriginName": "WELLS FARGO BANK NA",
"referenceCode": " ",
"immediateOriginName": "WELLS FARGO BANK NA",
"standardEntryClassCode": "IAT",
"referenceCode": " ",
"batchChildren": [{
"id": 70,
"serviceClassCode": "200",
"serviceClassCode": "200",
"iatIndicator": "Iat Indiacator p",

@@ -26,3 +27,3 @@ "foreignExchangeIndicator": "IN",

"originatorIdentification": "2345432443",
"standardEntryClassCode": "IAT",
"standardEntryClassCode": "IAT",
"companyEntryDescription": "SANdeepviS",

@@ -33,3 +34,3 @@ "isoOriginatingCurrencyCode": "IND",

"originatorStatusCode": "",
"originatingDFI": "121042882",
"originatingDFI": "121042882",
"entryChildren": [{

@@ -59,5 +60,5 @@ "id": 70,

"amount": "92345678",
"idNumber": null,
"individualName": "",
"discretionaryData": "",
"idNumber": null,
"individualName": "",
"discretionaryData": "",
"transactionCode": "21",

@@ -69,3 +70,3 @@ "transactionType": "Credit",

"queued_transaction_id": 70,
"addenda_type_code": "10",
"addenda_type_code": "10",
"payment_related_information": "UAS123454323454323.008765432345670000000001The abbreviation INDN on a bank sta",

@@ -77,3 +78,3 @@ "created_at": "2023-10-05 20:35:59",

"queued_transaction_id": 70,
"addenda_type_code": "11",
"addenda_type_code": "11",
"payment_related_information": "UAS123454323454323.008765432345670000000001The abbreviation INDN on a bank sta",

@@ -85,3 +86,3 @@ "created_at": "2023-10-05 20:35:59",

"queued_transaction_id": 70,
"addenda_type_code": "12",
"addenda_type_code": "12",
"payment_related_information": "UAS123454323454323.008765432345670000000001The abbreviation INDN on a bank sta",

@@ -93,3 +94,3 @@ "created_at": "2023-10-05 20:35:59",

}],
"recordCount": 1
"recordCount": 1
}]

@@ -96,0 +97,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc