<?php
namespace Payment\Charge\Wx; use Payment\Common\Weixin\Data\Charge\BarChargeData; use Payment\Common\Weixin\WxBaseStrategy; use Payment\Common\WxConfig; class WxBarCharge extends WxBaseStrategy { protected $reqUrl = 'https://api.mch.weixin.qq.com/{debug}/pay/micropay'; public function getBuildDataClass() { return BarChargeData::class; } protected function retData(array $ret) { $ret['total_fee'] = bcdiv($ret['total_fee'], 100, 2); $ret['cash_fee'] = bcdiv($ret['cash_fee'], 100, 2); if ($this->config->returnRaw) { return $ret; } return $ret; } } 