<?php
namespace Payment\Charge\Wx; use Payment\Common\Weixin\Data\BackAppChargeData; use Payment\Common\Weixin\Data\Charge\AppChargeData; use Payment\Common\Weixin\WxBaseStrategy; class WxAppCharge extends WxBaseStrategy { public function getBuildDataClass() { $this->config->tradeType = 'APP'; return AppChargeData::class; } protected function retData(array $ret) { $back = new BackAppChargeData($this->config, $ret); $back->setSign(); $backData = $back->getData(); return $backData; } } 