Browse Source

调整多次退款

master
wuliangbo 5 years ago
parent
commit
f04f6ce44b
  1. 30
      src/OpenPlatform/Authorizer/Mini/Model/VersionAuditContentBuilder.php
  2. 14
      src/OpenPlatform/Authorizer/Mini/Version/Client.php

30
src/OpenPlatform/Authorizer/Mini/Model/VersionAuditContentBuilder.php

@ -7,7 +7,9 @@
*/ */
namespace EasyAlipay\OpenPlatform\Authorizer\Mini\Model; namespace EasyAlipay\OpenPlatform\Authorizer\Mini\Model;
class VersionAuditContentBuilder use EasyAlipay\Kernel\AppRequest;
class VersionAuditContentBuilder extends AppRequest
{ {
/** /**
* @var string 小程序版本号 * @var string 小程序版本号
@ -25,22 +27,6 @@ class VersionAuditContentBuilder
* @var array 省市区信息,当区域类型为LOCATION时,不能为空 * @var array 省市区信息,当区域类型为LOCATION时,不能为空
*/ */
private $serviceRegionInfo; private $serviceRegionInfo;
/**
* @var array 参数数组
*/
private $bizContentarr = [];
/**
* @var string 参数字符串
*/
private $bizContent = NULL;
public function getBizContent()
{
if (!empty($this->bizContentarr)) {
$this->bizContent = json_encode($this->bizContentarr, JSON_UNESCAPED_UNICODE);
}
return $this->bizContent;
}
/** /**
* @param $appVersion * @param $appVersion
@ -48,7 +34,7 @@ class VersionAuditContentBuilder
public function setAppVersion($appVersion) public function setAppVersion($appVersion)
{ {
$this->appVersion = $appVersion; $this->appVersion = $appVersion;
$this->bizContentarr['app_version'] = $appVersion; $this->apiParas['app_version'] = $appVersion;
} }
/** /**
@ -65,7 +51,7 @@ class VersionAuditContentBuilder
public function setVersionDesc($versionDesc) public function setVersionDesc($versionDesc)
{ {
$this->versionDesc = $versionDesc; $this->versionDesc = $versionDesc;
$this->bizContentarr['version_desc'] = $versionDesc; $this->apiParas['version_desc'] = $versionDesc;
} }
/** /**
@ -82,7 +68,7 @@ class VersionAuditContentBuilder
public function setRegionType($regionType) public function setRegionType($regionType)
{ {
$this->regionType = $regionType; $this->regionType = $regionType;
$this->bizContentarr['region_type'] = $regionType; $this->apiParas['region_type'] = $regionType;
} }
/** /**
@ -99,7 +85,7 @@ class VersionAuditContentBuilder
public function setServiceRegionInfo($serviceRegionInfo) public function setServiceRegionInfo($serviceRegionInfo)
{ {
$this->serviceRegionInfo = $serviceRegionInfo; $this->serviceRegionInfo = $serviceRegionInfo;
$this->bizContentarr['service_region_info'] = $serviceRegionInfo; $this->apiParas['service_region_info'] = $serviceRegionInfo;
} }
/** /**
@ -117,7 +103,7 @@ class VersionAuditContentBuilder
public function setParams($params) public function setParams($params)
{ {
foreach ($params as $k => $v) { foreach ($params as $k => $v) {
$this->bizContentarr[$k] = $v; $this->apiParas[$k] = $v;
} }
} }
} }

14
src/OpenPlatform/Authorizer/Mini/Version/Client.php

@ -63,16 +63,14 @@ class Client extends AppClient
*/ */
public function audit(string $appVersion, string $versionDesc, string $regionType, array $serviceRegionInfo = [], array $params = []) public function audit(string $appVersion, string $versionDesc, string $regionType, array $serviceRegionInfo = [], array $params = [])
{ {
$contentBuilder = new VersionAuditContentBuilder(); $request = new VersionAuditContentBuilder();
$contentBuilder->setAppVersion($appVersion); $request->setAppVersion($appVersion);
$contentBuilder->setVersionDesc($versionDesc); $request->setVersionDesc($versionDesc);
$contentBuilder->setRegionType($regionType); $request->setRegionType($regionType);
if ($regionType == 'LOCATION') { if ($regionType == 'LOCATION') {
$contentBuilder->setServiceRegionInfo($serviceRegionInfo); $request->setServiceRegionInfo($serviceRegionInfo);
} }
$contentBuilder->setParams($params); $request->setParams($params);
$request = new AppRequest();
$request->setBizContent($contentBuilder->getBizContent());
$request->setApiMethodName("alipay.open.mini.version.audit.apply"); $request->setApiMethodName("alipay.open.mini.version.audit.apply");
return ($this->execute($request)); return ($this->execute($request));
} }

Loading…
Cancel
Save