Skip to content

Commit 271d934

Browse files
committed
修复获取预支付ID附带卡券参数bug
1 parent bad0e6c commit 271d934

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Wechat/WechatPay.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ public function getPrepayId($openid, $body, $out_trade_no, $total_fee, $notify_u
134134
"total_fee" => $total_fee,
135135
"notify_url" => $notify_url,
136136
"trade_type" => $trade_type,
137-
"spbill_create_ip" => Tools::getAddress(),
138-
"goods_tag" => $goods_tag
137+
"spbill_create_ip" => Tools::getAddress()
139138
);
139+
empty($goods_tag) || $postdata['goods_tag'] = $goods_tag;
140140
empty($openid) || $postdata['openid'] = $openid;
141141
$result = $this->getArrayResult($postdata, self::MCH_BASE_URL . '/pay/unifiedorder');
142142
if (false === $this->_parseResult($result)) {

0 commit comments

Comments
 (0)