# payhub_sdk

> A library providing methods for running transactions by using your payhub credentials

Latest version **1.0.2** (published 2016-07-21) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-07-21 |
| First published | 2016-06-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Agustin Breit |
| Maintainers | agustinbreit |
| Keywords | payhub, sdk, transactions, payments, online |

## Links

- npm: https://www.npmjs.com/package/payhub_sdk
- Repository: https://github.com/payhubbuilder/payhub-nodejs-sdk
- Homepage: https://github.com/payhubbuilder/payhub-nodejs-sdk#readme
- Issues: https://github.com/payhubbuilder/payhub-nodejs-sdk/issues
- npm.io page: https://npm.io/package/payhub_sdk

## Dependencies (1)

- [sync-request](https://npm.io/package/sync-request.md) *

## Recent versions

- 1.0.2 (latest) — 2016-07-21
- 1.0.1 — 2016-07-21
- 1.0.0 — 2016-06-27

## README

# payhub_sdk
=========

Welcome! In this directory, you'll find the files you need to be able to package up our NodeJs module into your server. 
<br><br>
[Download the Master Repo] (https://github.com/payhub/payhubws-public-sdk/archive/master.zip)

## Installation

  npm install payhub_sdk --save 
  or
  npm install git://github.com/payhubbuilder/payhub-nodejs-sdk.git

## Usage

```javascript
var models = require('../lib/model/apiModels');

var trnManager = require('../lib/utils/transactionManager');

var errors = require('../lib/model/errors');

var WsURL="https://sandbox-api.payhub.com/api/v2/";
var oauth_token = "2a5d6a73-d294-4fba-bfba-957a4948d4a3";


var merchant = new models.Merchant();
merchant.organization_id=10074
merchant.terminal_id=134

var bill = new models.Bill();
bill.base_amount=new models.Amount(1)

var card_data = new models.CardData()
card_data.card_number="5466410004374507";
card_data.cvv_data="998"
card_data.card_expiry_date="202011"
card_data.billing_address_1="2350 Kerner Blvd"
card_data.billing_city="San Rafael"
card_data.billing_state="CA"
card_data.billing_zip="99997"

var customer=new models.Customer()
customer.first_name="testJS"
customer.last_name="testJS"
customer.email_address="testJS@testJS.com"

var sale = new models.Sale(merchant,bill,card_data,customer)

var transactionManager = new trnManager.TransactionManager(merchant,WsURL,oauth_token);
var saleResponse = transactionManager.doSale(sale);
console.log(saleResponse)

```

## Tests

  npm test

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/PayHubSDK. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.

## Release History

* 1.0.0 Initial release

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