# vspapi

> A payment service for VSP

Latest version **0.1.0** (published 2015-12-31) · 0 weekly downloads

## Install

```sh
npm install vspapi
pnpm add vspapi
yarn add vspapi
bun add vspapi
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-12-31 |
| First published | 2015-12-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 4.2.2 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rodney Aiglstorfer |
| Maintainers | ra9r |
| Keywords | payments, vsp, credit card, debit card |

## Links

- npm: https://www.npmjs.com/package/vspapi
- Repository: https://bitbucket.org/vspapi/vspapi
- Homepage: https://bitbucket.org/vspapi/vspapi#readme
- npm.io page: https://npm.io/package/vspapi

## Dependencies (4)

- [restler](https://npm.io/package/restler.md) *
- [winston](https://npm.io/package/winston.md) *
- [xml2json](https://npm.io/package/xml2json.md) 0.9.0
- [js2xmlparser](https://npm.io/package/js2xmlparser.md) *

## Recent versions

- 0.1.0 (latest) — 2015-12-31
- 0.0.9 — 2015-12-31
- 0.0.8 — 2015-12-29
- 0.0.5 — 2015-12-10
- 0.0.4 — 2015-12-10
- 0.0.3 — 2015-12-08
- 0.0.1 — 2015-12-07

## README

**VSPAPI** facilitates the use of the vSecure Processing web services within a Node application.  To use these services you will need to setup your own developer account at [vSP Developer Portal](http://www.vspdevelopers.com/) and sign a non-disclosure agreement.

# Setting Up a Context

Setting up the vspapi is very simple.  Once your have signed up with the developer portal you will be assigned your own GID and other assorted values which are used to setup the initail context for the api.

## Context Parameters
Property | Type | Required | Description |
:--------|:--------:|:--------:|:----------|
gid | String | ✔ | This value is unique to the developer.  One must be created for you by vSecure Processing.   |
platform | String |   | Optionally override the default "Buypass" platform value. |
url | String |  | Optionally override the default base URL for the vSP web services |
tid | String |  | Optionally set a Terminal ID ("01" by default) |
appId | String | ✔ | The ID of your application.  This value may be assigned to you by vSP |
userId | String | ✔ | The user ID of the developer as registered with vSP |

## Example Usage
```javascript
var api = require('vspapi');

var ctx = {
    gid:"xxxxxxxxxxxxxxx",
    appId:"xxxxx",
    userId:"info@someplace.com"
};

api.config(ctx);
```


# See Also

+ [api.createToken(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Create%20Token)
+ [api.deleteToken(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Delete%20Token)
+ [api.queryToken(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Query%20Token)
+ [api.updateToken(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Update%20Token)
+ [api.processPayment(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Process%20Payment)
+ [api.voidTransaction(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Void%20Transaction)
+ [api.processRefund(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Process%20Refund)
+ [api.processAuth(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Process%20Authorization)
+ [api.processAuthCancel(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Process%20Authorization%20Cancellation)
+ [api.processCaptureOnly(data, callback)](https://bitbucket.org/vspapi/vspapi/wiki/Process%20Capture%20Only)

---
_Source: https://npm.io/package/vspapi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
