Skip to content

Commit

Permalink
Merge pull request #7 from taobig/wechat-pay-fix
Browse files Browse the repository at this point in the history
微信支付时不对传入金额进行*100操作
  • Loading branch information
yansongda committed Sep 4, 2017
2 parents 55c6cb8 + 103d039 commit d5f1984
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Gateways/Wechat/Wechat.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ abstract public function pay(array $config_biz = []);
public function refund($config_biz = [])
{
$this->config = array_merge($this->config, $config_biz);
$this->config['total_fee'] = intval($this->config['total_fee'] * 100);
$this->config['refund_fee'] = intval($this->config['refund_fee'] * 100);
$this->config['total_fee'] = $this->config['total_fee'];
$this->config['refund_fee'] = $this->config['refund_fee'];
$this->config['op_user_id'] = isset($this->config['op_user_id']) ?: $this->user_config->get('mch_id', '');

$this->unsetTradeTypeAndNotifyUrl();
Expand Down Expand Up @@ -168,7 +168,7 @@ abstract protected function getTradeType();
protected function preOrder($config_biz = [])
{
$this->config = array_merge($this->config, $config_biz);
$this->config['total_fee'] = intval($this->config['total_fee'] * 100);
$this->config['total_fee'] = $this->config['total_fee'];

return $this->getResult($this->gateway);
}
Expand Down

0 comments on commit d5f1984

Please sign in to comment.