wpfw_ewei_shopv2/notify/video/notify.php
2023-02-14 19:57:32 +08:00

85 lines
2.7 KiB
PHP

<?php
/*
* @ https://EasyToYou.eu - IonCube v10 Decoder Online
* @ PHP 5.6
* @ Decoder version: 1.0.4
* @ Release: 02/06/2020
*
* @ ZendGuard Decoder PHP 5.6
*/
error_reporting(0);
define("IN_MOBILE", true);
$input = file_get_contents("php://input");
libxml_disable_entity_loader(true);
$echoStr = $_GET["echostr"];
if (!empty($echoStr)) {
exit($echoStr);
}
if (!empty($input) && !empty($_GET["shop_id"])) {
$obj = simplexml_load_string($input, "SimpleXMLElement", LIBXML_NOCDATA);
$data = json_decode(json_encode($obj), true);
if (empty($data)) {
exit("fail");
}
if ($data["MsgType"] != "event" || $data["Event"] != "MASSSENDJOBFINISH" || $data["Status"] != "send success") {
$result = array("return_code" => "FAIL", "return_msg" => empty($data["return_msg"]) ? $data["err_code_des"] : $data["return_msg"]);
echo array2xml($result);
exit;
}
if (!empty($data["version"]) && ($data["result_code"] != "0" || $data["status"] != "0")) {
exit("fail");
}
$data["uniacid"] = $_GET["shop_id"];
$get = $data;
} else {
$get = $_GET;
}
require dirname(__FILE__) . "/../../../../framework/bootstrap.inc.php";
require dirname(__DIR__) . "/../defines.php";
require IA_ROOT . "/addons/" . EWEI_SHOP_V2_MODULE_NAME . "/core/inc/functions.php";
require IA_ROOT . "/addons/" . EWEI_SHOP_V2_MODULE_NAME . "/core/inc/plugin_model.php";
require IA_ROOT . "/addons/" . EWEI_SHOP_V2_MODULE_NAME . "/core/inc/com_model.php";
new EweiShopVideo($get);
exit("fail");
class EweiShopVideo
{
public $get = NULL;
public $type = NULL;
public $total_fee = NULL;
public $set = NULL;
public $setting = NULL;
public $sec = NULL;
public $sign = NULL;
public $isapp = false;
public $is_jie = false;
public $is_wxapp = false;
public function __construct($get)
{
global $_W;
$this->get = $get;
$GLOBALS["_W"]["uniacid"] = $this->get["uniacid"];
$_W["uniacid"] = $this->get["uniacid"];
$this->init();
}
public function init()
{
global $_W;
if (!empty($this->get["ArticleUrlResult"]["ResultList"]["item"]["ArticleUrl"])) {
$mpUrl = str_replace("http://", "https://", $this->get["ArticleUrlResult"]["ResultList"]["item"]["ArticleUrl"]);
$message = m("cache")->get("message_cache_" . $this->get["MsgID"] . "_" . $_W["uniacid"]);
if (!empty($message)) {
m("cache")->set("goods_mp_url_" . $message["goods_id"] . "_" . $message["member_id"], $mpUrl);
}
}
return "";
}
public function success()
{
$result = array("return_code" => "SUCCESS", "return_msg" => "OK");
echo array2xml($result);
exit;
}
}
?>