Skip to main content

EncryptCard

Method which takes a card and encrypts it with respect to the click 2 pay provider.

InitParams

primaryAccountNumber String

The card PAN

panExpirationMonth String

The expiration month of the card, expressed as a two digit calendar month.

panExpirationYear String

The expiration year of the card, expressed as a two digit calendar year.

cardSecurityCode String

The card security code.

Encrypt card of the payonic-click2pay.js client
payonicClickToPay.EncryptCard({
primaryAccountNumber: "5186001700008785",
panExpirationMonth: "01"
panExpirationYear: "28",
cardSecurityCode: "123"
});
Response of EncryptCard
{
encryptedCard: "eyJrZXlJZCI6IjE0OTA2NC1zdGctc3JjLWZwYW4tZW5jcnlwdGlvbiIsImlhdCI6IjE2MTQ5NDM4NTYiLCJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0",
cardBrand: "mastercard"
}