# pushpay

> [![Teamcity Status]()](https://ci.crossroads.net/viewType.html?buildTypeId=SharedCode_Release_MinistryPlatformNode)

Latest version **0.1.1** (published 2018-09-28) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2018-09-28 |
| First published | 2018-09-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.6 |
| Dependencies | 4 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | crds_npm |

## Links

- npm: https://www.npmjs.com/package/pushpay
- npm.io page: https://npm.io/package/pushpay

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [dotenv](https://npm.io/package/dotenv.md) ^6.0.0
- [moment](https://npm.io/package/moment.md) ^2.22.2
- [querystring](https://npm.io/package/querystring.md) ^0.2.0

## Recent versions

- 0.1.1 (latest) — 2018-09-28
- 0.1.0 — 2018-09-27

## README

# Pushpay Node.js Client

[![Teamcity Status](<https://ci.crossroads.net/app/rest/builds/buildType:(id:SharedCode_Release_MinistryPlatformNode)/statusIcon.svg>)](https://ci.crossroads.net/viewType.html?buildTypeId=SharedCode_Release_MinistryPlatformNode)

an npm package for interacting with the Pushpay API

## Usage

#### Prerequisites

This package uses async/await, so requires a node version > 7.6
 
#### Build a request

currently, only get payments and recurring gifts is implemented

```js
const Pushpay = require('./src/app.js');
const pushpay = new Pushpay();

const start = moment().subtract(4, 'day').toDate()
const end = moment().toDate()
const data = await pushpay.getPayments(start, end)
console.info("data!", data);
```
> to run the above example, you can run `node example.js`, just remember to set your environment variables.

## Development

#### Install dependencies

```
npm i
```

#### Run tests (no passing tests yet)

```bash
npm test
# or, to run tests as you change files
npm test:watch
```

#### Environment Variables needed

* PUSHPAY_API_ENDPOINT=https://sandbox-api.pushpay.io/v1
* PUSHPAY_AUTH_ENDPOINT=https://auth.pushpay.com/pushpay-sandbox/oauth
* PUSHPAY_CLIENT_ID=client-id-abc
* PUSHPAY_CLIENT_SECRET=secret-password-777
* PUSHPAY_MERCHANT_KEY=merchant-key-453

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