This package has been deprecated

Author message:

This library is no longer supported, please use cybersource-rest-client-node

beta-rest-sdk-nodejs

0.1.0 • Public • Published

Cybersource APIs Client Library for Node.js

Description

The Cybersource API Client Library enables you to work with Cybersource Rest APIs on your server.

Basic Example

See the examples/ directory for examples of the key client features.

Configuration

    var ApiClient = require('apiClient.js');
    var options = {
        apikey: '<apikey>', //replace with your apikey
        secretKey: '<secretkey>', //replace with your secrekey
        domain: 'https://sandbox.api.visa.com/cybersource' //url
    };

Authorization

    var restClient = new ApiClient(options);
    restClient
    .authorizePayment(req)
    .then(function(res) {
        console.info("Authorization:" + JSON.stringify(res.body));
    }, function(err) {
        console.error("Failed to Authorize" + err.message);
    });

Capture

 
    var req = {
        id: <authorization id>,
        captureRequest: {
            amount: "100.00"
        }
    }
    var restClient = new ApiClient(options);
    restClient
    .capture(req)
    .then(function(res) {
        console.info("Capture:" + JSON.stringify(res.body));
    }, function(err) {
        console.error("Failed to Authorize" + err.message);
    });

Documentation

Cybersource: https://devint.vdp.visa.com/products/cybersource/guides

Readme

Keywords

Package Sidebar

Install

npm i beta-rest-sdk-nodejs

Weekly Downloads

1

Version

0.1.0

License

Apache 2

Last publish

Collaborators

  • cybersourcedev