vctc-sdk

Help make vctc API calls simpler

Usage no npm install needed!

<script type="module">
  import vctcSdk from 'https://cdn.skypack.dev/vctc-sdk';
</script>

README

vctc-sdk

Node module that helps make 'Visa Consumer Transaction Controls' API calls easier.

  • Use a new or an existing npm project.
  • Run ‘npm install vctc-sdk’ in your project.
  • Require ‘vctc-sdk’ in your project.
  • Pass your auth-credentials as parameters while instantiating the API.
  • Pass the request body, headers and others query parameters (if required) as parameters while making the API calls.

Installation

npm install vctc-sdk
var vctcSdk = require('vctc-sdk');
var authCredientials = {
    userId: "Enter your userId here",
    password: "Enter your password here ",
    keyFile: "Enter path to key.pem here",
    certificateFile: "Enter path to cert.pem here",
};

var programAdministrationApi = new vctcSdk.programAdministrationAPI(authCredientials);

var parameters = {
    body: {} // Enter your request body here 
         // Enter header or query parameters if required
};

programAdministrationApi.retrieveExistingRuleCategoriesUsingGET(parameters)
     .then(function (result) {
        // Put your custom logic here
         console.log('Result is:' + JSON.stringify(result.body));
     })
     .catch(function (error) {
         console.log('Error is: ' + error);
     });