0.2.7 • Published 7 months ago

computop-node-client v0.2.7

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

computop-node-client

This module is designed to help you integrate Computop Paygate more easily into your Node.js application. For this purpose, it contains classes for encryption and decryption, for generating a SHA-256 MAC hash, and for converting a key-value pair string into a JSON object.

Install

npm install --save

2) Create a file named ".env" and store your Computop keys like this:

KEY_BLOWFISH=<BF Key goes here>  
KEY_HMAC=<MAC key goes here>  

Usage

const computop = require('computop-node-client')

Encrypt to blowfish

computop.encryptBlowfish('Hello world');

Decrypt from blowfish

computop.decryptBlowfish('3FBEA4D5D8AD6CEE824F5BD7B5D6730FF41E214E67D515EC');

Encrypt to AES

computop.encryptAES('Hello world');

Decrypt from AES

computop.decryptAES('C0C8D486569F39C4DE13B2CA13697A92-50A271A52F8A72665DBE92A91DF1FB34BCC5752BD3A43E0D');

generate hash

computop.generateHash('123*Hello*World');

Convert JS object to key-value pairs

let myObject = {}
myObject.MerchantID = "myMID";
myObject.Amount = "100";

computop.buildRequest(myObject);

Parse response

computop.parseResponse('mid=YourMID&code=00000000&status=success);
0.2.7

7 months ago

0.2.6

1 year ago

0.2.3

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.2

1 year ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago