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

Develop #410

Merged
merged 17 commits into from
May 4, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Filter the empty params. #402
overtrue committed Apr 22, 2016

Verified

This commit was signed with the committer’s verified signature.
sagikazarmark Márk Sági-Kazár
commit 5f04df161d19075b28dcc31dce902fe4fae6784f
1 change: 1 addition & 0 deletions src/Payment/API.php
Original file line number Diff line number Diff line change
@@ -383,6 +383,7 @@ protected function request($api, array $params, $method = 'post', array $options
$params['mch_id'] = $this->merchant->merchant_id;
$params['device_info'] = $this->merchant->device_info;
$params['nonce_str'] = uniqid();
$params = array_filter($params);
$params['sign'] = generate_sign($params, $this->merchant->key, 'md5');

$options = array_merge([
1 change: 1 addition & 0 deletions src/Payment/LuckyMoney/API.php
Original file line number Diff line number Diff line change
@@ -181,6 +181,7 @@ public function getMerchant()
*/
protected function request($api, array $params, $method = 'post')
{
$params = array_filter($params);
$params['mch_id'] = $this->merchant->merchant_id;
$params['nonce_str'] = uniqid();
$params['sign'] = \EasyWeChat\Payment\generate_sign($params, $this->merchant->key, 'md5');
1 change: 1 addition & 0 deletions src/Payment/MerchantPay/API.php
Original file line number Diff line number Diff line change
@@ -121,6 +121,7 @@ public function getMerchant()
*/
protected function request($api, array $params, $method = 'post')
{
$params = array_filter($params);
$params['nonce_str'] = uniqid();
$params['sign'] = \EasyWeChat\Payment\generate_sign($params, $this->merchant->key, 'md5');