1.0.0 • Published 5 years ago
artpay-gateway v1.0.0
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)
}