# gamemoney-commonjs

> GameMoney API wrapper for Node.js

Latest version **6.0.2** (published 2024-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install gamemoney-commonjs
pnpm add gamemoney-commonjs
yarn add gamemoney-commonjs
bun add gamemoney-commonjs
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.2 |
| Published | 2024-04-10 |
| First published | 2022-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 27.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Maxim Makarov |
| Maintainers | herenickname |
| Keywords | gamemoney, gmpays, gm, merchant |

## Links

- npm: https://www.npmjs.com/package/gamemoney-commonjs
- Repository: https://github.com/gamemoney-ps/gamemoney-node-sdk
- Homepage: https://github.com/gamemoney-ps/gamemoney-node-sdk#readme
- Issues: https://github.com/gamemoney-ps/gamemoney-node-sdk/issues
- npm.io page: https://npm.io/package/gamemoney-commonjs

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.6.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 6.0.2 (latest) — 2024-04-10
- 6.0.1 — 2023-11-01
- 4.1.1 — 2022-12-05

## README

![GameMoney](https://cp.gmpays.com/assets/img/gm_logo.png)

[GameMoney](https://gmpays.com/) API wrapper for Node.js

Full API documentation [here](https://cp.gmpays.com/apidoc)

## Installation 
```sh
$ npm install gamemoney
```

## Usage

### Initialization
```typescript
import fs from 'fs'
import GameMoney from 'gamemoney'

const gm = new GameMoney({
	project: 42,
	hmacPrivateKey: 'test',

	// Optional. But to make checkouts must be specified
	rsaPrivateKey: {
		key: fs.readFileSync('./private.pem').toString(),
		passphrase: '123' // Optional
	},

	// OR:
	// rsaPrivateKey: Buffer.from(
	// 	process.env.GM_RSA_PRIVATE_KEY ?? '',
	// 	'base64',
	// )
})
```

### Examples
See examples in [src/examples](https://github.com/gamemoney-ps/gamemoney-node-sdk/tree/master/src/examples) directory

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