JavaScript

Parent Previous Next

When using JavaScript, the easiest (but certainly not the only) way to call the PayGate DDMS REST API is using JQuery:

     


var settings = {

   "async": true,

   "crossDomain": true,

   "url": "https://enterprise.paygate.cloud/ddmsapi/api/GetPayer",

   "method": "POST",

   "headers": {

       "content-type": "application/json",

       "cache-control": "no-cache",

       "Access-Control-Allow-Origin": "*",

       "Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept",

       "Access-Control-Allow-Methods": "GET, PUT, POST"

   },

   "processData": false,

   "data": {

       "Username": "myUsername",

       "Password": "myPassword",

       "ApiKey": "myApiKey",

       "PayerReference": "00003004"

   }

 }

 

 $.ajax(settings).done(function (response) {

   console.log(response);

 });