Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createACHObject(){
- var xhr = new XMLHttpRequest();
- var url = "https://staging.gatewayapi.payliance.com/api/ReceivablesProCustomer/createACHAccount/";
- var json = {"Request":{
- "AccountNumber": "8774598",
- "RoutingNumber": "011201458",
- "BankName": "Test API Account",
- "IsCheckingAccount": "true",
- "CustomerId": "420693",
- "IsDefault": "true"},
- "Auth":{
- "UserName": "APIUser155214",
- "SecretAccessKey": "kHDkU2sPDVbi6w0gankTc8hfW5ktaKligF50a5GhaFMliscU50JckfSFzFHBxv68jXMlPA0F2bP3C4rCke6Pz4zUWsvwdE2MdxQJX2TSVcFL3KLR0fl2hOJd5I7UcFp0"
- }
- }
- xhr.open("POST", url, true);
- xhr.setRequestHeader("Content-type", "application/json");
- xhr.onreadystatechange = function () {
- if (xhr.readyState === 4 && xhr.status === 200) {
- var json = JSON.parse(xhr.responseText);
- alert('success');
- console.log(json);
- //console.log(json.FirstName + ", " + json.LastName + ", " + json.ShippingSameAsBilling);
- }
- };
- var data = JSON.stringify(json);
- xhr.send(data);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement