1.2.0 • Published 12 months ago

@xendit/xenissuing-web v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

NodeJs Support NPM Support

Xenissuing

This SDK comprises of the following modules :

  • XenIssuing: this module handles encryption between XenIssuing and your Web application.

SecureSession

SecureSession is a module to help you set up encryption between XenIssuing and your application.

Requirements

To be able to use Xenissuing, you will need to use a private key provided by Xendit.

It includes several methods:

  • getKey will encrypt a session key randomly generated used for asymmetric encryption with Xenissuing.
  • encrypt would be used when setting sensitive data.
  • decryptCardData would be used whenever receiving sensitive card data from Xenissuing.

Usage

import XenIssuing from "@xendit/xenissuing-web";

const pubkey = "-----BEGIN PUBLIC KEY-----${key}-----END PUBLIC KEY-----`";

const secureSession = XenIssuing.createSecureSession(pubkey); // add sessionKey as parameter to test
const sessionId = secureSession.getKey(); // to be used for API calls(eg. get card pan,cvv,etc)

const { secret, iv } = apiResponse.data;
const decryptedData = secureSession.decryptCardData(iv, secret);
1.2.0

12 months ago

1.1.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago