Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

body使用中文时签名错误 #4

Closed
newbyebye opened this issue Mar 4, 2017 · 1 comment
Closed

body使用中文时签名错误 #4

newbyebye opened this issue Mar 4, 2017 · 1 comment

Comments

@newbyebye
Copy link

在计算字符串md5时需要指定编码为utf8
Payment.prototype.getSign = function(pkg) {
pkg = Object.assign({}, pkg);
delete pkg.sign;
var str = ulits.toQueryString(pkg) + '&key=' + this.partnerKey;
return crypto.createHash('md5').update(str, 'utf8').digest('hex').toUpperCase();
};

@befinal
Copy link
Owner

befinal commented Mar 4, 2017

已修复,感谢反馈

@befinal befinal closed this as completed Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants