Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f3d8a7d22c | |||
| 26732a2d51 |
@@ -1,9 +0,0 @@
|
|||||||
# 核销接口
|
|
||||||
|
|
||||||
[TOC]
|
|
||||||
|
|
||||||
## 文档说明
|
|
||||||
|
|
||||||
| 版本号 | 发行说明 |
|
|
||||||
| ------ | ------------------ |
|
|
||||||
| 1.0.1 | 第一版本发布 |
|
|
||||||
@@ -73,8 +73,7 @@ class IndexController extends AdminController
|
|||||||
protected function grid()
|
protected function grid()
|
||||||
{
|
{
|
||||||
$grid = new Grid(new Activity);
|
$grid = new Grid(new Activity);
|
||||||
$grid->model()->withCount('coupons');
|
$grid->model()->with(['grants.user', 'verifications.user']);
|
||||||
|
|
||||||
$grid->actions(function ($actions) {
|
$grid->actions(function ($actions) {
|
||||||
$actions->disableView();
|
$actions->disableView();
|
||||||
});
|
});
|
||||||
@@ -100,8 +99,6 @@ class IndexController extends AdminController
|
|||||||
$grid->column('id', '#ID#');
|
$grid->column('id', '#ID#');
|
||||||
$grid->column('title', '活动名称');
|
$grid->column('title', '活动名称');
|
||||||
$grid->column('code', '活动编号');
|
$grid->column('code', '活动编号');
|
||||||
$grid->column('total', '可发券总数');
|
|
||||||
$grid->column('coupons_count', '已发券总数');
|
|
||||||
$grid->column('rule.code', '卡券规则');
|
$grid->column('rule.code', '卡券规则');
|
||||||
$grid->column('类型')->display(function () {
|
$grid->column('类型')->display(function () {
|
||||||
return $this->type_text;
|
return $this->type_text;
|
||||||
@@ -158,11 +155,6 @@ class IndexController extends AdminController
|
|||||||
})
|
})
|
||||||
->required();
|
->required();
|
||||||
|
|
||||||
$form->number('total', '总数')
|
|
||||||
->help('可发券总数,0为不限制')
|
|
||||||
->default(10000)
|
|
||||||
->required();
|
|
||||||
|
|
||||||
$form->radio('type', '类型')
|
$form->radio('type', '类型')
|
||||||
->options(Activity::TYPES)
|
->options(Activity::TYPES)
|
||||||
->when(Activity::TYPE_EXTEND, function (Form $form) {
|
->when(Activity::TYPE_EXTEND, function (Form $form) {
|
||||||
@@ -200,16 +192,6 @@ class IndexController extends AdminController
|
|||||||
|
|
||||||
$form->saving(function (Form $form) {
|
$form->saving(function (Form $form) {
|
||||||
$request = request();
|
$request = request();
|
||||||
|
|
||||||
if ($request->total < 0) {
|
|
||||||
$error = new MessageBag([
|
|
||||||
'title' => '错误',
|
|
||||||
'message' => '可发券总数必须大于0',
|
|
||||||
]);
|
|
||||||
|
|
||||||
return back()->withInput()->with(compact('error'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->type == Activity::TYPE_EXTEND && empty($request->days)) {
|
if ($request->type == Activity::TYPE_EXTEND && empty($request->days)) {
|
||||||
$error = new MessageBag([
|
$error = new MessageBag([
|
||||||
'title' => '错误',
|
'title' => '错误',
|
||||||
@@ -227,7 +209,6 @@ class IndexController extends AdminController
|
|||||||
|
|
||||||
return back()->withInput()->with(compact('error'));
|
return back()->withInput()->with(compact('error'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request()->start) {
|
if (request()->start) {
|
||||||
$form->start_at = $form->start_at . ' 00:00:01';
|
$form->start_at = $form->start_at . ' 00:00:01';
|
||||||
}
|
}
|
||||||
@@ -235,7 +216,6 @@ class IndexController extends AdminController
|
|||||||
if (request()->end_at) {
|
if (request()->end_at) {
|
||||||
$form->end_at = $form->end_at . ' 23:59:59';
|
$form->end_at = $form->end_at . ' 23:59:59';
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$form->saved(function (Form $form) {
|
$form->saved(function (Form $form) {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class IndexController extends AdminController
|
|||||||
$grid = new Grid(new UnionpayLog);
|
$grid = new Grid(new UnionpayLog);
|
||||||
|
|
||||||
$grid->disableActions();
|
$grid->disableActions();
|
||||||
$grid->disableCreateButton();
|
|
||||||
$grid->model()->orderBy('id', 'desc');
|
$grid->model()->orderBy('id', 'desc');
|
||||||
|
|
||||||
$grid->filter(function ($filter) {
|
$grid->filter(function ($filter) {
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Api\Controllers;
|
|
||||||
|
|
||||||
class IndexController extends Controller
|
|
||||||
{
|
|
||||||
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
return $this->respond('200', [
|
|
||||||
'code' => 200,
|
|
||||||
'message' => 'Json Api is ready',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -35,12 +35,19 @@ class UnionPayController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function query(Request $request)
|
public function query(Request $request)
|
||||||
{
|
{
|
||||||
$inputs = $request->all();
|
|
||||||
$app = app('xuanchen.unionpay');
|
|
||||||
$app->setParams($inputs);
|
|
||||||
$app->start();
|
|
||||||
|
|
||||||
return $app->respond();
|
$inputs = $request->all();
|
||||||
|
$sign = $inputs['sign'];
|
||||||
|
unset($inputs['sign']);
|
||||||
|
$action = new UnionPay($inputs, $sign);
|
||||||
|
|
||||||
|
$action->addLog();
|
||||||
|
$action->start();
|
||||||
|
|
||||||
|
$action->updateLog();
|
||||||
|
|
||||||
|
return $action->respond();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
Route::group(['prefix' => 'V1'], function () {
|
Route::group(['prefix' => 'V1'], function () {
|
||||||
Route::get('/', 'IndexController@index');
|
|
||||||
|
|
||||||
Route::post('user/get', 'UserController@index');
|
Route::post('user/get', 'UserController@index');
|
||||||
Route::post('user/check', 'UserController@check');
|
Route::post('user/check', 'UserController@check');
|
||||||
|
|
||||||
@@ -24,4 +22,5 @@ Route::group(['prefix' => 'V1'], function () {
|
|||||||
Route::post('unionpay/index', 'UnionPayController@index');
|
Route::post('unionpay/index', 'UnionPayController@index');
|
||||||
Route::post('unionpay/query', 'UnionPayController@query');
|
Route::post('unionpay/query', 'UnionPayController@query');
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,330 +2,44 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Coupon;
|
use App\Api\Controllers\ApiResponse;
|
||||||
use App\Models\TestLog;
|
|
||||||
use App\Models\User;
|
|
||||||
use Illuminate\Queue\Jobs\Job;
|
|
||||||
use XuanChen\Coupon\Action\pingan\Query;
|
|
||||||
use XuanChen\Coupon\Action\ysd\YsdQuery;
|
|
||||||
|
|
||||||
class SkyxuController
|
class SkyxuController
|
||||||
{
|
{
|
||||||
|
use ApiResponse;
|
||||||
public $user;
|
|
||||||
|
|
||||||
public $jiemi;
|
|
||||||
|
|
||||||
public $query_coupon;
|
|
||||||
|
|
||||||
public $ticket;
|
|
||||||
|
|
||||||
public $type;
|
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$list = Job::get();
|
$postData = [
|
||||||
dd($list);
|
'server_id' => '20200103490104',
|
||||||
Coupon::whereBetween('id', ['70091', '70513'])
|
'key' => 'rRhHO7Jbao2SSxAH8VygV4DgS4L2WESa',
|
||||||
->orderBy('created_at', 'ASC')
|
'addcode' => '69198663',
|
||||||
->chunk(100, function ($logs) {
|
'sign' => '6cd2232e9aa853219a0dff80430567796d0ae33d6c0289dfa835813def08ed8c',
|
||||||
foreach ($logs as $log) {
|
'data' => 'DBEgnb5HidvKQDyxL0BAcCwuMkVdbTZRVu4mxwwzAM5TWj\/HAQfcrH9VzcgdG42lINsHYvI2Tv+MJfyP9eXVEQ==',
|
||||||
if (preg_match('/^YSD/', $log->redemptionCode, $matches)) {
|
|
||||||
$type = Coupon::TYPE_YSD;
|
|
||||||
} else {
|
|
||||||
$type = Coupon::TYPE_PINGAN;
|
|
||||||
}
|
|
||||||
|
|
||||||
$log->type = $type;
|
|
||||||
$log->save();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dd();
|
|
||||||
$count = TestLog::whereBetween('created_at', ['2020-11-10 11:06:40', '2020-11-11 10:42:26'])
|
|
||||||
->where('type', 'freezecoupon')
|
|
||||||
->where('back', '0')
|
|
||||||
->orderBy('created_at', 'ASC')
|
|
||||||
->count();
|
|
||||||
dump($count);
|
|
||||||
// $list = TestLog::whereBetween('created_at', ['2020-11-10 11:06:40', '2020-11-11 10:42:26'])
|
|
||||||
// ->where('type', 'freezecoupon')
|
|
||||||
// ->where('back', '0')
|
|
||||||
// ->orderBy('created_at', 'ASC')
|
|
||||||
// ->get();
|
|
||||||
//
|
|
||||||
//// $data = [];
|
|
||||||
//// foreach ($list as $cou) {
|
|
||||||
//// $data[] = $cou->in_source['jiemi']['redemptionCode'];
|
|
||||||
//// }
|
|
||||||
//// dump($data);
|
|
||||||
|
|
||||||
if ($count > 1) {
|
|
||||||
try {
|
|
||||||
TestLog::whereBetween('created_at', ['2020-11-10 11:06:40', '2020-11-11 10:42:26'])
|
|
||||||
->where('type', 'freezecoupon')
|
|
||||||
->where('back', '0')
|
|
||||||
->orderBy('created_at', 'ASC')
|
|
||||||
->chunk(100, function ($logs) {
|
|
||||||
$su = $er = [];
|
|
||||||
|
|
||||||
foreach ($logs as $log) {
|
|
||||||
|
|
||||||
$this->jiemi = $log->in_source['jiemi'];
|
|
||||||
$this->user = User::where('outlet_id', $this->jiemi['outletId'])->first();
|
|
||||||
$this->getQuery();
|
|
||||||
|
|
||||||
if (is_string($this->queryData)) {
|
|
||||||
$er[$this->jiemi['redemptionCode']] = $this->queryData;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->jiemi['redemptionCode'] == '157922465040') {
|
|
||||||
dump($this->jiemi);
|
|
||||||
dump($this->ticket);
|
|
||||||
dump($this->queryData);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->checkCode();
|
|
||||||
if (is_string($this->ticket)) {
|
|
||||||
$er[$this->jiemi['redemptionCode']] = $this->ticket;
|
|
||||||
|
|
||||||
$er[] = $this->jiemi['redemptionCode'];
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$status = isset($log->out_source['code']) ? 2 : 3;
|
|
||||||
$exists = Coupon::where('status', $status)
|
|
||||||
->where('redemptionCode', $this->jiemi['redemptionCode'])->exists();
|
|
||||||
if ($exists && $status != 3) {
|
|
||||||
$er[$this->jiemi['redemptionCode']] = [
|
|
||||||
$log->out_source,
|
|
||||||
];
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$couponData = [
|
|
||||||
'user_id' => $this->user->parent->id,
|
|
||||||
'type' => Coupon::TYPE_YSD,
|
|
||||||
'outletId' => $this->user->outlet_id,
|
|
||||||
'orderid' => '',
|
|
||||||
'PaOutletId' => $this->queryData['PaOutletId'],
|
|
||||||
'redemptionCode' => $this->jiemi['redemptionCode'],
|
|
||||||
'thirdPartyGoodsId' => $this->queryData['thirdPartyGoodsId'],
|
|
||||||
'couponName' => $this->queryData['couponName'],
|
|
||||||
'price' => $this->ticket['price'],
|
|
||||||
'total' => $this->jiemi['total'],
|
|
||||||
'profit' => $this->ticket['profit'],
|
|
||||||
'status' => $status,
|
|
||||||
'remark' => isset($log->out_source['code']) ? '核销成功!' : $log->out_source[0],
|
|
||||||
'startTime' => $this->queryData['startTime'],
|
|
||||||
'endTime' => $this->queryData['endTime'],
|
|
||||||
'created_at' => $log->created_at->format('Y-m-d H:i:s'),
|
|
||||||
];
|
|
||||||
|
|
||||||
// dump($this->jiemi);
|
|
||||||
// dump($this->ticket);
|
|
||||||
// dump($couponData);
|
|
||||||
// dd($this->queryData);
|
|
||||||
|
|
||||||
$coupon = Coupon::create($couponData);
|
|
||||||
$coupon->profit();
|
|
||||||
|
|
||||||
$log->back = 1;
|
|
||||||
$log->save();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count($er) > 1) {
|
|
||||||
dump($er);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
dd($e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getQuery()
|
|
||||||
{
|
|
||||||
if (preg_match('/^YSD/', $this->jiemi['redemptionCode'], $matches)) {
|
|
||||||
$this->query_coupon = (new YsdQuery)->setOutletId($this->jiemi['outletId'])
|
|
||||||
->setCode($this->jiemi['redemptionCode'])
|
|
||||||
->start();
|
|
||||||
$this->type = 'ysd';
|
|
||||||
} else {
|
|
||||||
$this->query_coupon = (new Query)->setOutletId($this->jiemi['outletId'])
|
|
||||||
->setCode($this->jiemi['redemptionCode'])
|
|
||||||
->start();
|
|
||||||
$this->type = 'pingan';
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->type == 'ysd') {
|
|
||||||
return $this->getYsdPro();
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return $this->getPro();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getYsdPro()
|
|
||||||
{
|
|
||||||
$rule_code = $this->query_coupon->activity->rule->code;
|
|
||||||
$code = $this->user->parent->code->where('code', $rule_code)->first();
|
|
||||||
|
|
||||||
if (!$code) {
|
|
||||||
$this->queryData = "核销失败,您没有权限使用此卡券优惠活动。";
|
|
||||||
}
|
|
||||||
|
|
||||||
$ticket = explode('-', $rule_code);
|
|
||||||
if (!is_array($ticket) || count($ticket) != 3) {
|
|
||||||
$this->queryData = "核销失败,卡券规则格式不正确";
|
|
||||||
}
|
|
||||||
|
|
||||||
$full = $ticket[1]; //full100
|
|
||||||
$price = $ticket[2];
|
|
||||||
// preg_match('/(\d{3}(\.\d+)?)/is', $full, $match);
|
|
||||||
preg_match('/\d+/', $full, $match);
|
|
||||||
|
|
||||||
if (!is_array($match)) {
|
|
||||||
$this->queryData = "核销失败,卡券规则格式不正确。";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_numeric($this->jiemi['total'])) {
|
|
||||||
$this->queryData = "核销失败,订单金额必须是数字";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($match[0] > $this->jiemi['total']) {
|
|
||||||
$this->queryData = '核销失败,订单金额不足。';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->queryData = [
|
|
||||||
'couponName' => $this->query_coupon->activity->title,
|
|
||||||
'thirdPartyGoodsId' => $rule_code,
|
|
||||||
'productId' => '',
|
|
||||||
'PaOutletId' => '',
|
|
||||||
'startTime' => $this->query_coupon->start_at->format('Y-m-d H:i:s'),
|
|
||||||
'endTime' => $this->query_coupon->end_at->format('Y-m-d H:i:s'),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
return $this->ticket = [
|
$curl = curl_init();
|
||||||
'total' => $match[0],
|
|
||||||
'price' => $price,
|
|
||||||
'profit' => $code->profit,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getPro()
|
curl_setopt_array($curl, array(
|
||||||
{
|
CURLOPT_URL => "http://pa.cnskl.com/api/V1/user/freezecoupon",
|
||||||
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
|
CURLOPT_ENCODING => "",
|
||||||
|
CURLOPT_MAXREDIRS => 10,
|
||||||
|
CURLOPT_TIMEOUT => 0,
|
||||||
|
CURLOPT_FOLLOWLOCATION => true,
|
||||||
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||||
|
CURLOPT_CUSTOMREQUEST => "POST",
|
||||||
|
CURLOPT_POSTFIELDS => $postData,
|
||||||
|
CURLOPT_HTTPHEADER => array(
|
||||||
|
"Content-Type: multipart/form-data;",
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
if (is_string($this->query_coupon)) {
|
$response = curl_exec($curl);
|
||||||
return $this->query_coupon;
|
|
||||||
}
|
|
||||||
|
|
||||||
$profitOfferItemVersion = $this->query_coupon['profitOfferItemVersion'];
|
curl_close($curl);
|
||||||
|
echo $response;
|
||||||
|
|
||||||
$productItemList = $this->query_coupon['productItemList'];
|
|
||||||
|
|
||||||
if (!is_array($productItemList) || !is_array($productItemList[0])) {
|
|
||||||
$this->queryData = '核销失败,平安券数据有误,可能是未配置网点。';
|
|
||||||
}
|
|
||||||
|
|
||||||
//循环查找
|
|
||||||
$first = '';
|
|
||||||
foreach ($productItemList as $key => $item) {
|
|
||||||
$productId = $item['productId'];
|
|
||||||
$thirdPartyGoodsId = $item['thirdPartyGoodsId'];
|
|
||||||
$outletList = $item['outletList'];
|
|
||||||
if (!is_array($outletList) || !is_array($outletList[0])) {
|
|
||||||
$this->queryData = '核销失败,网点信息有误!请检查平安券配置信息。';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$outletList = collect($outletList);
|
|
||||||
//判断是新版还是旧版
|
|
||||||
if ($profitOfferItemVersion) {
|
|
||||||
//新版通过第三方查询
|
|
||||||
$first = $outletList->firstWhere('thirdOutletNo', $this->user->outlet_id);
|
|
||||||
|
|
||||||
if ($first) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//旧版通过平安网点查询
|
|
||||||
$first = $outletList->firstWhere('outletNo', $this->user->PaOutletId);
|
|
||||||
if ($first) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$first) {
|
|
||||||
$this->queryData = '核销失败,未找到可用网点信息。';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$thirdPartyGoodsId) {
|
|
||||||
$this->queryData = '核销失败,平安券编号规则有误。';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$productId) {
|
|
||||||
$this->queryData = '核销失败,未查询到平安券商品id。';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->queryData = [
|
|
||||||
'couponName' => $this->query_coupon['couponName'],
|
|
||||||
'thirdPartyGoodsId' => $thirdPartyGoodsId,
|
|
||||||
'productId' => $productId,
|
|
||||||
'PaOutletId' => $first['outletNo'],
|
|
||||||
'startTime' => $this->query_coupon['startTime'],
|
|
||||||
'endTime' => $this->query_coupon['endTime'],
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function checkCode()
|
|
||||||
{
|
|
||||||
if ($this->type == 'ysd') {
|
|
||||||
return $this->ticket;
|
|
||||||
}
|
|
||||||
|
|
||||||
$code = $this->user->parent->code->where('code', $this->queryData['thirdPartyGoodsId'])->first();
|
|
||||||
if (!$code) {
|
|
||||||
$this->ticket = "核销失败,未找到此项平安券规则,请联系管理人员检查渠道配置。";
|
|
||||||
}
|
|
||||||
|
|
||||||
$ticket = explode('-', $this->queryData['thirdPartyGoodsId']);
|
|
||||||
|
|
||||||
if (!is_array($ticket) || count($ticket) != 3) {
|
|
||||||
$this->ticket = "核销失败,平安券规则格式不正确。";
|
|
||||||
}
|
|
||||||
|
|
||||||
$full = $ticket[1]; //full100
|
|
||||||
$price = $ticket[2];
|
|
||||||
preg_match('/\d+/', $full, $result);
|
|
||||||
|
|
||||||
if (empty($result) || !is_array($result)) {
|
|
||||||
$this->ticket = "核销失败,平安券规则格式不正确。";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_numeric($this->jiemi['total'])) {
|
|
||||||
$this->ticket = "核销失败,订单金额必须是数字";
|
|
||||||
}
|
|
||||||
if ($result[0] > $this->jiemi['total']) {
|
|
||||||
$this->ticket = '核销失败,订单金额不足,平安券不可使用。';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->ticket = [
|
|
||||||
'total' => $result[0],
|
|
||||||
'price' => $price,
|
|
||||||
'profit' => $code->profit,
|
|
||||||
];
|
|
||||||
|
|
||||||
return $this->ticket;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,36 +17,20 @@ class TestController
|
|||||||
|
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$this->user = User::find(6);
|
$user_id = $request->user_id;
|
||||||
$ret = [
|
$data = $request->data;
|
||||||
'redemptionCode' => 'YSD201029312435',
|
|
||||||
'outletId' => '2008030929274',
|
|
||||||
];
|
|
||||||
|
|
||||||
$ret = [
|
|
||||||
'mobile' => '15663876870',
|
|
||||||
'orderid' => '202008105236478',
|
|
||||||
'activityId' => 'ysd202010272',
|
|
||||||
'outletId' => '2008241014458',
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
return $this->success($ret);
|
|
||||||
dd();
|
|
||||||
$user_id = $request->user_id;
|
|
||||||
$data = $request->data;
|
|
||||||
$this->user = User::find(3);
|
$this->user = User::find(3);
|
||||||
|
|
||||||
$data = '5VehIrHTZsS1BY8V5VcKlhTN9hbutq4j+HIT2zRCbSqgPWvClQSxYSP7mn7PmHuiYQpj55NRC6w4397FfdVTq23wd4BOQ964giie/JForTjt0l7UaY23XzKnNjDSKiGqr7DAbd8P3SzJ75ZjKaqUu7UWu3PVylAeesGRbZgpQEF/XKwOW4XMaJGV2tIsowILZCtF+moqHg7yA6hI4vT7iYU3rTq9vk7kpcnfArLKPQ5dxH9FFIegdr7E1S8NVwpTZrxeQEmjDUsGrBcWe/Q9dRWXSlKF1Hdz2qCUCK94fu3gqvEVSYRllTCa5mwQhlYJLs2UTmWMSism7nsivySseSl1/JOvNH0lyvWaV1XDUMKG8oTC+kOPQKxFA3qp2xO9ohRhN0dkpML4JVgkMF1r6rv+rThYQuOL/rnsuY5Jdh4QdPWCItQ05lqI46s2yPyKROrLx7jQ3/+BOyEmP+Cj5W8/trEAVS1HczMj4Jnl3vrcY879ubokUcEatalAuKGM0uLNAqQF5XfHzgXam4coEMek8MjdbxW+Z9+eZFQp/P1ts7yN5qzpac6Y8CrqSMFJZf1vwowp+1peiEC5tCsXlHCsDLPS8Uh1LNnC3sag0XZu7jX5uVR9nxR2c/ibBJOAHcUO+NcjmzoN+dQOeBkb/aWj9B+9mW5RUQmfUk6O+Vwkb5ruZZbXsoJJULj4tHJv87+mVo30e0mBbaPD47+fTp1+qSJtLOOlLO2nEj1NNDBSBGLM4RxTDQ4ju2r6HY9YyMXsbNC2YB8zrXrDsUoB1WSuu5XcaWx8rzA0NpckzNbEIuv0+6fA69gXOhC9xcGGPyEBbko73XHr7W8MIDtWhGOG8kHf1cAMdjwVGS2OUJ6XKZnBMwIzY8cJn4Fi+jXRMFnt+7BxWLToNQsyOoHbYWypeM8FrAb4VQeaxGhBQUXUmHhmAp00jcGEe/ngxn1oVjq6G+pEq8CxBntvQ+GZ975sPaCqkYOjbuHa9Myd2tT6GWbczL/YcR4RRV96ByYYCEOBy01LsBNeo6SSpWYcK4eoLhc70v8s';
|
$data = '5VehIrHTZsS1BY8V5VcKlhTN9hbutq4j+HIT2zRCbSqgPWvClQSxYSP7mn7PmHuiYQpj55NRC6w4397FfdVTq23wd4BOQ964giie/JForTjt0l7UaY23XzKnNjDSKiGqr7DAbd8P3SzJ75ZjKaqUu7UWu3PVylAeesGRbZgpQEF/XKwOW4XMaJGV2tIsowILZCtF+moqHg7yA6hI4vT7iYU3rTq9vk7kpcnfArLKPQ5dxH9FFIegdr7E1S8NVwpTZrxeQEmjDUsGrBcWe/Q9dRWXSlKF1Hdz2qCUCK94fu3gqvEVSYRllTCa5mwQhlYJLs2UTmWMSism7nsivySseSl1/JOvNH0lyvWaV1XDUMKG8oTC+kOPQKxFA3qp2xO9ohRhN0dkpML4JVgkMF1r6rv+rThYQuOL/rnsuY5Jdh4QdPWCItQ05lqI46s2yPyKROrLx7jQ3/+BOyEmP+Cj5W8/trEAVS1HczMj4Jnl3vrcY879ubokUcEatalAuKGM0uLNAqQF5XfHzgXam4coEMek8MjdbxW+Z9+eZFQp/P1ts7yN5qzpac6Y8CrqSMFJZf1vwowp+1peiEC5tCsXlHCsDLPS8Uh1LNnC3sag0XZu7jX5uVR9nxR2c/ibBJOAHcUO+NcjmzoN+dQOeBkb/aWj9B+9mW5RUQmfUk6O+Vwkb5ruZZbXsoJJULj4tHJv87+mVo30e0mBbaPD47+fTp1+qSJtLOOlLO2nEj1NNDBSBGLM4RxTDQ4ju2r6HY9YyMXsbNC2YB8zrXrDsUoB1WSuu5XcaWx8rzA0NpckzNbEIuv0+6fA69gXOhC9xcGGPyEBbko73XHr7W8MIDtWhGOG8kHf1cAMdjwVGS2OUJ6XKZnBMwIzY8cJn4Fi+jXRMFnt+7BxWLToNQsyOoHbYWypeM8FrAb4VQeaxGhBQUXUmHhmAp00jcGEe/ngxn1oVjq6G+pEq8CxBntvQ+GZ975sPaCqkYOjbuHa9Myd2tT6GWbczL/YcR4RRV96ByYYCEOBy01LsBNeo6SSpWYcK4eoLhc70v8s';
|
||||||
$iv = substr($this->user->des3key, 0, 8);
|
$iv = substr($this->user->des3key, 0, 8);
|
||||||
$ret = openssl_decrypt($data, 'DES-EDE3-CBC', $this->user->des3key, 0, $iv);
|
$ret = openssl_decrypt($data, 'DES-EDE3-CBC', $this->user->des3key, 0, $iv);
|
||||||
if (false === $ret) {
|
if (false === $ret) {
|
||||||
return openssl_error_string();
|
return openssl_error_string();
|
||||||
}
|
}
|
||||||
dd($ret);
|
dd($ret);
|
||||||
dd();
|
dd();
|
||||||
$this->user = User::find(215);
|
$this->user = User::find(215);
|
||||||
$ret = [
|
$ret = [
|
||||||
'redemptionCode' => '951951858070',
|
'redemptionCode' => '951951858070',
|
||||||
'total' => 5,
|
'total' => 5,
|
||||||
'outletId' => '2006151433887',
|
'outletId' => '2006151433887',
|
||||||
@@ -90,7 +74,7 @@ class TestController
|
|||||||
*/
|
*/
|
||||||
public function grant(Request $request)
|
public function grant(Request $request)
|
||||||
{
|
{
|
||||||
$this->user = User::find(299);
|
$this->user = User::find(3);
|
||||||
|
|
||||||
$data = $this->jiami($request->all());
|
$data = $this->jiami($request->all());
|
||||||
|
|
||||||
@@ -111,7 +95,7 @@ class TestController
|
|||||||
$this->user = User::find(3);
|
$this->user = User::find(3);
|
||||||
|
|
||||||
$redemptionCode = $request->redemptionCode;
|
$redemptionCode = $request->redemptionCode;
|
||||||
$outletId = $request->outletId;
|
$outletId = $request->outletId;
|
||||||
|
|
||||||
$data = $this->jiami($request->all());
|
$data = $this->jiami($request->all());
|
||||||
|
|
||||||
@@ -137,7 +121,7 @@ class TestController
|
|||||||
$this->user = User::find(3);
|
$this->user = User::find(3);
|
||||||
|
|
||||||
$redemptionCode = $request->redemptionCode;
|
$redemptionCode = $request->redemptionCode;
|
||||||
$data = $this->jiami($request->all());
|
$data = $this->jiami($request->all());
|
||||||
|
|
||||||
$url = $this->baseUrl . 'user/destroy';
|
$url = $this->baseUrl . 'user/destroy';
|
||||||
$res = $this->http($data, $url);
|
$res = $this->http($data, $url);
|
||||||
@@ -164,11 +148,11 @@ class TestController
|
|||||||
$this->user = User::find($user_id);
|
$this->user = User::find($user_id);
|
||||||
|
|
||||||
$data = $this->jiami([
|
$data = $this->jiami([
|
||||||
'redemptionCode' => $request->redemptionCode,
|
'redemptionCode' => $request->redemptionCode,
|
||||||
'total' => $request->total,
|
'total' => $request->total,
|
||||||
'outletId' => $request->outletId,
|
'outletId' => $request->outletId,
|
||||||
'orderid' => $request->orderid,
|
'orderid' => $request->orderid,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$url = $this->baseUrl . 'user/freezecoupon';
|
$url = $this->baseUrl . 'user/freezecoupon';
|
||||||
$res = $this->http($data, $url);
|
$res = $this->http($data, $url);
|
||||||
@@ -176,10 +160,10 @@ class TestController
|
|||||||
return $res;
|
return $res;
|
||||||
|
|
||||||
$redemptionCode = $request->redemptionCode;
|
$redemptionCode = $request->redemptionCode;
|
||||||
$total = $request->total;
|
$total = $request->total;
|
||||||
$outletId = $request->outletId;
|
$outletId = $request->outletId;
|
||||||
$orderid = $request->orderid ?? '';
|
$orderid = $request->orderid ?? '';
|
||||||
$res = Coupon::Redemption($this->user, $redemptionCode, $total, $outletId, $orderid);
|
$res = Coupon::Redemption($this->user, $redemptionCode, $total, $outletId, $orderid);
|
||||||
|
|
||||||
if (is_string($res)) {
|
if (is_string($res)) {
|
||||||
return $this->error($res);
|
return $this->error($res);
|
||||||
@@ -190,22 +174,22 @@ class TestController
|
|||||||
|
|
||||||
public function http($data, $url)
|
public function http($data, $url)
|
||||||
{
|
{
|
||||||
$client = new Client();
|
$client = new Client();
|
||||||
$response = $client->request('POST', $url, ['form_params' => $data, 'http_errors' => false]);
|
$response = $client->request('POST', $url, ['form_params' => $data, 'http_errors' => false]);
|
||||||
|
|
||||||
$body = $response->getBody();
|
$body = $response->getBody();
|
||||||
$content = $body->getContents();
|
$content = $body->getContents();
|
||||||
$result = json_decode($content, true);
|
$result = json_decode($content, true);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function jiami($ret)
|
public function jiami($ret)
|
||||||
{
|
{
|
||||||
$jsonData = json_encode($ret); //数据JSON化
|
$jsonData = json_encode($ret); //数据JSON化
|
||||||
$ascdata = $this->keyasc($jsonData); //加密
|
$ascdata = $this->keyasc($jsonData); //加密
|
||||||
$addcode = sprintf("%08d", mt_rand(0, 99999999)); //随机code 验证签名用
|
$addcode = sprintf("%08d", mt_rand(0, 99999999)); //随机code 验证签名用
|
||||||
$sign = $this->keysign($ascdata, $addcode);
|
$sign = $this->keysign($ascdata, $addcode);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'server_id' => $this->user->server_id,
|
'server_id' => $this->user->server_id,
|
||||||
@@ -225,7 +209,7 @@ class TestController
|
|||||||
*/
|
*/
|
||||||
public function jiemi($value)
|
public function jiemi($value)
|
||||||
{
|
{
|
||||||
$iv = substr($this->user->des3key, 0, 8);
|
$iv = substr($this->user->des3key, 0, 8);
|
||||||
$ret = openssl_decrypt($value, 'DES - EDE3 - CBC', $this->user->des3key, 0, $iv);
|
$ret = openssl_decrypt($value, 'DES - EDE3 - CBC', $this->user->des3key, 0, $iv);
|
||||||
if (false === $ret) {
|
if (false === $ret) {
|
||||||
return openssl_error_string();
|
return openssl_error_string();
|
||||||
|
|||||||
@@ -98,10 +98,9 @@ class Activity extends Model
|
|||||||
//发券
|
//发券
|
||||||
public function grant($mobile, $outletId = null)
|
public function grant($mobile, $outletId = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// $code = 'YSD' . date('ymd') . mt_rand(100000, 999999);
|
$code = '66406' . date('ymd') . mt_rand(100000, 999999);
|
||||||
$code = '66406' . date('ymdH') . mt_rand(1000000, 9999999);
|
|
||||||
if ($this->type == SELF::TYPE_EXTEND) {
|
if ($this->type == SELF::TYPE_EXTEND) {
|
||||||
$start_at = now();
|
$start_at = now();
|
||||||
$end_at = now()->addDays($this->days);
|
$end_at = now()->addDays($this->days);
|
||||||
|
|||||||
39
bootstrap/cache/packages.php
vendored
39
bootstrap/cache/packages.php
vendored
@@ -21,17 +21,6 @@
|
|||||||
'Admin' => 'Encore\\Admin\\Facades\\Admin',
|
'Admin' => 'Encore\\Admin\\Facades\\Admin',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'facade/ignition' =>
|
|
||||||
array (
|
|
||||||
'providers' =>
|
|
||||||
array (
|
|
||||||
0 => 'Facade\\Ignition\\IgnitionServiceProvider',
|
|
||||||
),
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
'Flare' => 'Facade\\Ignition\\Facades\\Flare',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'fideloper/proxy' =>
|
'fideloper/proxy' =>
|
||||||
array (
|
array (
|
||||||
'providers' =>
|
'providers' =>
|
||||||
@@ -82,20 +71,6 @@
|
|||||||
0 => 'Carbon\\Laravel\\ServiceProvider',
|
0 => 'Carbon\\Laravel\\ServiceProvider',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'nunomaduro/collision' =>
|
|
||||||
array (
|
|
||||||
'providers' =>
|
|
||||||
array (
|
|
||||||
0 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'overtrue/laravel-query-logger' =>
|
|
||||||
array (
|
|
||||||
'providers' =>
|
|
||||||
array (
|
|
||||||
0 => 'Overtrue\\LaravelQueryLogger\\ServiceProvider',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'simplesoftwareio/simple-qrcode' =>
|
'simplesoftwareio/simple-qrcode' =>
|
||||||
array (
|
array (
|
||||||
'providers' =>
|
'providers' =>
|
||||||
@@ -107,18 +82,4 @@
|
|||||||
'QrCode' => 'SimpleSoftwareIO\\QrCode\\Facades\\QrCode',
|
'QrCode' => 'SimpleSoftwareIO\\QrCode\\Facades\\QrCode',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'xuanchen/coupon' =>
|
|
||||||
array (
|
|
||||||
'providers' =>
|
|
||||||
array (
|
|
||||||
0 => 'XuanChen\\Coupon\\ServiceProvider',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'xuanchen/unionpay' =>
|
|
||||||
array (
|
|
||||||
'providers' =>
|
|
||||||
array (
|
|
||||||
0 => 'XuanChen\\UnionPay\\ServiceProvider',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
62
bootstrap/cache/services.php
vendored
62
bootstrap/cache/services.php
vendored
@@ -25,24 +25,19 @@
|
|||||||
21 => 'Illuminate\\View\\ViewServiceProvider',
|
21 => 'Illuminate\\View\\ViewServiceProvider',
|
||||||
22 => 'Barryvdh\\Debugbar\\ServiceProvider',
|
22 => 'Barryvdh\\Debugbar\\ServiceProvider',
|
||||||
23 => 'Encore\\Admin\\AdminServiceProvider',
|
23 => 'Encore\\Admin\\AdminServiceProvider',
|
||||||
24 => 'Facade\\Ignition\\IgnitionServiceProvider',
|
24 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
|
||||||
25 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
|
25 => 'Intervention\\Image\\ImageServiceProvider',
|
||||||
26 => 'Intervention\\Image\\ImageServiceProvider',
|
26 => 'Encore\\WangEditor\\WangEditorServiceProvider',
|
||||||
27 => 'Encore\\WangEditor\\WangEditorServiceProvider',
|
27 => 'Laravel\\Tinker\\TinkerServiceProvider',
|
||||||
28 => 'Laravel\\Tinker\\TinkerServiceProvider',
|
28 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
|
||||||
29 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
|
29 => 'Carbon\\Laravel\\ServiceProvider',
|
||||||
30 => 'Carbon\\Laravel\\ServiceProvider',
|
30 => 'SimpleSoftwareIO\\QrCode\\QrCodeServiceProvider',
|
||||||
31 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
|
31 => 'App\\Providers\\AppServiceProvider',
|
||||||
32 => 'Overtrue\\LaravelQueryLogger\\ServiceProvider',
|
32 => 'App\\Providers\\AuthServiceProvider',
|
||||||
33 => 'SimpleSoftwareIO\\QrCode\\QrCodeServiceProvider',
|
33 => 'App\\Providers\\EventServiceProvider',
|
||||||
34 => 'XuanChen\\Coupon\\ServiceProvider',
|
34 => 'App\\Providers\\RouteServiceProvider',
|
||||||
35 => 'XuanChen\\UnionPay\\ServiceProvider',
|
35 => 'App\\Api\\ApiServiceProvider',
|
||||||
36 => 'App\\Providers\\AppServiceProvider',
|
36 => 'App\\Merchant\\MerchantServiceProvider',
|
||||||
37 => 'App\\Providers\\AuthServiceProvider',
|
|
||||||
38 => 'App\\Providers\\EventServiceProvider',
|
|
||||||
39 => 'App\\Providers\\RouteServiceProvider',
|
|
||||||
40 => 'App\\Api\\ApiServiceProvider',
|
|
||||||
41 => 'App\\Merchant\\MerchantServiceProvider',
|
|
||||||
),
|
),
|
||||||
'eager' =>
|
'eager' =>
|
||||||
array (
|
array (
|
||||||
@@ -58,24 +53,19 @@
|
|||||||
9 => 'Illuminate\\View\\ViewServiceProvider',
|
9 => 'Illuminate\\View\\ViewServiceProvider',
|
||||||
10 => 'Barryvdh\\Debugbar\\ServiceProvider',
|
10 => 'Barryvdh\\Debugbar\\ServiceProvider',
|
||||||
11 => 'Encore\\Admin\\AdminServiceProvider',
|
11 => 'Encore\\Admin\\AdminServiceProvider',
|
||||||
12 => 'Facade\\Ignition\\IgnitionServiceProvider',
|
12 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
|
||||||
13 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
|
13 => 'Intervention\\Image\\ImageServiceProvider',
|
||||||
14 => 'Intervention\\Image\\ImageServiceProvider',
|
14 => 'Encore\\WangEditor\\WangEditorServiceProvider',
|
||||||
15 => 'Encore\\WangEditor\\WangEditorServiceProvider',
|
15 => 'Laravel\\Tinker\\TinkerServiceProvider',
|
||||||
16 => 'Laravel\\Tinker\\TinkerServiceProvider',
|
16 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
|
||||||
17 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
|
17 => 'Carbon\\Laravel\\ServiceProvider',
|
||||||
18 => 'Carbon\\Laravel\\ServiceProvider',
|
18 => 'SimpleSoftwareIO\\QrCode\\QrCodeServiceProvider',
|
||||||
19 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
|
19 => 'App\\Providers\\AppServiceProvider',
|
||||||
20 => 'Overtrue\\LaravelQueryLogger\\ServiceProvider',
|
20 => 'App\\Providers\\AuthServiceProvider',
|
||||||
21 => 'SimpleSoftwareIO\\QrCode\\QrCodeServiceProvider',
|
21 => 'App\\Providers\\EventServiceProvider',
|
||||||
22 => 'XuanChen\\Coupon\\ServiceProvider',
|
22 => 'App\\Providers\\RouteServiceProvider',
|
||||||
23 => 'XuanChen\\UnionPay\\ServiceProvider',
|
23 => 'App\\Api\\ApiServiceProvider',
|
||||||
24 => 'App\\Providers\\AppServiceProvider',
|
24 => 'App\\Merchant\\MerchantServiceProvider',
|
||||||
25 => 'App\\Providers\\AuthServiceProvider',
|
|
||||||
26 => 'App\\Providers\\EventServiceProvider',
|
|
||||||
27 => 'App\\Providers\\RouteServiceProvider',
|
|
||||||
28 => 'App\\Api\\ApiServiceProvider',
|
|
||||||
29 => 'App\\Merchant\\MerchantServiceProvider',
|
|
||||||
),
|
),
|
||||||
'deferred' =>
|
'deferred' =>
|
||||||
array (
|
array (
|
||||||
|
|||||||
@@ -21,9 +21,7 @@
|
|||||||
"php-parallel-lint/php-console-color": "^0.3.0",
|
"php-parallel-lint/php-console-color": "^0.3.0",
|
||||||
"php-parallel-lint/php-console-highlighter": "^0.5.0",
|
"php-parallel-lint/php-console-highlighter": "^0.5.0",
|
||||||
"predis/predis": "^1.1",
|
"predis/predis": "^1.1",
|
||||||
"simplesoftwareio/simple-qrcode": "^2.0",
|
"simplesoftwareio/simple-qrcode": "^2.0"
|
||||||
"xuanchen/coupon": "^1.01",
|
|
||||||
"xuanchen/unionpay": "^1.1"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"facade/ignition": "^1.4",
|
"facade/ignition": "^1.4",
|
||||||
@@ -47,7 +45,10 @@
|
|||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "app/",
|
"App\\": "app/",
|
||||||
"RuLong\\Bonus\\": "packages/bonus/src/",
|
"RuLong\\Bonus\\": "packages/bonus/src/",
|
||||||
"RuLong\\Identity\\": "packages/identity/src/"
|
"RuLong\\Identity\\": "packages/identity/src/",
|
||||||
|
"XuanChen\\Coupon\\": "packages/coupon/src/",
|
||||||
|
"XuanChen\\UnionPay\\": "packages/unionpay/src/",
|
||||||
|
"XuanChen\\Sinopec\\": "packages/sinopec/src/"
|
||||||
},
|
},
|
||||||
"classmap": [
|
"classmap": [
|
||||||
"database/seeds",
|
"database/seeds",
|
||||||
|
|||||||
437
composer.lock
generated
437
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "13d36c80a80c6a5377c75bac63e5ee5a",
|
"content-hash": "62a374df68be5012e10762e1763bc43c",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bacon/bacon-qr-code",
|
"name": "bacon/bacon-qr-code",
|
||||||
@@ -690,10 +690,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1|^8.0"
|
"php": "^7.0|^8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^6.4|^7.0"
|
"phpunit/phpunit": "^6.4|^7.0|^8.0|^9.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -733,20 +733,20 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-12T18:35:36+00:00"
|
"time": "2020-10-13T00:52:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "egulias/email-validator",
|
"name": "egulias/email-validator",
|
||||||
"version": "2.1.23",
|
"version": "2.1.22",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/egulias/EmailValidator.git",
|
"url": "https://github.com/egulias/EmailValidator.git",
|
||||||
"reference": "5fa792ad1853ae2bc60528dd3e5cbf4542d3c1df"
|
"reference": "68e418ec08fbfc6f58f6fd2eea70ca8efc8cc7d5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/5fa792ad1853ae2bc60528dd3e5cbf4542d3c1df",
|
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/68e418ec08fbfc6f58f6fd2eea70ca8efc8cc7d5",
|
||||||
"reference": "5fa792ad1853ae2bc60528dd3e5cbf4542d3c1df",
|
"reference": "68e418ec08fbfc6f58f6fd2eea70ca8efc8cc7d5",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -797,20 +797,20 @@
|
|||||||
"validation",
|
"validation",
|
||||||
"validator"
|
"validator"
|
||||||
],
|
],
|
||||||
"time": "2020-10-31T20:37:35+00:00"
|
"time": "2020-09-26T15:48:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "encore/laravel-admin",
|
"name": "encore/laravel-admin",
|
||||||
"version": "v1.8.10",
|
"version": "v1.8.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/z-song/laravel-admin.git",
|
"url": "https://github.com/z-song/laravel-admin.git",
|
||||||
"reference": "7a405d4ba1d6b41b3f4d2aaded60d2c27f758c2d"
|
"reference": "e3060ea62e6f625d0daf92ae5ef721469851c587"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/z-song/laravel-admin/zipball/7a405d4ba1d6b41b3f4d2aaded60d2c27f758c2d",
|
"url": "https://api.github.com/repos/z-song/laravel-admin/zipball/e3060ea62e6f625d0daf92ae5ef721469851c587",
|
||||||
"reference": "7a405d4ba1d6b41b3f4d2aaded60d2c27f758c2d",
|
"reference": "e3060ea62e6f625d0daf92ae5ef721469851c587",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -873,7 +873,7 @@
|
|||||||
"grid",
|
"grid",
|
||||||
"laravel"
|
"laravel"
|
||||||
],
|
],
|
||||||
"time": "2020-11-03T08:13:45+00:00"
|
"time": "2020-09-27T03:07:05+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fideloper/proxy",
|
"name": "fideloper/proxy",
|
||||||
@@ -1310,16 +1310,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v6.20.2",
|
"version": "v6.19.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "41915424bbd0939048e9b2d3701568dc2bc98790"
|
"reference": "7eb0b25daf58ec9374c59bd700949b3ea78d0276"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/41915424bbd0939048e9b2d3701568dc2bc98790",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/7eb0b25daf58ec9374c59bd700949b3ea78d0276",
|
||||||
"reference": "41915424bbd0939048e9b2d3701568dc2bc98790",
|
"reference": "7eb0b25daf58ec9374c59bd700949b3ea78d0276",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -1340,7 +1340,7 @@
|
|||||||
"monolog/monolog": "^1.12|^2.0",
|
"monolog/monolog": "^1.12|^2.0",
|
||||||
"nesbot/carbon": "^2.31",
|
"nesbot/carbon": "^2.31",
|
||||||
"opis/closure": "^3.6",
|
"opis/closure": "^3.6",
|
||||||
"php": "^7.2.5|^8.0",
|
"php": "^7.2",
|
||||||
"psr/container": "^1.0",
|
"psr/container": "^1.0",
|
||||||
"psr/simple-cache": "^1.0",
|
"psr/simple-cache": "^1.0",
|
||||||
"ramsey/uuid": "^3.7",
|
"ramsey/uuid": "^3.7",
|
||||||
@@ -1398,7 +1398,7 @@
|
|||||||
"league/flysystem-cached-adapter": "^1.0",
|
"league/flysystem-cached-adapter": "^1.0",
|
||||||
"mockery/mockery": "~1.3.3|^1.4.2",
|
"mockery/mockery": "~1.3.3|^1.4.2",
|
||||||
"moontoast/math": "^1.1",
|
"moontoast/math": "^1.1",
|
||||||
"orchestra/testbench-core": "^4.8",
|
"orchestra/testbench-core": "^4.0",
|
||||||
"pda/pheanstalk": "^4.0",
|
"pda/pheanstalk": "^4.0",
|
||||||
"phpunit/phpunit": "^7.5.15|^8.4|^9.3.3",
|
"phpunit/phpunit": "^7.5.15|^8.4|^9.3.3",
|
||||||
"predis/predis": "^1.1.1",
|
"predis/predis": "^1.1.1",
|
||||||
@@ -1413,8 +1413,8 @@
|
|||||||
"ext-pcntl": "Required to use all features of the queue worker.",
|
"ext-pcntl": "Required to use all features of the queue worker.",
|
||||||
"ext-posix": "Required to use all features of the queue worker.",
|
"ext-posix": "Required to use all features of the queue worker.",
|
||||||
"ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
|
"ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
|
||||||
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
|
|
||||||
"filp/whoops": "Required for friendly error pages in development (^2.8).",
|
"filp/whoops": "Required for friendly error pages in development (^2.8).",
|
||||||
|
"fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).",
|
||||||
"guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0.1).",
|
"guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0.1).",
|
||||||
"laravel/tinker": "Required to use the tinker console command (^2.0).",
|
"laravel/tinker": "Required to use the tinker console command (^2.0).",
|
||||||
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
|
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
|
||||||
@@ -1461,7 +1461,7 @@
|
|||||||
"framework",
|
"framework",
|
||||||
"laravel"
|
"laravel"
|
||||||
],
|
],
|
||||||
"time": "2020-10-29T18:56:44+00:00"
|
"time": "2020-10-20T18:43:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/tinker",
|
"name": "laravel/tinker",
|
||||||
@@ -1534,16 +1534,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/commonmark",
|
"name": "league/commonmark",
|
||||||
"version": "1.5.7",
|
"version": "1.5.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/commonmark.git",
|
"url": "https://github.com/thephpleague/commonmark.git",
|
||||||
"reference": "11df9b36fd4f1d2b727a73bf14931d81373b9a54"
|
"reference": "a56e91e0fa1f6d0049153a9c34f63488f6b7ce61"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/11df9b36fd4f1d2b727a73bf14931d81373b9a54",
|
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/a56e91e0fa1f6d0049153a9c34f63488f6b7ce61",
|
||||||
"reference": "11df9b36fd4f1d2b727a73bf14931d81373b9a54",
|
"reference": "a56e91e0fa1f6d0049153a9c34f63488f6b7ce61",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -1631,7 +1631,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-31T13:49:32+00:00"
|
"time": "2020-10-17T21:33:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
@@ -1789,16 +1789,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "maatwebsite/excel",
|
"name": "maatwebsite/excel",
|
||||||
"version": "3.1.24",
|
"version": "3.1.23",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Maatwebsite/Laravel-Excel.git",
|
"url": "https://github.com/Maatwebsite/Laravel-Excel.git",
|
||||||
"reference": "8b267b4a940634195eb6ea60c2da62f178a15940"
|
"reference": "b8145257f020635f374d2314ccd556674efcbfcb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/8b267b4a940634195eb6ea60c2da62f178a15940",
|
"url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/b8145257f020635f374d2314ccd556674efcbfcb",
|
||||||
"reference": "8b267b4a940634195eb6ea60c2da62f178a15940",
|
"reference": "b8145257f020635f374d2314ccd556674efcbfcb",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -1865,7 +1865,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-28T09:10:05+00:00"
|
"time": "2020-09-29T07:30:12+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "maennchen/zipstream-php",
|
"name": "maennchen/zipstream-php",
|
||||||
@@ -3651,16 +3651,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
"reference": "20f73dd143a5815d475e0838ff867bce1eebd9d5"
|
"reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/20f73dd143a5815d475e0838ff867bce1eebd9d5",
|
"url": "https://api.github.com/repos/symfony/console/zipball/90933b39c7b312fc3ceaa1ddeac7eb48cb953124",
|
||||||
"reference": "20f73dd143a5815d475e0838ff867bce1eebd9d5",
|
"reference": "90933b39c7b312fc3ceaa1ddeac7eb48cb953124",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -3701,6 +3701,11 @@
|
|||||||
"symfony/process": ""
|
"symfony/process": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Console\\": ""
|
"Symfony\\Component\\Console\\": ""
|
||||||
@@ -3739,20 +3744,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T11:50:19+00:00"
|
"time": "2020-09-15T07:58:55+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
"version": "v5.1.8",
|
"version": "v5.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/css-selector.git",
|
"url": "https://github.com/symfony/css-selector.git",
|
||||||
"reference": "6cbebda22ffc0d4bb8fea0c1311c2ca54c4c8fa0"
|
"reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/css-selector/zipball/6cbebda22ffc0d4bb8fea0c1311c2ca54c4c8fa0",
|
"url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9",
|
||||||
"reference": "6cbebda22ffc0d4bb8fea0c1311c2ca54c4c8fa0",
|
"reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -3765,6 +3770,11 @@
|
|||||||
"php": ">=7.2.5"
|
"php": ">=7.2.5"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "5.1-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\CssSelector\\": ""
|
"Symfony\\Component\\CssSelector\\": ""
|
||||||
@@ -3807,20 +3817,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T12:01:57+00:00"
|
"time": "2020-05-20T17:43:50+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/debug",
|
"name": "symfony/debug",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/debug.git",
|
"url": "https://github.com/symfony/debug.git",
|
||||||
"reference": "c87adf3fc1cd0bf4758316a3a150d50a8f957ef4"
|
"reference": "726b85e69342e767d60e3853b98559a68ff74183"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/debug/zipball/c87adf3fc1cd0bf4758316a3a150d50a8f957ef4",
|
"url": "https://api.github.com/repos/symfony/debug/zipball/726b85e69342e767d60e3853b98559a68ff74183",
|
||||||
"reference": "c87adf3fc1cd0bf4758316a3a150d50a8f957ef4",
|
"reference": "726b85e69342e767d60e3853b98559a68ff74183",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -3841,6 +3851,11 @@
|
|||||||
"symfony/http-kernel": "^3.4|^4.0|^5.0"
|
"symfony/http-kernel": "^3.4|^4.0|^5.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Debug\\": ""
|
"Symfony\\Component\\Debug\\": ""
|
||||||
@@ -3879,20 +3894,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T11:50:19+00:00"
|
"time": "2020-09-09T05:20:36+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/dom-crawler",
|
"name": "symfony/dom-crawler",
|
||||||
"version": "v5.1.8",
|
"version": "v5.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/dom-crawler.git",
|
"url": "https://github.com/symfony/dom-crawler.git",
|
||||||
"reference": "0969122fe144dd8ab2e8c98c7e03eedc621b368c"
|
"reference": "6d6885e167aad0af4128b392f22d8f2a33dd88ec"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/0969122fe144dd8ab2e8c98c7e03eedc621b368c",
|
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/6d6885e167aad0af4128b392f22d8f2a33dd88ec",
|
||||||
"reference": "0969122fe144dd8ab2e8c98c7e03eedc621b368c",
|
"reference": "6d6885e167aad0af4128b392f22d8f2a33dd88ec",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -3918,6 +3933,11 @@
|
|||||||
"symfony/css-selector": ""
|
"symfony/css-selector": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "5.1-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\DomCrawler\\": ""
|
"Symfony\\Component\\DomCrawler\\": ""
|
||||||
@@ -3956,20 +3976,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T12:01:57+00:00"
|
"time": "2020-09-02T16:23:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/error-handler",
|
"name": "symfony/error-handler",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/error-handler.git",
|
"url": "https://github.com/symfony/error-handler.git",
|
||||||
"reference": "363cca01cabf98e4f1c447b14d0a68617f003613"
|
"reference": "c8be4a5c70af70fec82e762dd93e3bbcf95c035f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/363cca01cabf98e4f1c447b14d0a68617f003613",
|
"url": "https://api.github.com/repos/symfony/error-handler/zipball/c8be4a5c70af70fec82e762dd93e3bbcf95c035f",
|
||||||
"reference": "363cca01cabf98e4f1c447b14d0a68617f003613",
|
"reference": "c8be4a5c70af70fec82e762dd93e3bbcf95c035f",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -3990,6 +4010,11 @@
|
|||||||
"symfony/serializer": "^4.4|^5.0"
|
"symfony/serializer": "^4.4|^5.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\ErrorHandler\\": ""
|
"Symfony\\Component\\ErrorHandler\\": ""
|
||||||
@@ -4028,20 +4053,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T11:50:19+00:00"
|
"time": "2020-10-01T16:21:20+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||||
"reference": "4204f13d2d0b7ad09454f221bb2195fccdf1fe98"
|
"reference": "e17bb5e0663dc725f7cdcafc932132735b4725cd"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4204f13d2d0b7ad09454f221bb2195fccdf1fe98",
|
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e17bb5e0663dc725f7cdcafc932132735b4725cd",
|
||||||
"reference": "4204f13d2d0b7ad09454f221bb2195fccdf1fe98",
|
"reference": "e17bb5e0663dc725f7cdcafc932132735b4725cd",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -4076,6 +4101,11 @@
|
|||||||
"symfony/http-kernel": ""
|
"symfony/http-kernel": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\EventDispatcher\\": ""
|
"Symfony\\Component\\EventDispatcher\\": ""
|
||||||
@@ -4114,7 +4144,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T11:50:19+00:00"
|
"time": "2020-09-18T14:07:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher-contracts",
|
"name": "symfony/event-dispatcher-contracts",
|
||||||
@@ -4200,16 +4230,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/finder",
|
"name": "symfony/finder",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/finder.git",
|
"url": "https://github.com/symfony/finder.git",
|
||||||
"reference": "26f63b8d4e92f2eecd90f6791a563ebb001abe31"
|
"reference": "60d08560f9aa72997c44077c40d47aa28a963230"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/finder/zipball/26f63b8d4e92f2eecd90f6791a563ebb001abe31",
|
"url": "https://api.github.com/repos/symfony/finder/zipball/60d08560f9aa72997c44077c40d47aa28a963230",
|
||||||
"reference": "26f63b8d4e92f2eecd90f6791a563ebb001abe31",
|
"reference": "60d08560f9aa72997c44077c40d47aa28a963230",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -4222,6 +4252,11 @@
|
|||||||
"php": ">=7.1.3"
|
"php": ">=7.1.3"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Finder\\": ""
|
"Symfony\\Component\\Finder\\": ""
|
||||||
@@ -4260,7 +4295,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T11:50:19+00:00"
|
"time": "2020-10-02T07:34:48+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-client-contracts",
|
"name": "symfony/http-client-contracts",
|
||||||
@@ -4346,16 +4381,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/http-foundation",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-foundation.git",
|
"url": "https://github.com/symfony/http-foundation.git",
|
||||||
"reference": "827a00811ef699e809a201ceafac0b2b246bf38a"
|
"reference": "10683b407c3b6087c64619ebc97a87e36ea62c92"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/827a00811ef699e809a201ceafac0b2b246bf38a",
|
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/10683b407c3b6087c64619ebc97a87e36ea62c92",
|
||||||
"reference": "827a00811ef699e809a201ceafac0b2b246bf38a",
|
"reference": "10683b407c3b6087c64619ebc97a87e36ea62c92",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -4374,6 +4409,11 @@
|
|||||||
"symfony/expression-language": "^3.4|^4.0|^5.0"
|
"symfony/expression-language": "^3.4|^4.0|^5.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\HttpFoundation\\": ""
|
"Symfony\\Component\\HttpFoundation\\": ""
|
||||||
@@ -4412,20 +4452,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T11:50:19+00:00"
|
"time": "2020-09-27T14:14:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-kernel",
|
"name": "symfony/http-kernel",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-kernel.git",
|
"url": "https://github.com/symfony/http-kernel.git",
|
||||||
"reference": "109b2a46e470a487ec8b0ffea4b0bb993aaf42ed"
|
"reference": "6544745997b06c7dcecf0d4a70f09e5de1db7ca8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/109b2a46e470a487ec8b0ffea4b0bb993aaf42ed",
|
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/6544745997b06c7dcecf0d4a70f09e5de1db7ca8",
|
||||||
"reference": "109b2a46e470a487ec8b0ffea4b0bb993aaf42ed",
|
"reference": "6544745997b06c7dcecf0d4a70f09e5de1db7ca8",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -4481,6 +4521,11 @@
|
|||||||
"symfony/dependency-injection": ""
|
"symfony/dependency-injection": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\HttpKernel\\": ""
|
"Symfony\\Component\\HttpKernel\\": ""
|
||||||
@@ -4519,20 +4564,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-28T05:50:56+00:00"
|
"time": "2020-10-04T07:48:13+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/mime",
|
"name": "symfony/mime",
|
||||||
"version": "v5.1.8",
|
"version": "v5.1.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/mime.git",
|
"url": "https://github.com/symfony/mime.git",
|
||||||
"reference": "f5485a92c24d4bcfc2f3fc648744fb398482ff1b"
|
"reference": "4404d6545125863561721514ad9388db2661eec5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/mime/zipball/f5485a92c24d4bcfc2f3fc648744fb398482ff1b",
|
"url": "https://api.github.com/repos/symfony/mime/zipball/4404d6545125863561721514ad9388db2661eec5",
|
||||||
"reference": "f5485a92c24d4bcfc2f3fc648744fb398482ff1b",
|
"reference": "4404d6545125863561721514ad9388db2661eec5",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -4555,6 +4600,11 @@
|
|||||||
"symfony/dependency-injection": "^4.4|^5.0"
|
"symfony/dependency-injection": "^4.4|^5.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "5.1-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Mime\\": ""
|
"Symfony\\Component\\Mime\\": ""
|
||||||
@@ -4597,7 +4647,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T12:01:57+00:00"
|
"time": "2020-09-02T16:23:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
@@ -5273,16 +5323,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/process.git",
|
"url": "https://github.com/symfony/process.git",
|
||||||
"reference": "2f4b049fb80ca5e9874615a2a85dc2a502090f05"
|
"reference": "9b887acc522935f77555ae8813495958c7771ba7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/process/zipball/2f4b049fb80ca5e9874615a2a85dc2a502090f05",
|
"url": "https://api.github.com/repos/symfony/process/zipball/9b887acc522935f77555ae8813495958c7771ba7",
|
||||||
"reference": "2f4b049fb80ca5e9874615a2a85dc2a502090f05",
|
"reference": "9b887acc522935f77555ae8813495958c7771ba7",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -5295,6 +5345,11 @@
|
|||||||
"php": ">=7.1.3"
|
"php": ">=7.1.3"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Process\\": ""
|
"Symfony\\Component\\Process\\": ""
|
||||||
@@ -5333,20 +5388,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T11:50:19+00:00"
|
"time": "2020-09-02T16:08:58+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/routing",
|
"name": "symfony/routing",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/routing.git",
|
"url": "https://github.com/symfony/routing.git",
|
||||||
"reference": "826794f2e9305fe73cba859c60d2a336851bd202"
|
"reference": "006b2d06672b8650998f328fc603eb6f3feb979f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/routing/zipball/826794f2e9305fe73cba859c60d2a336851bd202",
|
"url": "https://api.github.com/repos/symfony/routing/zipball/006b2d06672b8650998f328fc603eb6f3feb979f",
|
||||||
"reference": "826794f2e9305fe73cba859c60d2a336851bd202",
|
"reference": "006b2d06672b8650998f328fc603eb6f3feb979f",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -5380,6 +5435,11 @@
|
|||||||
"symfony/yaml": "For using the YAML loader"
|
"symfony/yaml": "For using the YAML loader"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Routing\\": ""
|
"Symfony\\Component\\Routing\\": ""
|
||||||
@@ -5424,7 +5484,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T11:50:19+00:00"
|
"time": "2020-10-01T16:25:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/service-contracts",
|
"name": "symfony/service-contracts",
|
||||||
@@ -5510,16 +5570,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation",
|
"name": "symfony/translation",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/translation.git",
|
"url": "https://github.com/symfony/translation.git",
|
||||||
"reference": "73095716af79f610f3b6338b911357393fdd10ab"
|
"reference": "8494fa1bbf9d77fe1e7d50ac8ccfb80a858a98bd"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/translation/zipball/73095716af79f610f3b6338b911357393fdd10ab",
|
"url": "https://api.github.com/repos/symfony/translation/zipball/8494fa1bbf9d77fe1e7d50ac8ccfb80a858a98bd",
|
||||||
"reference": "73095716af79f610f3b6338b911357393fdd10ab",
|
"reference": "8494fa1bbf9d77fe1e7d50ac8ccfb80a858a98bd",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -5559,6 +5619,11 @@
|
|||||||
"symfony/yaml": ""
|
"symfony/yaml": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Component\\Translation\\": ""
|
"Symfony\\Component\\Translation\\": ""
|
||||||
@@ -5597,7 +5662,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-24T11:50:19+00:00"
|
"time": "2020-10-02T07:34:48+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation-contracts",
|
"name": "symfony/translation-contracts",
|
||||||
@@ -5682,16 +5747,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-dumper",
|
"name": "symfony/var-dumper",
|
||||||
"version": "v4.4.16",
|
"version": "v4.4.15",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/var-dumper.git",
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
"reference": "3718e18b68d955348ad860e505991802c09f5f73"
|
"reference": "0dc22bdf9d1197467bb04d505355180b6f20bcca"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/3718e18b68d955348ad860e505991802c09f5f73",
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/0dc22bdf9d1197467bb04d505355180b6f20bcca",
|
||||||
"reference": "3718e18b68d955348ad860e505991802c09f5f73",
|
"reference": "0dc22bdf9d1197467bb04d505355180b6f20bcca",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -5725,6 +5790,11 @@
|
|||||||
"Resources/bin/var-dump-server"
|
"Resources/bin/var-dump-server"
|
||||||
],
|
],
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.4-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"Resources/functions/dump.php"
|
"Resources/functions/dump.php"
|
||||||
@@ -5770,7 +5840,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-10-26T20:47:51+00:00"
|
"time": "2020-09-18T08:35:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tijsverkoyen/css-to-inline-styles",
|
"name": "tijsverkoyen/css-to-inline-styles",
|
||||||
@@ -5905,99 +5975,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-14T19:04:52+00:00"
|
"time": "2020-07-14T19:04:52+00:00"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "xuanchen/coupon",
|
|
||||||
"version": "1.01",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/xuanchen120/coupon.git",
|
|
||||||
"reference": "96fb631176e5308a207d932e1f89b4d105d46165"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/xuanchen120/coupon/zipball/96fb631176e5308a207d932e1f89b4d105d46165",
|
|
||||||
"reference": "96fb631176e5308a207d932e1f89b4d105d46165",
|
|
||||||
"shasum": "",
|
|
||||||
"mirrors": [
|
|
||||||
{
|
|
||||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
|
||||||
"preferred": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"laravel/framework": "*",
|
|
||||||
"php": ">=7.1.3"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"laravel": {
|
|
||||||
"providers": [
|
|
||||||
"XuanChen\\Coupon\\ServiceProvider"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"XuanChen\\Coupon\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "玄尘",
|
|
||||||
"email": "122383162@qq.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "卡券核销相关",
|
|
||||||
"homepage": "https://github.com/xuanchen120/coupon.git",
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/xuanchen120/coupon/issues",
|
|
||||||
"source": "https://github.com/xuanchen120/coupon/tree/1.01"
|
|
||||||
},
|
|
||||||
"time": "2020-11-27T01:57:16+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "xuanchen/unionpay",
|
|
||||||
"version": "1.1.3",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://gitee.com/xdeepu/unionpay.git",
|
|
||||||
"reference": "519227eebfc06c20c2de954fdbf1b959bcdcbe9b"
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"laravel/framework": "*",
|
|
||||||
"php": ">=7.1.3"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"laravel": {
|
|
||||||
"providers": [
|
|
||||||
"XuanChen\\UnionPay\\ServiceProvider"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"XuanChen\\UnionPay\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "玄尘",
|
|
||||||
"email": "122383162@qq.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "第三方银联对接",
|
|
||||||
"time": "2020-11-11T07:24:20+00:00"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
@@ -6146,16 +6123,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "facade/ignition",
|
"name": "facade/ignition",
|
||||||
"version": "1.16.4",
|
"version": "1.16.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/facade/ignition.git",
|
"url": "https://github.com/facade/ignition.git",
|
||||||
"reference": "1da1705e7f6b24ed45af05461463228da424e14f"
|
"reference": "19674150bb46a4de0ba138c747f538fe7be11dbc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/facade/ignition/zipball/1da1705e7f6b24ed45af05461463228da424e14f",
|
"url": "https://api.github.com/repos/facade/ignition/zipball/19674150bb46a4de0ba138c747f538fe7be11dbc",
|
||||||
"reference": "1da1705e7f6b24ed45af05461463228da424e14f",
|
"reference": "19674150bb46a4de0ba138c747f538fe7be11dbc",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -6172,13 +6149,14 @@
|
|||||||
"filp/whoops": "^2.4",
|
"filp/whoops": "^2.4",
|
||||||
"illuminate/support": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6.0",
|
"illuminate/support": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6.0",
|
||||||
"monolog/monolog": "^1.12 || ^2.0",
|
"monolog/monolog": "^1.12 || ^2.0",
|
||||||
"php": "^7.1|^8.0",
|
"php": "^7.1",
|
||||||
"scrivo/highlight.php": "^9.15",
|
"scrivo/highlight.php": "^9.15",
|
||||||
"symfony/console": "^3.4 || ^4.0",
|
"symfony/console": "^3.4 || ^4.0",
|
||||||
"symfony/var-dumper": "^3.4 || ^4.0"
|
"symfony/var-dumper": "^3.4 || ^4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"mockery/mockery": "~1.3.3|^1.4.2",
|
"friendsofphp/php-cs-fixer": "^2.14",
|
||||||
|
"mockery/mockery": "^1.2",
|
||||||
"orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0"
|
"orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
@@ -6218,7 +6196,7 @@
|
|||||||
"laravel",
|
"laravel",
|
||||||
"page"
|
"page"
|
||||||
],
|
],
|
||||||
"time": "2020-10-30T13:40:01+00:00"
|
"time": "2020-07-13T15:54:05+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "facade/ignition-contracts",
|
"name": "facade/ignition-contracts",
|
||||||
@@ -6277,16 +6255,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "filp/whoops",
|
"name": "filp/whoops",
|
||||||
"version": "2.9.1",
|
"version": "2.9.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/filp/whoops.git",
|
"url": "https://github.com/filp/whoops.git",
|
||||||
"reference": "307fb34a5ab697461ec4c9db865b20ff2fd40771"
|
"reference": "2ec31f3adc54c71a59c5e3c2143d7a0e2f8899f8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/filp/whoops/zipball/307fb34a5ab697461ec4c9db865b20ff2fd40771",
|
"url": "https://api.github.com/repos/filp/whoops/zipball/2ec31f3adc54c71a59c5e3c2143d7a0e2f8899f8",
|
||||||
"reference": "307fb34a5ab697461ec4c9db865b20ff2fd40771",
|
"reference": "2ec31f3adc54c71a59c5e3c2143d7a0e2f8899f8",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -6340,7 +6318,7 @@
|
|||||||
"throwable",
|
"throwable",
|
||||||
"whoops"
|
"whoops"
|
||||||
],
|
],
|
||||||
"time": "2020-11-01T12:00:00+00:00"
|
"time": "2020-10-20T12:00:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fzaninotto/faker",
|
"name": "fzaninotto/faker",
|
||||||
@@ -6396,7 +6374,6 @@
|
|||||||
"faker",
|
"faker",
|
||||||
"fixtures"
|
"fixtures"
|
||||||
],
|
],
|
||||||
"abandoned": true,
|
|
||||||
"time": "2019-12-12T13:22:17+00:00"
|
"time": "2019-12-12T13:22:17+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -6588,16 +6565,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nunomaduro/collision",
|
"name": "nunomaduro/collision",
|
||||||
"version": "v3.1.0",
|
"version": "v3.0.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nunomaduro/collision.git",
|
"url": "https://github.com/nunomaduro/collision.git",
|
||||||
"reference": "88b58b5bd9bdcc54756480fb3ce87234696544ee"
|
"reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/88b58b5bd9bdcc54756480fb3ce87234696544ee",
|
"url": "https://api.github.com/repos/nunomaduro/collision/zipball/af42d339fe2742295a54f6fdd42aaa6f8c4aca68",
|
||||||
"reference": "88b58b5bd9bdcc54756480fb3ce87234696544ee",
|
"reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -6609,12 +6586,14 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"filp/whoops": "^2.1.4",
|
"filp/whoops": "^2.1.4",
|
||||||
"jakub-onderka/php-console-highlighter": "0.3.*|0.4.*",
|
"jakub-onderka/php-console-highlighter": "0.3.*|0.4.*",
|
||||||
"php": "^7.1 || ^8.0",
|
"php": "^7.1",
|
||||||
"symfony/console": "~2.8|~3.3|~4.0"
|
"symfony/console": "~2.8|~3.3|~4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"laravel/framework": "^6.0",
|
"laravel/framework": "5.8.*",
|
||||||
"phpunit/phpunit": "^8.0 || ^9.0"
|
"nunomaduro/larastan": "^0.3.0",
|
||||||
|
"phpstan/phpstan": "^0.11",
|
||||||
|
"phpunit/phpunit": "~8.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -6652,21 +6631,7 @@
|
|||||||
"php",
|
"php",
|
||||||
"symfony"
|
"symfony"
|
||||||
],
|
],
|
||||||
"funding": [
|
"time": "2019-03-07T21:35:13+00:00"
|
||||||
{
|
|
||||||
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L",
|
|
||||||
"type": "custom"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://github.com/nunomaduro",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "https://www.patreon.com/nunomaduro",
|
|
||||||
"type": "patreon"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"time": "2020-10-29T16:05:21+00:00"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "overtrue/laravel-query-logger",
|
"name": "overtrue/laravel-query-logger",
|
||||||
@@ -7458,16 +7423,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "scrivo/highlight.php",
|
"name": "scrivo/highlight.php",
|
||||||
"version": "v9.18.1.4",
|
"version": "v9.18.1.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/scrivo/highlight.php.git",
|
"url": "https://github.com/scrivo/highlight.php.git",
|
||||||
"reference": "ee8007a215a27cb9c078e0328fb5de901d74ef9b"
|
"reference": "6a1699707b099081f20a488ac1f92d682181018c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/scrivo/highlight.php/zipball/ee8007a215a27cb9c078e0328fb5de901d74ef9b",
|
"url": "https://api.github.com/repos/scrivo/highlight.php/zipball/6a1699707b099081f20a488ac1f92d682181018c",
|
||||||
"reference": "ee8007a215a27cb9c078e0328fb5de901d74ef9b",
|
"reference": "6a1699707b099081f20a488ac1f92d682181018c",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@@ -7535,7 +7500,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-11-01T04:06:53+00:00"
|
"time": "2020-10-16T07:43:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/code-unit-reverse-lookup",
|
"name": "sebastian/code-unit-reverse-lookup",
|
||||||
@@ -8341,5 +8306,5 @@
|
|||||||
"php": "^7.2"
|
"php": "^7.2"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.0.0"
|
"plugin-api-version": "1.1.0"
|
||||||
}
|
}
|
||||||
|
|||||||
339
config/unionpay.php
Normal file
339
config/unionpay.php
Normal file
@@ -0,0 +1,339 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
//分配的渠道号
|
||||||
|
'msg_sender' => '660134',
|
||||||
|
//打印在小票上,由活动标题、优惠金额、原始金额组合而成
|
||||||
|
'pos_receipt' => '本时生活,优惠生活',
|
||||||
|
//广告,用于打印在小票上
|
||||||
|
'pos_ad' => '',
|
||||||
|
//营销联盟广告,用于打印在小票上
|
||||||
|
'pos_mkt_ad' => '本时生活,优惠生活',
|
||||||
|
//银联渠道id
|
||||||
|
'agent_id' => '299',
|
||||||
|
//银联网点id
|
||||||
|
'outlet_id' => '2009300919918',
|
||||||
|
//用于银商与sp分润的金额(是佣金的一部分), 以分为单位
|
||||||
|
'serv_chg' => 0,
|
||||||
|
//佣金
|
||||||
|
'commission' => 0,
|
||||||
|
//证书
|
||||||
|
'check' => [
|
||||||
|
'self' => [
|
||||||
|
'private' => storage_path('cert/unionpay/self/private_rsa.pem'),
|
||||||
|
'public' => storage_path('cert/unionpay/self/public_rsa.pem'),
|
||||||
|
],
|
||||||
|
'unionpay' => [
|
||||||
|
'public' => storage_path('cert/unionpay/public_rsa.pem'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'type' => [
|
||||||
|
'002025' => '查询',
|
||||||
|
'002100' => '交易',
|
||||||
|
'002101' => '冲正',
|
||||||
|
'002102' => '撤销',
|
||||||
|
],
|
||||||
|
'log_type' => [
|
||||||
|
'002025' => 'query',
|
||||||
|
'002100' => 'freezecoupon',
|
||||||
|
'002101' => 'reversal',
|
||||||
|
'002102' => 'annul',
|
||||||
|
],
|
||||||
|
//需要校验的数据
|
||||||
|
'validator' => [
|
||||||
|
'002025' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_ver",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"req_serial_no",
|
||||||
|
"mkt_code",
|
||||||
|
"amount",
|
||||||
|
"avl_amt",
|
||||||
|
],
|
||||||
|
'002100' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",
|
||||||
|
"orig_req_serial_no",
|
||||||
|
"sett_date",
|
||||||
|
"txn_date",
|
||||||
|
"txn_time",
|
||||||
|
"orig_amt",
|
||||||
|
"discount_amt",
|
||||||
|
],
|
||||||
|
'002101' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",
|
||||||
|
"orig_req_serial_no",
|
||||||
|
],
|
||||||
|
'002102' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",
|
||||||
|
"orig_req_serial_no",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
//入库基础数据
|
||||||
|
'regular' => [
|
||||||
|
'002025' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
// "msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_ver",
|
||||||
|
"msg_sys_sn",//自己添加的基础数据
|
||||||
|
"req_serial_no",//自己添加的基础数据
|
||||||
|
"mkt_code",//自己添加的基础数据
|
||||||
|
],
|
||||||
|
'002100' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
// "msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",//自己添加的基础数据
|
||||||
|
"orig_req_serial_no",//自己添加的基础数据
|
||||||
|
"sett_date",//自己添加的基础数据
|
||||||
|
],
|
||||||
|
'002101' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
// "msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",//自己添加的基础数据
|
||||||
|
"orig_req_serial_no",//自己添加的基础数据
|
||||||
|
],
|
||||||
|
'002102' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
// "msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",//自己添加的基础数据
|
||||||
|
"orig_req_serial_no",//自己添加的基础数据
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'fields' => [
|
||||||
|
//聚合营销优惠查询接口
|
||||||
|
'002025' => [
|
||||||
|
'in' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "报文流水号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"req_serial_no" => "查询流水号",
|
||||||
|
"shop_no" => "门店号",
|
||||||
|
"term_no" => "受理终端号",
|
||||||
|
"service_code" => "受理方式",
|
||||||
|
"voucher_no" => "受理凭证号",
|
||||||
|
"mkt_code" => "聚合营销码",
|
||||||
|
"mkt_mode" => "聚合营销类型",
|
||||||
|
"embedded_mchnt_no" => "发起渠道商户号",
|
||||||
|
"currency_code" => "货币代码",
|
||||||
|
"amount" => "消费金额",
|
||||||
|
"avl_amt" => "可优惠金额",
|
||||||
|
"term_sp_chnl_no" => "终端指定SP渠道号",
|
||||||
|
"func_code" => "功能码",
|
||||||
|
"times" => "次数",
|
||||||
|
"pay_mode" => "支付方式",
|
||||||
|
//用户附加信息
|
||||||
|
"user_ext_info" => [
|
||||||
|
"mobile_no" => "手机号",
|
||||||
|
"user_code" => "用户号",
|
||||||
|
"user_code_type" => "用户号类型",
|
||||||
|
"dev_id" => "设备id",
|
||||||
|
],
|
||||||
|
"sign" => "签名域",
|
||||||
|
],
|
||||||
|
'out' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "报文流水号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_rsp_code" => "响应码",
|
||||||
|
"msg_rsp_desc" => "响应码描述",
|
||||||
|
"discount" => "折扣金额",
|
||||||
|
"actual_amt" => "折后应收金额",
|
||||||
|
"pos_display" => "POS显示",
|
||||||
|
"pos_receipt" => "POS小票",
|
||||||
|
"pos_ad" => "POS广告",
|
||||||
|
"pos_mkt_ad" => "Pos_营销联盟广告",
|
||||||
|
"sign" => "签名域",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
//销账交易接口
|
||||||
|
'002100' => [
|
||||||
|
'in' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"shop_no" => "门店号",
|
||||||
|
"term_no" => "终端号",
|
||||||
|
"req_serial_no" => "销券流水号",
|
||||||
|
"orig_req_serial_no" => "原查询流水号",
|
||||||
|
"enc_card_no" => "加密卡号",
|
||||||
|
"part_card_no" => "部分卡号",
|
||||||
|
"acq_term_sn" => "受理终端流水号",
|
||||||
|
"refer_no" => "检索参考号",
|
||||||
|
"sett_date" => "清算日期",
|
||||||
|
"txn_date" => "交易日期",
|
||||||
|
"txn_time" => "交易时间",
|
||||||
|
"orig_amt" => "原始金额",
|
||||||
|
"discount_amt" => "优惠的金额",
|
||||||
|
"pay_amt" => "支付金额",
|
||||||
|
"pay_mode" => "支付方式",
|
||||||
|
"order_no" => "订单号",
|
||||||
|
"trans_crrltn_no" => "交易关联流水号",
|
||||||
|
"equity_no" => "权益号",
|
||||||
|
"card_no" => "全卡号",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
'out' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"msg_rsp_code" => "响应码",
|
||||||
|
"msg_rsp_desc" => "响应码描述",
|
||||||
|
"orig_amt" => "原始金额",
|
||||||
|
"discount_amt" => "折扣金额",
|
||||||
|
"pay_amt" => "支付金额",
|
||||||
|
"serv_chg" => "服务费",
|
||||||
|
"commission" => "佣金",
|
||||||
|
"ad" => "广告",
|
||||||
|
"pos_receipt" => "POS优惠",
|
||||||
|
"coupon_no" => "凭证号",
|
||||||
|
"coupon_type" => "凭证类型",
|
||||||
|
"sp_biz_code" => "SP统计码",
|
||||||
|
"charge_code" => "计费码",
|
||||||
|
"pos_event_title" => "SP活动主题",
|
||||||
|
"sp_contact" => "SP联系电话",
|
||||||
|
"sp_name" => "SP名称",
|
||||||
|
"event_no" => "活动号",
|
||||||
|
"td_code" => "二维码",
|
||||||
|
"memo" => "附言",
|
||||||
|
"mkt_sp_chnl_no" => "营销渠道号",
|
||||||
|
"point_amt" => "积分抵扣金额",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
//销账冲正通知接口
|
||||||
|
'002101' => [
|
||||||
|
'in' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"shop_no" => "门店号",
|
||||||
|
"term_no" => "终端号",
|
||||||
|
"req_serial_no" => "冲正流水号",
|
||||||
|
"orig_req_serial_no" => "原始销账流水号",
|
||||||
|
"trans_crrltn_no" => "交易关联流水号",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
'out' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"msg_rsp_code" => "响应码",
|
||||||
|
"msg_rsp_desc" => "响应码描述",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'002102' => [
|
||||||
|
'in' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"shop_no" => "门店号",
|
||||||
|
"term_no" => "终端号",
|
||||||
|
"req_serial_no" => "撤销流水号",
|
||||||
|
"orig_req_serial_no" => "原始销账流水号",
|
||||||
|
"trans_crrltn_no" => "交易关联流水号",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
'out' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"msg_rsp_code" => "响应码",
|
||||||
|
"msg_rsp_desc" => "响应码描述",
|
||||||
|
"ad" => "广告",
|
||||||
|
"td_code" => "二维码",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
];
|
||||||
8
packages/coupon/README.md
Normal file
8
packages/coupon/README.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# coupon 优惠券接口
|
||||||
|
## 接口地址:http://pac.ysd-bs.com/api/V1
|
||||||
|
|
||||||
|
|
||||||
|
### 发券地址:http://pac.ysd-bs.com/api/V1/user/grant
|
||||||
|
### 查询接口:http://pa.ysd-bs.com/api/V1/user/query
|
||||||
|
### 核销地址:http://pa.ysd-bs.com/api/V1/user/freezecoupon
|
||||||
|
### 作废地址:http://pa.ysd-bs.com/api/V1/user/destroy
|
||||||
28
packages/coupon/composer.json
Normal file
28
packages/coupon/composer.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "xuanchen/coupon",
|
||||||
|
"description": "卡券相关",
|
||||||
|
"license": "MIT",
|
||||||
|
"homepage": "https://gitee.com/xdeepu/coupon",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "玄尘",
|
||||||
|
"email": "122383162@qq.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.3",
|
||||||
|
"laravel/framework": "*"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"XuanChen\\Coupon": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"XuanChen\\Coupon\\ServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
15
packages/coupon/config/xuanchen_coupon.php
Normal file
15
packages/coupon/config/xuanchen_coupon.php
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'coupon_model' => \App\Models\Coupon::class,
|
||||||
|
'rules' => [
|
||||||
|
'pingan' => [
|
||||||
|
'pattern' => '/^\d{12}$/',
|
||||||
|
'model' => \XuanChen\Coupon\Action\PinganAction::class,
|
||||||
|
],
|
||||||
|
'ysd' => [
|
||||||
|
'pattern' => '/^YSD/',
|
||||||
|
'model' => \XuanChen\Coupon\Action\YsdAction::class,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
197
packages/coupon/src/Action/Init.php
Normal file
197
packages/coupon/src/Action/Init.php
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action;
|
||||||
|
|
||||||
|
use App\Models\Coupon;
|
||||||
|
use App\Models\Log as LogModel;
|
||||||
|
|
||||||
|
class Init
|
||||||
|
{
|
||||||
|
|
||||||
|
//渠道
|
||||||
|
public $user;
|
||||||
|
|
||||||
|
//卡券编号
|
||||||
|
public $redemptionCode;
|
||||||
|
|
||||||
|
//订单金额
|
||||||
|
public $total;
|
||||||
|
|
||||||
|
//网点编号
|
||||||
|
public $outletId;
|
||||||
|
|
||||||
|
//活动id
|
||||||
|
public $activityId;
|
||||||
|
|
||||||
|
//手机号
|
||||||
|
public $mobile;
|
||||||
|
|
||||||
|
//核销的卡券 创建的核销记录
|
||||||
|
public $coupon;
|
||||||
|
|
||||||
|
//查询返回卡券信息
|
||||||
|
public $query_coupon;
|
||||||
|
|
||||||
|
//订单id
|
||||||
|
public $orderid;
|
||||||
|
|
||||||
|
//查询到的卡券规则和商品id 只有平安券才有
|
||||||
|
public $queryData;
|
||||||
|
|
||||||
|
//设置渠道
|
||||||
|
public function setUser($user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置渠道
|
||||||
|
public function setOrderId($orderid)
|
||||||
|
{
|
||||||
|
$this->orderid = $orderid;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置核销码
|
||||||
|
public function setCode($redemptionCode)
|
||||||
|
{
|
||||||
|
$this->redemptionCode = $redemptionCode;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置订单总额
|
||||||
|
public function setTotal($total)
|
||||||
|
{
|
||||||
|
$this->total = $total;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置网点id
|
||||||
|
public function setOutletId($outletId)
|
||||||
|
{
|
||||||
|
$this->outletId = $outletId;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置活动id
|
||||||
|
public function setActivityId($activityId)
|
||||||
|
{
|
||||||
|
$this->activityId = $activityId;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置手机号
|
||||||
|
public function setMobile($mobile)
|
||||||
|
{
|
||||||
|
$this->mobile = $mobile;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 插入日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/30 10:29
|
||||||
|
* @param $url
|
||||||
|
* @param $method
|
||||||
|
* @param $params
|
||||||
|
* @param string $type
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function createLog($url, $method, $params, $type = 'pingan')
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'path' => $url,
|
||||||
|
'method' => $method,
|
||||||
|
'type' => $type,
|
||||||
|
'in_source' => $params,
|
||||||
|
];
|
||||||
|
|
||||||
|
$info = LogModel::create($data);
|
||||||
|
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 更新日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/30 10:29
|
||||||
|
* @param $log
|
||||||
|
* @param $params
|
||||||
|
*/
|
||||||
|
public static function updateLog($log, $params)
|
||||||
|
{
|
||||||
|
$log->out_source = $params;
|
||||||
|
$log->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
//统一门店 相同金额 3分钟之内看作是一笔订单
|
||||||
|
public function CheckCount()
|
||||||
|
{
|
||||||
|
if ($this->queryData) {
|
||||||
|
if (isset($this->queryData['thirdPartyGoodsId']) && $this->queryData['thirdPartyGoodsId'] == 'YSD-full0-0') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->orderid) {
|
||||||
|
$check_count = Coupon::where('orderid', $this->orderid)
|
||||||
|
->where('outletId', $this->outletId)
|
||||||
|
->where('total', $this->total)
|
||||||
|
->where('status', 2)
|
||||||
|
->where('created_at', '>=', now()->subMinutes(3)->format('Y-m-d H:i:s'))
|
||||||
|
->count();
|
||||||
|
} else {
|
||||||
|
$check_count = Coupon::where('outletId', $this->outletId)
|
||||||
|
->where('total', $this->total)
|
||||||
|
->where('status', 2)
|
||||||
|
->where('created_at', '>=', now()->subMinutes(3)->format('Y-m-d H:i:s'))
|
||||||
|
->count();
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = floor($this->total / 100);
|
||||||
|
|
||||||
|
if ($check_count > 0) {
|
||||||
|
// if ($this->total < 100) {
|
||||||
|
// return '核销失败,订单金额少于100只能核销一张优惠券。';
|
||||||
|
// }
|
||||||
|
if ($check_count >= $count) {
|
||||||
|
return "核销失败,此订单您只能使用 {$count} 张优惠券";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 校验是否已经核销过
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/8/8 13:43
|
||||||
|
*/
|
||||||
|
public function HasCheck()
|
||||||
|
{
|
||||||
|
$info = Coupon::where('redemptionCode', $this->redemptionCode)
|
||||||
|
->where('outletId', $this->outletId)
|
||||||
|
->where('total', $this->total)
|
||||||
|
->where('status', 2)
|
||||||
|
->first();
|
||||||
|
if ($info) {
|
||||||
|
return '核销失败,此优惠券已被使用';
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
61
packages/coupon/src/Action/PinganAction.php
Normal file
61
packages/coupon/src/Action/PinganAction.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action;
|
||||||
|
|
||||||
|
use XuanChen\Coupon\Action\pingan\Query;
|
||||||
|
use XuanChen\Coupon\Action\pingan\Verification;
|
||||||
|
use XuanChen\Coupon\Contracts\CouponContracts;
|
||||||
|
|
||||||
|
class PinganAction extends Init implements CouponContracts
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 核销执行入口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 14:49
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
return (new Verification)->setCode($this->redemptionCode)
|
||||||
|
->setUser($this->user)
|
||||||
|
->setOutletId($this->outletId)
|
||||||
|
->setTotal($this->total)
|
||||||
|
->setOrderId($this->orderid)
|
||||||
|
->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 查询卡券详情
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 15:15
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function detail()
|
||||||
|
{
|
||||||
|
$info = (new Query)->setOutletId($this->outletId)
|
||||||
|
->setCode($this->redemptionCode)
|
||||||
|
->start();
|
||||||
|
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
//发券
|
||||||
|
public function grant()
|
||||||
|
{
|
||||||
|
return '没这个接口';
|
||||||
|
}
|
||||||
|
|
||||||
|
//作废
|
||||||
|
public function destroy()
|
||||||
|
{
|
||||||
|
return '没这个接口';
|
||||||
|
}
|
||||||
|
|
||||||
|
//撤销
|
||||||
|
public function reversal()
|
||||||
|
{
|
||||||
|
return '没这个接口';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
105
packages/coupon/src/Action/YsdAction.php
Normal file
105
packages/coupon/src/Action/YsdAction.php
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action;
|
||||||
|
|
||||||
|
use XuanChen\Coupon\Action\ysd\YsdDestroy;
|
||||||
|
use XuanChen\Coupon\Action\ysd\YsdGrant;
|
||||||
|
use XuanChen\Coupon\Action\ysd\YsdQuery;
|
||||||
|
use XuanChen\Coupon\Action\ysd\YsdReversal;
|
||||||
|
use XuanChen\Coupon\Action\ysd\YsdVerification;
|
||||||
|
use XuanChen\Coupon\Contracts\CouponContracts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class YsdAction 自有卡券核销
|
||||||
|
* @Author : 玄尘
|
||||||
|
* @Date : 2020/7/21 9:41
|
||||||
|
* @package XuanChen\Coupon\Action
|
||||||
|
*/
|
||||||
|
class YsdAction extends Init implements CouponContracts
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 发券
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/7/21 10:08
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function grant()
|
||||||
|
{
|
||||||
|
return (new YsdGrant)->setActivityId($this->activityId)
|
||||||
|
->setOutletId($this->outletId)
|
||||||
|
->setMobile($this->mobile)
|
||||||
|
->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 查询卡券详情
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 15:15
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function detail()
|
||||||
|
{
|
||||||
|
$query_coupon = (new YsdQuery)->setOutletId($this->outletId)
|
||||||
|
->setCode($this->redemptionCode)
|
||||||
|
->start();
|
||||||
|
|
||||||
|
if (!is_string($query_coupon)) {
|
||||||
|
return [
|
||||||
|
'name' => $query_coupon->activity->title,
|
||||||
|
'code' => $query_coupon->code,
|
||||||
|
'full' => $query_coupon->full,
|
||||||
|
'price' => $query_coupon->price,
|
||||||
|
'status' => $query_coupon->status,
|
||||||
|
'used_at' => (string)$query_coupon->used_at,
|
||||||
|
'startTime' => (string)$query_coupon->start_at,
|
||||||
|
'endTime' => (string)$query_coupon->end_at,
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $query_coupon;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 作废
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/7/21 11:32
|
||||||
|
*/
|
||||||
|
public function destroy()
|
||||||
|
{
|
||||||
|
return $res = (new YsdDestroy)->setCode($this->redemptionCode)
|
||||||
|
->setOutletId($this->outletId)
|
||||||
|
->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 核销执行入口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 14:49
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
return $res = (new YsdVerification)->setCode($this->redemptionCode)
|
||||||
|
->setUser($this->user)
|
||||||
|
->setOutletId($this->outletId)
|
||||||
|
->setTotal($this->total)
|
||||||
|
->setOrderId($this->orderid)
|
||||||
|
->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 撤销
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/10/12 11:55
|
||||||
|
* @return array|string
|
||||||
|
*/
|
||||||
|
public function reversal()
|
||||||
|
{
|
||||||
|
return $res = (new YsdReversal)->setCode($this->redemptionCode)
|
||||||
|
->setOutletId($this->outletId)
|
||||||
|
->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
205
packages/coupon/src/Action/pingan/PingAnInit.php
Normal file
205
packages/coupon/src/Action/pingan/PingAnInit.php
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action\pingan;
|
||||||
|
|
||||||
|
use App\Models\PinganToken;
|
||||||
|
use GuzzleHttp\Client;
|
||||||
|
use GuzzleHttp\Exception\RequestException;
|
||||||
|
use XuanChen\Coupon\Action\Init;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 超市购物券
|
||||||
|
*/
|
||||||
|
class PingAnInit extends Init
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $this_type;
|
||||||
|
|
||||||
|
protected $baseUri;
|
||||||
|
|
||||||
|
protected $tokenUri;
|
||||||
|
|
||||||
|
protected $client_id;
|
||||||
|
|
||||||
|
protected $grant_type;
|
||||||
|
|
||||||
|
protected $client_secret;
|
||||||
|
|
||||||
|
protected $access_token;
|
||||||
|
|
||||||
|
protected $userName;
|
||||||
|
|
||||||
|
protected $error;
|
||||||
|
|
||||||
|
protected $aes_code; //aes 密钥
|
||||||
|
|
||||||
|
protected $log;//日志
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->this_type = config('pingan.this_type');
|
||||||
|
$pingan = config('pingan.' . $this->this_type);
|
||||||
|
|
||||||
|
$this->baseUri = $pingan['Uri'];
|
||||||
|
$this->tokenUri = $pingan['tokenUri'];
|
||||||
|
$this->client_id = $pingan['client_id'];
|
||||||
|
$this->grant_type = $pingan['grant_type'];
|
||||||
|
$this->userName = $pingan['userName'];
|
||||||
|
$this->client_secret = $pingan['client_secret'];
|
||||||
|
$this->aes_code = $pingan['AES_CODE'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取access_token
|
||||||
|
* @return void [type] [description]
|
||||||
|
*/
|
||||||
|
public function getToken()
|
||||||
|
{
|
||||||
|
//从数据库里找token
|
||||||
|
$token = PinganToken::where('type', $this->this_type)->orderBy('id', 'desc')->first();
|
||||||
|
|
||||||
|
if ($token) {
|
||||||
|
$access_token = $token->access_token;
|
||||||
|
$expires_in = $token->expires_in;
|
||||||
|
$get_token_time = $token->get_token_time;
|
||||||
|
$diffMinutes = $get_token_time->diffInMinutes(now(), false);
|
||||||
|
if ($diffMinutes < $expires_in) {
|
||||||
|
$this->access_token = $access_token;
|
||||||
|
} else {
|
||||||
|
$this->getAjaxToken();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$this->getAjaxToken();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取毫秒级别的时间戳
|
||||||
|
*/
|
||||||
|
public function getMsecTime()
|
||||||
|
{
|
||||||
|
[$msec, $sec] = explode(' ', microtime());
|
||||||
|
$msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
|
||||||
|
$msectime = explode('.', $msectime);
|
||||||
|
|
||||||
|
return $msectime[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求平台 access_token
|
||||||
|
* @return void [type] [description]
|
||||||
|
*/
|
||||||
|
public function getAjaxToken()
|
||||||
|
{
|
||||||
|
$params = [
|
||||||
|
'client_id' => $this->client_id,
|
||||||
|
'grant_type' => $this->grant_type,
|
||||||
|
'client_secret' => $this->client_secret,
|
||||||
|
];
|
||||||
|
|
||||||
|
try {
|
||||||
|
$log = $this->createLog($this->tokenUri, 'POST', $params, 'pingan');
|
||||||
|
|
||||||
|
$client = new Client();
|
||||||
|
$response = $client->request('POST', $this->tokenUri, [
|
||||||
|
'form_params' => $params,
|
||||||
|
]);
|
||||||
|
$body = $response->getBody();
|
||||||
|
$content = $body->getContents();
|
||||||
|
$result = json_decode($content, true);
|
||||||
|
|
||||||
|
$this->updateLog($log, $result); //更新日志
|
||||||
|
|
||||||
|
if ($result['ret'] > 0) {
|
||||||
|
$this->error = $result['msg'];
|
||||||
|
} else {
|
||||||
|
$data = $result['data'];
|
||||||
|
PinganToken::create([
|
||||||
|
'type' => $this->this_type,
|
||||||
|
'access_token' => $data['access_token'],
|
||||||
|
'expires_in' => $data['expires_in'],
|
||||||
|
'get_token_time' => now(),
|
||||||
|
]);
|
||||||
|
$this->access_token = $data['access_token'];
|
||||||
|
$this->error = '';
|
||||||
|
}
|
||||||
|
} catch (RequestException $e) {
|
||||||
|
$this->error = $e->getMessage();
|
||||||
|
$this->updateLog($log, [$this->error]); //更新日志
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用获取数据接口
|
||||||
|
* @param [type] $url 请求地址
|
||||||
|
* @param array $query 传递参数
|
||||||
|
* @param array $json 需要传的json数据
|
||||||
|
* @param string $method 方式
|
||||||
|
* @return array|mixed [type] [description]
|
||||||
|
*/
|
||||||
|
public function getPingAnData($url, $query = [], $json = [], $method = 'POST')
|
||||||
|
{
|
||||||
|
$this->getToken();
|
||||||
|
|
||||||
|
if ($this->error) {
|
||||||
|
return $this->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
$postData = [
|
||||||
|
'query' => array_merge([
|
||||||
|
'access_token' => $this->access_token,
|
||||||
|
'request_id' => $this->getMsecTime(),
|
||||||
|
'userName' => $this->userName,
|
||||||
|
], $query),
|
||||||
|
'json' => $json,
|
||||||
|
'headers' => [
|
||||||
|
'Content-Type' => 'application/json;charset=utf-8',
|
||||||
|
'accept' => 'application/json;charset=utf-8',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$log = $this->createLog($url, $method, $postData, 'pingan'); //日志
|
||||||
|
|
||||||
|
try {
|
||||||
|
$client = new Client();
|
||||||
|
$response = $client->request($method, $url, $postData);
|
||||||
|
$body = $response->getBody();
|
||||||
|
$content = $body->getContents();
|
||||||
|
$result = json_decode($content, true);
|
||||||
|
|
||||||
|
if ($result['ret'] > 0) {
|
||||||
|
$retData = $result['msg'];
|
||||||
|
} else {
|
||||||
|
$retData = $result['data'];
|
||||||
|
}
|
||||||
|
$this->updateLog($log, $retData);//更新日志
|
||||||
|
|
||||||
|
return $retData;
|
||||||
|
} catch (RequestException $e) {
|
||||||
|
$this->updateLog($log, [$e->getMessage()]);//更新日志
|
||||||
|
|
||||||
|
return ['ret' => '99999', $e->getMessage()];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//加密
|
||||||
|
public function encrypt($str)
|
||||||
|
{
|
||||||
|
if (is_array($str)) {
|
||||||
|
$str = json_encode($str);
|
||||||
|
}
|
||||||
|
$data = openssl_encrypt($str, 'aes-128-ecb', $this->aes_code, OPENSSL_RAW_DATA);
|
||||||
|
|
||||||
|
return base64_encode($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
//解密
|
||||||
|
public function decrypt($str)
|
||||||
|
{
|
||||||
|
$encrypted = base64_decode($str);
|
||||||
|
|
||||||
|
return openssl_decrypt($encrypted, 'aes-128-ecb', $this->aes_code, OPENSSL_RAW_DATA);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
45
packages/coupon/src/Action/pingan/Query.php
Normal file
45
packages/coupon/src/Action/pingan/Query.php
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action\pingan;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
|
||||||
|
class Query extends PingAnInit
|
||||||
|
{
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
|
||||||
|
try {
|
||||||
|
//查询网点是否存在
|
||||||
|
$outlet = User::where('outlet_id', $this->outletId)->first();
|
||||||
|
|
||||||
|
if (!$outlet) {
|
||||||
|
throw new \Exception('网点编号错误,未查询到网点信息');
|
||||||
|
}
|
||||||
|
|
||||||
|
$url = $this->baseUri . 'partner/v2/coupondetail';
|
||||||
|
$params = [
|
||||||
|
'redemptionCode' => $this->redemptionCode,
|
||||||
|
'outletNo' => $outlet->PaOutletId,
|
||||||
|
'thirdOutletNo' => $outlet->outlet_id,
|
||||||
|
];
|
||||||
|
|
||||||
|
$res = $this->getPingAnData($url, $params);
|
||||||
|
|
||||||
|
if (!is_array($res)) {
|
||||||
|
throw new \Exception($res);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($res['code'] != 200) {
|
||||||
|
throw new \Exception($res['message']);
|
||||||
|
}
|
||||||
|
|
||||||
|
return collect($res['data']);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
298
packages/coupon/src/Action/pingan/Verification.php
Normal file
298
packages/coupon/src/Action/pingan/Verification.php
Normal file
@@ -0,0 +1,298 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action\pingan;
|
||||||
|
|
||||||
|
use App\Models\Coupon;
|
||||||
|
use App\Models\User;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
class Verification extends PingAnInit
|
||||||
|
{
|
||||||
|
|
||||||
|
public $ticket;
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
//检查是否已经核销过
|
||||||
|
$res = $this->HasCheck();
|
||||||
|
if ($res !== false) {
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询卡券信息
|
||||||
|
$this->query_coupon = (new Query)->setOutletId($this->outletId)
|
||||||
|
->setCode($this->redemptionCode)
|
||||||
|
->start();
|
||||||
|
if (is_string($this->query_coupon)) {
|
||||||
|
return $this->query_coupon;
|
||||||
|
}
|
||||||
|
|
||||||
|
//校验卡券
|
||||||
|
$ticket = $this->checkCoupon();
|
||||||
|
if (!is_array($ticket)) {
|
||||||
|
return $ticket;
|
||||||
|
}
|
||||||
|
|
||||||
|
//检查可核销次数
|
||||||
|
$ret = $this->CheckCount();
|
||||||
|
if ($ret !== true) {
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
//增加核销记录
|
||||||
|
$coupon = $this->AddCoupon();
|
||||||
|
if (is_string($coupon)) {
|
||||||
|
return $coupon;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$params = [
|
||||||
|
'couponNo' => $coupon->redemptionCode,
|
||||||
|
'partnerOrderId' => date('ymdHis') . sprintf("%0" . strlen(999999) . "d", mt_rand(0, 999999)),
|
||||||
|
'outletId' => $coupon->PaOutletId,
|
||||||
|
'productId' => $coupon->productId,
|
||||||
|
'timestamp' => $this->getMsecTime(),
|
||||||
|
];
|
||||||
|
|
||||||
|
$url = $this->baseUri . 'partner/redemption';
|
||||||
|
$str = $this->encrypt($params);
|
||||||
|
$res = $this->getPingAnData($url, [], ['data' => $str]);
|
||||||
|
|
||||||
|
if (!is_array($res)) {
|
||||||
|
$coupon->remark = $res;
|
||||||
|
$coupon->status = 3;
|
||||||
|
$coupon->save();
|
||||||
|
throw new \Exception($res);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($res['code'] != 200) {
|
||||||
|
$coupon->remark = $res['code'] . '--' . $res['message'];
|
||||||
|
$coupon->status = 3;
|
||||||
|
$coupon->save();
|
||||||
|
throw new \Exception($res['message']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $res['data'];
|
||||||
|
|
||||||
|
$coupon->remark = $data['message'];
|
||||||
|
$coupon->status = ($data['status'] == 1) ? 2 : 3;
|
||||||
|
$coupon->save();
|
||||||
|
|
||||||
|
//返回的数据
|
||||||
|
$resdata = [
|
||||||
|
'price' => $coupon->price,
|
||||||
|
'name' => $coupon->couponName,
|
||||||
|
'total' => $coupon->total,
|
||||||
|
];
|
||||||
|
|
||||||
|
//核销成功 执行分润
|
||||||
|
$coupon->profit();
|
||||||
|
|
||||||
|
return $resdata;
|
||||||
|
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$coupon->status = 3;
|
||||||
|
$coupon->remark = '核销失败 ' . $e->getMessage();
|
||||||
|
$coupon->save();
|
||||||
|
|
||||||
|
return $coupon->remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 如可核销记录
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/7/21 15:03
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function AddCoupon()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$couponData = [
|
||||||
|
'user_id' => $this->user->id,
|
||||||
|
'type' => Coupon::TYPE_PINGAN,
|
||||||
|
'outletId' => $this->outletId,
|
||||||
|
'orderid' => $this->orderid,
|
||||||
|
'PaOutletId' => $this->queryData['PaOutletId'],
|
||||||
|
'redemptionCode' => $this->redemptionCode,
|
||||||
|
'productId' => $this->queryData['productId'],
|
||||||
|
'thirdPartyGoodsId' => $this->queryData['thirdPartyGoodsId'],
|
||||||
|
'couponName' => $this->query_coupon['couponName'],
|
||||||
|
'price' => $this->ticket['price'],
|
||||||
|
'total' => $this->total,
|
||||||
|
'profit' => $this->ticket['profit'],
|
||||||
|
'status' => 0,
|
||||||
|
'startTime' => $this->query_coupon['startTime'],
|
||||||
|
'endTime' => $this->query_coupon['endTime'],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $coupon = Coupon::create($couponData);
|
||||||
|
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 检查卡券信息
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 16:40
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function checkCoupon()
|
||||||
|
{
|
||||||
|
|
||||||
|
//检查卡券是否已被核销
|
||||||
|
if ($this->query_coupon['status'] > 0) {
|
||||||
|
if (isset(config('pingan.coupon_status')[$this->query_coupon['status']])) {
|
||||||
|
return '核销失败,平安券' . config('pingan.coupon_status')[$this->query_coupon['status']];
|
||||||
|
}
|
||||||
|
|
||||||
|
return '核销失败,平安券不可用。';
|
||||||
|
}
|
||||||
|
|
||||||
|
$startTime = Carbon::parse($this->query_coupon['startTime']);
|
||||||
|
$endTime = Carbon::parse($this->query_coupon['endTime']);
|
||||||
|
$now = now();
|
||||||
|
|
||||||
|
if ($startTime->gt($now)) {
|
||||||
|
return '核销失败,平安券未开始使用。';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($now->gt($endTime)) {
|
||||||
|
return '核销失败,平安券已过期。';
|
||||||
|
}
|
||||||
|
|
||||||
|
//查找适配的商品id 和 网点id
|
||||||
|
$pinganData = $this->getPinganProduct();
|
||||||
|
|
||||||
|
if (is_string($pinganData)) {
|
||||||
|
return $pinganData;
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取相关优惠信息
|
||||||
|
return $this->checkCode();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验平安券编号
|
||||||
|
* @return array|string [type] [description]
|
||||||
|
*/
|
||||||
|
public function checkCode()
|
||||||
|
{
|
||||||
|
$code = $this->user->code->where('code', $this->queryData['thirdPartyGoodsId'])->first();
|
||||||
|
if (!$code) {
|
||||||
|
return "核销失败,未找到此项平安券规则,请联系管理人员检查渠道配置。";
|
||||||
|
}
|
||||||
|
|
||||||
|
$ticket = explode('-', $this->queryData['thirdPartyGoodsId']);
|
||||||
|
|
||||||
|
if (!is_array($ticket) || count($ticket) != 3) {
|
||||||
|
return "核销失败,平安券规则格式不正确。";
|
||||||
|
}
|
||||||
|
|
||||||
|
$full = $ticket[1]; //full100
|
||||||
|
$price = $ticket[2];
|
||||||
|
preg_match('/\d+/', $full, $result);
|
||||||
|
|
||||||
|
if (empty($result) || !is_array($result)) {
|
||||||
|
return "核销失败,平安券规则格式不正确。";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_numeric($this->total)) {
|
||||||
|
return "核销失败,订单金额必须是数字";
|
||||||
|
}
|
||||||
|
if ($result[0] > $this->total) {
|
||||||
|
return '核销失败,订单金额不足,平安券不可使用。';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->ticket = [
|
||||||
|
'total' => $result[0],
|
||||||
|
'price' => $price,
|
||||||
|
'profit' => $code->profit,
|
||||||
|
];
|
||||||
|
|
||||||
|
return $this->ticket;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找平安商品id
|
||||||
|
* @author 玄尘 2020-04-04
|
||||||
|
* @return array|string [type] [description]
|
||||||
|
*/
|
||||||
|
public function getPinganProduct()
|
||||||
|
{
|
||||||
|
//查询网点是否存在
|
||||||
|
$outlet = User::where('outlet_id', $this->outletId)->first();
|
||||||
|
|
||||||
|
if (!$outlet) {
|
||||||
|
return '核销失败,网点编号错误,未查询到网点信息';
|
||||||
|
}
|
||||||
|
|
||||||
|
$PaOutletId = $outlet->PaOutletId;
|
||||||
|
$outlet_id = $outlet->outlet_id;
|
||||||
|
$profitOfferItemVersion = $this->query_coupon['profitOfferItemVersion'];
|
||||||
|
|
||||||
|
if (!$PaOutletId && $profitOfferItemVersion != 1) {
|
||||||
|
return '核销失败,参数错误,渠道信息缺少平安网点id';
|
||||||
|
}
|
||||||
|
|
||||||
|
$productItemList = $this->query_coupon['productItemList'];
|
||||||
|
|
||||||
|
if (!is_array($productItemList) || !is_array($productItemList[0])) {
|
||||||
|
return '核销失败,平安券数据有误,可能是未配置网点。';
|
||||||
|
}
|
||||||
|
|
||||||
|
//循环查找
|
||||||
|
$first = '';
|
||||||
|
foreach ($productItemList as $key => $item) {
|
||||||
|
$productId = $item['productId'];
|
||||||
|
$thirdPartyGoodsId = $item['thirdPartyGoodsId'];
|
||||||
|
$outletList = $item['outletList'];
|
||||||
|
if (!is_array($outletList) || !is_array($outletList[0])) {
|
||||||
|
return '核销失败,网点信息有误!请检查平安券配置信息。';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$outletList = collect($outletList);
|
||||||
|
//判断是新版还是旧版
|
||||||
|
if ($profitOfferItemVersion) {
|
||||||
|
//新版通过第三方查询
|
||||||
|
$first = $outletList->firstWhere('thirdOutletNo', $outlet_id);
|
||||||
|
|
||||||
|
if ($first) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//旧版通过平安网点查询
|
||||||
|
$first = $outletList->firstWhere('outletNo', $PaOutletId);
|
||||||
|
if ($first) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$first) {
|
||||||
|
return '核销失败,未找到可用网点信息。';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$thirdPartyGoodsId) {
|
||||||
|
return '核销失败,平安券编号规则有误。';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$productId) {
|
||||||
|
return '核销失败,未查询到平安券商品id。';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->queryData = [
|
||||||
|
'thirdPartyGoodsId' => $thirdPartyGoodsId,
|
||||||
|
'productId' => $productId,
|
||||||
|
'PaOutletId' => $first['outletNo'],
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
61
packages/coupon/src/Action/ysd/YsdDestroy.php
Normal file
61
packages/coupon/src/Action/ysd/YsdDestroy.php
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action\ysd;
|
||||||
|
|
||||||
|
use App\Events\ConponCallback;
|
||||||
|
use App\Models\ActivityCoupon;
|
||||||
|
use App\Models\User;
|
||||||
|
use XuanChen\Coupon\Action\Init;
|
||||||
|
|
||||||
|
class YsdDestroy extends Init
|
||||||
|
{
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
if ($this->redemptionCode) {
|
||||||
|
try {
|
||||||
|
if (!$this->outletId) {
|
||||||
|
throw new \Exception('缺少网点id');
|
||||||
|
}
|
||||||
|
|
||||||
|
$info = ActivityCoupon::where('code', $this->redemptionCode)->first();
|
||||||
|
|
||||||
|
if (!$info) {
|
||||||
|
throw new \Exception('未查询到卡券信息');
|
||||||
|
}
|
||||||
|
|
||||||
|
$outlet = User::where('outlet_id', $this->outletId)->first();
|
||||||
|
|
||||||
|
if (empty($outlet)) {
|
||||||
|
return '作废失败,未查询到此网点信息。';
|
||||||
|
}
|
||||||
|
|
||||||
|
$grants = $info->activity->grants()->pluck('user_id');
|
||||||
|
if ($grants->isEmpty()) {
|
||||||
|
return '作废失败,此活动还没有配置可发券渠道,请联系相关人员进行配置。';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($outlet->parent_id, $grants->toArray())) {
|
||||||
|
return '作废失败,您没有权限作废此优惠券。';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$info->canDestroy()) {
|
||||||
|
throw new \Exception('作废失败,' . $info->status_text . '不能操作');
|
||||||
|
}
|
||||||
|
|
||||||
|
$info->status = ActivityCoupon::STATUS_CLOSE;
|
||||||
|
$info->save();
|
||||||
|
|
||||||
|
event(new ConponCallback($info));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return '未获取到券码。';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
59
packages/coupon/src/Action/ysd/YsdGrant.php
Normal file
59
packages/coupon/src/Action/ysd/YsdGrant.php
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action\ysd;
|
||||||
|
|
||||||
|
use App\Models\Activity;
|
||||||
|
use App\Models\User;
|
||||||
|
use XuanChen\Coupon\Action\Init;
|
||||||
|
|
||||||
|
class YsdGrant extends Init
|
||||||
|
{
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$activity = Activity::where('code', $this->activityId)->first();
|
||||||
|
if (!$activity) {
|
||||||
|
return '发券失败,没有找到这个活动。';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$activity->status) {
|
||||||
|
return '发券失败,活动已经关闭。';
|
||||||
|
}
|
||||||
|
|
||||||
|
$outlet = User::where('outlet_id', $this->outletId)->first();
|
||||||
|
if (!$outlet) {
|
||||||
|
return '发券失败,未查询到此网点信息。';
|
||||||
|
}
|
||||||
|
|
||||||
|
$grants = $activity->grants()->pluck('user_id');
|
||||||
|
if ($grants->isEmpty()) {
|
||||||
|
return '发券失败,此活动还没有配置可发券渠道,请联系相关人员进行配置。';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($outlet->parent_id, $grants->toArray())) {
|
||||||
|
return '发券失败,您没有权限发此类优惠券。';
|
||||||
|
}
|
||||||
|
|
||||||
|
$coupon = $activity->grant($this->mobile, $this->outletId);
|
||||||
|
|
||||||
|
if (!is_string($coupon)) {
|
||||||
|
return [
|
||||||
|
'name' => $activity->title,
|
||||||
|
'code' => $coupon->code,
|
||||||
|
'full' => $coupon->full,
|
||||||
|
'price' => $coupon->price,
|
||||||
|
'startTime' => $coupon->start_at->format('Y-m-d H:i:s'),
|
||||||
|
'endTime' => $coupon->end_at->format('Y-m-d H:i:s'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $coupon;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
51
packages/coupon/src/Action/ysd/YsdQuery.php
Normal file
51
packages/coupon/src/Action/ysd/YsdQuery.php
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action\ysd;
|
||||||
|
|
||||||
|
use App\Models\ActivityCoupon;
|
||||||
|
use App\Models\User;
|
||||||
|
use XuanChen\Coupon\Action\Init;
|
||||||
|
|
||||||
|
class YsdQuery extends Init
|
||||||
|
{
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$info = User::where('outlet_id', $this->outletId)->first();
|
||||||
|
|
||||||
|
if (!$info) {
|
||||||
|
throw new \Exception('网点编号错误,未查询到网点信息');
|
||||||
|
}
|
||||||
|
|
||||||
|
$coupon = ActivityCoupon::where('code', $this->redemptionCode)->first();
|
||||||
|
|
||||||
|
if (!$coupon) {
|
||||||
|
throw new \Exception('卡券编号错误,未查询到卡券信息');
|
||||||
|
}
|
||||||
|
|
||||||
|
$activity = $coupon->activity;
|
||||||
|
if (!$activity) {
|
||||||
|
throw new \Exception('操作失败,未查到活动信息');
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取所有可核销渠道
|
||||||
|
$verifications = $activity->verifications()->pluck('user_id');
|
||||||
|
|
||||||
|
if ($verifications->isEmpty()) {
|
||||||
|
throw new \Exception('操作失败,此活动还没有配置可核券渠道,请联系相关人员进行配置。');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($info->parent_id, $verifications->toArray())) {
|
||||||
|
throw new \Exception('操作失败,您没有权限查询此卡券信息。');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $coupon;
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
69
packages/coupon/src/Action/ysd/YsdReversal.php
Normal file
69
packages/coupon/src/Action/ysd/YsdReversal.php
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action\ysd;
|
||||||
|
|
||||||
|
use App\Events\ConponCallback;
|
||||||
|
use App\Models\ActivityCoupon;
|
||||||
|
use App\Models\Coupon;
|
||||||
|
use App\Models\User;
|
||||||
|
use XuanChen\Coupon\Action\Init;
|
||||||
|
|
||||||
|
class YsdReversal extends Init
|
||||||
|
{
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
if ($this->redemptionCode) {
|
||||||
|
try {
|
||||||
|
if (!$this->outletId) {
|
||||||
|
throw new \Exception('缺少网点id');
|
||||||
|
}
|
||||||
|
|
||||||
|
$activityCoupon = ActivityCoupon::where('code', $this->redemptionCode)->first();
|
||||||
|
|
||||||
|
if (!$activityCoupon) {
|
||||||
|
throw new \Exception('未查询到卡券信息');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$activityCoupon->canReversal()) {
|
||||||
|
throw new \Exception('操作失败,卡券当前状态不能操作');
|
||||||
|
}
|
||||||
|
|
||||||
|
$outlet = User::where('outlet_id', $this->outletId)->first();
|
||||||
|
|
||||||
|
if (empty($outlet)) {
|
||||||
|
return '操作失败,未查询到此网点信息。';
|
||||||
|
}
|
||||||
|
|
||||||
|
$grants = $activityCoupon->activity->grants()->pluck('user_id');
|
||||||
|
if ($grants->isEmpty()) {
|
||||||
|
return '操作失败,此活动还没有配置可发券渠道,请联系相关人员进行配置。';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!in_array($outlet->parent_id, $grants->toArray())) {
|
||||||
|
return '操作失败,您没有权限作废此优惠券。';
|
||||||
|
}
|
||||||
|
|
||||||
|
$coupon = Coupon::where('redemptionCode', $this->redemptionCode)
|
||||||
|
->where('status', 2)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($activityCoupon && $coupon) {
|
||||||
|
//撤销
|
||||||
|
$activityCoupon->reversal();
|
||||||
|
//撤销
|
||||||
|
$coupon->reversal();
|
||||||
|
}
|
||||||
|
event(new ConponCallback($activityCoupon));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return '未获取到券码。';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
195
packages/coupon/src/Action/ysd/YsdVerification.php
Normal file
195
packages/coupon/src/Action/ysd/YsdVerification.php
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action\ysd;
|
||||||
|
|
||||||
|
use App\Events\ConponCallback;
|
||||||
|
use App\Models\ActivityCoupon;
|
||||||
|
use App\Models\Coupon;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use XuanChen\Coupon\Action\Init;
|
||||||
|
|
||||||
|
class YsdVerification extends Init
|
||||||
|
{
|
||||||
|
|
||||||
|
public $ticket;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 核销具体流程
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/7/29 13:12
|
||||||
|
* @return array|string
|
||||||
|
*/
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
//检查是否已经核销过
|
||||||
|
$res = $this->HasCheck();
|
||||||
|
if ($res !== false) {
|
||||||
|
return $res;
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询卡券信息 返回model 返回string 说明报错
|
||||||
|
$this->query_coupon = (new YsdQuery)->setOutletId($this->outletId)
|
||||||
|
->setCode($this->redemptionCode)
|
||||||
|
->start();
|
||||||
|
|
||||||
|
if (is_string($this->query_coupon)) {
|
||||||
|
return $this->query_coupon;
|
||||||
|
}
|
||||||
|
|
||||||
|
//检查可核销次数,100元为1次。
|
||||||
|
if ($this->query_coupon->activity && $this->query_coupon->activity->need_check) {
|
||||||
|
$ret = $this->CheckCount();
|
||||||
|
if ($ret !== true) {
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//校验卡券
|
||||||
|
$ticket = $this->checkCoupon();
|
||||||
|
if (!is_array($ticket)) {
|
||||||
|
return $ticket;
|
||||||
|
}
|
||||||
|
|
||||||
|
//增加核销记录
|
||||||
|
$coupon = $this->AddCoupon();
|
||||||
|
if (is_string($coupon)) {
|
||||||
|
return $coupon;
|
||||||
|
}
|
||||||
|
|
||||||
|
DB::beginTransaction();
|
||||||
|
|
||||||
|
try {
|
||||||
|
$this->query_coupon->status = ActivityCoupon::STATUS_USED;
|
||||||
|
$this->query_coupon->used_at = now();
|
||||||
|
$this->query_coupon->save();
|
||||||
|
|
||||||
|
$this->coupon->status = 2;
|
||||||
|
$this->coupon->remark = '核销成功';
|
||||||
|
$this->coupon->save();
|
||||||
|
//返回的数据
|
||||||
|
$resdata = [
|
||||||
|
'name' => $this->coupon->couponName,
|
||||||
|
'total' => $this->coupon->total,
|
||||||
|
'price' => $this->coupon->price,
|
||||||
|
];
|
||||||
|
//核销成功 执行分润
|
||||||
|
$this->coupon->profit();
|
||||||
|
DB::commit();
|
||||||
|
|
||||||
|
event(new ConponCallback($this->query_coupon));
|
||||||
|
|
||||||
|
return $resdata;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
DB::rollback();
|
||||||
|
|
||||||
|
$this->coupon->status = 3;
|
||||||
|
$this->coupon->remark = '核销失败 ' . $e->getMessage();
|
||||||
|
$this->coupon->save();
|
||||||
|
|
||||||
|
return $this->coupon->remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 检查卡券信息
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 16:40
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function checkCoupon()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!$this->query_coupon->canRedemption()) {
|
||||||
|
return '核销失败,优惠券不可核销';
|
||||||
|
}
|
||||||
|
|
||||||
|
$now = now();
|
||||||
|
|
||||||
|
if ($this->query_coupon->start_at->gt($now)) {
|
||||||
|
return '核销失败,卡券未到可用时间。请在' . $this->query_coupon->start_at->format('Y-m-d H:i:s') . '后使用';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($now->gt($this->query_coupon->end_at)) {
|
||||||
|
return '核销失败,卡券已过期。';
|
||||||
|
}
|
||||||
|
|
||||||
|
$rule_code = $this->query_coupon->activity->rule->code;
|
||||||
|
$code = $this->user->code->where('code', $rule_code)->first();
|
||||||
|
|
||||||
|
if (!$code) {
|
||||||
|
return "核销失败,您没有权限使用此卡券优惠活动。";
|
||||||
|
}
|
||||||
|
|
||||||
|
$ticket = explode('-', $rule_code);
|
||||||
|
if (!is_array($ticket) || count($ticket) != 3) {
|
||||||
|
return "核销失败,卡券规则格式不正确";
|
||||||
|
}
|
||||||
|
|
||||||
|
$full = $ticket[1]; //full100
|
||||||
|
$price = $ticket[2];
|
||||||
|
// preg_match('/(\d{3}(\.\d+)?)/is', $full, $match);
|
||||||
|
preg_match('/\d+/', $full, $match);
|
||||||
|
|
||||||
|
if (!is_array($match)) {
|
||||||
|
return "核销失败,卡券规则格式不正确。";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_numeric($this->total)) {
|
||||||
|
return "核销失败,订单金额必须是数字";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($match[0] > $this->total) {
|
||||||
|
return '核销失败,订单金额不足。';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->ticket = [
|
||||||
|
'total' => $match[0],
|
||||||
|
'price' => $price,
|
||||||
|
'profit' => $code->profit,
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 如可核销记录
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/7/21 15:03
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function AddCoupon()
|
||||||
|
{
|
||||||
|
DB::beginTransaction();
|
||||||
|
|
||||||
|
try {
|
||||||
|
$couponData = [
|
||||||
|
'user_id' => $this->user->id,
|
||||||
|
'type' => Coupon::TYPE_YSD,
|
||||||
|
'outletId' => $this->outletId,
|
||||||
|
'orderid' => $this->orderid,
|
||||||
|
'PaOutletId' => '',
|
||||||
|
'redemptionCode' => $this->redemptionCode,
|
||||||
|
'thirdPartyGoodsId' => $this->query_coupon->activity->rule->code,
|
||||||
|
'couponName' => $this->query_coupon->activity->title,
|
||||||
|
'price' => $this->ticket['price'],
|
||||||
|
'total' => $this->total,
|
||||||
|
'profit' => $this->ticket['profit'],
|
||||||
|
'status' => $this->query_coupon->status,
|
||||||
|
'startTime' => $this->query_coupon->start_at,
|
||||||
|
'endTime' => $this->query_coupon->end_at,
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->coupon = Coupon::create($couponData);
|
||||||
|
|
||||||
|
DB::commit();
|
||||||
|
|
||||||
|
return $this->coupon;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
DB::rollback();
|
||||||
|
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
14
packages/coupon/src/Contracts/CheckCouponContracts.php
Normal file
14
packages/coupon/src/Contracts/CheckCouponContracts.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Contracts;
|
||||||
|
|
||||||
|
interface CheckCouponContracts
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* start
|
||||||
|
* @return [type] [description]
|
||||||
|
*/
|
||||||
|
function start();
|
||||||
|
|
||||||
|
}
|
||||||
30
packages/coupon/src/Contracts/CouponContracts.php
Normal file
30
packages/coupon/src/Contracts/CouponContracts.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Contracts;
|
||||||
|
|
||||||
|
interface CouponContracts
|
||||||
|
{
|
||||||
|
|
||||||
|
//发券接口
|
||||||
|
function grant();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 查询卡券详情
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 15:15
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
function detail();
|
||||||
|
|
||||||
|
//作废接口
|
||||||
|
function destroy();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 核销执行入口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 14:49
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
function start();
|
||||||
|
|
||||||
|
}
|
||||||
179
packages/coupon/src/Coupon.php
Normal file
179
packages/coupon/src/Coupon.php
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon;
|
||||||
|
|
||||||
|
use App\Models\Activity;
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自有卡券系统
|
||||||
|
*/
|
||||||
|
class Coupon
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 发券接口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/28 15:07
|
||||||
|
* @param $activityId 活动编号
|
||||||
|
* @param $outletId 网点编号
|
||||||
|
* @param $mobile 手机号
|
||||||
|
*/
|
||||||
|
public static function Grant($activityId, $outletId, $mobile)
|
||||||
|
{
|
||||||
|
$model = config('xuanchen_coupon.rules.ysd.model');
|
||||||
|
|
||||||
|
return (new $model)->setActivityId($activityId)
|
||||||
|
->setOutletId($outletId)
|
||||||
|
->setMobile($mobile)
|
||||||
|
->grant();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 查询接口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/7/21 11:58
|
||||||
|
* @param $redemptionCode
|
||||||
|
*/
|
||||||
|
public static function Query($redemptionCode, $outletId)
|
||||||
|
{
|
||||||
|
if (!$redemptionCode) {
|
||||||
|
return '查询失败,未获取到券码';
|
||||||
|
}
|
||||||
|
|
||||||
|
$model = self::getModelByCode($redemptionCode);
|
||||||
|
if (is_string($model)) {
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $model->setCode($redemptionCode)
|
||||||
|
->setOutletId($outletId)
|
||||||
|
->detail();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 卡券作废
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/9/2 16:54
|
||||||
|
* @param $redemptionCode
|
||||||
|
* @param $outletId
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function Destroy($redemptionCode, $outletId)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$model = self::getModelByCode($redemptionCode);
|
||||||
|
if (is_string($model)) {
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $model->setCode($redemptionCode)
|
||||||
|
->setOutletId($outletId)
|
||||||
|
->destroy();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 根据券码 获取class
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/7/21 12:00
|
||||||
|
* @param $code
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getModelByCode($code)
|
||||||
|
{
|
||||||
|
$rules = config('xuanchen_coupon.rules');
|
||||||
|
|
||||||
|
if (!$rules) {
|
||||||
|
throw new \Exception('系统出错,未找到配置文件');
|
||||||
|
}
|
||||||
|
|
||||||
|
$model = '';
|
||||||
|
foreach ($rules as $rule) {
|
||||||
|
if (is_array($rule['pattern']) && count($rule['pattern']) > 1) {
|
||||||
|
foreach ($rule['pattern'] as $pattern) {
|
||||||
|
if (preg_match($pattern, $code, $matches)) {
|
||||||
|
$model = $rule['model'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (preg_match($rule['pattern'], $code, $matches)) {
|
||||||
|
$model = $rule['model'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$model) {
|
||||||
|
throw new \Exception('操作失败。未查到卡券所属');
|
||||||
|
}
|
||||||
|
|
||||||
|
return new $model;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: description
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/8/21 13:33
|
||||||
|
* @param \App\Models\User $user 渠道
|
||||||
|
* @param string $redemptionCode 要核销的券码
|
||||||
|
* @param float $total 订单金额
|
||||||
|
* @param string $outletId 网点id
|
||||||
|
* @param string $orderid 订单id
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function Redemption(User $user, string $redemptionCode, float $total, string $outletId, string $orderid = '')
|
||||||
|
{
|
||||||
|
|
||||||
|
try {
|
||||||
|
$model = self::getModelByCode($redemptionCode);
|
||||||
|
if (is_string($model)) {
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $model->setUser($user)
|
||||||
|
->setCode($redemptionCode)
|
||||||
|
->setTotal($total)
|
||||||
|
->setOutletId($outletId)
|
||||||
|
->setOrderId($orderid)
|
||||||
|
->start();
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 冲正 撤销 已经核销的改为未核销状态
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/10/12 11:54
|
||||||
|
* @param $redemptionCode
|
||||||
|
* @param $outletId
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function Reversal($redemptionCode, $outletId)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$model = self::getModelByCode($redemptionCode);
|
||||||
|
if (is_string($model)) {
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $model->setCode($redemptionCode)
|
||||||
|
->setOutletId($outletId)
|
||||||
|
->reversal();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
31
packages/coupon/src/ServiceProvider.php
Normal file
31
packages/coupon/src/ServiceProvider.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
|
||||||
|
|
||||||
|
class ServiceProvider extends LaravelServiceProvider
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register services.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
if ($this->app->runningInConsole()) {
|
||||||
|
$this->publishes([__DIR__ . '/../config/xuanchen_coupon.php' => config_path('xuanchen_coupon.php')]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap services.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
$this->mergeConfigFrom(__DIR__ . '/../config/xuanchen_coupon.php', 'xuanchen_coupon');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
47
packages/coupon/src/Traits/Log.php
Normal file
47
packages/coupon/src/Traits/Log.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Traits;
|
||||||
|
|
||||||
|
use App\Models\Log as LogModel;
|
||||||
|
|
||||||
|
trait Log
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 插入日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/30 10:29
|
||||||
|
* @param $url
|
||||||
|
* @param $method
|
||||||
|
* @param $params
|
||||||
|
* @param string $type
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function createLog($url, $method, $params, $type = 'pingan')
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'path' => $url,
|
||||||
|
'method' => $method,
|
||||||
|
'type' => $type,
|
||||||
|
'in_source' => $params,
|
||||||
|
];
|
||||||
|
|
||||||
|
$info = LogModel::create($data);
|
||||||
|
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 更新日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/30 10:29
|
||||||
|
* @param $log
|
||||||
|
* @param $params
|
||||||
|
*/
|
||||||
|
public static function updateLog($log, $params)
|
||||||
|
{
|
||||||
|
$log->out_source = $params;
|
||||||
|
$log->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
79
packages/coupon/src/Traits/SetParams.php
Normal file
79
packages/coupon/src/Traits/SetParams.php
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Traits;
|
||||||
|
|
||||||
|
trait SetParams
|
||||||
|
{
|
||||||
|
|
||||||
|
//渠道
|
||||||
|
public $user;
|
||||||
|
|
||||||
|
//卡券编号
|
||||||
|
public $redemptionCode;
|
||||||
|
|
||||||
|
//订单金额
|
||||||
|
public $total;
|
||||||
|
|
||||||
|
//网点编号
|
||||||
|
public $outletId;
|
||||||
|
|
||||||
|
//活动id
|
||||||
|
public $activityId;
|
||||||
|
|
||||||
|
//手机号
|
||||||
|
public $mobile;
|
||||||
|
|
||||||
|
//设置渠道
|
||||||
|
public function setUser($user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置核销码
|
||||||
|
public function setCode($redemptionCode)
|
||||||
|
{
|
||||||
|
$this->redemptionCode = $redemptionCode;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置订单总额
|
||||||
|
public function setTotal($total)
|
||||||
|
{
|
||||||
|
$this->total = $total;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置网点id
|
||||||
|
public function setOutletId($outletId)
|
||||||
|
{
|
||||||
|
$this->outletId = $outletId;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置活动id
|
||||||
|
public function setActivityId($activityId)
|
||||||
|
{
|
||||||
|
$this->activityId = $activityId;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置手机号
|
||||||
|
public function setMobile($mobile)
|
||||||
|
{
|
||||||
|
$this->mobile = $mobile;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
27
packages/sinopec/composer.json
Normal file
27
packages/sinopec/composer.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "xuanchen/sinopec",
|
||||||
|
"description": "中石化相关",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "玄尘",
|
||||||
|
"email": "122383162@qq.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.3",
|
||||||
|
"laravel/framework": "*"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"XuanChen\\Sinopec": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"XuanChen\\Sinopec\\ServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
15
packages/sinopec/config/xuanchen_coupon.php
Normal file
15
packages/sinopec/config/xuanchen_coupon.php
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'coupon_model' => \App\Models\Coupon::class,
|
||||||
|
'rules' => [
|
||||||
|
'pingan' => [
|
||||||
|
'pattern' => '/^\d{12}$/',
|
||||||
|
'model' => \XuanChen\Coupon\Action\PinganAction::class,
|
||||||
|
],
|
||||||
|
'ysd' => [
|
||||||
|
'pattern' => '/^YSD/',
|
||||||
|
'model' => \XuanChen\Coupon\Action\SinopecAction::class,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
197
packages/sinopec/src/Action/Init.php
Normal file
197
packages/sinopec/src/Action/Init.php
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action;
|
||||||
|
|
||||||
|
use App\Models\Coupon;
|
||||||
|
use App\Models\Log as LogModel;
|
||||||
|
|
||||||
|
class Init
|
||||||
|
{
|
||||||
|
|
||||||
|
//渠道
|
||||||
|
public $user;
|
||||||
|
|
||||||
|
//卡券编号
|
||||||
|
public $redemptionCode;
|
||||||
|
|
||||||
|
//订单金额
|
||||||
|
public $total;
|
||||||
|
|
||||||
|
//网点编号
|
||||||
|
public $outletId;
|
||||||
|
|
||||||
|
//活动id
|
||||||
|
public $activityId;
|
||||||
|
|
||||||
|
//手机号
|
||||||
|
public $mobile;
|
||||||
|
|
||||||
|
//核销的卡券 创建的核销记录
|
||||||
|
public $coupon;
|
||||||
|
|
||||||
|
//查询返回卡券信息
|
||||||
|
public $query_coupon;
|
||||||
|
|
||||||
|
//订单id
|
||||||
|
public $orderid;
|
||||||
|
|
||||||
|
//查询到的卡券规则和商品id 只有平安券才有
|
||||||
|
public $queryData;
|
||||||
|
|
||||||
|
//设置渠道
|
||||||
|
public function setUser($user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置渠道
|
||||||
|
public function setOrderId($orderid)
|
||||||
|
{
|
||||||
|
$this->orderid = $orderid;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置核销码
|
||||||
|
public function setCode($redemptionCode)
|
||||||
|
{
|
||||||
|
$this->redemptionCode = $redemptionCode;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置订单总额
|
||||||
|
public function setTotal($total)
|
||||||
|
{
|
||||||
|
$this->total = $total;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置网点id
|
||||||
|
public function setOutletId($outletId)
|
||||||
|
{
|
||||||
|
$this->outletId = $outletId;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置活动id
|
||||||
|
public function setActivityId($activityId)
|
||||||
|
{
|
||||||
|
$this->activityId = $activityId;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置手机号
|
||||||
|
public function setMobile($mobile)
|
||||||
|
{
|
||||||
|
$this->mobile = $mobile;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 插入日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/30 10:29
|
||||||
|
* @param $url
|
||||||
|
* @param $method
|
||||||
|
* @param $params
|
||||||
|
* @param string $type
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function createLog($url, $method, $params, $type = 'pingan')
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'path' => $url,
|
||||||
|
'method' => $method,
|
||||||
|
'type' => $type,
|
||||||
|
'in_source' => $params,
|
||||||
|
];
|
||||||
|
|
||||||
|
$info = LogModel::create($data);
|
||||||
|
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 更新日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/30 10:29
|
||||||
|
* @param $log
|
||||||
|
* @param $params
|
||||||
|
*/
|
||||||
|
public static function updateLog($log, $params)
|
||||||
|
{
|
||||||
|
$log->out_source = $params;
|
||||||
|
$log->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
//统一门店 相同金额 3分钟之内看作是一笔订单
|
||||||
|
public function CheckCount()
|
||||||
|
{
|
||||||
|
if ($this->queryData) {
|
||||||
|
if (isset($this->queryData['thirdPartyGoodsId']) && $this->queryData['thirdPartyGoodsId'] == 'YSD-full0-0') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->orderid) {
|
||||||
|
$check_count = Coupon::where('orderid', $this->orderid)
|
||||||
|
->where('outletId', $this->outletId)
|
||||||
|
->where('total', $this->total)
|
||||||
|
->where('status', 2)
|
||||||
|
->where('created_at', '>=', now()->subMinutes(3)->format('Y-m-d H:i:s'))
|
||||||
|
->count();
|
||||||
|
} else {
|
||||||
|
$check_count = Coupon::where('outletId', $this->outletId)
|
||||||
|
->where('total', $this->total)
|
||||||
|
->where('status', 2)
|
||||||
|
->where('created_at', '>=', now()->subMinutes(3)->format('Y-m-d H:i:s'))
|
||||||
|
->count();
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = floor($this->total / 100);
|
||||||
|
|
||||||
|
if ($check_count > 0) {
|
||||||
|
// if ($this->total < 100) {
|
||||||
|
// return '核销失败,订单金额少于100只能核销一张优惠券。';
|
||||||
|
// }
|
||||||
|
if ($check_count >= $count) {
|
||||||
|
return "核销失败,此订单您只能使用 {$count} 张优惠券";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 校验是否已经核销过
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/8/8 13:43
|
||||||
|
*/
|
||||||
|
public function HasCheck()
|
||||||
|
{
|
||||||
|
$info = Coupon::where('redemptionCode', $this->redemptionCode)
|
||||||
|
->where('outletId', $this->outletId)
|
||||||
|
->where('total', $this->total)
|
||||||
|
->where('status', 2)
|
||||||
|
->first();
|
||||||
|
if ($info) {
|
||||||
|
return '核销失败,此优惠券已被使用';
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
73
packages/sinopec/src/Action/SinopecAction.php
Normal file
73
packages/sinopec/src/Action/SinopecAction.php
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Coupon\Action;
|
||||||
|
|
||||||
|
use XuanChen\Coupon\Action\sinopec\ZhyCreate;
|
||||||
|
use XuanChen\Coupon\Contracts\CouponContracts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class SinopecAction 中石化控制器
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date: 2020/9/23 15:14
|
||||||
|
* @package XuanChen\Coupon\Action
|
||||||
|
*/
|
||||||
|
class SinopecAction extends Init implements CouponContracts
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Notes: 创建营销活动
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date: 2020/9/23 16:01
|
||||||
|
* @param array $data
|
||||||
|
*/
|
||||||
|
public function create(array $data)
|
||||||
|
{
|
||||||
|
$action = new ZhyCreate();
|
||||||
|
$action->data = $data;
|
||||||
|
|
||||||
|
return $action->start();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 发券接口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date: 2020/9/23 15:58
|
||||||
|
*/
|
||||||
|
function grant()
|
||||||
|
{
|
||||||
|
// TODO: Implement grant() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 查询接口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date: 2020/9/23 15:58
|
||||||
|
* @return mixed|void
|
||||||
|
*/
|
||||||
|
function detail()
|
||||||
|
{
|
||||||
|
// TODO: Implement detail() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 作废接口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date: 2020/9/23 15:59
|
||||||
|
*/
|
||||||
|
function destroy()
|
||||||
|
{
|
||||||
|
// TODO: Implement destroy() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 核销接口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date: 2020/9/23 16:00
|
||||||
|
* @return mixed|void
|
||||||
|
*/
|
||||||
|
function start()
|
||||||
|
{
|
||||||
|
// TODO: Implement start() method.
|
||||||
|
}
|
||||||
|
}
|
||||||
82
packages/sinopec/src/Action/sinopec/ZhyCreate.php
Normal file
82
packages/sinopec/src/Action/sinopec/ZhyCreate.php
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Sinopec\Action\sinopec;
|
||||||
|
|
||||||
|
use XuanChen\Sinopec\Contracts\CheckCouponContracts;
|
||||||
|
|
||||||
|
class ZhyCreate implements CheckCouponContracts
|
||||||
|
{
|
||||||
|
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
|
||||||
|
try {
|
||||||
|
[
|
||||||
|
"cooperativeMerchant" => "",
|
||||||
|
"eletronAndRule" => [
|
||||||
|
[
|
||||||
|
"entryMethod" => "01",
|
||||||
|
"marketCode" => "20191213154203514",
|
||||||
|
"marketRuleNumber" => "001",
|
||||||
|
"perVoucherNumber" => "1",
|
||||||
|
"planVoucherNumber" => "10",
|
||||||
|
"queryCreateTime" => "2019-11-11 18:39:49",
|
||||||
|
"similarStack" => "Y",
|
||||||
|
"voucherEndTime" => "2019-12-15",
|
||||||
|
"voucher_ruleCode" => "$01-VC-1573468710381900",
|
||||||
|
"voucherRuleName" => "ceshi2",
|
||||||
|
"voucherSource" => "S01",
|
||||||
|
"voucherStartTime" => "2019-12-13",
|
||||||
|
"voucherStartTime_type" => "VOUCHER_START_TIME_TYPE_ABSOLUTE_EFFECTIVE_TIME",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
"limitFrequency" => "",
|
||||||
|
"mabIsRefund" => "",
|
||||||
|
"marketCode" => "20191213154203514",
|
||||||
|
"marketExEndTime" => "2019-12-15 00:00:00",
|
||||||
|
"marketExStartTime" => "2019-12-13 00:00:00",
|
||||||
|
"marketHierarchy" => "3311",
|
||||||
|
"marketName" => "行为推送活动-3",
|
||||||
|
"marketProvince" => "51",
|
||||||
|
"marketReleaseSys" => "VOUCHER_PUBLISH_TYPE_APPLET",
|
||||||
|
"marketStatus" => "MARKET_ACTIVITY_STATE_TAKE_EFFECT",
|
||||||
|
"promotionCalculation" => "PROMOTION_TYPE_MEMBER_BEHAVIOR",
|
||||||
|
"rule" => [
|
||||||
|
[
|
||||||
|
"cashValue" => "100",
|
||||||
|
"channel" => "C01,C02,C03,C05",
|
||||||
|
"fullType" => "",
|
||||||
|
"marketCode" => "20191213154203514",
|
||||||
|
"perVoucherNumber" => "1",
|
||||||
|
"planVoucherNumber" => "10",
|
||||||
|
"ruleCode" => "$01-VC-1573468710381900",
|
||||||
|
"ruleDetail" => "123123",
|
||||||
|
"ruleName" => "ceshi2",
|
||||||
|
"voucherType" => "C01",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
"tradLimit" => [
|
||||||
|
[
|
||||||
|
"endValue" => "",
|
||||||
|
"fixed" => "",
|
||||||
|
"marketCode" => "20191213154203514",
|
||||||
|
"marketRuleName" => "001",
|
||||||
|
"marketRuleNumber" => "001",
|
||||||
|
"memLevel" => "",
|
||||||
|
"operator" => "",
|
||||||
|
"startValue" => "",
|
||||||
|
"tradingUnit" => "",
|
||||||
|
"transactionType" => "",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
82
packages/sinopec/src/Action/sinopec/ZhyQuery.php
Normal file
82
packages/sinopec/src/Action/sinopec/ZhyQuery.php
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Sinopec\Action\sinopec;
|
||||||
|
|
||||||
|
use XuanChen\Sinopec\Contracts\CheckCouponContracts;
|
||||||
|
|
||||||
|
class ZhyQuery implements CheckCouponContracts
|
||||||
|
{
|
||||||
|
|
||||||
|
public $data;
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
|
||||||
|
try {
|
||||||
|
[
|
||||||
|
"cooperativeMerchant" => "",
|
||||||
|
"eletronAndRule" => [
|
||||||
|
[
|
||||||
|
"entryMethod" => "01",
|
||||||
|
"marketCode" => "20191213154203514",
|
||||||
|
"marketRuleNumber" => "001",
|
||||||
|
"perVoucherNumber" => "1",
|
||||||
|
"planVoucherNumber" => "10",
|
||||||
|
"queryCreateTime" => "2019-11-11 18=> 39=> 49",
|
||||||
|
"similarStack" => "Y",
|
||||||
|
"voucherEndTime" => "2019-12-15",
|
||||||
|
"voucher_ruleCode" => "$01-VC-1573468710381900",
|
||||||
|
"voucherRuleName" => "ceshi2",
|
||||||
|
"voucherSource" => "S01",
|
||||||
|
"voucherStartTime" => "2019-12-13",
|
||||||
|
"voucherStartTime_type" => "VOUCHER_START_TIME_TYPE_ABSOLUTE_EFFECTIVE_TIME",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
"limitFrequency" => "",
|
||||||
|
"mabIsRefund" => "",
|
||||||
|
"marketCode" => "20191213154203514",
|
||||||
|
"marketExEndTime" => "2019-12-15 00=> 00=> 00",
|
||||||
|
"marketExStartTime" => "2019-12-13 00=> 00=> 00",
|
||||||
|
"marketHierarchy" => "3311",
|
||||||
|
"marketName" => "行为推送活动-3",
|
||||||
|
"marketProvince" => "51",
|
||||||
|
"marketReleaseSys" => "VOUCHER_PUBLISH_TYPE_APPLET",
|
||||||
|
"marketStatus" => "MARKET_ACTIVITY_STATE_TAKE_EFFECT",
|
||||||
|
"promotionCalculation" => "PROMOTION_TYPE_MEMBER_BEHAVIOR",
|
||||||
|
"rule" => [
|
||||||
|
[
|
||||||
|
"cashValue" => "100",
|
||||||
|
"channel" => "C01,C02,C03,C05",
|
||||||
|
"fullType" => "",
|
||||||
|
"marketCode" => "20191213154203514",
|
||||||
|
"perVoucherNumber" => "1",
|
||||||
|
"planVoucherNumber" => "10",
|
||||||
|
"ruleCode" => "$01-VC-1573468710381900",
|
||||||
|
"ruleDetail" => "123123",
|
||||||
|
"ruleName" => "ceshi2",
|
||||||
|
"voucherType" => "C01",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
"tradLimit" => [
|
||||||
|
[
|
||||||
|
"endValue" => "",
|
||||||
|
"fixed" => "",
|
||||||
|
"marketCode" => "20191213154203514",
|
||||||
|
"marketRuleName" => "001",
|
||||||
|
"marketRuleNumber" => "001",
|
||||||
|
"memLevel" => "",
|
||||||
|
"operator" => "",
|
||||||
|
"startValue" => "",
|
||||||
|
"tradingUnit" => "",
|
||||||
|
"transactionType" => "",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
14
packages/sinopec/src/Contracts/CheckCouponContracts.php
Normal file
14
packages/sinopec/src/Contracts/CheckCouponContracts.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Sinopec\Contracts;
|
||||||
|
|
||||||
|
interface CheckCouponContracts
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* start
|
||||||
|
* @return [type] [description]
|
||||||
|
*/
|
||||||
|
function start();
|
||||||
|
|
||||||
|
}
|
||||||
30
packages/sinopec/src/Contracts/CouponContracts.php
Normal file
30
packages/sinopec/src/Contracts/CouponContracts.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Sinopec\Contracts;
|
||||||
|
|
||||||
|
interface CouponContracts
|
||||||
|
{
|
||||||
|
|
||||||
|
//发券接口
|
||||||
|
function grant();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 查询卡券详情
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 15:15
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
function detail();
|
||||||
|
|
||||||
|
//作废接口
|
||||||
|
function destroy();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 核销执行入口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/29 14:49
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
function start();
|
||||||
|
|
||||||
|
}
|
||||||
31
packages/sinopec/src/ServiceProvider.php
Normal file
31
packages/sinopec/src/ServiceProvider.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Sinopec;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
|
||||||
|
|
||||||
|
class ServiceProvider extends LaravelServiceProvider
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register services.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
if ($this->app->runningInConsole()) {
|
||||||
|
$this->publishes([__DIR__ . '/../config/sinopec.php' => config_path('sinopec.php')]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap services.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
$this->mergeConfigFrom(__DIR__ . '/../config/sinopec.php', 'sinopec');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
144
packages/sinopec/src/Sinopec.php
Normal file
144
packages/sinopec/src/Sinopec.php
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Sinopec;
|
||||||
|
|
||||||
|
use App\Models\Activity;
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中石化接口
|
||||||
|
*/
|
||||||
|
class Sinopec
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 发券接口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/28 15:07
|
||||||
|
* @param $activityId 活动编号
|
||||||
|
* @param $outletId 网点编号
|
||||||
|
* @param $mobile 手机号
|
||||||
|
*/
|
||||||
|
public static function Grant($activityId, $outletId, $mobile)
|
||||||
|
{
|
||||||
|
$model = config('xuanchen_coupon.rules.ysd.model');
|
||||||
|
|
||||||
|
return (new $model)->setActivityId($activityId)
|
||||||
|
->setOutletId($outletId)
|
||||||
|
->setMobile($mobile)
|
||||||
|
->grant();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 查询接口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/7/21 11:58
|
||||||
|
* @param $redemptionCode
|
||||||
|
*/
|
||||||
|
public static function Query($redemptionCode, $outletId)
|
||||||
|
{
|
||||||
|
if (!$redemptionCode) {
|
||||||
|
return '查询失败,未获取到券码';
|
||||||
|
}
|
||||||
|
|
||||||
|
$model = self::getModelByCode($redemptionCode);
|
||||||
|
if (is_string($model)) {
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $model->setCode($redemptionCode)
|
||||||
|
->setOutletId($outletId)
|
||||||
|
->detail();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 卡券作废
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/9/2 16:54
|
||||||
|
* @param $redemptionCode
|
||||||
|
* @param $outletId
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function Destroy($redemptionCode, $outletId)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$model = self::getModelByCode($redemptionCode);
|
||||||
|
if (is_string($model)) {
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $model->setCode($redemptionCode)
|
||||||
|
->setOutletId($outletId)
|
||||||
|
->destroy();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 根据券码 获取class
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/7/21 12:00
|
||||||
|
* @param $code
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getModelByCode($code)
|
||||||
|
{
|
||||||
|
$rules = config('xuanchen_coupon.rules');
|
||||||
|
if (!$rules) {
|
||||||
|
return '系统出错,未找到配置文件';
|
||||||
|
}
|
||||||
|
|
||||||
|
$model = '';
|
||||||
|
foreach ($rules as $rule) {
|
||||||
|
if (preg_match($rule['pattern'], $code, $matches)) {
|
||||||
|
$model = $rule['model'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$model) {
|
||||||
|
throw new \Exception('卡券核销失败。未查到卡券所属');
|
||||||
|
}
|
||||||
|
|
||||||
|
return new $model;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: description
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/8/21 13:33
|
||||||
|
* @param \App\Models\User $user 渠道
|
||||||
|
* @param string $redemptionCode 要核销的券码
|
||||||
|
* @param float $total 订单金额
|
||||||
|
* @param string $outletId 网点id
|
||||||
|
* @param string $orderid 订单id
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function Redemption(User $user, string $redemptionCode, float $total, string $outletId, string $orderid = '')
|
||||||
|
{
|
||||||
|
|
||||||
|
try {
|
||||||
|
$model = self::getModelByCode($redemptionCode);
|
||||||
|
if (is_string($model)) {
|
||||||
|
return $model;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $model->setUser($user)
|
||||||
|
->setCode($redemptionCode)
|
||||||
|
->setTotal($total)
|
||||||
|
->setOutletId($outletId)
|
||||||
|
->setOrderId($orderid)
|
||||||
|
->start();
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
47
packages/sinopec/src/Traits/Log.php
Normal file
47
packages/sinopec/src/Traits/Log.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Sinopec\Traits;
|
||||||
|
|
||||||
|
use App\Models\Log as LogModel;
|
||||||
|
|
||||||
|
trait Log
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 插入日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/30 10:29
|
||||||
|
* @param $url
|
||||||
|
* @param $method
|
||||||
|
* @param $params
|
||||||
|
* @param string $type
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function createLog($url, $method, $params, $type = 'pingan')
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'path' => $url,
|
||||||
|
'method' => $method,
|
||||||
|
'type' => $type,
|
||||||
|
'in_source' => $params,
|
||||||
|
];
|
||||||
|
|
||||||
|
$info = LogModel::create($data);
|
||||||
|
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 更新日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/6/30 10:29
|
||||||
|
* @param $log
|
||||||
|
* @param $params
|
||||||
|
*/
|
||||||
|
public static function updateLog($log, $params)
|
||||||
|
{
|
||||||
|
$log->out_source = $params;
|
||||||
|
$log->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
79
packages/sinopec/src/Traits/SetParams.php
Normal file
79
packages/sinopec/src/Traits/SetParams.php
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\Sinopec\Traits;
|
||||||
|
|
||||||
|
trait SetParams
|
||||||
|
{
|
||||||
|
|
||||||
|
//渠道
|
||||||
|
public $user;
|
||||||
|
|
||||||
|
//卡券编号
|
||||||
|
public $redemptionCode;
|
||||||
|
|
||||||
|
//订单金额
|
||||||
|
public $total;
|
||||||
|
|
||||||
|
//网点编号
|
||||||
|
public $outletId;
|
||||||
|
|
||||||
|
//活动id
|
||||||
|
public $activityId;
|
||||||
|
|
||||||
|
//手机号
|
||||||
|
public $mobile;
|
||||||
|
|
||||||
|
//设置渠道
|
||||||
|
public function setUser($user)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置核销码
|
||||||
|
public function setCode($redemptionCode)
|
||||||
|
{
|
||||||
|
$this->redemptionCode = $redemptionCode;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置订单总额
|
||||||
|
public function setTotal($total)
|
||||||
|
{
|
||||||
|
$this->total = $total;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置网点id
|
||||||
|
public function setOutletId($outletId)
|
||||||
|
{
|
||||||
|
$this->outletId = $outletId;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置活动id
|
||||||
|
public function setActivityId($activityId)
|
||||||
|
{
|
||||||
|
$this->activityId = $activityId;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置手机号
|
||||||
|
public function setMobile($mobile)
|
||||||
|
{
|
||||||
|
$this->mobile = $mobile;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
11
packages/unionpay/README.md
Normal file
11
packages/unionpay/README.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Unionpay 对接银联接口
|
||||||
|
|
||||||
|
002025 聚合营销优惠查询接口
|
||||||
|
|
||||||
|
002100 销账交易接口
|
||||||
|
|
||||||
|
002101 销账冲正通知接口
|
||||||
|
|
||||||
|
002102 销账撤销通知接口
|
||||||
|
|
||||||
|
接口地址:http://pac.ysd-bs.com/api/V1/unionpay/query
|
||||||
27
packages/unionpay/composer.json
Normal file
27
packages/unionpay/composer.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "xuanchen/unionpay",
|
||||||
|
"description": "银联对接",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "玄尘",
|
||||||
|
"email": "122383162@qq.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.3",
|
||||||
|
"laravel/framework": "*"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": {
|
||||||
|
"XuanChen\\UnionPay": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"XuanChen\\UnionPay\\ServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
339
packages/unionpay/config/unionpay.php
Normal file
339
packages/unionpay/config/unionpay.php
Normal file
@@ -0,0 +1,339 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
//分配的渠道号
|
||||||
|
'msg_sender' => '660134',
|
||||||
|
//打印在小票上,由活动标题、优惠金额、原始金额组合而成
|
||||||
|
'pos_receipt' => '本时生活,优惠生活',
|
||||||
|
//广告,用于打印在小票上
|
||||||
|
'pos_ad' => '',
|
||||||
|
//营销联盟广告,用于打印在小票上
|
||||||
|
'pos_mkt_ad' => '本时生活,优惠生活',
|
||||||
|
//银联渠道id
|
||||||
|
'agent_id' => '299',
|
||||||
|
//银联网点id
|
||||||
|
'outlet_id' => '2009300919918',
|
||||||
|
//用于银商与sp分润的金额(是佣金的一部分), 以分为单位
|
||||||
|
'serv_chg' => 0,
|
||||||
|
//佣金
|
||||||
|
'commission' => 0,
|
||||||
|
//证书
|
||||||
|
'check' => [
|
||||||
|
'self' => [
|
||||||
|
'private' => storage_path('cert/unionpay/self/private_rsa.pem'),
|
||||||
|
'public' => storage_path('cert/unionpay/self/public_rsa.pem'),
|
||||||
|
],
|
||||||
|
'unionpay' => [
|
||||||
|
'public' => storage_path('cert/unionpay/public_rsa.pem'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'type' => [
|
||||||
|
'002025' => '查询',
|
||||||
|
'002100' => '交易',
|
||||||
|
'002101' => '冲正',
|
||||||
|
'002102' => '撤销',
|
||||||
|
],
|
||||||
|
'log_type' => [
|
||||||
|
'002025' => 'query',
|
||||||
|
'002100' => 'freezecoupon',
|
||||||
|
'002101' => 'reversal',
|
||||||
|
'002102' => 'annul',
|
||||||
|
],
|
||||||
|
//需要校验的数据
|
||||||
|
'validator' => [
|
||||||
|
'002025' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_ver",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"req_serial_no",
|
||||||
|
"mkt_code",
|
||||||
|
"amount",
|
||||||
|
"avl_amt",
|
||||||
|
],
|
||||||
|
'002100' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",
|
||||||
|
"orig_req_serial_no",
|
||||||
|
"sett_date",
|
||||||
|
"txn_date",
|
||||||
|
"txn_time",
|
||||||
|
"orig_amt",
|
||||||
|
"discount_amt",
|
||||||
|
],
|
||||||
|
'002101' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",
|
||||||
|
"orig_req_serial_no",
|
||||||
|
],
|
||||||
|
'002102' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",
|
||||||
|
"orig_req_serial_no",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
//入库基础数据
|
||||||
|
'regular' => [
|
||||||
|
'002025' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_ver",
|
||||||
|
"msg_sys_sn",//自己添加的基础数据
|
||||||
|
"req_serial_no",//自己添加的基础数据
|
||||||
|
"mkt_code",//自己添加的基础数据
|
||||||
|
],
|
||||||
|
'002100' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",//自己添加的基础数据
|
||||||
|
"orig_req_serial_no",//自己添加的基础数据
|
||||||
|
"sett_date",//自己添加的基础数据
|
||||||
|
],
|
||||||
|
'002101' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",//自己添加的基础数据
|
||||||
|
"orig_req_serial_no",//自己添加的基础数据
|
||||||
|
],
|
||||||
|
'002102' => [
|
||||||
|
"msg_type",
|
||||||
|
"msg_txn_code",
|
||||||
|
"msg_crrltn_id",
|
||||||
|
"msg_flg",
|
||||||
|
"msg_sender",
|
||||||
|
"msg_time",
|
||||||
|
"msg_sys_sn",
|
||||||
|
"msg_ver",
|
||||||
|
"req_serial_no",//自己添加的基础数据
|
||||||
|
"orig_req_serial_no",//自己添加的基础数据
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'fields' => [
|
||||||
|
//聚合营销优惠查询接口
|
||||||
|
'002025' => [
|
||||||
|
'in' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "报文流水号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"req_serial_no" => "查询流水号",
|
||||||
|
"shop_no" => "门店号",
|
||||||
|
"term_no" => "受理终端号",
|
||||||
|
"service_code" => "受理方式",
|
||||||
|
"voucher_no" => "受理凭证号",
|
||||||
|
"mkt_code" => "聚合营销码",
|
||||||
|
"mkt_mode" => "聚合营销类型",
|
||||||
|
"embedded_mchnt_no" => "发起渠道商户号",
|
||||||
|
"currency_code" => "货币代码",
|
||||||
|
"amount" => "消费金额",
|
||||||
|
"avl_amt" => "可优惠金额",
|
||||||
|
"term_sp_chnl_no" => "终端指定SP渠道号",
|
||||||
|
"func_code" => "功能码",
|
||||||
|
"times" => "次数",
|
||||||
|
"pay_mode" => "支付方式",
|
||||||
|
//用户附加信息
|
||||||
|
"user_ext_info" => [
|
||||||
|
"mobile_no" => "手机号",
|
||||||
|
"user_code" => "用户号",
|
||||||
|
"user_code_type" => "用户号类型",
|
||||||
|
"dev_id" => "设备id",
|
||||||
|
],
|
||||||
|
"sign" => "签名域",
|
||||||
|
],
|
||||||
|
'out' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "报文流水号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_rsp_code" => "响应码",
|
||||||
|
"msg_rsp_desc" => "响应码描述",
|
||||||
|
"discount" => "折扣金额",
|
||||||
|
"actual_amt" => "折后应收金额",
|
||||||
|
"pos_display" => "POS显示",
|
||||||
|
"pos_receipt" => "POS小票",
|
||||||
|
"pos_ad" => "POS广告",
|
||||||
|
"pos_mkt_ad" => "Pos_营销联盟广告",
|
||||||
|
"sign" => "签名域",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
//销账交易接口
|
||||||
|
'002100' => [
|
||||||
|
'in' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"shop_no" => "门店号",
|
||||||
|
"term_no" => "终端号",
|
||||||
|
"req_serial_no" => "销券流水号",
|
||||||
|
"orig_req_serial_no" => "原查询流水号",
|
||||||
|
"enc_card_no" => "加密卡号",
|
||||||
|
"part_card_no" => "部分卡号",
|
||||||
|
"acq_term_sn" => "受理终端流水号",
|
||||||
|
"refer_no" => "检索参考号",
|
||||||
|
"sett_date" => "清算日期",
|
||||||
|
"txn_date" => "交易日期",
|
||||||
|
"txn_time" => "交易时间",
|
||||||
|
"orig_amt" => "原始金额",
|
||||||
|
"discount_amt" => "优惠的金额",
|
||||||
|
"pay_amt" => "支付金额",
|
||||||
|
"pay_mode" => "支付方式",
|
||||||
|
"order_no" => "订单号",
|
||||||
|
"trans_crrltn_no" => "交易关联流水号",
|
||||||
|
"equity_no" => "权益号",
|
||||||
|
"card_no" => "全卡号",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
'out' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"msg_rsp_code" => "响应码",
|
||||||
|
"msg_rsp_desc" => "响应码描述",
|
||||||
|
"orig_amt" => "原始金额",
|
||||||
|
"discount_amt" => "折扣金额",
|
||||||
|
"pay_amt" => "支付金额",
|
||||||
|
"serv_chg" => "服务费",
|
||||||
|
"commission" => "佣金",
|
||||||
|
"ad" => "广告",
|
||||||
|
"pos_receipt" => "POS优惠",
|
||||||
|
"coupon_no" => "凭证号",
|
||||||
|
"coupon_type" => "凭证类型",
|
||||||
|
"sp_biz_code" => "SP统计码",
|
||||||
|
"charge_code" => "计费码",
|
||||||
|
"pos_event_title" => "SP活动主题",
|
||||||
|
"sp_contact" => "SP联系电话",
|
||||||
|
"sp_name" => "SP名称",
|
||||||
|
"event_no" => "活动号",
|
||||||
|
"td_code" => "二维码",
|
||||||
|
"memo" => "附言",
|
||||||
|
"mkt_sp_chnl_no" => "营销渠道号",
|
||||||
|
"point_amt" => "积分抵扣金额",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
//销账冲正通知接口
|
||||||
|
'002101' => [
|
||||||
|
'in' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"shop_no" => "门店号",
|
||||||
|
"term_no" => "终端号",
|
||||||
|
"req_serial_no" => "冲正流水号",
|
||||||
|
"orig_req_serial_no" => "原始销账流水号",
|
||||||
|
"trans_crrltn_no" => "交易关联流水号",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
'out' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"msg_rsp_code" => "响应码",
|
||||||
|
"msg_rsp_desc" => "响应码描述",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'002102' => [
|
||||||
|
'in' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"shop_no" => "门店号",
|
||||||
|
"term_no" => "终端号",
|
||||||
|
"req_serial_no" => "撤销流水号",
|
||||||
|
"orig_req_serial_no" => "原始销账流水号",
|
||||||
|
"trans_crrltn_no" => "交易关联流水号",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
'out' => [
|
||||||
|
"msg_type" => "报文类型",
|
||||||
|
"msg_txn_code" => "交易代码",
|
||||||
|
"msg_crrltn_id" => "消息关联号",
|
||||||
|
"msg_flg" => "报文请求应答标志",
|
||||||
|
"msg_sender" => "报文发送方",
|
||||||
|
"msg_time" => "报文日期",
|
||||||
|
"msg_sys_sn" => "平台流水号",
|
||||||
|
"msg_ver" => "报文版本号",
|
||||||
|
"msg_rsp_code" => "响应码",
|
||||||
|
"msg_rsp_desc" => "响应码描述",
|
||||||
|
"ad" => "广告",
|
||||||
|
"td_code" => "二维码",
|
||||||
|
"sign" => "签名数据",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
];
|
||||||
243
packages/unionpay/src/Action/Init.php
Normal file
243
packages/unionpay/src/Action/Init.php
Normal file
@@ -0,0 +1,243 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\UnionPay\Action;
|
||||||
|
|
||||||
|
use App\Exceptions\ApiException;
|
||||||
|
use App\Exceptions\ApiUnionpayException;
|
||||||
|
use App\Models\Log as LogModel;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class Init
|
||||||
|
{
|
||||||
|
|
||||||
|
//传入的参数
|
||||||
|
public $params;
|
||||||
|
|
||||||
|
//传入的签名
|
||||||
|
public $sign;
|
||||||
|
|
||||||
|
public $msg_type = '00';
|
||||||
|
|
||||||
|
public $msg_txn_code;
|
||||||
|
|
||||||
|
public $msg_sender;
|
||||||
|
|
||||||
|
public $msg_rsp_code = '0000';
|
||||||
|
|
||||||
|
public $msg_rsp_desc = '成功';
|
||||||
|
|
||||||
|
//入库的模型
|
||||||
|
public $model;
|
||||||
|
|
||||||
|
//返回的数据
|
||||||
|
public $outdata;
|
||||||
|
|
||||||
|
//网点id
|
||||||
|
public $outlet_id;
|
||||||
|
|
||||||
|
//渠道id
|
||||||
|
public $agent_id;
|
||||||
|
|
||||||
|
//日志
|
||||||
|
public $log;
|
||||||
|
|
||||||
|
//幂等数据
|
||||||
|
public $info;
|
||||||
|
|
||||||
|
//内存
|
||||||
|
public $mem;
|
||||||
|
|
||||||
|
//开始内存
|
||||||
|
public $startMemory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 验签
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/9/30 8:39
|
||||||
|
* @param false $self 是否是自己的证书
|
||||||
|
* @return bool|string
|
||||||
|
*/
|
||||||
|
public function checkSign($out = true, $self = false)
|
||||||
|
{
|
||||||
|
$sign = $this->hexXbin($this->sign);
|
||||||
|
if (!$sign) {
|
||||||
|
throw new \Exception('签名错误');
|
||||||
|
}
|
||||||
|
$public_key = $this->getPublic($self);
|
||||||
|
|
||||||
|
$pub_key_id = openssl_get_publickey($public_key);
|
||||||
|
|
||||||
|
$signStr = $this->getSignString($out);
|
||||||
|
|
||||||
|
if ($pub_key_id) {
|
||||||
|
$result = (bool)openssl_verify($signStr, $sign, $pub_key_id);
|
||||||
|
openssl_free_key($pub_key_id);
|
||||||
|
} else {
|
||||||
|
throw new \Exception('私钥格式有误');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 校验sign
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/10/13 15:21
|
||||||
|
* @param $data
|
||||||
|
* @param false $types
|
||||||
|
* @return int|string
|
||||||
|
*/
|
||||||
|
public function hexXbin($sign, $types = false)
|
||||||
|
{
|
||||||
|
// 过滤非16进制字符
|
||||||
|
$checkStr = strspn($sign, '0123456789abcdefABCDEF');
|
||||||
|
//字符串长度不是偶数时pack来处理
|
||||||
|
if (strlen($checkStr) % 2) {
|
||||||
|
return pack("H*", $sign);
|
||||||
|
} else {
|
||||||
|
return hex2bin($sign);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 签名
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/10/9 15:52
|
||||||
|
* @param bool $self
|
||||||
|
* @return string
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
public function getSign($out = true)
|
||||||
|
{
|
||||||
|
$signStr = $this->getSignString($out);
|
||||||
|
$private_key = $this->getPrivate();
|
||||||
|
|
||||||
|
$privKeyId = openssl_pkey_get_private($private_key);
|
||||||
|
if (!$privKeyId) {
|
||||||
|
throw new \Exception('私钥格式有误');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (openssl_sign($signStr, $signature, $privKeyId)) {
|
||||||
|
$signature = bin2hex($signature);
|
||||||
|
} else {
|
||||||
|
throw new \Exception('签名错误');
|
||||||
|
}
|
||||||
|
|
||||||
|
openssl_free_key($privKeyId);
|
||||||
|
|
||||||
|
return $signature;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 获取待签名字符串
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/9/30 9:38
|
||||||
|
* @param $out 是否是获取返回值的数据
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getSignString($out = false)
|
||||||
|
{
|
||||||
|
if ($out) {
|
||||||
|
$params = array_filter($this->outdata);
|
||||||
|
} else {
|
||||||
|
$params = array_filter($this->params);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($params)) {
|
||||||
|
throw new \Exception('缺少数据');
|
||||||
|
}
|
||||||
|
|
||||||
|
ksort($params);
|
||||||
|
|
||||||
|
//http_build_query 会自动urlencode 需要转换
|
||||||
|
return $this->str2utf8(urldecode(http_build_query($params)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取私钥
|
||||||
|
public function getPrivate()
|
||||||
|
{
|
||||||
|
$private = config('unionpay.check.self.private');
|
||||||
|
|
||||||
|
if (!file_exists($private)) {
|
||||||
|
throw new \Exception('缺少私钥文件');
|
||||||
|
}
|
||||||
|
|
||||||
|
return file_get_contents($private);
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取公钥
|
||||||
|
public function getPublic($self = false)
|
||||||
|
{
|
||||||
|
$public = config('unionpay.check.unionpay.public');
|
||||||
|
|
||||||
|
if ($self) {
|
||||||
|
$public = config('unionpay.check.self.public');
|
||||||
|
}
|
||||||
|
|
||||||
|
return file_get_contents($public);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 插入日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/10/9 14:38
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function addLog()
|
||||||
|
{
|
||||||
|
$log_type = config('unionpay.log_type');
|
||||||
|
$data = [
|
||||||
|
'path' => request()->url(),
|
||||||
|
'method' => request()->method(),
|
||||||
|
'type' => $log_type[$this->msg_txn_code] ?? $this->msg_txn_code,
|
||||||
|
'in_source' => $this->params,
|
||||||
|
];
|
||||||
|
|
||||||
|
return $this->log = LogModel::create($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 更新日志
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/10/9 14:46
|
||||||
|
*/
|
||||||
|
public function updateLog()
|
||||||
|
{
|
||||||
|
$this->log->out_source = $this->outdata;
|
||||||
|
$this->log->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字符串编码转为 utf8
|
||||||
|
* @param $str
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function str2utf8($str)
|
||||||
|
{
|
||||||
|
$encode = mb_detect_encoding($str, ['ASCII', 'UTF-8', 'GB2312', 'GBK', 'BIG5']);
|
||||||
|
if ($encode != 'UTF-8') {
|
||||||
|
$str = $str ? $str : mb_convert_encoding($str, 'UTF-8', $encode);
|
||||||
|
}
|
||||||
|
$str = is_string($str) ? $str : '';
|
||||||
|
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
//输出数据
|
||||||
|
public function respond()
|
||||||
|
{
|
||||||
|
$rt = microtime(true) - LARAVEL_START;
|
||||||
|
|
||||||
|
$header = [
|
||||||
|
'rt' => round($rt * 1000, 2) . 'ms',
|
||||||
|
'qps' => round(1 / $rt, 1), 'company' => 'YSD',
|
||||||
|
'startMemory' => $this->startMemory,
|
||||||
|
'endMemory' => round(memory_get_usage() / 1024 / 1024, 2),
|
||||||
|
];
|
||||||
|
|
||||||
|
return \Response::json($this->outdata, 200, $header);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
54
packages/unionpay/src/Action/Query.php
Normal file
54
packages/unionpay/src/Action/Query.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\UnionPay\Action;
|
||||||
|
|
||||||
|
use XuanChen\Coupon\Coupon;
|
||||||
|
use XuanChen\UnionPay\Contracts\Contracts;
|
||||||
|
use XuanChen\UnionPay\UnionPay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class 查询
|
||||||
|
* @Author : 玄尘
|
||||||
|
* @Date : 2020/10/28 16:17
|
||||||
|
* @package XuanChen\UnionPay\Action
|
||||||
|
*/
|
||||||
|
class Query implements Contracts
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parent unionpay.
|
||||||
|
* @var UnionPay
|
||||||
|
*/
|
||||||
|
protected $unionpay;
|
||||||
|
|
||||||
|
public function __construct(UnionPay &$unionpay)
|
||||||
|
{
|
||||||
|
$this->unionpay = $unionpay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$res = Coupon::Query($this->unionpay->params['mkt_code'], $this->unionpay->outlet_id);
|
||||||
|
|
||||||
|
if (is_array($res)) {
|
||||||
|
$this->unionpay->outdata['pos_display'] = $res['name'];
|
||||||
|
$this->unionpay->outdata['discount'] = $res['price'] * 100;
|
||||||
|
$this->unionpay->outdata['actual_amt'] = (int)bcsub($this->unionpay->params['amount'], $res['price'] * 100);
|
||||||
|
} else {
|
||||||
|
$this->unionpay->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->unionpay->outdata['msg_rsp_desc'] = $res;
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->unionpay->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->unionpay->outdata['msg_rsp_desc'] = $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function back()
|
||||||
|
{
|
||||||
|
return $this->unionpay->outdata;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
65
packages/unionpay/src/Action/Redemption.php
Normal file
65
packages/unionpay/src/Action/Redemption.php
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\UnionPay\Action;
|
||||||
|
|
||||||
|
use App\Models\ActivityCoupon;
|
||||||
|
use App\Models\UnionpayLog;
|
||||||
|
use App\Models\User;
|
||||||
|
use XuanChen\Coupon\Coupon;
|
||||||
|
use XuanChen\UnionPay\Contracts\Contracts;
|
||||||
|
use XuanChen\UnionPay\UnionPay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Redemption 核销
|
||||||
|
* @Author : 玄尘
|
||||||
|
* @Date : 2020/10/28 16:17
|
||||||
|
* @package XuanChen\UnionPay\Action
|
||||||
|
*/
|
||||||
|
class Redemption implements Contracts
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parent unionpay.
|
||||||
|
* @var UnionPay
|
||||||
|
*/
|
||||||
|
protected $unionpay;
|
||||||
|
|
||||||
|
public function __construct(UnionPay &$unionpay)
|
||||||
|
{
|
||||||
|
$this->unionpay = $unionpay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
//查询聚合信息
|
||||||
|
$query = UnionpayLog::where('req_serial_no', $this->unionpay->params['orig_req_serial_no'])
|
||||||
|
->where('msg_txn_code', '002025')
|
||||||
|
->latest()
|
||||||
|
->first();
|
||||||
|
if (!$query) {
|
||||||
|
$this->unionpay->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->unionpay->outdata['msg_rsp_desc'] = '销账失败,未查询到前置数据。';
|
||||||
|
} else {
|
||||||
|
$this->unionpay->outdata['orig_amt'] = (int)$query->in_source['amount']; //订单金额 原始金额
|
||||||
|
$this->unionpay->outdata['discount_amt'] = $query->out_source['discount']; //折扣金额
|
||||||
|
$this->unionpay->outdata['pay_amt'] = $query->out_source['actual_amt']; //折扣后金额
|
||||||
|
|
||||||
|
//获取银联渠道
|
||||||
|
$user = User::find($this->unionpay->agent_id);
|
||||||
|
|
||||||
|
$coupon = Coupon::Redemption($user, $query->mkt_code, $this->unionpay->params['orig_amt'] / 100, $this->unionpay->outlet_id, '');
|
||||||
|
if (!is_array($coupon)) {
|
||||||
|
$this->unionpay->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->unionpay->outdata['msg_rsp_desc'] = $coupon;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function back()
|
||||||
|
{
|
||||||
|
return $this->unionpay->outdata;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
80
packages/unionpay/src/Action/Reversal.php
Normal file
80
packages/unionpay/src/Action/Reversal.php
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\UnionPay\Action;
|
||||||
|
|
||||||
|
use App\Models\UnionpayLog;
|
||||||
|
use XuanChen\Coupon\Coupon;
|
||||||
|
use App\Models\Coupon as CouponModel;
|
||||||
|
use XuanChen\UnionPay\Contracts\Contracts;
|
||||||
|
use XuanChen\UnionPay\UnionPay;
|
||||||
|
|
||||||
|
class Reversal implements Contracts
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parent unionpay.
|
||||||
|
* @var UnionPay
|
||||||
|
*/
|
||||||
|
protected $unionpay;
|
||||||
|
|
||||||
|
public function __construct(UnionPay &$unionpay)
|
||||||
|
{
|
||||||
|
$this->unionpay = $unionpay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
//查询聚合信息
|
||||||
|
$info = UnionpayLog::where('req_serial_no', $this->unionpay->params['orig_req_serial_no'])
|
||||||
|
->where('msg_txn_code', '002100')
|
||||||
|
->where('status', 1)
|
||||||
|
->latest()
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($info) {
|
||||||
|
$query = UnionpayLog::where('req_serial_no', $info->orig_req_serial_no)
|
||||||
|
->where('msg_txn_code', '002025')
|
||||||
|
->where('status', 1)
|
||||||
|
->latest()
|
||||||
|
->first();
|
||||||
|
|
||||||
|
$coupon = CouponModel::where('redemptionCode', $query->mkt_code)
|
||||||
|
->where('status', 2)
|
||||||
|
->latest()
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if ($query && $coupon) {
|
||||||
|
//优惠券核销成功
|
||||||
|
if ($coupon->status == 2) {
|
||||||
|
$res = Coupon::Reversal($coupon->redemptionCode, $this->unionpay->outlet_id);
|
||||||
|
if ($res !== true) {
|
||||||
|
$this->unionpay->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->unionpay->outdata['msg_rsp_desc'] = $res;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$this->unionpay->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->unionpay->outdata['msg_rsp_desc'] = '优惠券状态不对';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$this->unionpay->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->unionpay->outdata['msg_rsp_desc'] = '未查询到卡券信息。';
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$this->unionpay->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->unionpay->outdata['msg_rsp_desc'] = '未查询到销账接口数据。';
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->unionpay->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->unionpay->outdata['msg_rsp_desc'] = $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function back()
|
||||||
|
{
|
||||||
|
return $this->unionpay->outdata;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
16
packages/unionpay/src/Contracts/Contracts.php
Normal file
16
packages/unionpay/src/Contracts/Contracts.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\UnionPay\Contracts;
|
||||||
|
|
||||||
|
interface Contracts
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* start
|
||||||
|
* @return [type] [description]
|
||||||
|
*/
|
||||||
|
function start();
|
||||||
|
|
||||||
|
function back();
|
||||||
|
|
||||||
|
}
|
||||||
31
packages/unionpay/src/ServiceProvider.php
Normal file
31
packages/unionpay/src/ServiceProvider.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\UnionPay;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
|
||||||
|
|
||||||
|
class ServiceProvider extends LaravelServiceProvider
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register services.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
if ($this->app->runningInConsole()) {
|
||||||
|
$this->publishes([__DIR__ . '/../config/unionpay.php' => config_path('unionpay.php')]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap services.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
$this->mergeConfigFrom(__DIR__ . '/../config/unionpay.php', 'unionpay');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
256
packages/unionpay/src/UnionPay.php
Normal file
256
packages/unionpay/src/UnionPay.php
Normal file
@@ -0,0 +1,256 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace XuanChen\UnionPay;
|
||||||
|
|
||||||
|
use App\Models\UnionpayLog;
|
||||||
|
use App\Models\User;
|
||||||
|
use XuanChen\UnionPay\Action\Init;
|
||||||
|
use XuanChen\Coupon\Coupon;
|
||||||
|
use XuanChen\UnionPay\Action\Query;
|
||||||
|
use XuanChen\UnionPay\Action\Redemption;
|
||||||
|
use XuanChen\UnionPay\Action\Reversal;
|
||||||
|
use XuanChen\UnionPay\Action\Skyxu;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银联入口
|
||||||
|
*/
|
||||||
|
class UnionPay extends Init
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UnionPay constructor.
|
||||||
|
* @param $params
|
||||||
|
* @param string $sign
|
||||||
|
*/
|
||||||
|
public function __construct($params, $sign = '')
|
||||||
|
{
|
||||||
|
$this->params = $params;
|
||||||
|
$this->sign = $sign;
|
||||||
|
$this->msg_txn_code = $params['msg_txn_code'] ?? '';
|
||||||
|
$this->msg_sender = config('unionpay.msg_sender');
|
||||||
|
$this->agent_id = config('unionpay.agent_id');
|
||||||
|
$this->outlet_id = config('unionpay.outlet_id');
|
||||||
|
$this->startMemory = round(memory_get_usage() / 1024 / 1024, 2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 入口
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/10/9 9:33
|
||||||
|
*/
|
||||||
|
public function start()
|
||||||
|
{
|
||||||
|
//设置基础数据
|
||||||
|
$this->getOutBaseData();
|
||||||
|
|
||||||
|
try {
|
||||||
|
//校验数据
|
||||||
|
$this->checkInData();
|
||||||
|
//查询是否是幂等 就是重复查询
|
||||||
|
$this->idempotent();
|
||||||
|
//入库请求参数
|
||||||
|
$this->InputData();
|
||||||
|
//返回值
|
||||||
|
$this->out_data();
|
||||||
|
//更新数据
|
||||||
|
$this->updateOutData();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
$this->outdata['msg_rsp_code'] = '9999';
|
||||||
|
$this->outdata['msg_rsp_desc'] = $e->getMessage();
|
||||||
|
if (empty($this->model->out_source)) {
|
||||||
|
$this->updateOutData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//处理流程
|
||||||
|
public function out_data()
|
||||||
|
{
|
||||||
|
//是幂等
|
||||||
|
if ($this->info && !empty($this->info->out_source)) {
|
||||||
|
$this->outdata = $this->info->out_source;
|
||||||
|
} else {
|
||||||
|
if ($this->msg_rsp_code == '0000') {
|
||||||
|
switch ($this->msg_txn_code) {
|
||||||
|
case '002025'://聚合营销优惠查询接口
|
||||||
|
$action = new Query($this);
|
||||||
|
$action->start();
|
||||||
|
break;
|
||||||
|
case '002100'://销账交易接口
|
||||||
|
$action = new Redemption($this);
|
||||||
|
$action->start();
|
||||||
|
$this->outdata = $action->back();
|
||||||
|
break;
|
||||||
|
case '002101'://冲正
|
||||||
|
case '002102'://撤销
|
||||||
|
$action = new Reversal($this);
|
||||||
|
$action->start();
|
||||||
|
$this->outdata = $action->back();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$this->outdata['msg_rsp_code'] = $this->msg_rsp_code;
|
||||||
|
$this->outdata['msg_rsp_desc'] = $this->msg_rsp_desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 入库数据
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/9/30 8:46
|
||||||
|
*/
|
||||||
|
private function InputData()
|
||||||
|
{
|
||||||
|
//获取基础数据
|
||||||
|
$base = config('unionpay.regular')[$this->msg_txn_code];
|
||||||
|
$data = [];
|
||||||
|
//循环获取入库数据
|
||||||
|
foreach ($this->params as $key => $param) {
|
||||||
|
if (in_array($key, $base)) {
|
||||||
|
$data[$key] = $param;
|
||||||
|
} else {
|
||||||
|
$data['in_source'][$key] = $param;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->model = UnionpayLog::create($data);
|
||||||
|
|
||||||
|
if (empty($this->model)) {
|
||||||
|
throw new \Exception('数据入库失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 校验输入的数据
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/9/30 14:46
|
||||||
|
*/
|
||||||
|
public function checkInData()
|
||||||
|
{
|
||||||
|
//验签
|
||||||
|
// $res = $this->checkSign(false, false);
|
||||||
|
//
|
||||||
|
// if ($res !== true) {
|
||||||
|
// $this->msg_rsp_code = 9996;
|
||||||
|
// $this->msg_rsp_desc = '验签失败';
|
||||||
|
// }
|
||||||
|
|
||||||
|
if ($this->msg_txn_code && $this->msg_rsp_code == '0000') {
|
||||||
|
$rule_code = config('unionpay.validator')[$this->msg_txn_code];
|
||||||
|
$rule_msg = config('unionpay.fields')[$this->msg_txn_code]['in'];
|
||||||
|
|
||||||
|
foreach ($rule_code as $item) {
|
||||||
|
$rule[$item] = 'required';
|
||||||
|
$msg[$item . '.required'] = $rule_msg[$item] . '不能为空';
|
||||||
|
}
|
||||||
|
$validator = \Validator::make($this->params, $rule, $msg);
|
||||||
|
|
||||||
|
if ($validator->fails()) {
|
||||||
|
$this->msg_rsp_code = 9996;
|
||||||
|
$this->msg_rsp_desc = $validator->errors()->first();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$this->msg_rsp_code = 9996;
|
||||||
|
$this->msg_rsp_desc = $this->msg_rsp_code == '0000' ? '平台流水号不能为空。' : $this->msg_rsp_desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 返回的基础数据
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/9/30 14:48
|
||||||
|
*/
|
||||||
|
public function getOutBaseData()
|
||||||
|
{
|
||||||
|
$basics = [
|
||||||
|
"msg_type" => $this->msg_type,
|
||||||
|
"msg_txn_code" => $this->msg_txn_code,
|
||||||
|
"msg_crrltn_id" => $this->params['msg_crrltn_id'],
|
||||||
|
"msg_flg" => 1,
|
||||||
|
"msg_sender" => $this->msg_sender,
|
||||||
|
"msg_time" => now()->format('YmdHis'),
|
||||||
|
"msg_sys_sn" => $this->params['msg_sys_sn'] ?? '',
|
||||||
|
"msg_rsp_code" => $this->msg_rsp_code,
|
||||||
|
"msg_rsp_desc" => $this->msg_rsp_desc,
|
||||||
|
];
|
||||||
|
|
||||||
|
switch ($this->msg_txn_code) {
|
||||||
|
//查询
|
||||||
|
case '002025':
|
||||||
|
$basics = array_merge($basics, [
|
||||||
|
"discount" => 0,
|
||||||
|
"actual_amt" => 0,
|
||||||
|
"pos_display" => "",
|
||||||
|
// "pos_receipt" => config('unionpay.pos_receipt'),
|
||||||
|
// "pos_ad" => config('unionpay.pos_ad'),
|
||||||
|
"pos_mkt_ad" => config('unionpay.pos_receipt'),
|
||||||
|
]);
|
||||||
|
break;
|
||||||
|
//销账
|
||||||
|
case '002100':
|
||||||
|
$basics = array_merge($basics, [
|
||||||
|
'msg_ver' => 0.1,
|
||||||
|
'orig_amt' => $this->params['orig_amt'],
|
||||||
|
'discount_amt' => $this->params['discount_amt'],
|
||||||
|
'pay_amt' => $this->params['pay_amt'],
|
||||||
|
'serv_chg' => config('unionpay.serv_chg'),
|
||||||
|
'commission' => config('unionpay.commission'),
|
||||||
|
'event_no' => '',//活动号 直接为空就可以
|
||||||
|
]);
|
||||||
|
break;
|
||||||
|
//冲正
|
||||||
|
case '002101':
|
||||||
|
//撤销
|
||||||
|
case '002102':
|
||||||
|
$basics = array_merge($basics, [
|
||||||
|
'msg_ver' => 0.1,
|
||||||
|
]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->outdata = $basics;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 查询是否是幂等
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/10/10 13:25
|
||||||
|
*/
|
||||||
|
public function idempotent()
|
||||||
|
{
|
||||||
|
$this->info = UnionpayLog::where('req_serial_no', $this->params['req_serial_no'])
|
||||||
|
->where('msg_txn_code', $this->msg_txn_code)
|
||||||
|
->where('status', 1)
|
||||||
|
->latest()
|
||||||
|
->first();
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新返回值
|
||||||
|
public function updateOutData()
|
||||||
|
{
|
||||||
|
$this->outdata['sign'] = $this->getSign();
|
||||||
|
//如果有入库模型
|
||||||
|
if ($this->model) {
|
||||||
|
$this->model->out_source = $this->outdata;
|
||||||
|
if ($this->outdata['msg_rsp_code'] != '0000') {
|
||||||
|
$this->model->status = 0;
|
||||||
|
}
|
||||||
|
$this->model->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
267
storage/logs/laravel-2020-06-28.log
Normal file
267
storage/logs/laravel-2020-06-28.log
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
[2020-06-28 11:42:16] local.ERROR: Class 'App\Admin\Controllers\Activity\Activity' not found {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Class 'App\\Admin\\Controllers\\Activity\\Activity' not found at /home/wwwroot/pingan/app/Admin/Controllers/Activity/RuleController.php:44)
|
||||||
|
[stacktrace]
|
||||||
|
#0 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Controllers/AdminController.php(100): App\\Admin\\Controllers\\Activity\\RuleController->form()
|
||||||
|
#1 [internal function]: Encore\\Admin\\Controllers\\AdminController->create(Object(Encore\\Admin\\Layout\\Content))
|
||||||
|
#2 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
|
||||||
|
#3 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('create', Array)
|
||||||
|
#4 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Admin\\Controllers\\Activity\\RuleController), 'create')
|
||||||
|
#5 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
|
||||||
|
#6 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Route->run()
|
||||||
|
#7 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#8 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Permission.php(46): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#9 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Permission->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#10 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Bootstrap.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#11 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Bootstrap->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#12 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/LogOperation.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#13 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\LogOperation->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#14 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Pjax.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#15 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Pjax->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#16 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Authenticate.php(26): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#17 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#18 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#19 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#20 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(76): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#21 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#22 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#23 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#24 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#25 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#26 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#27 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#28 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#29 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#30 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#31 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
|
||||||
|
#32 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
|
||||||
|
#33 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
|
||||||
|
#34 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
|
||||||
|
#35 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(177): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
|
||||||
|
#36 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#37 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#38 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#39 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#40 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#41 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#42 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#43 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#44 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#45 /home/wwwroot/pingan/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#46 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#47 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#48 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(152): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
|
||||||
|
#49 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(117): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
|
||||||
|
#50 /home/wwwroot/pingan/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
|
||||||
|
#51 {main}
|
||||||
|
"}
|
||||||
|
[2020-06-28 13:32:00] local.ERROR: SQLSTATE[HY000]: General error: 1364 Field 'rule' doesn't have a default value (SQL: insert into `activities` (`title`, `description`, `user_id`, `activity_rule_id`, `type`, `days`, `status`, `code`, `updated_at`, `created_at`) values (ce, 21, ?, 1, 1, 60, 1, ysd20200636, 2020-06-28 13:32:00, 2020-06-28 13:32:00)) {"exception":"[object] (Illuminate\\Database\\QueryException(code: HY000): SQLSTATE[HY000]: General error: 1364 Field 'rule' doesn't have a default value (SQL: insert into `activities` (`title`, `description`, `user_id`, `activity_rule_id`, `type`, `days`, `status`, `code`, `updated_at`, `created_at`) values (ce, 21, ?, 1, 1, 60, 1, ysd20200636, 2020-06-28 13:32:00, 2020-06-28 13:32:00)) at /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669)
|
||||||
|
[stacktrace]
|
||||||
|
#0 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(629): Illuminate\\Database\\Connection->runQueryCallback('insert into `ac...', Array, Object(Closure))
|
||||||
|
#1 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(464): Illuminate\\Database\\Connection->run('insert into `ac...', Array, Object(Closure))
|
||||||
|
#2 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(416): Illuminate\\Database\\Connection->statement('insert into `ac...', Array)
|
||||||
|
#3 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\\Database\\Connection->insert('insert into `ac...', Array)
|
||||||
|
#4 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2670): Illuminate\\Database\\Query\\Processors\\Processor->processInsertGetId(Object(Illuminate\\Database\\Query\\Builder), 'insert into `ac...', Array, 'id')
|
||||||
|
#5 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1350): Illuminate\\Database\\Query\\Builder->insertGetId(Array, 'id')
|
||||||
|
#6 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(839): Illuminate\\Database\\Eloquent\\Builder->__call('insertGetId', Array)
|
||||||
|
#7 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(804): Illuminate\\Database\\Eloquent\\Model->insertAndSetId(Object(Illuminate\\Database\\Eloquent\\Builder), Array)
|
||||||
|
#8 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(667): Illuminate\\Database\\Eloquent\\Model->performInsert(Object(Illuminate\\Database\\Eloquent\\Builder))
|
||||||
|
#9 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Form.php(341): Illuminate\\Database\\Eloquent\\Model->save()
|
||||||
|
#10 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(29): Encore\\Admin\\Form->Encore\\Admin\\{closure}(Object(Illuminate\\Database\\MySqlConnection))
|
||||||
|
#11 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(349): Illuminate\\Database\\Connection->transaction(Object(Closure))
|
||||||
|
#12 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Database\\DatabaseManager->__call('transaction', Array)
|
||||||
|
#13 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Form.php(344): Illuminate\\Support\\Facades\\Facade::__callStatic('transaction', Array)
|
||||||
|
#14 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Controllers/HasResourceActions.php(26): Encore\\Admin\\Form->store()
|
||||||
|
#15 [internal function]: Encore\\Admin\\Controllers\\AdminController->store()
|
||||||
|
#16 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
|
||||||
|
#17 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('store', Array)
|
||||||
|
#18 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Admin\\Controllers\\Activity\\IndexController), 'store')
|
||||||
|
#19 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
|
||||||
|
#20 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Route->run()
|
||||||
|
#21 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#22 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Permission.php(46): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#23 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Permission->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#24 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Bootstrap.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#25 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Bootstrap->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#26 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/LogOperation.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#27 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\LogOperation->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#28 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Pjax.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#29 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Pjax->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#30 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Authenticate.php(26): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#31 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#32 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#33 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#34 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(76): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#35 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#36 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#37 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#38 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#39 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#40 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#41 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#42 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#43 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#44 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#45 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
|
||||||
|
#46 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
|
||||||
|
#47 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
|
||||||
|
#48 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
|
||||||
|
#49 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(177): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
|
||||||
|
#50 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#51 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#52 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#53 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#54 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#55 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#56 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#57 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#58 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#59 /home/wwwroot/pingan/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#60 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#61 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#62 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(152): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
|
||||||
|
#63 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(117): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
|
||||||
|
#64 /home/wwwroot/pingan/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
|
||||||
|
#65 {main}
|
||||||
|
|
||||||
|
[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDOException(code: HY000): SQLSTATE[HY000]: General error: 1364 Field 'rule' doesn't have a default value at /home/wwwroot/pingan/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:123)
|
||||||
|
[stacktrace]
|
||||||
|
#0 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(463): Doctrine\\DBAL\\Driver\\PDOStatement->execute()
|
||||||
|
#1 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(662): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('insert into `ac...', Array)
|
||||||
|
#2 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(629): Illuminate\\Database\\Connection->runQueryCallback('insert into `ac...', Array, Object(Closure))
|
||||||
|
#3 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(464): Illuminate\\Database\\Connection->run('insert into `ac...', Array, Object(Closure))
|
||||||
|
#4 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(416): Illuminate\\Database\\Connection->statement('insert into `ac...', Array)
|
||||||
|
#5 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\\Database\\Connection->insert('insert into `ac...', Array)
|
||||||
|
#6 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2670): Illuminate\\Database\\Query\\Processors\\Processor->processInsertGetId(Object(Illuminate\\Database\\Query\\Builder), 'insert into `ac...', Array, 'id')
|
||||||
|
#7 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1350): Illuminate\\Database\\Query\\Builder->insertGetId(Array, 'id')
|
||||||
|
#8 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(839): Illuminate\\Database\\Eloquent\\Builder->__call('insertGetId', Array)
|
||||||
|
#9 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(804): Illuminate\\Database\\Eloquent\\Model->insertAndSetId(Object(Illuminate\\Database\\Eloquent\\Builder), Array)
|
||||||
|
#10 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(667): Illuminate\\Database\\Eloquent\\Model->performInsert(Object(Illuminate\\Database\\Eloquent\\Builder))
|
||||||
|
#11 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Form.php(341): Illuminate\\Database\\Eloquent\\Model->save()
|
||||||
|
#12 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(29): Encore\\Admin\\Form->Encore\\Admin\\{closure}(Object(Illuminate\\Database\\MySqlConnection))
|
||||||
|
#13 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(349): Illuminate\\Database\\Connection->transaction(Object(Closure))
|
||||||
|
#14 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Database\\DatabaseManager->__call('transaction', Array)
|
||||||
|
#15 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Form.php(344): Illuminate\\Support\\Facades\\Facade::__callStatic('transaction', Array)
|
||||||
|
#16 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Controllers/HasResourceActions.php(26): Encore\\Admin\\Form->store()
|
||||||
|
#17 [internal function]: Encore\\Admin\\Controllers\\AdminController->store()
|
||||||
|
#18 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
|
||||||
|
#19 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('store', Array)
|
||||||
|
#20 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Admin\\Controllers\\Activity\\IndexController), 'store')
|
||||||
|
#21 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
|
||||||
|
#22 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Route->run()
|
||||||
|
#23 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#24 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Permission.php(46): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#25 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Permission->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#26 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Bootstrap.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#27 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Bootstrap->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#28 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/LogOperation.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#29 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\LogOperation->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#30 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Pjax.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#31 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Pjax->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#32 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Authenticate.php(26): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#33 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#34 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#35 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#36 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(76): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#37 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#38 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#39 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#40 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#41 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#42 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#43 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#44 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#45 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#46 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#47 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
|
||||||
|
#48 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
|
||||||
|
#49 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
|
||||||
|
#50 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
|
||||||
|
#51 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(177): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
|
||||||
|
#52 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#53 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#54 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#55 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#56 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#57 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#58 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#59 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#60 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#61 /home/wwwroot/pingan/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#62 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#63 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#64 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(152): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
|
||||||
|
#65 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(117): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
|
||||||
|
#66 /home/wwwroot/pingan/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
|
||||||
|
#67 {main}
|
||||||
|
|
||||||
|
[previous exception] [object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1364 Field 'rule' doesn't have a default value at /home/wwwroot/pingan/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:121)
|
||||||
|
[stacktrace]
|
||||||
|
#0 /home/wwwroot/pingan/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(121): PDOStatement->execute(NULL)
|
||||||
|
#1 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(463): Doctrine\\DBAL\\Driver\\PDOStatement->execute()
|
||||||
|
#2 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(662): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('insert into `ac...', Array)
|
||||||
|
#3 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(629): Illuminate\\Database\\Connection->runQueryCallback('insert into `ac...', Array, Object(Closure))
|
||||||
|
#4 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(464): Illuminate\\Database\\Connection->run('insert into `ac...', Array, Object(Closure))
|
||||||
|
#5 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Connection.php(416): Illuminate\\Database\\Connection->statement('insert into `ac...', Array)
|
||||||
|
#6 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\\Database\\Connection->insert('insert into `ac...', Array)
|
||||||
|
#7 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2670): Illuminate\\Database\\Query\\Processors\\Processor->processInsertGetId(Object(Illuminate\\Database\\Query\\Builder), 'insert into `ac...', Array, 'id')
|
||||||
|
#8 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1350): Illuminate\\Database\\Query\\Builder->insertGetId(Array, 'id')
|
||||||
|
#9 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(839): Illuminate\\Database\\Eloquent\\Builder->__call('insertGetId', Array)
|
||||||
|
#10 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(804): Illuminate\\Database\\Eloquent\\Model->insertAndSetId(Object(Illuminate\\Database\\Eloquent\\Builder), Array)
|
||||||
|
#11 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(667): Illuminate\\Database\\Eloquent\\Model->performInsert(Object(Illuminate\\Database\\Eloquent\\Builder))
|
||||||
|
#12 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Form.php(341): Illuminate\\Database\\Eloquent\\Model->save()
|
||||||
|
#13 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(29): Encore\\Admin\\Form->Encore\\Admin\\{closure}(Object(Illuminate\\Database\\MySqlConnection))
|
||||||
|
#14 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(349): Illuminate\\Database\\Connection->transaction(Object(Closure))
|
||||||
|
#15 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\\Database\\DatabaseManager->__call('transaction', Array)
|
||||||
|
#16 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Form.php(344): Illuminate\\Support\\Facades\\Facade::__callStatic('transaction', Array)
|
||||||
|
#17 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Controllers/HasResourceActions.php(26): Encore\\Admin\\Form->store()
|
||||||
|
#18 [internal function]: Encore\\Admin\\Controllers\\AdminController->store()
|
||||||
|
#19 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
|
||||||
|
#20 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('store', Array)
|
||||||
|
#21 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Admin\\Controllers\\Activity\\IndexController), 'store')
|
||||||
|
#22 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
|
||||||
|
#23 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Route->run()
|
||||||
|
#24 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#25 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Permission.php(46): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#26 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Permission->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#27 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Bootstrap.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#28 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Bootstrap->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#29 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/LogOperation.php(38): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#30 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\LogOperation->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#31 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Pjax.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#32 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Pjax->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#33 /home/wwwroot/pingan/vendor/encore/laravel-admin/src/Middleware/Authenticate.php(26): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#34 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\\Admin\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#35 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#36 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#37 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(76): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#38 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#39 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#40 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#41 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#42 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#43 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#44 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#45 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#46 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#47 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#48 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
|
||||||
|
#49 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
|
||||||
|
#50 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
|
||||||
|
#51 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
|
||||||
|
#52 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(177): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
|
||||||
|
#53 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#54 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#55 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#56 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#57 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#58 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#59 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#60 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#61 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#62 /home/wwwroot/pingan/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#63 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
|
||||||
|
#64 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
|
||||||
|
#65 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(152): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
|
||||||
|
#66 /home/wwwroot/pingan/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(117): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
|
||||||
|
#67 /home/wwwroot/pingan/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
|
||||||
|
#68 {main}
|
||||||
|
"}
|
||||||
Reference in New Issue
Block a user