This commit is contained in:
youda 2025-05-13 19:50:01 +08:00
parent 0d3c550f5b
commit 29f6592d2d
3 changed files with 31 additions and 10 deletions

View File

@ -978,4 +978,24 @@ class Mall extends Base
return $this->renderError($e->getMessage());
}
}
public function get_diamond_order_log()
{
$user_id = $this->getuserid();
if ($user_id == 0) {
return $this->renderError("未登录");
}
$order_num = request()->param('order_num', '');
$diamond_order = DiamondOrder::where('order_no', '=', $order_num)->find();
if (!$diamond_order) {
return $this->renderError("订单不存在");
}
if ($diamond_order['user_id'] != $user_id) {
return $this->renderError("无权限查看");
}
if ($diamond_order['status'] != DiamondOrder::STATUS_SUCCESS) {
return $this->renderError("订单未成功");
}
return $this->renderSuccess($diamond_order['reward_log']);
}
}

View File

@ -243,3 +243,4 @@ Route::any('getAddressDetail', 'Other/getAddressDetail');
#============================
Route::any('get_diamond_list', 'Mall/get_diamond_list');
Route::any('createOrderProducts', 'Mall/createOrderProducts');
Route::any('get_diamond_order_log', 'Mall/get_diamond_order_log');

View File

@ -71,9 +71,9 @@ class H5Platform extends BasePlatform
// 生成新的支付通知URL
$notifyUrl = generatePayNotifyUrl($payment_type, $order_type, $user_id, $order_no, $callback_nonce_str);
$is_test = $user['istest'];
// if ($is_test == 2) {
// $price = 0.01;
// }
if ($is_test == 2) {
$price = 0.01;
}
$returnUrl = urldecode($returnUrl);
//2. 发起API调用以支付能力下的统一收单交易创建接口为例
$result = Factory::payment()