|
|
@@ -38,6 +38,10 @@ class CustomController extends BaseController
|
|
|
$get = Yii::$app->request->get();
|
|
|
$amount = $get['amount'] ?? 0;
|
|
|
$customId = $get['customId'] ?? 0;
|
|
|
+ $payWay = $get['payWay'] ?? -1;
|
|
|
+ if ($payWay < 0) {
|
|
|
+ util::fail('请选择付款方式');
|
|
|
+ }
|
|
|
if ($amount <= 0) {
|
|
|
util::fail('充值金额需要大于0');
|
|
|
}
|
|
|
@@ -57,7 +61,7 @@ class CustomController extends BaseController
|
|
|
$transaction = $connection->beginTransaction();
|
|
|
try {
|
|
|
$staff = $this->shopAdmin;
|
|
|
- CustomService::rechargeClear($custom, $amount, $this->shop, $staff);
|
|
|
+ CustomService::rechargeClear($custom, $amount, $this->shop, $staff, $payWay);
|
|
|
$transaction->commit();
|
|
|
util::complete('充值成功');
|
|
|
} catch (\Exception $e) {
|