|
@@ -242,8 +242,6 @@ export class SunPayService extends BaseService {
|
|
const nonce = headers['sunpay-nonce'];
|
|
const nonce = headers['sunpay-nonce'];
|
|
const str = timestamp + nonce + JSON.stringify(payload);
|
|
const str = timestamp + nonce + JSON.stringify(payload);
|
|
const validSign = this.utils.signBySha256(str, API_SERECT).toUpperCase();
|
|
const validSign = this.utils.signBySha256(str, API_SERECT).toUpperCase();
|
|
- console.log(sign, str)
|
|
|
|
- console.log(validSign)
|
|
|
|
if (sign !== validSign) {
|
|
if (sign !== validSign) {
|
|
throw new Error('sign error');
|
|
throw new Error('sign error');
|
|
}
|
|
}
|
|
@@ -251,7 +249,7 @@ export class SunPayService extends BaseService {
|
|
throw new Error('order no success');
|
|
throw new Error('order no success');
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
- date: moment(),
|
|
|
|
|
|
+ date: new Date(),
|
|
orderNo: data.out_order_no,
|
|
orderNo: data.out_order_no,
|
|
traceNo: data.order_no,
|
|
traceNo: data.order_no,
|
|
};
|
|
};
|