[更新]修正函数名称

This commit is contained in:
Anyon 2018-10-30 18:54:09 +08:00
parent 0c1e64f220
commit 83eba868be
4 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@ class App extends BasicAliPay
*/ */
public function apply($options) public function apply($options)
{ {
$this->buildData($options); $this->applyData($options);
return http_build_query($this->options->get()); return http_build_query($this->options->get());
} }
} }

View File

@ -41,7 +41,7 @@ class Wap extends BasicAliPay
*/ */
public function apply($options) public function apply($options)
{ {
parent::buildData($options); parent::applyData($options);
return $this->buildPayHtml(); return $this->buildPayHtml();
} }
} }

View File

@ -41,7 +41,7 @@ class Web extends BasicAliPay
*/ */
public function apply($options) public function apply($options)
{ {
parent::buildData($options); parent::applyData($options);
return $this->buildPayHtml(); return $this->buildPayHtml();
} }
} }

View File

@ -175,7 +175,7 @@ abstract class BasicAliPay
* 数据包生成及数据签名 * 数据包生成及数据签名
* @param array $options * @param array $options
*/ */
protected function buildData($options) protected function applyData($options)
{ {
$this->options['biz_content'] = json_encode($options, JSON_UNESCAPED_UNICODE); $this->options['biz_content'] = json_encode($options, JSON_UNESCAPED_UNICODE);
$this->options['sign'] = $this->getSign(); $this->options['sign'] = $this->getSign();
@ -189,7 +189,7 @@ abstract class BasicAliPay
*/ */
protected function getResult($options) protected function getResult($options)
{ {
$this->buildData($options); $this->applyData($options);
$data = json_decode(Tools::post($this->gateway, $this->options->get()), true); $data = json_decode(Tools::post($this->gateway, $this->options->get()), true);
$method = str_replace('.', '_', $this->options['method']) . '_response'; $method = str_replace('.', '_', $this->options['method']) . '_response';
if (!isset($data[$method]['code']) || $data[$method]['code'] !== '10000') { if (!isset($data[$method]['code']) || $data[$method]['code'] !== '10000') {