Skip to content

Helper function for encrypt and decrypt 2c2p payment action api

Notifications You must be signed in to change notification settings

pangaunn/node-2c2p

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node-2c2p

Introduction

Helper function for encrypt and decrypt 2c2p payment action api.

Installation

npm install node-2c2p

encrypt(xmlString, publicKeyPath)

/**
 * @param {String} xmlString xml string that you want to encrypt.
 * @param {String} publicKeyPath path to your certificate file (this file you have to request from 2c2p)
 * @return {String} encrypted xml string
 */

decrypt(encryptedXml, privateKeyPath)

/**
 * @param {String} encryptedXml encrypted reponse string from 2c2p payment action request.
 * @param {String} privateKeyPath path to your pem file (this file you have to request from 2c2p)
 * @return {String} string in xml
 */

About

Helper function for encrypt and decrypt 2c2p payment action api

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published