Skip to content

A JavaScript library for Straal API. A brilliant payment solution for disruptive businesses.

License

Notifications You must be signed in to change notification settings

straal/StraalJS

Repository files navigation


License: Apache 2.0 Twitter

StraalJS

A JavaScript library for Straal API. A brilliant payment solution for disruptive businesses.

Installation

Add StraalJS to your project via NPM:

npm i --save https://github.com/straal/StraalJS.git#1.0.5

Usage

import { sendEncrypted, getBrowserParams } from "straaljs";

sendEncrypted(
  "yourCryptKey",
  {
    name: "John Smith",
    number: "4444444444444448",
    cvv: "123",
    expiry_month: 11,
    expiry_year: 2020,
    browser: getBrowserParams(), // optional for 3DSV2
  },
  {
    success: function (xhr) {
      console.log(xhr);
    },
    fail: function (xhr) {
      console.log(xhr);
    },
  }
);

sendEncrypted method

This is the main method for sending encrypted data to a Straal endpoint:

Straal.sendEncrypted(cryptKey, jsonData[ , options])

Support

Any suggestions or reports of technical issues are welcome! Contact us via email.

License

This library is released under Apache License 2.0. See LICENSE for more info.

About

A JavaScript library for Straal API. A brilliant payment solution for disruptive businesses.

Resources

License

Stars

Watchers

Forks

Packages

No packages published