Commit c03886d3 by 王栋源

wdy

parent 8212eb9d
var APIBase = require("../../api.base");
var system = require("../../../system");
const Client = require('aliyun-api-gateway').Client;
const client = new Client('203756933','1hxwkxz2tyn80i3ucrdbchru59zpxibz');
const client = new Client('203756933', '1hxwkxz2tyn80i3ucrdbchru59zpxibz');
const md5 = require("MD5");
class TradeTransferAPI extends APIBase {
constructor() {
super();
this.tradetransferSve= system.getObject("service.transfer.tradetransferSve");
this.notarizationflowSve= system.getObject("service.transfer.notarizationflowSve");
this.tradetransferSve = system.getObject("service.transfer.tradetransferSve");
this.notarizationflowSve = system.getObject("service.transfer.notarizationflowSve");
}
async acceptOrder(pobj, query) {
pobj.channelParams.fq_ordernum=pobj.orderNo;
pobj.channelParams.fq_ordernum = pobj.orderNo;
return await this.tradetransferSve.createtransfer(pobj.channelParams);
}
async closeOrder(pobj, query) {
......@@ -31,33 +31,54 @@ class TradeTransferAPI extends APIBase {
async writecommunicationlog(pobj, query) {
return await this.tradetransferSve.writecommunicationlog(pobj);
}
async uppaymentstatus(){
async uppaymentstatus() {
return await this.tradetransferSve.uppaymentstatus();
}
async m5(p){
var signStr="appid=00000051&body=sdfg&cusid=990581007426001&notify_url=dfgdsfgdf&randomstr=dfghrtjjn&reqsn=1564125456123&returl=sdsd154541&trxamt=100&version=12"
async m5(p) {
var keys = p.keys(jsonObj).sort();
if (keys.length == 0) {
reqResult.code = -230;
reqResult.msg = "请求参数信息为空";
return reqResult;
}
for (let k = 0; k < keys.length; k++) {
const tKey = keys[k];
if (tKey != "sign" && jsonObj[tKey]) {
signArr.push(tKey + "=" + jsonObj[tKey]);
}
}
if (signArr.length == 0) {
reqResult.code = -250;
reqResult.msg = "请求组装签名参数信息为空";
return reqResult;
}
signArr.push("key=" + pay_key);
var signStr = signArr.join("&");
// console.log(signStr, ",signStr.......................");
var tmpSign = md5(signStr).toUpperCase();
var signStr = "appid=00000051&body=sdfg&cusid=990581007426001&notify_url=dfgdsfgdf&randomstr=dfghrtjjn&reqsn=1564125456123&returl=sdsd154541&trxamt=100&version=12"
var tmpSign = md5(signStr).toUpperCase();
return tmpSign
}
async test(pobj, query){
async test(pobj, query) {
var url = 'https://jaxiya.gongsibao.com/orders/refuse';
var result = await client.post(url, {
data:{
"BizId":"trademark_prepayment_pre-cn-o401er9gv01",
"UserName":"阿里云",
"Mobile":"18600480430",
"RegisterNumber":"25559504",
"Classification":"20",
"Price":"10"
},
headers: {
accept: 'application/json'
}
data: {
"BizId": "trademark_prepayment_pre-cn-o401er9gv01",
"UserName": "阿里云",
"Mobile": "18600480430",
"RegisterNumber": "25559504",
"Classification": "20",
"Price": "10"
},
headers: {
accept: 'application/json'
}
});
return result;
return result;
console.log(JSON.stringify(result));
}
exam() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment