Socket
Socket
Sign inDemoInstall

juno-payment-node

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    juno-payment-node

Juno Payment API node wrapper based on JavaScript version.


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Install size
35.6 kB
Created
Weekly downloads
 

Readme

Source

Introduction

This package has getCardHash method for JUNO API (juno.com.br).

Sample: getCardHash

1. Require Juno.

const Juno = require('juno-payment-node');

2. Declare get card hash function

    private async getCardHash(ccNumber: string, name: string, ccCode: string,
        ccExpiresOnMonth: string, ccExpiresOnYear: string): Promise<string> {
        return new Promise(async (resolve, reject) => {

            let tokenJuno = getJunoPublicKey(); // TODO: Code get key.

            let cardData = {
                cardNumber: ccNumber,
                holderName: name,
                securityCode: ccCode,
                expirationMonth: ccExpiresOnMonth,
                expirationYear: ccExpiresOnYear
            };

            let checkout = new Juno.DirectCheckout(tokenJuno,
                isProd()); // TODO: Code check whether is production or not.

            checkout.getCardHash(cardData, resolve, reject);
        });
    }

3. Make the call.

let ccHash = await this.getCardHash  (ccNumber, name, ccCode, ccExpiresOnMonth, ccExpiresOnYear);

FAQs

Last updated on 18 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc