示例#1
0
 function ParseDecrypt($decrypted)
 {
     $xml = new XML();
     if (($rtv = $xml->load_xml("", $decrypted)) != OK) {
         return $rtv;
     }
     $this->m_Xml = array_merge($this->m_Xml, $xml->xml_node);
     if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_RECEIPT) {
         //���γ�¥(ApplDate), ���νð�(ApplTime), ���ι�ȣ(ApplNum)�� ����!!(OCB, ���ݿ����� ����)
         //ISP, CARD�� CARD�� assign. ��/������ ISP�� ����, CARD�� ���� �˰� ����!!!-_-
         if ($this->m_sPayMethod == NM_TX_CARD) {
             $this->m_RESULT[APPLDATE] = $this->GetXMLData(CARD_APPLDATE);
             $this->m_RESULT[APPLTIME] = $this->GetXMLData(CARD_APPLTIME);
             $this->m_RESULT[APPLNUM] = $this->GetXMLData(CARD_APPLNUM);
             $this->m_RESULT[CARD_NUM] = $this->GetXMLData(CARD_NUM);
             $this->m_RESULT[CARD_EXPIRE] = $this->GetXMLData(CARD_EXPIRE);
             $this->m_RESULT[CARD_BANKCODE] = $this->GetXMLData(CARD_BANKCODE);
             $this->m_RESULT[CARD_CODE] = $this->GetXMLData(CARD_CODE);
             $this->m_RESULT[CARD_APPLPRICE] = $this->GetXMLData(CARD_APPLPRICE);
             $this->m_RESULT[CARD_QUOTA] = $this->GetXMLData(CARD_QUOTA);
             $this->m_RESULT[CARD_INTEREST] = $this->GetXMLData(CARD_INTEREST);
             $this->m_RESULT[CARD_POINT] = $this->GetXMLData(CARD_POINT);
             $this->m_RESULT[CARD_AUTHTYPE] = $this->GetXMLData(CARD_AUTHTYPE);
             $this->m_RESULT[CARD_REGNUM] = $this->GetXMLData(CARD_REGNUM);
             $this->m_RESULT[CARD_TERMINALNUM] = $this->GetXMLData(CARD_TERMINALNUM);
             $this->m_RESULT[CARD_MEMBERNUM] = $this->GetXMLData(CARD_MEMBERNUM);
             $this->m_RESULT[CARD_PURCHASECODE] = $this->GetXMLData(CARD_PURCHASECODE);
         } else {
             if ($this->m_sPayMethod == NM_TX_ISP) {
                 $this->m_RESULT[APPLDATE] = $this->GetXMLData(ISP_APPLDATE);
                 $this->m_RESULT[APPLTIME] = $this->GetXMLData(ISP_APPLTIME);
                 $this->m_RESULT[APPLNUM] = $this->GetXMLData(ISP_APPLNUM);
                 $this->m_RESULT[CARD_NUM] = $this->GetXMLData(ISP_CARDNUM);
                 $this->m_RESULT[CARD_EXPIRE] = $this->GetXMLData(ISP_EXPIRE);
                 $this->m_RESULT[CARD_BANKCODE] = $this->GetXMLData(ISP_BANKCODE);
                 $this->m_RESULT[CARD_CODE] = $this->GetXMLData(ISP_CARDCODE);
                 $this->m_RESULT[CARD_APPLPRICE] = $this->GetXMLData(ISP_APPLPRICE);
                 $this->m_RESULT[CARD_QUOTA] = $this->GetXMLData(ISP_QUOTA);
                 $this->m_RESULT[CARD_INTEREST] = $this->GetXMLData(ISP_INTEREST);
                 $this->m_RESULT[CARD_POINT] = $this->GetXMLData(ISP_POINT);
                 $this->m_RESULT[CARD_TERMINALNUM] = $this->GetXMLData(ISP_TERMINALNUM);
                 $this->m_RESULT[CARD_MEMBERNUM] = $this->GetXMLData(ISP_MEMBERNUM);
                 $this->m_RESULT[CARD_PURCHASECODE] = $this->GetXMLData(ISP_PURCHASECODE);
             } else {
                 if ($this->m_sPayMethod == NM_TX_CSHR) {
                     $this->m_RESULT[APPLDATE] = $this->GetXMLData(CSHR_APPLDATE);
                     $this->m_RESULT[APPLTIME] = $this->GetXMLData(CSHR_APPLTIME);
                     $this->m_RESULT[APPLNUM] = $this->GetXMLData(CSHR_APPLNUM);
                 } else {
                     if ($this->m_sPayMethod == NM_TX_ACCT) {
                         $this->m_RESULT[APPLDATE] = $this->GetXMLData(ACCT_APPLDATE);
                         $this->m_RESULT[APPLTIME] = $this->GetXMLData(ACCT_APPLTIME);
                         $this->m_RESULT[APPLNUM] = $this->GetXMLData(ACCT_APPLNUM);
                     } else {
                         if ($this->m_sPayMethod == NM_TX_HPP) {
                             $this->m_RESULT[APPLDATE] = $this->GetXMLData(HPP_APPLDATE);
                             $this->m_RESULT[APPLTIME] = $this->GetXMLData(HPP_APPLTIME);
                             $this->m_RESULT[APPLNUM] = $this->GetXMLData(HPP_APPLNUM);
                         } else {
                             if ($this->m_sPayMethod == NM_TX_VACT) {
                                 $this->m_RESULT[APPLDATE] = $this->GetXMLData(VACT_APPLDATE);
                                 $this->m_RESULT[APPLTIME] = $this->GetXMLData(VACT_APPLTIME);
                             } else {
                                 if ($this->m_sPayMethod == NM_TX_ARSB) {
                                     $this->m_RESULT[APPLDATE] = $this->GetXMLData(ARSB_APPLDATE);
                                     $this->m_RESULT[APPLTIME] = $this->GetXMLData(ARSB_APPLTIME);
                                     $this->m_RESULT[APPLNUM] = $this->GetXMLData(ARSB_APPLNUM);
                                 } else {
                                     if ($this->m_sPayMethod == NM_TX_PHNB) {
                                         $this->m_RESULT[APPLDATE] = $this->GetXMLData(PHNB_APPLDATE);
                                         $this->m_RESULT[APPLTIME] = $this->GetXMLData(PHNB_APPLTIME);
                                         $this->m_RESULT[APPLNUM] = $this->GetXMLData(PHNB_APPLNUM);
                                     } else {
                                         if ($this->m_sPayMethod == NM_TX_CULT) {
                                             $this->m_RESULT[APPLDATE] = $this->GetXMLData(CULT_APPLDATE);
                                             $this->m_RESULT[APPLTIME] = $this->GetXMLData(CULT_APPLTIME);
                                             $this->m_RESULT[APPLNUM] = $this->GetXMLData(CULT_APPLNUM);
                                         } else {
                                             if ($this->m_sPayMethod == NM_TX_GAMG) {
                                                 $this->m_RESULT[APPLDATE] = $this->GetXMLData(GAMG_APPLDATE);
                                                 $this->m_RESULT[APPLTIME] = $this->GetXMLData(GAMG_APPLTIME);
                                                 $this->m_RESULT[APPLNUM] = $this->GetXMLData(GAMG_APPLNUM);
                                                 $this->m_RESULT[GAMG_CNT] = $this->GetXMLData(GAMG_CNT);
                                                 //���ӹ�ȭ��ǰ���� Multi���� ����
                                                 MakePathGAMG($this->m_RESULT[GAMG_CNT]);
                                                 for ($i = 1; $i <= $this->m_RESULT[GAMG_CNT]; $i++) {
                                                     $this->m_RESULT[constant("GAMG_NUM{$i}")] = $this->GetXMLData(constant("GAMG_NUM{$i}"));
                                                     $this->m_RESULT[constant("GAMG_REMAINS{$i}")] = $this->GetXMLData(constant("GAMG_REMAINS{$i}"));
                                                     $this->m_RESULT[constant("GAMG_ERRMSG{$i}")] = $this->GetXMLData(constant("GAMG_ERRMSG{$i}"));
                                                 }
                                                 $this->m_RESULT[GAMG_APPLPRICE] = $this->GetXMLData(GAMG_APPLPRICE);
                                                 $this->m_RESULT[GAMG_NUM] = $this->GetXMLData(GAMG_NUM);
                                                 $this->m_RESULT[GAMG_RESULTCODE] = $this->GetXMLData(GAMG_RESULTCODE);
                                                 $this->m_RESULT[GAMG_RESULTMSG] = $this->GetXMLData(GAMG_RESULTMSG);
                                             } else {
                                                 if ($this->m_sPayMethod == NM_TX_EDUG) {
                                                     $this->m_RESULT[APPLDATE] = $this->GetXMLData(EDUG_APPLDATE);
                                                     $this->m_RESULT[APPLTIME] = $this->GetXMLData(EDUG_APPLTIME);
                                                     $this->m_RESULT[APPLNUM] = $this->GetXMLData(EDUG_APPLNUM);
                                                 } else {
                                                     if ($this->m_sPayMethod == NM_TX_TEEN) {
                                                         $this->m_RESULT[APPLDATE] = $this->GetXMLData(TEEN_APPLDATE);
                                                         $this->m_RESULT[APPLTIME] = $this->GetXMLData(TEEN_APPLTIME);
                                                         $this->m_RESULT[APPLNUM] = $this->GetXMLData(TEEN_APPLNUM);
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     } else {
         if ($this->m_Type == TYPE_INQUIRY) {
             $this->m_RESULT[INQR_TID] = $this->GetXMLData(INQR_TID);
             $this->m_RESULT[INQR_PRICE] = $this->GetXMLData(INQR_Price);
             $this->m_RESULT[INQR_STATUS] = $this->GetXMLData(INQR_Status);
         }
     }
     return OK;
 }
示例#2
0
文件: INICls.php 项目: bjrambo/nurigo
 function ParseDecrypt($decrypted)
 {
     $xml = new XML();
     if (($rtv = $xml->load_xml("", $decrypted)) != OK) {
         return $rtv;
     }
     $this->m_Xml = array_merge($this->m_Xml, $xml->xml_node);
     if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_RECEIPT) {
         //승인날짜(ApplDate), 승인시간(ApplTime), 승인번호(ApplNum)는 공통!!(OCB, 현금영수증 제외)
         //ISP, CARD는 CARD로 assign. 고객/상점은 ISP가 뭔지, CARD가 뭔지 알게 뭐야!!!-_-
         if ($this->m_sPayMethod == NM_TX_CARD) {
             $this->m_RESULT[APPLDATE] = $this->GetXMLData(CARD_APPLDATE);
             $this->m_RESULT[APPLTIME] = $this->GetXMLData(CARD_APPLTIME);
             $this->m_RESULT[APPLNUM] = $this->GetXMLData(CARD_APPLNUM);
             $this->m_RESULT[CARD_NUM] = $this->GetXMLData(CARD_NUM);
             $this->m_RESULT[CARD_EXPIRE] = $this->GetXMLData(CARD_EXPIRE);
             $this->m_RESULT[CARD_BANKCODE] = $this->GetXMLData(CARD_BANKCODE);
             $this->m_RESULT[CARD_CODE] = $this->GetXMLData(CARD_CODE);
             $this->m_RESULT[CARD_APPLPRICE] = $this->GetXMLData(CARD_APPLPRICE);
             $this->m_RESULT[CARD_QUOTA] = $this->GetXMLData(CARD_QUOTA);
             $this->m_RESULT[CARD_INTEREST] = $this->GetXMLData(CARD_INTEREST);
             $this->m_RESULT[CARD_POINT] = $this->GetXMLData(CARD_POINT);
             $this->m_RESULT[CARD_AUTHTYPE] = $this->GetXMLData(CARD_AUTHTYPE);
             $this->m_RESULT[CARD_REGNUM] = $this->GetXMLData(CARD_REGNUM);
             $this->m_RESULT[CARD_TERMINALNUM] = $this->GetXMLData(CARD_TERMINALNUM);
             $this->m_RESULT[CARD_MEMBERNUM] = $this->GetXMLData(CARD_MEMBERNUM);
             $this->m_RESULT[CARD_PURCHASECODE] = $this->GetXMLData(CARD_PURCHASECODE);
         } else {
             if ($this->m_sPayMethod == NM_TX_ISP) {
                 $this->m_RESULT[APPLDATE] = $this->GetXMLData(ISP_APPLDATE);
                 $this->m_RESULT[APPLTIME] = $this->GetXMLData(ISP_APPLTIME);
                 $this->m_RESULT[APPLNUM] = $this->GetXMLData(ISP_APPLNUM);
                 $this->m_RESULT[CARD_NUM] = $this->GetXMLData(ISP_CARDNUM);
                 $this->m_RESULT[CARD_EXPIRE] = $this->GetXMLData(ISP_EXPIRE);
                 $this->m_RESULT[CARD_BANKCODE] = $this->GetXMLData(ISP_BANKCODE);
                 $this->m_RESULT[CARD_CODE] = $this->GetXMLData(ISP_CARDCODE);
                 $this->m_RESULT[CARD_APPLPRICE] = $this->GetXMLData(ISP_APPLPRICE);
                 $this->m_RESULT[CARD_QUOTA] = $this->GetXMLData(ISP_QUOTA);
                 $this->m_RESULT[CARD_INTEREST] = $this->GetXMLData(ISP_INTEREST);
                 $this->m_RESULT[CARD_POINT] = $this->GetXMLData(ISP_POINT);
                 $this->m_RESULT[CARD_TERMINALNUM] = $this->GetXMLData(ISP_TERMINALNUM);
                 $this->m_RESULT[CARD_MEMBERNUM] = $this->GetXMLData(ISP_MEMBERNUM);
                 $this->m_RESULT[CARD_PURCHASECODE] = $this->GetXMLData(ISP_PURCHASECODE);
             } else {
                 if ($this->m_sPayMethod == NM_TX_CSHR) {
                     $this->m_RESULT[APPLDATE] = $this->GetXMLData(CSHR_APPLDATE);
                     $this->m_RESULT[APPLTIME] = $this->GetXMLData(CSHR_APPLTIME);
                     $this->m_RESULT[APPLNUM] = $this->GetXMLData(CSHR_APPLNUM);
                 } else {
                     if ($this->m_sPayMethod == NM_TX_ACCT) {
                         $this->m_RESULT[APPLDATE] = $this->GetXMLData(ACCT_APPLDATE);
                         $this->m_RESULT[APPLTIME] = $this->GetXMLData(ACCT_APPLTIME);
                         $this->m_RESULT[APPLNUM] = $this->GetXMLData(ACCT_APPLNUM);
                     } else {
                         if ($this->m_sPayMethod == NM_TX_HPP) {
                             $this->m_RESULT[APPLDATE] = $this->GetXMLData(HPP_APPLDATE);
                             $this->m_RESULT[APPLTIME] = $this->GetXMLData(HPP_APPLTIME);
                             $this->m_RESULT[APPLNUM] = $this->GetXMLData(HPP_APPLNUM);
                         } else {
                             if ($this->m_sPayMethod == NM_TX_VACT) {
                                 $this->m_RESULT[APPLDATE] = $this->GetXMLData(VACT_APPLDATE);
                                 $this->m_RESULT[APPLTIME] = $this->GetXMLData(VACT_APPLTIME);
                             } else {
                                 if ($this->m_sPayMethod == NM_TX_ARSB) {
                                     $this->m_RESULT[APPLDATE] = $this->GetXMLData(ARSB_APPLDATE);
                                     $this->m_RESULT[APPLTIME] = $this->GetXMLData(ARSB_APPLTIME);
                                     $this->m_RESULT[APPLNUM] = $this->GetXMLData(ARSB_APPLNUM);
                                 } else {
                                     if ($this->m_sPayMethod == NM_TX_PHNB) {
                                         $this->m_RESULT[APPLDATE] = $this->GetXMLData(PHNB_APPLDATE);
                                         $this->m_RESULT[APPLTIME] = $this->GetXMLData(PHNB_APPLTIME);
                                         $this->m_RESULT[APPLNUM] = $this->GetXMLData(PHNB_APPLNUM);
                                     } else {
                                         if ($this->m_sPayMethod == NM_TX_CULT) {
                                             $this->m_RESULT[APPLDATE] = $this->GetXMLData(CULT_APPLDATE);
                                             $this->m_RESULT[APPLTIME] = $this->GetXMLData(CULT_APPLTIME);
                                             $this->m_RESULT[APPLNUM] = $this->GetXMLData(CULT_APPLNUM);
                                         } else {
                                             if ($this->m_sPayMethod == NM_TX_GAMG) {
                                                 $this->m_RESULT[APPLDATE] = $this->GetXMLData(GAMG_APPLDATE);
                                                 $this->m_RESULT[APPLTIME] = $this->GetXMLData(GAMG_APPLTIME);
                                                 $this->m_RESULT[APPLNUM] = $this->GetXMLData(GAMG_APPLNUM);
                                                 $this->m_RESULT[GAMG_CNT] = $this->GetXMLData(GAMG_CNT);
                                                 //게임문화상품권은 Multi결제 가능
                                                 MakePathGAMG($this->m_RESULT[GAMG_CNT]);
                                                 for ($i = 1; $i <= $this->m_RESULT[GAMG_CNT]; $i++) {
                                                     $this->m_RESULT[constant("GAMG_NUM{$i}")] = $this->GetXMLData(constant("GAMG_NUM{$i}"));
                                                     $this->m_RESULT[constant("GAMG_REMAINS{$i}")] = $this->GetXMLData(constant("GAMG_REMAINS{$i}"));
                                                     $this->m_RESULT[constant("GAMG_ERRMSG{$i}")] = $this->GetXMLData(constant("GAMG_ERRMSG{$i}"));
                                                 }
                                                 $this->m_RESULT[GAMG_APPLPRICE] = $this->GetXMLData(GAMG_APPLPRICE);
                                                 $this->m_RESULT[GAMG_NUM] = $this->GetXMLData(GAMG_NUM);
                                                 $this->m_RESULT[GAMG_RESULTCODE] = $this->GetXMLData(GAMG_RESULTCODE);
                                                 $this->m_RESULT[GAMG_RESULTMSG] = $this->GetXMLData(GAMG_RESULTMSG);
                                             } else {
                                                 if ($this->m_sPayMethod == NM_TX_EDUG) {
                                                     $this->m_RESULT[APPLDATE] = $this->GetXMLData(EDUG_APPLDATE);
                                                     $this->m_RESULT[APPLTIME] = $this->GetXMLData(EDUG_APPLTIME);
                                                     $this->m_RESULT[APPLNUM] = $this->GetXMLData(EDUG_APPLNUM);
                                                 } else {
                                                     if ($this->m_sPayMethod == NM_TX_TEEN) {
                                                         $this->m_RESULT[APPLDATE] = $this->GetXMLData(TEEN_APPLDATE);
                                                         $this->m_RESULT[APPLTIME] = $this->GetXMLData(TEEN_APPLTIME);
                                                         $this->m_RESULT[APPLNUM] = $this->GetXMLData(TEEN_APPLNUM);
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return OK;
 }