# gopay-api-nodejs

> GoPay implementation

Latest version **0.1.0** (published 2018-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install gopay-api-nodejs
pnpm add gopay-api-nodejs
yarn add gopay-api-nodejs
bun add gopay-api-nodejs
```

## 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 | 2018-02-21 |
| First published | 2018-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Martin Smola |
| Maintainers | test123456789t |
| Keywords | gopay, payment |

## Links

- npm: https://www.npmjs.com/package/gopay-api-nodejs
- Repository: https://github.com/molda/gopay-api-nodejs
- Homepage: https://github.com/molda/gopay-api-nodejs#readme
- Issues: https://github.com/molda/gopay-api-nodejs/issues
- npm.io page: https://npm.io/package/gopay-api-nodejs

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.83.0

## Recent versions

- 0.1.0 (latest) — 2018-02-21

## README

# gopay-api-nodejs

### Usage
```javascript
var GoPay = require('gopay');

GoPay.init({
	clientID: 'xxxxxx'
	clientSecret: 'xxxxxxx'
}/* , true  */); // true for production, since default is debug mode

// default scope is 'payment-create'
GoPay.getToken(/*scope, */function(err, token){

	var payment = new Payment()
		.payer({contact: { email: 'test@test.cz' }})
		.target({
			type:'ACCOUNT',
			goid: gp.goid
		})
		.amount(1000)
		.currency("CZK")
		.orderNo("001")
		.orderDesc("pojisteni01")
		.items([{ name:'item01', amount:1000 }])
		.preAuth(true)
		.additional_params([{"name":"invoicenumber", "value":"2015001003"}])
		.callback({
			"return_url":"http://martin.smola/return",
			// "notification_url":"http://www.eshop.cz/notify"
		})
		.toObj();

	GoPay.createPayment(payment, token, function(err, data){

		GoPay.getStatus(data.id, token, function(err, data){
			
		});			
	});	

});
```

License: MIT

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