Skip to content

1.3.5

Compare
Choose a tag to compare
@abei2017 abei2017 released this 21 Mar 12:29
· 7 commits to master since this release

主要解决在yii2的console模式下使用 企业付款到微信零钱包 接口无法获取IP问题,mch接口的send方法增加自定义参数,可以人工设置,如下:

$mch = (new Application())->driver('mp.mch');
$params = [
    'partner_trade_no'=>"xxxxx",
    'openid'=>"open",
    'amount'=>100,
    'desc'=>'xxx',
    'check_name'=>'NO_CHECK',
    'ip'=>'xxx.xxx.xxx.xxx',
];
$result = $mch->send($params);

当然如果你不是在console模式下使用此方法,则可以不传入ip项。