|
@@ -3,6 +3,7 @@
|
|
namespace App\Http\Controllers\Wap\Pay;
|
|
namespace App\Http\Controllers\Wap\Pay;
|
|
|
|
|
|
use App\Modules\Book\Services\ChapterService;
|
|
use App\Modules\Book\Services\ChapterService;
|
|
|
|
+use App\Modules\Subscribe\Services\OrderParamService;
|
|
use App\Modules\Subscribe\Services\SubstituteOrderService;
|
|
use App\Modules\Subscribe\Services\SubstituteOrderService;
|
|
use App\Modules\User\Services\ReadRecordService;
|
|
use App\Modules\User\Services\ReadRecordService;
|
|
use Illuminate\Routing\Controller;
|
|
use Illuminate\Routing\Controller;
|
|
@@ -298,6 +299,7 @@ class OrdersController extends Controller
|
|
if($result)
|
|
if($result)
|
|
{
|
|
{
|
|
$this->orderCreated($init_order);
|
|
$this->orderCreated($init_order);
|
|
|
|
+ $this->recordOtherParam($result->id, $uid);
|
|
}
|
|
}
|
|
|
|
|
|
if ($request->get('suid')) {
|
|
if ($request->get('suid')) {
|
|
@@ -473,6 +475,7 @@ class OrdersController extends Controller
|
|
if($result)
|
|
if($result)
|
|
{
|
|
{
|
|
$this->orderCreated($init_order);
|
|
$this->orderCreated($init_order);
|
|
|
|
+ $this->recordOtherParam($result->id, $uid);
|
|
}
|
|
}
|
|
if ($suid) {
|
|
if ($suid) {
|
|
$this->createSubstituteOrder($result->id, $uid, $suid);
|
|
$this->createSubstituteOrder($result->id, $uid, $suid);
|
|
@@ -1498,6 +1501,13 @@ class OrdersController extends Controller
|
|
SubstituteOrderService::createOrder($order_id, $uid, $pay_uid);
|
|
SubstituteOrderService::createOrder($order_id, $uid, $pay_uid);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private function recordOtherParam($order_id, $uid){
|
|
|
|
+ $gxhp = ReadRecordService::getByField($uid,'gxhp');
|
|
|
|
+ if($gxhp){
|
|
|
|
+ OrderParamService::create($order_id,$gxhp);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private function substituteOrderPrice($order_id,$prize_fee=500)
|
|
private function substituteOrderPrice($order_id,$prize_fee=500)
|
|
{
|
|
{
|
|
SubstituteOrderService::SubstituteOrderPrize($order_id, $prize_fee);
|
|
SubstituteOrderService::SubstituteOrderPrize($order_id, $prize_fee);
|