Files
OMS/app/erpapi/lib/sms/result.php
2025-12-28 23:13:25 +08:00

23 lines
696 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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;
}
}