A JavaScript library for Straal API. A brilliant payment solution for disruptive businesses.
Add StraalJS to your project via NPM:
npm i --save https://github.com/straal/StraalJS.git#1.0.5
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);
},
}
);
This is the main method for sending encrypted data to a Straal endpoint:
Straal.sendEncrypted(cryptKey, jsonData[ , options])
Any suggestions or reports of technical issues are welcome! Contact us via email.
This library is released under Apache License 2.0. See LICENSE for more info.