多个语言参数
This commit is contained in:
parent
15184d3975
commit
467864b4f4
|
@ -78,7 +78,7 @@ class GuMaPayServices implements PayApiInterface
|
|||
}
|
||||
|
||||
|
||||
public function pay($pay_data)
|
||||
public function pay($pay_data,$order)
|
||||
{
|
||||
|
||||
//订单开始时间,倒计时
|
||||
|
@ -98,12 +98,22 @@ class GuMaPayServices implements PayApiInterface
|
|||
'pay_status' => $this->order->pay_status == 1 ? '已支付' : '等待支付',
|
||||
'only_time' =>$time_only
|
||||
];
|
||||
$lange = $order->language ?? 'zh_cn';
|
||||
$appPath = base_path();
|
||||
$dir = $appPath . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'web' . DIRECTORY_SEPARATOR . 'order' . DIRECTORY_SEPARATOR;
|
||||
$file = $lange == 'zh_cn' ? '' : $lange;
|
||||
|
||||
if ($file != '') {
|
||||
$filedir = $dir . $lange . DIRECTORY_SEPARATOR . 'code.blade.php';
|
||||
} else {
|
||||
$filedir = $dir . 'code.blade.php';
|
||||
}
|
||||
|
||||
|
||||
return view('web.order.code', $data);
|
||||
|
||||
|
||||
if (file_exists($filedir)) {
|
||||
return view('web.order.' . $lange . '.code', $data);
|
||||
} else {
|
||||
return view('web.order.code', $data);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -18,7 +18,7 @@ interface PayApiInterface
|
|||
public function payConfig($type, $setConfig = []);
|
||||
|
||||
//统一下单支付
|
||||
public function pay($pay_data);
|
||||
public function pay($pay_data,$order);
|
||||
|
||||
//统一验证签名
|
||||
public function verify();
|
||||
|
|
|
@ -331,6 +331,7 @@ trait PayTrait
|
|||
$data['out_user_id'] = $request->input('user_id', '');
|
||||
$data['out_trade_sn'] = $request->input('out_trade_sn', '');
|
||||
$data['ewm_account'] = $request->input('ewm_account', '');
|
||||
$data['language'] = $request->input('language', 'zh_cn');
|
||||
|
||||
$data['order_at'] = date('Y-m-d H:i:s');
|
||||
if ($is_local) {
|
||||
|
|
|
@ -197,7 +197,8 @@
|
|||
}
|
||||
.code h4{
|
||||
color: red;
|
||||
text-align: center;
|
||||
text-align: right;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue