Last active
February 11, 2023 05:37
-
-
Save spurgeonbj/c08da73413b7a80b4b4aad47d02e0031 to your computer and use it in GitHub Desktop.
Lookup Indian Banks IFSC Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function IFSCLookup(ifsccode) { | |
const ifscode = $('#ifsccode').val().trim().toUpperCase(); | |
if (ifscode) { | |
// lookup ifsc and populate bank data if available | |
const ifscapiurl = "https://ifsc.razorpay.com/" + ifscode; | |
$.get(ifscapiurl, function (bankdata, reqstatus) { | |
if (reqstatus === "success") { | |
$("#ifsccode").val(ifscode); | |
$("#bankname").val(bankdata.BANK); | |
$("#bankaddress").val(bankdata.ADDRESS); | |
$('#bankaddress').focus(); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment