增加测试代码
This commit is contained in:
@@ -120,7 +120,7 @@ trait ApiResponse
|
|||||||
* @Author :<C.Jason>
|
* @Author :<C.Jason>
|
||||||
* @Date :2018-05-22
|
* @Date :2018-05-22
|
||||||
* @param [type] $data [description]
|
* @param [type] $data [description]
|
||||||
* @param string $status [description]
|
* @param string $log
|
||||||
* @return [type] [description]
|
* @return [type] [description]
|
||||||
*/
|
*/
|
||||||
public function success($data, $log = '')
|
public function success($data, $log = '')
|
||||||
|
|||||||
@@ -258,4 +258,48 @@ class TestController
|
|||||||
return number_format(microtime(true) - request()->server('REQUEST_TIME_FLOAT'), $decimals) . ' s';
|
return number_format(microtime(true) - request()->server('REQUEST_TIME_FLOAT'), $decimals) . ' s';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notes: 测试签名
|
||||||
|
* @Author: 玄尘
|
||||||
|
* @Date : 2020/12/30 11:47
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
*/
|
||||||
|
public function getSign(Request $request)
|
||||||
|
{
|
||||||
|
|
||||||
|
// $data = 'SMyBpCxqBnxAGr/Fk9LOB851Glkgc3ruZnu1Y0ft/R+Ng26ooLXok1Oi1SrwhSJaQ9U75zy3tI7fq3YfTLQxITwUmt4jBiShpeK1whMaYrI=';
|
||||||
|
// $addcode = '1234567812345678';
|
||||||
|
//
|
||||||
|
// return [
|
||||||
|
// 'sign' => $this->keysign($data, $addcode),
|
||||||
|
// 'server_id' => $this->user->server_id,
|
||||||
|
// 'server_key' => $this->user->server_key,
|
||||||
|
// 'data' => $data,
|
||||||
|
// 'addcode' => $addcode,
|
||||||
|
// ];
|
||||||
|
|
||||||
|
$server_id = $request->server_id;
|
||||||
|
$redemptionCode = $request->redemptionCode;
|
||||||
|
$total = $request->total;
|
||||||
|
$outletId = $request->outletId;
|
||||||
|
|
||||||
|
$this->user = User::whereNull('parent_id')
|
||||||
|
->where('server_id', $server_id)
|
||||||
|
->first();
|
||||||
|
if (!$this->user) {
|
||||||
|
return $this->error('未查到到渠道');
|
||||||
|
}
|
||||||
|
$ret = [
|
||||||
|
'redemptionCode' => $redemptionCode,
|
||||||
|
'total' => $total,
|
||||||
|
'outletId' => $outletId,
|
||||||
|
];
|
||||||
|
|
||||||
|
return json_encode($ret);
|
||||||
|
info(json_encode($ret));
|
||||||
|
|
||||||
|
return $this->success($ret);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
6
composer.lock
generated
6
composer.lock
generated
@@ -6005,10 +6005,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "第三方银联对接",
|
"description": "第三方银联对接",
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/xuanchen120/unionpay/issues",
|
|
||||||
"source": "https://github.com/xuanchen120/unionpay/tree/2.2"
|
|
||||||
},
|
|
||||||
"time": "2020-12-21T07:04:17+00:00"
|
"time": "2020-12-21T07:04:17+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -8353,5 +8349,5 @@
|
|||||||
"php": "^7.2"
|
"php": "^7.2"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.0.0"
|
"plugin-api-version": "1.1.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,31 @@ return [
|
|||||||
],
|
],
|
||||||
// 签名检查数据 没有为全数据
|
// 签名检查数据 没有为全数据
|
||||||
'checksign' => [
|
'checksign' => [
|
||||||
|
'default' => [
|
||||||
|
'in' => [
|
||||||
|
'msg_type',
|
||||||
|
'msg_txn_code',
|
||||||
|
'msg_crrltn_id',
|
||||||
|
'msg_flg',
|
||||||
|
'msg_sender',
|
||||||
|
'msg_time',
|
||||||
|
'msg_sys_sn',
|
||||||
|
'msg_ver',
|
||||||
|
'sign_type',
|
||||||
|
],
|
||||||
|
'out' => [
|
||||||
|
'msg_type',
|
||||||
|
'msg_txn_code',
|
||||||
|
'msg_crrltn_id',
|
||||||
|
'msg_flg',
|
||||||
|
'msg_sender',
|
||||||
|
'msg_sys_sn',
|
||||||
|
'msg_time',
|
||||||
|
'msg_ver',
|
||||||
|
'msg_rsp_code',
|
||||||
|
'msg_rsp_desc',
|
||||||
|
],
|
||||||
|
],
|
||||||
'106040' => [
|
'106040' => [
|
||||||
'in' => [
|
'in' => [
|
||||||
'msg_type',
|
'msg_type',
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ Route::get('/test/grant', 'TestController@grant')->name('test.grant');
|
|||||||
Route::get('/test/checkcoupon', 'TestController@checkcoupon')->name('test.checkcoupon');
|
Route::get('/test/checkcoupon', 'TestController@checkcoupon')->name('test.checkcoupon');
|
||||||
Route::get('/test/query', 'TestController@query')->name('test.query');
|
Route::get('/test/query', 'TestController@query')->name('test.query');
|
||||||
Route::get('/test/destroy', 'TestController@destroy')->name('test.destroy');
|
Route::get('/test/destroy', 'TestController@destroy')->name('test.destroy');
|
||||||
|
Route::get('/test/getsign', 'TestController@getSign')->name('test.getsign');
|
||||||
|
|
||||||
Route::get('/skyxu', 'SkyxuController@index')->name('skyxu');
|
Route::get('/skyxu', 'SkyxuController@index')->name('skyxu');
|
||||||
Route::get('/coupon', 'CouponController@index')->name('coupon');
|
Route::get('/coupon', 'CouponController@index')->name('coupon');
|
||||||
|
|||||||
Reference in New Issue
Block a user