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
41
42
43
44
45
46
47
48
49
50
51
|
<?php require_once dirname(__FILE__).'/BodyMessageValidator.php'; require_once dirname(__FILE__).'/../exception/ServiceException.php'; require_once dirname(__FILE__).'/../log/LogMode.php';
class BuyDecisionBodyMessageValidator implements BodyMessageValidator{ public function BuyDecisionBodyMessageValidator(){ } /** * * @param $mdto */ public function validate($mdto){ // TID if($mdto->getParameter(TID) == null || $mdto->getParameter(TID) == ""){ if(LogMode::isAppLogable()){ $logJournal = NicePayLogJournal::getInstance(); $logJournal->errorAppLog("°Å·¡TID ¹Ì¼³Á¤ ¿À·ùÀÔ´Ï´Ù."); } throw new ServiceException("VC01","°Å·¡TID ¹Ì¼³Á¤ ¿À·ùÀÔ´Ï´Ù."); }
// MID if($mdto->getParameter(MID) == null || $mdto->getParameter(MID) == ""){ if(LogMode::isAppLogable()){ $logJournal = NicePayLogJournal::getInstance(); $logJournal->errorAppLog("MID ¹Ì¼³Á¤ ¿À·ùÀÔ´Ï´Ù."); } throw new ServiceException("VC04","MID ¹Ì¼³Á¤ ¿À·ùÀÔ´Ï´Ù."); } // TID if($mdto->getParameter(BUYER_AUTH_NO) == null || $mdto->getParameter(BUYER_AUTH_NO) == ""){ if(LogMode::isAppLogable()){ $logJournal = NicePayLogJournal::getInstance(); $logJournal->errorAppLog("°í°´°íÀ¯¹øÈ£ ¹ÌÀÔ·Â ¿À·ùÀÔ´Ï´Ù."); } throw new ServiceException("VC05","°í°´°íÀ¯¹øÈ£ ¹ÌÀÔ·Â ¿À·ùÀÔ´Ï´Ù."); } } }
?>
|