Skip to content

Commit

Permalink
XNSE ifsc added
Browse files Browse the repository at this point in the history
  • Loading branch information
PriyankaMarbill committed Nov 6, 2024
1 parent c1ea2d2 commit c47f23b
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/banks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14804,6 +14804,11 @@
"type": "RRB",
"upi": true
},
"XNSE": {
"code": "XNSE",
"ifsc": "XNSE0000001",
"micr": null
},
"YADX": {
"code": "YADX",
"ifsc": "YESB0YDC001",
Expand Down Expand Up @@ -15115,4 +15120,4 @@
"nach_debit": false,
"type": "DCCB"
}
}
}
25 changes: 25 additions & 0 deletions tests/node/client_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,28 @@ ifsc.fetchDetails('HDFC0CAGSBK')
console.error(err);
process.exit(1);
})

ifsc
.fetchDetails('XNSE0000001')
.then(function(res) {
assert.equal('EXCHANGE PLAZA,PLOT NO C/1, G BLOCK,BANDRA-KURLA COMPLEX,BANDRA (E), MUMBAI 400051',res['ADDRESS'])
assert.equal('NSE Clearing Limited',res['BANK'])
assert.equal('XNSE',res['BANKCODE'])
assert.equal('MUMBAI',res['BRANCH'])
assert.equal('MUMBAI',res['CENTRE'])
assert.equal('MUMBAI',res['CITY'])
assert.equal('MUMBAI',res['DISTRICT'])
assert.equal('XNSE0000001',res['IFSC'])
assert.equal('MAHARASHTRA',res['STATE'])
assert.equal(null,res['MICR'])
assert.equal(false,res['UPI'])
assert.equal(false,res['NEFT'])
assert.equal(false,res['IMPS'])
assert.equal(true,res['RTGS'])
assert.equal(null,res['SWIFT'])
assert.equal("IN-MH",res['ISO3166'])
})
.catch(err => {
console.error(err);
process.exit(1);
})
9 changes: 9 additions & 0 deletions tests/php/BankNameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Name extends TestCase
public function testDefined() {
$this->assertEquals('PUNB', constant('Razorpay\IFSC\Bank::PUNB'));
$this->assertEquals('BDBL', constant('Razorpay\IFSC\Bank::BDBL'));
$this->assertEquals('XNSE', constant('Razorpay\IFSC\Bank::XNSE'));

$this->assertEquals('BDBL', Bank::BDBL);
}
Expand Down Expand Up @@ -43,5 +44,13 @@ public function testBankDetails() {
'name' => 'Fino Payments Bank',
'bank_code' => '099'
], Bank::getDetails('FINO'));

$this->assertEqualsCanonicalizing([
'code' => 'XNSE',
'ifsc' => 'XNSE0000001',
'micr' => null,
'name' => 'NSE Clearing Limited',
'bank_code' => null
], Bank::getDetails('XNSE'));
}
}
7 changes: 7 additions & 0 deletions tests/php/SubletTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ public function testBasicNames()
$this->assertEquals("Darjeeling District Central Co-operative Bank", $name);
}

public function testXNSE()
{
$name = IFSC::getBankName('XNSE0000001');

$this->assertEquals("NSE Clearing Limited", $name);
}

/**
* Ensure that the sublet list only
* includes genuine subleases
Expand Down
9 changes: 9 additions & 0 deletions tests/ruby/bank_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
ach_debit: true,
nach_debit: true)
end
it 'should return details from the bank code' do
expect(described_class.get_details(:XNSE)).to eq(code: 'XNSE',
type: 'XNSE',
upi: true,
ifsc: 'XNSE0000001',
micr: null,
bank_code: null,
)
end

it 'should match all constants defined in banknames.json' do
JSON.parse(File.read('src/banknames.json')).keys.each do |c|
Expand Down
1 change: 1 addition & 0 deletions tests/ruby/ifsc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
expect(described_class.bank_name_for('KSCB0006001')).to eq 'Tumkur District Central Bank'
expect(described_class.bank_name_for('WBSC0KPCB01')).to eq 'Kolkata Police Co-operative Bank'
expect(described_class.bank_name_for('YESB0ADB002')).to eq 'Amravati District Central Co-operative Bank'
expect(described_class.bank_name_for('XNSE0000001')).to eq 'NSE Clearing Limited'
end
end

Expand Down

0 comments on commit c47f23b

Please sign in to comment.