|
|
@@ -140,7 +140,9 @@ export class WeixinService {
|
|
|
const nonceStr = Kits.generateStr()
|
|
|
const packageStr = `prepay_id=${result.data.prepay_id}`
|
|
|
const signType = 'RSA'
|
|
|
- const signStr = [this.weixinConfiguration.appId, timeStamp, nonceStr, packageStr].join('\n')
|
|
|
+ const signStr =
|
|
|
+ [this.weixinConfiguration.appId, timeStamp, nonceStr, packageStr].join(String.fromCharCode(10)) +
|
|
|
+ String.fromCharCode(10)
|
|
|
const paySign = Kits.sha256WithRsa(signStr, this.privateKey)
|
|
|
console.log(signStr.replace(/\n/g, '\\n'))
|
|
|
console.log(paySign)
|