1.0.0 • Published 4 years ago

artpay-gateway v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

TEST BUILD

artpay-gateway

Node module for Artpay API.

Install

npm i artpay-gateway

Import

import Pay from 'artpay-gateway'
const Pay = require('artpay-gateway')

Default Settings

Pay.set(Pay.API_URL, 'api_url')
Pay.set(Pay.AGREGGATOR_ID, 'agreggator_id')
Pay.set(Pay.SECRET_1, 'secret_1')
Pay.set(Pay.SECRET_2, 'secret_2')
Pay.set(Pay.ALGO_KEY, 'algo_key')

AuthUser

const uid = 'uid'
const user = await Pay.authUser(uid)

SessionStorage

const uid = 'uid'

const storage = Pay.getSessionStorage()
let user = storage.findByUID(uid)

if (!user) {
    user = await Pay.authUser(uid)
    storage.put(user)
}
1.0.1

4 years ago

1.0.0

4 years ago