Skip to content

Commit

Permalink
Develop (#397)
Browse files Browse the repository at this point in the history
* Bugfix close #389

* Fix tests.

* Fix url. close #393

* Payment::configForPayment() bugfix. EasyWeChat/docs#27

* Fix tests.
  • Loading branch information
overtrue committed Apr 20, 2016
1 parent c03e751 commit befb968
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Payment/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ public function configForPayment($prepayId, $json = true)

$params['paySign'] = generate_sign($params, $this->merchant->key, 'md5');

// 简直了,这帮人真的是快玩出花儿来了!
$params['timestamp'] = $params['timeStamp'];
unset($params['timeStamp']);

return $json ? json_encode($params) : $params;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Payment/PaymentPaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function testConfigForPayment()
$this->assertEquals('wxTestAppId', $array['appId']);
$this->assertEquals('prepay_id=prepayId', $array['package']);
$this->assertEquals('MD5', $array['signType']);
$this->assertArrayHasKey('timeStamp', $array);
$this->assertArrayHasKey('timestamp', $array);
$this->assertArrayHasKey('nonceStr', $array);
$this->assertArrayHasKey('paySign', $array);
}
Expand Down

0 comments on commit befb968

Please sign in to comment.