|
@@ -21,7 +21,7 @@ $str = HttpUtil::getQueryString(); # 提取参数串
|
|
|
$data = JsonUtil::decode($str);
|
|
|
$req = new PayRequest($data); # 创建订单
|
|
|
$cfg = loyalsoft\config_alipay::Inst();
|
|
|
-$req->notifyUrl = $cfg->notify_Url; # 给客户端传递回调URL.
|
|
|
+//$req->notifyUrl = $cfg->notify_Url; # 给客户端传递回调URL.
|
|
|
$req->InserDataBase(); # 将订单插入数据库
|
|
|
CLog::pay('[alipay.pay]创建订单' . $req); # 日志
|
|
|
// SDK已经封装掉了公共参数,这里只需要传入业务参数: https://docs.open.alipay.com/204/105465/
|
|
@@ -29,7 +29,7 @@ $bizcontent = "{\"body\":\"" . $req->product_name . "\","
|
|
|
. "\"subject\": \"龙游科技\","
|
|
|
. "\"out_trade_no\": \"" . $req->cpOrderId . "\","
|
|
|
. "\"timeout_express\": \"30m\","
|
|
|
- . "\"total_amount\": \"" . $req->amount/100 . "\"," # 这里单位是元, 注意检查
|
|
|
+ . "\"total_amount\": \"" . $req->amount / 100 . "\"," # 这里单位是元, 注意检查
|
|
|
. "\"product_code\":\"QUICK_MSECURITY_PAY\","
|
|
|
. "\"passback_params\":\"" . $req->callbackInfo . "\"" # 透传参数
|
|
|
. "}";
|
|
@@ -45,7 +45,7 @@ $aop->signType = "RSA2";
|
|
|
|
|
|
//实例化具体API对应的request类,类名称和接口名称对应,
|
|
|
$request = new AlipayTradeAppPayRequest(); # 当前调用接口名称:alipay.trade.app.pay
|
|
|
-$request->setNotifyUrl($cfg->notify_Url);
|
|
|
+$request->setNotifyUrl($req->notifyUrl);
|
|
|
$request->setBizContent($bizcontent);
|
|
|
$response = $aop->sdkExecute($request); # 这里和普通的接口调用不同,使用的是sdkExecute
|
|
|
|