添加支付费率扣除

This commit is contained in:
Dev
2026-10-27 18:10:51 +08:00
parent 20f9113d94
commit f53c142a56
14 changed files with 225 additions and 41 deletions
@@ -193,6 +193,9 @@ class Common extends Api
'developTypes' => $developTypes,
// 平台服务费比例(0~1),前端据此计算开发者预计到手金额
'platform_commission_ratio' => (float)DemandService::getPlatformCommissionRatio(),
// 虚拟支付渠道费率(0~1):安卓 1%,iOS 12%,报价页按两端分别估算到手
'android_pay_fee_rate' => (float)DemandService::getPayFeeRate('android'),
'ios_pay_fee_rate' => (float)DemandService::getPayFeeRate('ios'),
// 推广分享卡片预览图,未配置时为空
'promotion_share_image' => $shareImage ? cdnurl($shareImage, true) : '',
// 商品按案例展示:不显示价格和购买入口
+2 -1
View File
@@ -308,7 +308,8 @@ class Order extends Api
if (!$orderNo) {
$this->error('订单号不能为空');
}
$res = OrderService::confirmVirtualPay($orderNo, $this->auth->id);
$payPlatform = $this->request->post('payPlatform', '');
$res = OrderService::confirmVirtualPay($orderNo, $this->auth->id, $payPlatform);
$this->success('支付成功', $res);
} catch (\Exception $e) {
if ($e instanceof HttpResponseException) {