作者 lihan
1 个管道 的构建 通过 耗费 0 秒

支付宝

... ... @@ -417,7 +417,7 @@ class OrderController extends HomeBaseController
$payRequestBuilder->setBody($body);
$payRequestBuilder->setSubject($subject);
$payRequestBuilder->setOutTradeNo($out_trade_no);
$payRequestBuilder->setTotalAmount($total_amount);
$payRequestBuilder->setTotalAmount(0.01);
$payRequestBuilder->setTimeExpress($timeout_express);
$payResponse = new \AlipayTradeService($config);
... ... @@ -427,10 +427,14 @@ class OrderController extends HomeBaseController
}
}
//支付宝回调
//支付宝异步回调
public function alipayNotify()
{
require EXTEND_PATH . '/alipay/config.php';
require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php';
$alipay = new \AlipayTradeService($config);
Db::name('user')->where(['id'=>10])->setInc('balance', 1);
$alipay->check();
}
}
\ No newline at end of file
... ...