修改huifu类引入
This commit is contained in:
parent
cbbeb195e5
commit
9fceb91243
@ -4,12 +4,13 @@ namespace app\api\controller;
|
||||
|
||||
use app\common\basics\Api;
|
||||
use BsPaySdk\core\BsPay;
|
||||
//require_once dirname(__FILE__) . "/loader.php";
|
||||
|
||||
require_once ROOT_PATH . "/../vendor/hf/BsPaySdk/init.php";
|
||||
|
||||
class Huifu extends Api
|
||||
{
|
||||
|
||||
|
||||
public function payTest(){
|
||||
public function payTest()
|
||||
{
|
||||
$config = new BsPay();
|
||||
$merConfig = $config->getConfig();
|
||||
// 2.组装请求参数
|
||||
@ -52,12 +53,9 @@ public function payTest(){
|
||||
// 3. 发起API调用
|
||||
$bspay = new BsPay();
|
||||
$result = $bspay->post("v2.trade.payment.jspay", $paramsInfo, '', 'default');
|
||||
if (!$result || $result->isError())
|
||||
{ //失败处理
|
||||
if (!$result || $result->isError()) { //失败处理
|
||||
var_dump($result->getErrorInfo());
|
||||
}
|
||||
|
||||
else { //成功处理
|
||||
} else { //成功处理
|
||||
var_dump($result);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user