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


PHP HttpClient::getErrorMsg方法代码示例

本文整理汇总了PHP中HttpClient::getErrorMsg方法的典型用法代码示例。如果您正苦于以下问题:PHP HttpClient::getErrorMsg方法的具体用法?PHP HttpClient::getErrorMsg怎么用?PHP HttpClient::getErrorMsg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HttpClient的用法示例。


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

示例1: connectURL

 function connectURL($msg)
 {
     $httpclient = new HttpClient("true", HOST_IP);
     $this->printLog("Start INImx_APPL");
     $this->printLog("Start HTTP Connect:" . HOST_IP . $this->m_serviceurl);
     if ($httpclient->HttpConnect()) {
         $this->printLog("HTTP CONNECTION SUCCESS");
         if ($httpclient->HttpRequest($this->m_serviceurl, $msg)) {
             $this->printLog("RECV REQUEST:" . trim($httpclient->getBody()));
             // ���� �� �Ľ�
             parse_str(trim($httpclient->getBody()), $resultString);
             //����
             $this->m_tid = $resultString['P_TID'];
             $this->m_resultCode = $resultString['P_STATUS'];
             $this->m_resultMsg = $resultString['P_RMESG1'];
             $this->m_payMethod = $resultString['P_TYPE'];
             $this->m_mid = $resultString['P_MID'];
             $this->m_moid = $resultString['P_OID'];
             $this->m_resultprice = $resultString['P_AMT'];
             $this->m_buyerName = $resultString['P_UNAME'];
             $this->m_noti = $resultString['P_NOTI'];
             $this->m_nextUrl = $resultString['P_NEXT_URL'];
             $this->m_notiUrl = $resultString['P_NOTEURL'];
             //�ſ�ī��
             $this->m_pgAuthDate = substr($resultString['P_AUTH_DT'], '0', '8');
             $this->m_pgAuthTime = substr($resultString['P_AUTH_DT'], '8', '6');
             $this->m_authCode = $resultString['P_AUTH_NO'];
             $this->m_cardQuota = $resultString['P_RMESG2'];
             $this->m_cardCode = $resultString['P_FN_CD1'];
             $this->m_cardIssuerCode = $resultString['P_CARD_ISSUER_CODE'];
             $this->m_cardNumber = $resultString['P_CARD_NUM'];
             $this->m_cardMember = $resultString['P_CARD_MEMBER_NUM'];
             $this->m_cardpurchase = $resultString['P_CARD_PURCHASE_CODE'];
             $this->m_prtc = $resultString['P_CARD_PRTC_CODE'];
             //�޴���
             $this->m_codegw = $resultString['P_HPP_CORP'];
             //�������
             $this->m_vacct = $resultString['P_VACT_NUM'];
             $this->m_dtinput = $resultString['P_VACT_DATE'];
             $this->m_tminput = $resultString['P_VACT_TIME'];
             $this->m_nmvacct = $resultString['P_VACT_NAME'];
             $this->m_vcdbank = $resultString['P_VACT_BANK_CODE'];
         } else {
             $this->printLog("HTTP REQUEST FAIL:" . $httpclient->getErrorCode() . ":" . $httpclient->getErrorMsg());
             // �� ���� ��û ����
             $this->m_resultCode = "05";
             $this->m_resultmsg = "HTTP REQUEST FAIL";
         }
     } else {
         $this->printLog("HTTP CONNECTION FAIL:" . $httpclient->getErrorCode() . ":" . $httpclient->getErrorMsg());
         // ���� ���� ����
         $this->m_resultCode = "05";
         $this->m_resultmsg = "HTTP CONNECTION FAIL";
     }
     $this->printLog("P_STATUS:" . $this->m_resultCode);
     $this->printLog("P_RMESG1:" . $this->m_resultMsg);
     $this->printLog("P_TYPE:" . $this->m_payMethod);
     $this->printLog("P_TID:" . $this->m_tid);
     $this->printLog("P_MID:" . $this->m_mid);
     $this->printLog("P_OID:" . $this->m_moid);
     $this->printLog("P_UNAME:" . $this->m_buyerName);
     $this->printLog("P_AMT:" . $this->m_resultprice);
     $this->printLog("P_AUTH_DT:" . $this->m_pgAuthDate);
     $this->printLog("P_AUTH_TM:" . $this->m_pgAuthTime);
     $this->printLog("P_AUTH_NO:" . $this->m_authCode);
     $this->printLog("P_RMESG2:" . $this->m_cardQuota);
     $this->printLog("P_FN_CD1:" . $this->m_cardCode);
     $this->printLog("P_CARD_ISSUER_CODE:" . $this->m_cardIssuerCode);
     $this->printLog("P_CARD_PURCHASE_CODE:" . $this->m_cardpurchase);
     $this->printLog("P_CARD_PRTC_CODE:" . $this->m_prtc);
     $this->printLog("P_VACT_NUM:" . $this->m_vacct);
     $this->printLog("P_VACT_BANK_CODE:" . $this->m_vcdbank);
     $this->printLog("P_VACT_DATE:" . $this->m_dtinput);
     $this->printLog("P_VACT_TIME:" . $this->m_tminput);
     $this->printLog("P_VACT_NAME:" . $this->m_nmvacct);
     $this->printLog("P_NEXT_URL:" . $this->m_nextUrl);
     $this->printLog("P_NOTEURL:" . $this->m_notiUrl);
     $this->printLog("APPL Transaction End");
 }
