spgateway-js

1.0.0 • Public • Published

spgateway-js

智付通信用卡付款 API

npm i --save spgateway-js

Usage

var sp = require('spgateway-js')
 
var trade = sp.encrypt(KEY, IV, {
  MerchantID: SPGATEWAY_MERCHANT_ID,
  RespondType: 'JSON',
  TimeStamp: Math.floor(Date.now() / 1000),
  Version: '1.4',
  MerchantOrderNo: ORDER_NO,
  Amt: amount,
  ItemDesc: 'Item',
  Email: user.email,
  LoginType: 0,
  ReturnURL: '...',
  NotifyURL: '...
})
// trade = {TradeInfo: '...', TradeSha: '...'}
 
var payload = sp.decrypt(KEY, IV, TradeInfo)

License

The MIT License

Readme

Keywords

Package Sidebar

Install

npm i spgateway-js

Weekly Downloads

6

Version

1.0.0

License

MIT

Last publish

Collaborators

  • poga