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 b121805 commit 6713b46
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions transfers_new.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AlipayService
public function __construct($appid, $saPrivateKey)
{
$this->appId = $appid;
$this->charset = 'utf8';
$this->charset = 'utf-8';
$this->rsaPrivateKey=$saPrivateKey;
}

Expand Down Expand Up @@ -94,8 +94,7 @@ public function doTransfer($totalFee, $outTradeNo, $account,$realName,$remark=''
'biz_content'=>json_encode($requestConfigs),
);
$commonConfigs["sign"] = $this->generateSign($commonConfigs, $commonConfigs['sign_type']);
$result = $this->curlPost('https://openapi.alipay.com/gateway.do',$commonConfigs);
$result = iconv('gbk','utf-8',$result);
$result = $this->curlPost('https://openapi.alipay.com/gateway.do?charset='.$this->charset,$commonConfigs);
return json_decode($result,true);
}

Expand Down

0 comments on commit 6713b46

Please sign in to comment.