1.0.5 • Published 4 years ago

yp-jd-payment v1.0.5

Weekly downloads
19
License
ISC
Repository
github
Last release
4 years ago

京东支付 NodeJS

Install

npm install yp-jd-payment

yp-jd-payment

Usage

const fs = require('fs');
const path = require('path');

const desKey = 'xxxx';
const config = {
  privateKey: fs.readFileSync(path.resolve(__dirname, './key.pem')).toString(),
  publicKey: fs.readFileSync(path.resolve(__dirname, './public.pem')).toString(),
  desKey: Buffer.from(desKey, 'base64'),
  merchant: 'xxx',
};

const params = {
  // 
};

try {
  const response = await jpay.customerPay(params);

  // const response = await jpay.uniorder(params);
  // const response = await jpay.query(params);
  // const response = await jpay.refund(params);
  console.log(response);
} catch (e) {
  console.log(e);
}

API

https://payapi.jd.com/

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago