Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

des-sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

des-sdk

```bash npm install des-sdk --save ```

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Install

npm install des-sdk --save

Usage

Merchant client

import {DESMerchantClient} from 'des-sdk'

let client = new DESMerchantClient('5Ka9YjFQtfUUX2Ddnqka...', '1.2.19');
console.time('data-exchange');
client.createDataExchangeRequest(4, {
    name: 'name',
    idcard: 'idcard'
}).then(result => {
    console.log('request created:', result);
    client.getResult(result.request_id).then(result => {
        console.log(JSON.stringify(result,null,2));
        console.timeEnd('data-exchange');
    }).catch(ex => {
        console.error('error when get result:', ex);
    });
}).catch(ex => {
    console.error('error when create data exchange request:', ex);
});

Blacklist client

import {DESBlackListGatewayClient} from "des-sdk";

let client = new DESBlackListGatewayClient("5KHoUrUT...", "1.2.2316");

let loanInfoList = [
    {
        platform: "1.2.902895",
        app_id: "jx",
        loan_type: 1,
        loan_amount: "1-1.5",
        loan_status: "3",
        repay_status: "M(2)",
        arrears: 1000.00,
        contract_date: "2017-05-01"
    }
];

console.log("=========GET TOKEN=========");
client.getQuestionToken("QmP3vkTwxRH6d1Masg1GU3fCRqvkc1d8FxYnZF41SmriKd", "http://127.0.0.1/question?token=", loanInfoList).then(resp => {
    console.log(resp);
    console.log("=========GET REPORT=========");
    client.getQuestionReport("GXBBLec8ed80782624cbe818b0aeddcf81c30").then(resp => {
        console.log(resp);
    }).catch(ex => {
        console.error(ex);
    });
}).catch(ex => {
    console.error(ex);
});

Dev Documents

https://doc.gxb.io/des/

Keywords

FAQs

Package last updated on 10 Aug 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc