当前位置: 首页>>代码示例>>PHP>>正文


PHP XML_unserialize函数代码示例

本文整理汇总了PHP中XML_unserialize函数的典型用法代码示例。如果您正苦于以下问题:PHP XML_unserialize函数的具体用法?PHP XML_unserialize怎么用?PHP XML_unserialize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了XML_unserialize函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wsnotify

function wsnotify($resultStr, $class_act, $cert_md5)
{
    $pMerCode = $resultStr["pMerCode"];
    $pErrCode = $resultStr["pErrCode"];
    $pErrMsg = $resultStr["pErrMsg"];
    $p3DesXmlPara = $resultStr["p3DesXmlPara"];
    $pSign = $resultStr["pSign"];
    $signPlainText = $pMerCode . $pErrCode . $pErrMsg . $p3DesXmlPara . $cert_md5;
    $localSign = md5($signPlainText);
    if ($localSign == $pSign) {
        //file_put_contents(PATH_LOG_FILE,PATH."--".date('YmdHis')."	验签通过"."\r\n",FILE_APPEND);
        $Crypt3Des = new Crypt3Des();
        //new 3des class
        $str3XmlParaInfo = $Crypt3Des->DESDecrypt($p3DesXmlPara);
        //3des解密
        if (empty($str3XmlParaInfo)) {
            //file_put_contents(PATH_LOG_FILE,PATH."--".date('YmdHis')."	3DES解密失败"."\r\n",FILE_APPEND);
            return;
        } else {
            require_once APP_ROOT_PATH . 'system/collocation/ips/xml.php';
            $str3ParaInfo = @XML_unserialize($str3XmlParaInfo);
            $str3Req = $str3ParaInfo['pReq'];
            if ($class_act == 'GuaranteeUnfreeze') {
                require_once APP_ROOT_PATH . 'system/collocation/ips/GuaranteeUnfreeze.php';
                GuaranteeUnfreezeCallBack($pMerCode, $pErrCode, $pErrMsg, $str3Req);
                showSuccess($pErrMsg, 0, SITE_DOMAIN . APP_ROOT);
            }
            if ($class_act == 'Transfer') {
                require_once APP_ROOT_PATH . 'system/collocation/ips/Transfer.php';
                TransferCallBack($pMerCode, $pErrCode, $pErrMsg, $str3Req);
                showSuccess($pErrMsg, 0, SITE_DOMAIN . APP_ROOT);
            }
        }
    }
}
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:35,代码来源:ips.php

示例2: __cddata

	private function __cddata()
	{
		if (post('receive_address'))
		{
			include_once dirname(__FILE__).'/alipay.function.php';
			$pdata = XML_unserialize(post('receive_address'));
			$this->adata = $pdata['receiveAddress'];
		}
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:9,代码来源:alipay.php

示例3: QueryForAccBalance

function QueryForAccBalance($user_id, $platformNo, $post_url)
{
    /* 请求参数 */
    $req = "<request platformNo=\"{$platformNo}\"><platformUserNo>{$user_id}</platformUserNo></request>";
    /* 签名数据 */
    $sign = "xxxx";
    /* 调用账户查询服务 */
    $service = "ACCOUNT_INFO";
    $ch = curl_init($post_url . "/bhaexter/bhaController");
    curl_setopt_array($ch, array(CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_POSTFIELDS => 'service=' . $service . '&req=' . rawurlencode($req) . "&sign=" . rawurlencode($sign)));
    $resultStr = curl_exec($ch);
    //print($result);
    if (empty($resultStr)) {
        $result = array();
        $result['pErrCode'] = 9999;
        $result['pErrMsg'] = '返回出错';
        $result['pIpsAcctNo'] = '';
        $result['pBalance'] = 0;
        $result['pLock'] = 0;
        $result['pNeedstl'] = 0;
    } else {
        require_once APP_ROOT_PATH . 'system/collocation/ips/xml.php';
        $str3ParaInfo = @XML_unserialize($resultStr);
        //print_r($str3ParaInfo);exit;
        $str3Req = $str3ParaInfo['response'];
        $result = array();
        if ($str3Req["code"] == 1) {
            $result['pErrCode'] = "0000";
        } else {
            $result['pErrCode'] = $str3Req["code"];
        }
        $result['pErrMsg'] = $str3Req["description"];
        $result['pIpsAcctNo'] = $user_id;
        $result['pBalance'] = $str3Req["balance"] - $str3Req["freezeAmount"];
        $result['pLock'] = $str3Req["freezeAmount"];
        $result['pNeedstl'] = 0;
        // $str3Req["availableAmount"];
    }
    return $result;
    /*
    * <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <response platformNo="10040011137">
        <code>1</code>
        <description>操作成功</description>
        <memberType>PERSONAL</memberType>
        <activeStatus>ACTIVATED</activeStatus>
        <balance>9980.98</balance>
        <availableAmount>9980.98</availableAmount>
        <freezeAmount>0.00</freezeAmount>
        <cardNo>********5512</cardNo>
        <cardStatus>VERIFIED</cardStatus>
        <bank>CCB</bank>
        <autoTender>false</autoTender>
    </response>
    */
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:56,代码来源:QueryForAccBalance.php

示例4: DoBids

/**
 * 标的登记 及 流标
 * @param int $deal_id
 * @param int $pOperationType 标的操作类型,1:新增,2:结束 “新增”代表新增标的,“结束”代表标的正常还清、丌 需要再还款戒者标的流标等情况。标的“结束”后,投资 人投标冻结金额、担保方保证金、借款人保证金均自劢解 冻
 * @param int $status; 0:新增; 2:流标结束
 * @param string $status_msg 主要是status_msg=2时记录的,流标原因
 * @param unknown_type $platformNo
 * @param unknown_type $post_url
 * @return string
 */
function DoBids($deal_id, $pOperationType, $status, $status_msg, $platformNo, $post_url)
{
    $pWebUrl = SITE_DOMAIN . APP_ROOT . "/index.php?ctl=collocation&act=response&class_name=yeepay&class_act=DoBids";
    //web方式返回
    $pS2SUrl = SITE_DOMAIN . APP_ROOT . "/index.php?ctl=collocation&act=notify&class_name=yeepay&class_act=DoBids";
    //s2s方式返回
    //$requestNo = $GLOBALS['db']->getOne("select * from ".DB_PREFIX."yeepay_cp_transaction where is_callback = 1 and code = 1 and tenderOrderNo = '".$deal_id."'");
    $t_arr = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "yeepay_cp_transaction where is_callback = 1 and tenderOrderNo = " . $deal_id . " and bizType = 'TENDER'");
    $deal = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal where id = " . $deal_id);
    $err_count = 0;
    foreach ($t_arr as $k => $v) {
        $data = array();
        $data['requestNo'] = $v["requestNo"];
        //请求流水号
        $data['platformNo'] = $platformNo;
        // 商户编号
        $data['mode'] = "CANCEL";
        /* 请求参数 */
        $req = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" . "<request platformNo=\"" . $platformNo . "\">" . "<requestNo>" . $data['requestNo'] . "</requestNo>" . "<mode>" . $data['mode'] . "</mode>" . "<notifyUrl><![CDATA[" . $pS2SUrl . "]]></notifyUrl>" . "</request>";
        /* 签名数据 */
        $sign = "xxxx";
        $yeepay_log = array();
        $yeepay_log['code'] = 'COMPLETE_TRANSACTION';
        $yeepay_log['create_date'] = to_date(TIME_UTC, 'Y-m-d H:i:s');
        $yeepay_log['strxml'] = $req;
        $GLOBALS['db']->autoExecute(DB_PREFIX . "yeepay_log", $yeepay_log);
        //$id = $GLOBALS['db']->insert_id();
        /* 调用账户查询服务 */
        $service = "COMPLETE_TRANSACTION";
        $ch = curl_init($post_url . "/bhaexter/bhaController");
        curl_setopt_array($ch, array(CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_POSTFIELDS => 'service=' . $service . '&req=' . rawurlencode($req) . "&sign=" . rawurlencode($sign)));
        $resultStr = curl_exec($ch);
        if (empty($resultStr)) {
            $err_count++;
        } else {
            require_once APP_ROOT_PATH . 'system/collocation/ips/xml.php';
            $str3ParaInfo = @XML_unserialize($resultStr);
            //print_r($str3ParaInfo);exit;
            $str3Req = $str3ParaInfo['response'];
            $result['pErrCode'] = $str3Req["code"];
            $result['pErrMsg'] = $str3Req["description"];
            //$result['pIpsAcctNo'] = $user_id;
            if ($str3Req["code"] == 1) {
                $requestNo = $str3Req['requestNo'];
                $t_data = array();
                $t_data["is_complete_transaction"] = 1;
                $GLOBALS['db']->autoExecute(DB_PREFIX . "yeepay_cp_transaction", $t_data, 'UPDATE', " requestNo = '" . $requestNo . "'");
                return array("info" => '操作成功');
            }
        }
    }
    //showIpsInfo('同步成功',"");
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:63,代码来源:DoBids.php

示例5: query_timestamp

 /**
  * 用于防钓鱼,调用接口query_timestamp来获取时间戳的处理函数
  * 注意:若要使用远程HTTP获取数据,必须开通SSL服务,该服务请找到php.ini配置文件设置开启,建议与您的网络管理员联系解决。
  * return 时间戳字符串
  */
 function query_timestamp()
 {
     $url = $this->alipay_gateway_new . "service=query_timestamp&partner=" . trim($this->aliapy_config['partner']);
     $encrypt_key = "";
     //获取远程数据
     $xml_data = getHttpResponse($url);
     //解析XML数据
     $para_data = @XML_unserialize($xml_data);
     //获取时间戳
     $encrypt_key = $para_data['alipay']['response']['timestamp']['encrypt_key'];
     return $encrypt_key;
 }
开发者ID:BGCX262,项目名称:zuituware-svn-to-git,代码行数:17,代码来源:alipay_service.class.php

示例6: sendPostInfo

 /**
  * 构造模拟远程HTTP的POST请求,获取支付宝的返回XML处理结果
  * @param $para_temp 请求参数数组
  * @param $gateway 网关地址
  * @param $aliapy_config 基本配置信息数组
  * @return 支付宝返回XML处理结果
  */
 function sendPostInfo($para_temp, $gateway, $aliapy_config)
 {
     $xml_str = '';
     //待请求参数数组字符串
     $request_data = $this->buildRequestParaToString($para_temp, $aliapy_config);
     //请求的url完整链接
     $url = $gateway . $request_data;
     //远程获取数据
     $xml_data = getHttpResponse($url, trim(strtolower($aliapy_config['input_charset'])));
     //解析XML
     $para_data = @XML_unserialize($xml_data);
     return $para_data;
 }
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:20,代码来源:alipay_submit.class.php

示例7: getPayPalEmailAddress

    /**
     * 获取订单当前收款的邮箱
     * @param int $itemid
     * @return array
     * @author lzx
     */
    public function getPayPalEmailAddress($itemid)
    {
        $requestXmlBody = ' <?xml version="1.0" encoding="utf-8"?>
			<' . $this->verb . 'Request xmlns="urn:ebay:apis:eBLBaseComponents">
				<RequesterCredentials>
					<eBayAuthToken>' . $this->token . '</eBayAuthToken>
				</RequesterCredentials>
				<OutputSelector>Item.PayPalEmailAddress</OutputSelector>
				<ItemID>' . $itemid . '</ItemID>
				<WarningLevel>High</WarningLevel>
			</' . $this->verb . 'Request>';
        return XML_unserialize($this->sendHttpRequest($requestXmlBody));
    }
开发者ID:bizonix,项目名称:sailvan,代码行数:19,代码来源:getitem_api.php

示例8: fetchMessageBody

 public function fetchMessageBody($messageid, $account)
 {
     /*----- 加载token文件 -----*/
     $tokenfile = WEB_PATH . 'lib/ebaylibrary/keys/keys_' . $account . '.php';
     if (!file_exists($tokenfile)) {
         //授权文件不存在
         self::$errCode = 10050;
         self::$errMsg = '账号授权文件不存在';
         return FALSE;
     }
     include_once '' . $tokenfile;
     /*----- 导出为全局变量 ugly code -----*/
     $GLOBALS['siteID'] = $siteID;
     $GLOBALS['production'] = $production;
     $GLOBALS['compatabilityLevel'] = $compatabilityLevel;
     $GLOBALS['devID'] = $devID;
     $GLOBALS['appID'] = $appID;
     $GLOBALS['certID'] = $certID;
     $GLOBALS['serverUrl'] = $serverUrl;
     $GLOBALS['userToken'] = $userToken;
     /*----- 导出为全局变量 -----*/
     /*----- 加载token文件 -----*/
     $getmsgobj = new GetMemberMessagesAPI($account);
     $responseXml = $getmsgobj->requestMessagesID($messageid);
     //var_dump($responseXml);exit;
     if (stristr($responseXml, 'HTTP 404') || $responseXml == '') {
         self::$errCode = 10051;
         self::$errMsg = '获取失败!';
         return FALSE;
     }
     $responseDoc = new DomDocument();
     $responseDoc->loadXML($responseXml);
     $data = XML_unserialize($responseXml);
     //print_r($data);exit;
     $Content = $data['GetMyMessagesResponse']['Messages']['Message']['Text'];
     if (empty($Content)) {
         self::$errCode = 10051;
         self::$errMsg = '获取失败!';
         return FALSE;
     }
     $date = date('Y-m-d', time());
     $filepath = MSGBODYSAVEPATH . $account . '/' . $date . '/' . $messageid . '.html';
     if (write_a_file(MSGREALPREFIX . $filepath, $Content) === false) {
         self::$errCode = 10052;
         self::$errMsg = 'message文件保存失败!';
         return FALSE;
     }
     return $filepath;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:49,代码来源:fetchAmazonMessage.model.php

示例9: SincerityGoldUnfreeze

function SincerityGoldUnfreeze($user_id, $platformNo, $freezeRequestNo, $deal_id, $post_url, $sys = 'pc')
{
    //$pWebUrl= SITE_DOMAIN.APP_ROOT."/index.php?ctl=collocation&act=response&class_name=Yeepay&class_act=SincerityGoldUnfreeze&from=".$_REQUEST['from'];//web方式返回
    //$pS2SUrl= SITE_DOMAIN.APP_ROOT."/index.php?ctl=collocation&act=notify&class_name=Yeepay&class_act=SincerityGoldUnfreeze&from=".$_REQUEST['from'];//s2s方式返回
    $yeepay_log = array();
    $yeepay_log['code'] = 'UNFREEZE';
    $yeepay_log['create_date'] = to_date(NOW_TIME, 'Y-m-d H:i:s');
    $GLOBALS['db']->autoExecute(DB_PREFIX . "yeepay_log", $yeepay_log);
    $requestNo = $GLOBALS['db']->insert_id();
    $data = array();
    $data['platformNo'] = $platformNo;
    // 商户编号
    $data['freezeRequestNo'] = $freezeRequestNo;
    $data['expired'] = NOW_TIME;
    //到期自劢解冻时间
    //	$strxml = SincerityGoldUnfreezeXml($data,$pWebUrl,$pS2SUrl);
    /* 请求参数 */
    $req = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" . "<request platformNo='" . $data['platformNo'] . "'>" . "<freezeRequestNo>" . $data['freezeRequestNo'] . "</freezeRequestNo>" . "</request>";
    /* 签名数据 */
    $sign = cfca($req);
    /* 调用账户查询服务 */
    $service = "UNFREEZE";
    $ch = curl_init($post_url . "/bhaexter/bhaController");
    curl_setopt_array($ch, array(CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_POSTFIELDS => 'service=' . $service . '&req=' . rawurlencode($req) . "&sign=" . rawurlencode($sign)));
    $resultStr = curl_exec($ch);
    if (empty($resultStr)) {
        //$err_count ++ ;
    } else {
        require_once APP_ROOT_PATH . 'system/collocation/ips/xml.php';
        $str3ParaInfo = @XML_unserialize($resultStr);
        $str3Req = $str3ParaInfo['response'];
        $result['pErrCode'] = $str3Req["code"];
        $result['pErrMsg'] = $str3Req["description"];
        if ($str3Req["code"] == 1) {
            //操作成功
            $where = " platformUserNo=" . $user_id . " and deal_id =" . $deal_id . " and requestNo=" . $freezeRequestNo;
            $data['status'] = 2;
            $data['create_time'] = NOW_TIME;
            if (isset($str3Req['description'])) {
                $data['description'] = $str3Req["description"];
            }
            $GLOBALS['db']->autoExecute(DB_PREFIX . "money_freeze", $data, 'UPDATE', $where);
            showIpsInfo('诚意金解冻成功', get_domain() . APP_ROOT . '/m.php?m=UserFreeze&a=index&');
        }
    }
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:46,代码来源:SincerityGoldUnfreeze.php

示例10: load_theme

 function load_theme($url, $skip_file = false)
 {
     $this->error(false);
     ob_start();
     $xml = file_get_contents($url);
     //, false, null, 0, 4*1024); // 5 paramater format only works in PHP5
     $err = ob_get_contents();
     if (!empty($err)) {
         // cleanup the error a little bit so it's a little easier to tell what happened
         $err = str_replace(' [function.file-get-contents]', '', strip_tags($err));
     }
     ob_end_clean();
     $this->headers = $this->parse_headers($http_response_header);
     $this->xml = array();
     $data = array();
     if ($xml !== false) {
         // make sure the content-type returned is something reasonable (and not an image, etc).
         if ($this->is_xml()) {
             $data = XML_unserialize($xml);
             if ($data and is_array($data['theme'])) {
                 $xml2 = simple_interpolate($xml, $data['theme'], true);
                 if ($xml2 != $xml) {
                     // unserialize the data once more since it had $vars in the XML
                     $data = XML_unserialize($xml2);
                 }
                 $this->xml = $data['theme'];
                 array_walk($this->xml, array(&$this, '_fix_xml_attrib'));
             } else {
                 $this->error("Invalid theme XML format loaded from {$url}", PSTHEME_ERR_XML);
             }
         } else {
             $this->error("Invalid content-type returned for XML (" . $this->headers['content-type'] . ")", PSTHEME_ERR_CONTENT);
         }
     } else {
         $this->error($err, PSTHEME_ERR_NOTFOUND);
     }
     $ok = false;
     if (!$this->error() and $this->xml) {
         $ok = $this->validate_theme($skip_file);
         if ($ok and file_exists(catfile($this->template_dir, $this->xml['name']))) {
             $this->xml['theme_exists'] = true;
         }
     }
     return $ok;
 }
开发者ID:Nerus87,项目名称:PsychoStats,代码行数:45,代码来源:class_themeManager.php

示例11: getSellerTransactions

    /**
     * 从交易信息获取发货地址
     * @param string $orderid
     * @return array
     * @author lzx
     */
    public function getSellerTransactions($orderid)
    {
        $requestXmlBody = ' <?xml version="1.0" encoding="utf-8"?>
			<' . $this->verb . 'Request xmlns="urn:ebay:apis:eBLBaseComponents">
			<RequesterCredentials>
				<eBayAuthToken>' . $this->token . '</eBayAuthToken>
			</RequesterCredentials>
			<DetailLevel>ReturnAll</DetailLevel>
			<OutputSelector>OrderArray.Order.TransactionArray.Transaction.Buyer.BuyerInfo.ShippingAddress</OutputSelector>
			<IncludeFinalValueFee>true</IncludeFinalValueFee>
			<OrderRole>Seller</OrderRole>
			<OrderStatus>Completed</OrderStatus>
			<OrderIDArray>
				<OrderID>' . $orderid . '</OrderID>
			</OrderIDArray>
			</' . $this->verb . 'Request>';
        return XML_unserialize($this->sendHttpRequest($requestXmlBody));
    }
开发者ID:ohjack,项目名称:newErp,代码行数:24,代码来源:getordertransactions_api.php

示例12: getOrderLists

    /**
     * 获取订单详情
     * @param array $order_ids
     * @return array
     * @author lzx
     */
    public function getOrderLists($order_ids)
    {
        $order_ids = array_filter($order_ids, create_function('$orderid', 'return preg_match("/^\\d{12}(|\\-\\d{12,14}|\\-0)$/i", $orderid)>0;'));
        if (count($order_ids) == 0) {
            return false;
        }
        $valid_orderids = array_map(create_function('$a', 'return "<OrderID>".$a."</OrderID>";'), $order_ids);
        $requestXmlBody = '<?xml version="1.0" encoding="utf-8"?>
			<' . $this->verb . 'Request xmlns="urn:ebay:apis:eBLBaseComponents">
				<RequesterCredentials>
					<eBayAuthToken>' . $this->requestToken . '</eBayAuthToken>
				</RequesterCredentials>  
				<DetailLevel>ReturnAll</DetailLevel>
				<IncludeFinalValueFee>true</IncludeFinalValueFee>
				<OrderRole>Seller</OrderRole>
				<OrderStatus>Completed</OrderStatus>
				<OrderIDArray>' . "\n" . implode("\n\t", $valid_orderids) . "\n" . '</OrderIDArray>
			</' . $this->verb . 'Request>';
        return XML_unserialize($this->sendHttpRequest($requestXmlBody));
    }
开发者ID:bizonix,项目名称:sailvan,代码行数:26,代码来源:getorders_api.php

示例13: GetBankList

/**
 * 商户端获取银行列表查询(WS) 
 * @param int $MerCode
 * @param unknown_type $cert_md5
 * @param unknown_type $ws_url
 * @return  
 * 		  pMerCode 6 “平台”账号 否 由IPS颁发的商户号 pErrCode 4 返回状态 否 0000成功; 9999失败;
 * 		  pErrMsg 100 返回信息 否 状态0000:成功 除此乊外:反馈实际原因 
 * 		  pBankList 银行名称|银行卡别名|银行卡编号#银行名称|银行卡别名|银行卡编号
 * 		  BankList[] = array('name'=>银行名称,'sub_name'=>银行卡别名,'id'=>银行卡编号);
 */
function GetBankList($MerCode, $cert_md5, $ws_url)
{
    $str = $MerCode . $cert_md5;
    $pSign = md5($str);
    try {
        $url = $ws_url;
        $client = new SoapClient($url);
        // 接口方法:public string GetBankList(string argMerCode, string argSign)
        $param = array('argMerCode' => $MerCode, 'argSign' => $pSign);
        $arrResult = $client->GetBankList($param);
        $resultStr = $arrResult->GetBankListResult;
        /*
         * pMerCode 6 “平台”账号 否 由IPS颁发的商户号 pErrCode 4 返回状态 否 0000成功; 9999失败;
         * pErrMsg 100 返回信息 否 状态0000:成功 除此乊外:反馈实际原因 
         * pBankList 银行名称|银行卡别名|银行卡编号#银行名称|银行卡别名|银行卡编号
         */
        require_once APP_ROOT_PATH . 'system/collocation/ips/xml.php';
        $str3ParaInfo = @XML_unserialize($resultStr);
        //print_r($str3ParaInfo);exit;
        $str3Req = $str3ParaInfo['pReq'];
        $result = array();
        $result['pErrCode'] = $str3Req["pErrCode"];
        $result['pErrMsg'] = $str3Req["pErrMsg"];
        $result['pBankList'] = $str3Req["pBankList"];
        $list = explode('#', $result['pBankList']);
        $BankList = array();
        foreach ($list as $bank) {
            $b = explode('|', $bank);
            if (count($b) >= 3) {
                $BankList[] = array('name' => $b[0], 'sub_name' => $b[1], 'id' => $b[2]);
            }
        }
        $result['BankList'] = $BankList;
    } catch (SOAPFault $e) {
        $result = array();
        $result['pErrCode'] = 9999;
        $result['pErrMsg'] = print_r($e, 1);
        $result['pBankList'] = '';
    }
    return $result;
}
开发者ID:workplayteam,项目名称:P2P,代码行数:52,代码来源:GetBankList.php

示例14: sendEbayCsMail

    public function sendEbayCsMail($itemId, $buyerId, $sendContent, $subject)
    {
        include_once WEB_PATH . 'lib/ebaylibrary/eBaySession.php';
        global $devID, $appID, $certID, $serverUrl, $siteID, $compatabilityLevel, $userToken;
        $verb = 'AddMemberMessageAAQToPartner';
        $session = new eBaySession($userToken, $devID, $appID, $certID, $serverUrl, $compatabilityLevel, $siteID, $verb);
        $requestXML = <<<EOF
        <?xml version="1.0" encoding="utf-8"?>
        <AddMemberMessageAAQToPartnerRequest xmlns="urn:ebay:apis:eBLBaseComponents">
          <RequesterCredentials>
            <eBayAuthToken>{$userToken}</eBayAuthToken>
          </RequesterCredentials>
          <ItemID>{$itemId}</ItemID>
          <MemberMessage>
            <Subject>{$subject}</Subject>
            <Body>{$sendContent}</Body>
            <EmailCopyToSender>true</EmailCopyToSender>
            <QuestionType>General</QuestionType>
            <RecipientID>{$buyerId}</RecipientID>
          </MemberMessage>
        </AddMemberMessageAAQToPartnerRequest>
EOF;
        $responseXml = $session->sendHttpRequest($requestXML);
        if (stristr($responseXml, 'HTTP 404') || $responseXml == '' || $responseXml === FALSE) {
            self::$errMsg = __METHOD__ . '发送请求失败! in line ' . __LINE__;
            return FALSE;
        }
        $data = XML_unserialize($responseXml);
        $ack = $data['AddMemberMessageAAQToPartnerResponse'];
        $ack = $ack['Ack'];
        if ($ack == 'Success') {
            return TRUE;
        } else {
            $err = $data['AddMemberMessageAAQToPartnerResponse']['Errors']['LongMessage'];
            self::$errMsg = '处理失败 ::ERR INFO ==> ' . $err;
            return FALSE;
        }
    }
开发者ID:ohjack,项目名称:newErp,代码行数:38,代码来源:ebayCsMailManage.model.php

示例15: GuaranteeUnfreeze

/**
 * 解冻保证金
 * @param int $deal_id 标的号
 * @param int $pUnfreezenType 解冻类型 否 1#解冻借款方;2#解冻担保方
 * @param float $money 解冻金额;默认为0时,则解冻所有未解冻的金额
 * @param unknown_type $MerCode
 * @param unknown_type $cert_md5
 * @param unknown_type $post_url
 * @return string
 */
function GuaranteeUnfreeze($deal_id, $pUnfreezenType, $money, $MerCode, $cert_md5, $ws_url)
{
    $pWebUrl = SITE_DOMAIN . APP_ROOT . "/index.php?ctl=collocation&act=response&class_name=Ips&class_act=GuaranteeUnfreeze";
    //web方式返回
    $pS2SUrl = SITE_DOMAIN . APP_ROOT . "/index.php?ctl=collocation&act=notify&class_name=Ips&class_act=GuaranteeUnfreeze";
    //s2s方式返回
    $deal = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal where id = " . $deal_id);
    if ($pUnfreezenType == 1) {
        $user = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . intval($deal['user_id']));
    } else {
        $user = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . intval($deal['agency_id']));
    }
    $data = array();
    $data['deal_id'] = $deal_id;
    $data['pMerCode'] = $MerCode;
    // '“平台”账号 否 由IPS颁发的商户号 ',
    $data['pMerBillNo'] = $deal_id . 'U' . get_gmtime();
    //商户系统唯一丌重复 ',
    $data['pBidNo'] = $deal_id;
    //'标的号,商户系统唯一丌重复',
    $data['pUnfreezeDate'] = to_date(get_gmtime(), 'Ymd');
    //'解冻日期格 式:yyyymmdd',
    $data['pUnfreezenType'] = $pUnfreezenType;
    //'解冻类型 否 1#解冻借款方;2#解冻担保方',
    $money = floatval($money);
    if ($money == 0) {
        if ($pUnfreezenType == 1) {
            $money = $deal['real_freezen_amt'] - $deal['un_real_freezen_amt'];
            //'解冻金额 金额单位,丌能为负,丌允许为0 累计解冻金额  <= 当时冻结时的保证金',
        } else {
            $money = $deal['guarantor_real_freezen_amt'] - $deal['un_guarantor_real_freezen_amt'];
        }
    }
    $data['pUnfreezeAmt'] = str_replace(',', '', number_format($money, 2));
    $data['pAcctType'] = 1;
    //'解冻者账户类型 否 0#机构;1#个人',
    $data['pIdentNo'] = $user['idno'];
    //'解冻者证件号码 是/否 解冻者账户类型1时:真实身份证(个人),必填 解冻账户类型0时:为空处理 ',
    $data['pRealName'] = $user['real_name'];
    //'解冻者姓名 否 账户类型为1时,真实姓名(中文) 账户类型为0时,开户时在IPS登记的商户名称 '
    $data['pIpsAcctNo'] = $user['ips_acct_no'];
    //'解冻者IPS账号 否 账户类型为1时,IPS个人托管账户号 账户类型为0时,由IPS颁发的商户号',
    $GLOBALS['db']->autoExecute(DB_PREFIX . "ips_guarantee_unfreeze", $data, 'INSERT');
    $id = $GLOBALS['db']->insert_id();
    $strxml = GuaranteeUnfreezeXml($data, $pWebUrl, $pS2SUrl);
    //echo $strxml;exit;
    $Crypt3Des = new Crypt3Des();
    //new 3des class
    $p3DesXmlPara = $Crypt3Des->DESEncrypt($strxml);
    //3des 加密
    $str = $MerCode . $p3DesXmlPara . $cert_md5;
    $pSign = md5($str);
    try {
        $url = $ws_url;
        $client = new SoapClient($url);
        $param = array('argMerCode' => $MerCode, 'arg3DesXmlPara' => $p3DesXmlPara, 'argSign' => $pSign);
        $arrResult = $client->GuaranteeUnfreeze($param);
        $resultStr = $arrResult->GuaranteeUnfreezeResult;
        require_once APP_ROOT_PATH . 'system/collocation/ips/ips.php';
        require_once APP_ROOT_PATH . 'system/collocation/ips/xml.php';
        $result = @XML_unserialize($resultStr);
        $result = $result['pReq'];
        wsnotify($result, 'GuaranteeUnfreeze', $cert_md5);
        $result['resultStr'] = $resultStr;
        return $result;
    } catch (SOAPFault $e) {
        print $e;
        //file_put_contents(PATH_LOG_FILE,PATH.$e."\r\n",FILE_APPEND);
    }
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:80,代码来源:GuaranteeUnfreeze.php


注:本文中的XML_unserialize函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。