paytools-3ds

2.0.3 • Public • Published

Standalone 3D Secure by Orchestra

Introduction

This JavaScript library is designed to perform 3D Secure authentication on cards you capture.

Highlights

  • No dependencies
  • The library contains a single API
  • Latest releases 2.0.0 - last stable version.

Install

npm i paytools-3ds

Usage

perform3ds(sessionToken, iFrameElementId, cardData, callback);

Request Parameters

  • sessionToken {string}: The session token is a token from Orchestra that identifies your 3D Secure operations (see below further details).
  • iFrameElementId {string}: The Id of the element in which the 3D Secure challenge form should be created.
  • cardData {Object}: The card details to be authenticated in the following format:
{
cardType: "", // 'Visa', 'MasterCard', 'AMEX', 'Discover'
cardNumber: "",
expirationYear: number,
expirationMonth: number,
cardHolderName: ""
};
  • callback: The callback function to be invoked upon completion. This function should accept the authentication results object.

Response

The response will contain the authentication results object. The results object has a member named messageType and optional members, based on the MessageType. The results object would look like this: {messageType: "", ... other members }

Sample responses

  • Authenticated message:
    {messageType: "Authenticated", threeDs: { authenticationValue: "", eci: "", xID: "", version:""}}

  • Rejected message:
    { messageType: "Rejected", reason: "" }

  • CardNotEnrolled message:
    { messageType: "CardNotEnrolled" }

  • TechnicalProblem message:
    { messageType: "TechnicalProblem", reason: "", reference: "" }

Build and Test

To get started, you will need to set up a free sandbox account with Orchestra. In your account, proceed to generate an API Key which is necessary for authentication. To create a 3D Secure operations token, you will need to use the method POST https://api.epaytools.com/ThreeDsSessions in the Orchestra API (see documentation here).

Support

For assistance, please do not hesitate to contact our support team at support@pcibooking.net.

Package Sidebar

Install

npm i paytools-3ds

Weekly Downloads

6

Version

2.0.3

License

To be used with the Pci Booking Orchestra service

Unpacked Size

19.7 kB

Total Files

6

Last publish

Collaborators

  • yehuda.pcibooking
  • eyalnevo