/home/mjc1/public_html/plugin/nicepay/lib/nicepay/validator/BankBodyMessageValidator.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
require_once dirname(__FILE__).'/BodyMessageValidator.php';
require_once 
dirname(__FILE__).'/../exception/ServiceException.php';
require_once 
dirname(__FILE__).'/../log/LogMode.php';
/**
 * 
 * @author kblee
 *
 */
class BankBodyMessageValidator implements BodyMessageValidator{
    
    
/**
     * 
     */
    
public function BankBodyMessageValidator(){
        
    }
    
    
/**
     * 
     * @param $mdto
     */
    
public function validate($mdto){
      
      if (
$mdto->getParameter(TR_KEY) == null) {
        
// BankEncData
          
if($mdto->getParameter(BANK_ENC_DATA) == null || $mdto->getParameter(BANK_ENC_DATA) == ""){
              
              if(
LogMode::isAppLogable()){
                  
$logJournal NicePayLogJournal::getInstance();
                  
$logJournal->errorAppLog("±ÝÀ¶°áÁ¦¿ø ¾Ïȣȭ µ¥ÀÌÅÍ ¹Ì¼³Á¤¿À·ùÀÔ´Ï´Ù.");
              }
              
              throw new 
ServiceException("V602","±ÝÀ¶°áÁ¦¿ø ¾Ïȣȭ µ¥ÀÌÅÍ ¹Ì¼³Á¤ ¿À·ùÀÔ´Ï´Ù.");
          }        
      }
    }
    
}
?>