开发者ID:ksw2342,项目名称:kau_webstudio_12,代码行数:79,代码来源:INImx.php

示例2: call

 public function call($method, $params, $mod, $add, $conf)
 {
     $sign = Pi::get('global.innerapi_sign', '');
     $sign_name = Pi::get('global.innerapi_sign_name', '_pi_inner_nm');
     if (isset($conf['ip']) && isset($conf['net']) && $conf['net'] == 'http') {
         $args = array();
         $args['mod'] = $mod;
         $args['add'] = $add;
         $args['method'] = $method;
         $args['param'] = $params;
         $args[$sign_name] = $sign;
         try {
             $curl = new HttpClient();
             $timeout = isset($conf['timeout']) ? intval($conf['timeout']) : 10;
             $res = $curl->sendPostData($conf['ip'], $args, $timeout);
             if ($curl->hasError() === false) {
                 $data = unserialize($res);
                 $data = isset($data[INNER_RES_PACK]) ? $data[INNER_RES_PACK] : $data;
                 return $data;
             } else {
                 throw new Exception('curl error', 5011);
             }
         } catch (Exception $e) {
             return array(INNER_ERR => 5011, 'msg' => $curl->getErrorMsg());
         }
     }
     throw new Exception('inner api err conf : ' . var_export($conf), 5004);
 }
开发者ID:xtzlyp,项目名称:newpi,代码行数:28,代码来源:Proxy.php

示例3: startAction


//.........这里部分代码省略.........
                                 } else {
                                     if (trim($this->m_ActionType) == "PYO" && trim($this->m_PayMethod) != "RECEIPT") {
                                         if (trim($_POST["MID"]) == "") {
                                             $this->MakeErrorMsg(ERROR_WRONG_PARAMETER, "요청페이지 파라메터가 잘못되었습니다. [MID]");
                                             return;
                                         } else {
                                             if (trim($_POST["Amt"]) == "") {
                                                 $this->MakeErrorMsg(ERROR_WRONG_PARAMETER, "요청페이지 파라메터가 잘못되었습니다. [Amt]");
                                                 return;
                                             }
                                         }
                                         $this->m_uri = "/lite/payProcess.jsp";
                                         unset($this->m_queryString);
                                         $this->m_queryString = $_POST;
                                         $this->m_queryString["EncodeKey"] = $this->m_LicenseKey;
                                         $this->m_queryString["TID"] = "";
                                         if ($this->m_charSet == "UTF8") {
                                             $this->m_queryString["BuyerName"] = iconv("UTF-8", "EUC-KR", $this->m_queryString["BuyerName"]);
                                             $this->m_queryString["GoodsName"] = iconv("UTF-8", "EUC-KR", $this->m_queryString["GoodsName"]);
                                             $this->m_queryString["BuyerAddr"] = iconv("UTF-8", "EUC-KR", $this->m_queryString["BuyerAddr"]);
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     $httpclient = new HttpClient($this->m_ssl);
     //connect
     if (!$httpclient->HttpConnect($NICELog)) {
         $NICELog->WriteLog('Server Connect Error!!' . $httpclient->getErrorMsg());
         $resultMsg = $httpclient->getErrorMsg() . "서버연결을 할 수가 없습니다.";
         if ($this->m_ssl == "true") {
             $resultMsg .= "<br>귀하의 서버는 SSL통신을 지원하지 않습니다. 결제처리파일에서 m_ssl=false로 셋팅하고 시도하세오.";
             $this->MakeErrorMsg(ERR_SSLCONN, $resultMsg);
         } else {
             $this->MakeErrorMsg(ERR_CONN, $resultMsg);
         }
         $NICELog->CloseNiceLog("");
         return;
     }
     //request
     if (!$httpclient->HttpRequest($this->m_uri, $this->m_queryString, $NICELog)) {
         // 요청 오류시 처리
         $NICELog->WriteLog('POST Error!!' . $httpclient->getErrorMsg());
         $this->MakeErrorMsg(ERR_NO_RESPONSE, "서버 응답 오류");
         //NET CANCEL Start---------------------------------
         if ($httpclient->getErrorCode() == READ_TIMEOUT_ERR) {
             $NICELog->WriteLog("Net Cancel Start");
             $this->m_uri = "/lite/cancelProcess.jsp";
             unset($this->m_queryString);
             $this->m_queryString["MID"] = substr($this->m_TID, 0, 10);
             $this->m_queryString["TID"] = $this->m_TID;
             $this->m_queryString["CancelAmt"] = $this->m_NetCancelAmt;
             $this->m_queryString["CancelMsg"] = "NICE_NET_CANCEL";
             $this->m_queryString["CancelPwd"] = $this->m_NetCancelPW;
             $this->m_queryString["NetCancelCode"] = "1";
             $NICELog->WriteLog($this->m_queryString["TID"]);
             if (!$httpclient->HttpConnect($NICELog)) {
                 $NICELog->WriteLog('Server Connect Error!!' . $httpclient->getErrorMsg());
                 $resultMsg = $httpclient->getErrorMsg() . "서버연결을 할 수가 없습니다.";
                 $this->MakeErrorMsg(ERR_CONN, $resultMsg);
                 $NICELog->CloseNiceLog($this->m_resultMsg);
开发者ID:erynet,项目名称:sadari,代码行数:67,代码来源:NicepayLite.php


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