Skip to content

Commit

Permalink
退款
Browse files Browse the repository at this point in the history
  • Loading branch information
dedemao authored Jun 1, 2020
1 parent 7d83d30 commit f4bb4b0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AlipayService

public function __construct()
{
$this->charset = 'utf8';
$this->charset = 'utf-8';
}
public function setAppid($appid)
{
Expand Down Expand Up @@ -89,12 +89,8 @@ public function doRefund()
'biz_content'=>json_encode($requestConfigs),
);
$commonConfigs["sign"] = $this->generateSign($commonConfigs, $commonConfigs['sign_type']);
$result = $this->curlPost('https://openapi.alipay.com/gateway.do',$commonConfigs);
$result = $this->curlPost('https://openapi.alipay.com/gateway.do?charset='.$this->charset,$commonConfigs);
$resultArr = json_decode($result,true);
if(empty($resultArr)){
$result = iconv('GBK','UTF-8//IGNORE',$result);
return json_decode($result,true);
}
return $resultArr;
}

Expand Down

0 comments on commit f4bb4b0

Please sign in to comment.