mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-22 18:35:35 +08:00
23 lines
696 B
PHP
23 lines
696 B
PHP
<?php
|
||
/**
|
||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
* See LICENSE file for license details.
|
||
*/
|
||
|
||
/**
|
||
* @author ykm 2016-01-20
|
||
* @describe 短信平台返回数据预处理
|
||
*/
|
||
class erpapi_sms_result extends erpapi_result {
|
||
|
||
function set_response($response, $format)
|
||
{
|
||
$response = kernel::single('erpapi_format_'.$format)->data_decode($response);
|
||
|
||
$rsp['rsp'] = $response['res'] == 'succ' ? 'succ' : 'fail';
|
||
$rsp['res'] = $response['code'] ? $response['code'] : $response['msg'];
|
||
$rsp['data'] = $response['info'] ? $response['info'] : $response['data'];
|
||
$this->response = $rsp;
|
||
return $this;
|
||
}
|
||
} |