<?php /************************** * 1. 라이브러리 인클루드 * **************************/ require "../lib/NicepayLite.php"; require "../PDOEx/PDOEx.php"; /*************************************** * 2. NicepayLite 클래스의 인스턴스 생성 * ***************************************/ $nicepay = new NicepayLite(); //로그를 저장할 디렉토리를 설정하십시요. $nicepay->m_NicepayHome = "/var/www/sadari/sadari/nicepay/log"; /************************************** * 3. 결제 요청 파라미터 설정 * ***************************************/ $nicepay->m_GoodsName = $GoodsName; $nicepay->m_GoodsCnt = $GoodsCnt; $nicepay->m_Price = $Amt; $nicepay->m_Moid = $Moid; $nicepay->m_BuyerName = $BuyerName; $nicepay->m_BuyerEmail = $BuyerEmail; $nicepay->m_BuyerTel = $BuyerTel; $nicepay->m_MallUserID = $MallUserID; $nicepay->m_GoodsCl = $GoodsCl; $nicepay->m_MID = $MID; //$nicepay->m_MallIP = $MallIP; $nicepay->m_TrKey = $TrKey; $nicepay->m_EncryptedData = $EncryptData; $nicepay->m_PayMethod = $PayMethod; $nicepay->m_TransType = $TransType;
exit("already processed<br/>"); } else { if ($_SADARI_STATE == 2) { exit("canceled item<br/>"); } } } unset($stmt); } catch (PDOException $e) { print "Error : " . $e->getMessage() . "<br/>"; die; } /*************************************** * 2. NicepayLite 클래스의 인스턴스 생성 * ***************************************/ $nicepay = new NicepayLite(); // 상점 MID를 설정합니다. test시 nictest00m으로 설정하십시요. $nicepay->m_MID = "cooknet01m"; //"nictest00m"; //$nicepay->m_MID = "nictest00m"; // 상점서명키 (꼭 해당 상점키로 바꿔주세요) $nicepay->m_MerchantKey = "A1KP7j4qTyUs2gn2uyNmNJHZKdJyv+1ZXru1ZP29hU/y+UQQM4nGIKOb/0iVV+1HaDyZ2bNJRBXrtfjJ+nGVLA=="; //"33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A=="; //$nicepay->m_MerchantKey = "33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A=="; // 거래 날짜 $nicepay->m_EdiDate = date("YmdHis"); // 상품 가격을 설정하여 주십시요. $nicepay->m_Price = $_SADARI_HOW_MUCH; //초기 처리 $nicepay->requestProcess(); ?>