fix(channel): 修复美城支付查询功能并优化相关页面文本- 修改携转号码检测数据按钮文本
- 优化美城支付查询逻辑,增加对 query_status 的判断 - 调整请求方式从 POST 改为 GET- 更新订单状态查询逻辑,解决未返回 query_status 的问题
This commit is contained in:
parent
a80b289967
commit
49c8f5e37f
@ -120,9 +120,12 @@ class Meicheng extends Core
|
|||||||
unset($request['sign']);
|
unset($request['sign']);
|
||||||
unset($request['s_order']);
|
unset($request['s_order']);
|
||||||
$sign = strtoupper($this->_sign($request, array('userid', 'orderid', 'sporderid', 'merchantsubmittime', 'resultno')));
|
$sign = strtoupper($this->_sign($request, array('userid', 'orderid', 'sporderid', 'merchantsubmittime', 'resultno')));
|
||||||
|
if(!isset($data['query_status']) ){
|
||||||
if ($sign != $data['sign']) {
|
if ($sign != $data['sign']) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
$result['cash'] = 1;
|
$result['cash'] = 1;
|
||||||
if ($data['resultno'] == 1) {
|
if ($data['resultno'] == 1) {
|
||||||
@ -180,17 +183,19 @@ class Meicheng extends Core
|
|||||||
|
|
||||||
$request['sign'] = $this->_sign($request, array('userid', 'sporderid'));
|
$request['sign'] = $this->_sign($request, array('userid', 'sporderid'));
|
||||||
$url = $this->host . 'searchpay.do';
|
$url = $this->host . 'searchpay.do';
|
||||||
$response = $this->curl('post', $url, $request);
|
$response = $this->curl('get', $url, $request);
|
||||||
|
|
||||||
$log['type'] = 'query_response';
|
$log['type'] = 'query_response';
|
||||||
$log['data'] = $response;
|
$log['data'] = $response;
|
||||||
$log['config'] = $this->data;
|
$log['config'] = $this->data;
|
||||||
$this->log($log);
|
$this->log($log);
|
||||||
|
|
||||||
$array = $this->json_decode($response);
|
$array = (array) simplexml_load_string($response);
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
|
$result = $array;
|
||||||
$result['status'] = 4;
|
$result['status'] = 4;
|
||||||
|
$result['query_status'] = 1;
|
||||||
if (isset($array['resultno']) ) {
|
if (isset($array['resultno']) ) {
|
||||||
if($array['resultno'] == '1'){
|
if($array['resultno'] == '1'){
|
||||||
$result['status'] = 2;
|
$result['status'] = 2;
|
||||||
|
@ -7,7 +7,7 @@ use app\channel\service\CardService;
|
|||||||
use app\channel\service\ChannelService;
|
use app\channel\service\ChannelService;
|
||||||
use app\channel\service\KamiService;
|
use app\channel\service\KamiService;
|
||||||
use app\channel\service\ProductService;
|
use app\channel\service\ProductService;
|
||||||
use app\gateway\controller\api\Notify;
|
use app\gateway\controller\v4\Notify;
|
||||||
use app\gateway\service\RedisService;
|
use app\gateway\service\RedisService;
|
||||||
use app\kami\controller\getcookie\KaiDianBao;
|
use app\kami\controller\getcookie\KaiDianBao;
|
||||||
use app\kami\controller\getcookie\ZhongZhao;
|
use app\kami\controller\getcookie\ZhongZhao;
|
||||||
@ -181,23 +181,35 @@ class Test extends Core
|
|||||||
|
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
|
$orde = OrderService::instance()->db()->where(['status'=>4,'cid'=>14])->select()->toArray();
|
||||||
|
if($orde){
|
||||||
|
foreach ($orde as $k=>$v){
|
||||||
|
$channelService = ChannelService::instance();
|
||||||
|
$result = $channelService->call('query', $v['cid'], $v);
|
||||||
|
|
||||||
|
Log::write('test', 'runss', $result);
|
||||||
|
|
||||||
|
// Log::write('');
|
||||||
|
// var_dump($result);die;
|
||||||
|
if ($result['status'] != 4) {
|
||||||
|
|
||||||
$LockCardService = LockCardService::instance();
|
Log::write('test', 'runs', $result);
|
||||||
|
$notifyClass = new Notify($this->app);
|
||||||
|
$notifyClass->queue_query($v['order_id'], $result);
|
||||||
|
|
||||||
|
var_dump([$v['order_id'],$result['status']]);
|
||||||
// $cardno = $response['kami']['cardno'];
|
|
||||||
// $cardpwd = $response['kami']['cardpwd'];
|
|
||||||
// $expire_time = $response['kami']['expired'];
|
|
||||||
|
|
||||||
$suoka = $LockCardService->call('',12, 2409301790976058, 123456, 123, 100,'Whymcl');
|
|
||||||
|
|
||||||
|
|
||||||
return $suoka;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{extend name="../../admin/view/table"}
|
{extend name="../../admin/view/table"}
|
||||||
{block name="button"}
|
{block name="button"}
|
||||||
<!--{if auth("add")}-->
|
<!--{if auth("add")}-->
|
||||||
<button data-modal='{:url("add")}' data-title="添加携转号码检测数据" class='layui-btn layui-btn-sm layui-btn-primary'>添加携转号码检测数据</button>
|
<button data-modal='{:url("add")}' data-title="添加携转检测数据" class='layui-btn layui-btn-sm layui-btn-primary'>添加携转检测数据</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user