Ignore:
Timestamp:
2007/08/06 18:49:07 (17 years ago)
Author:
naka
Message:
 
Location:
branches/feature-module-paygent/data/downloads/module/mdl_paygent
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-paygent/data/downloads/module/mdl_paygent/mdl_paygent.inc

    r15198 r15219  
    88 */ 
    99$paygent_credit_php_dir = realpath(dirname( __FILE__)); 
     10// include_path¤Ëmdl_paygent¤Î¥Ñ¥¹¤ò´Þ¤á¤ë 
    1011ini_set('include_path', $paygent_credit_php_dir . PATH_SEPARATOR . ini_get('include_path')); 
    1112 
    12 $check_path = $paygent_credit_php_dir . "/" . "jp/co/ks/merchanttool/connectmodule/"; 
     13$paygent_module_dir = "jp/co/ks/merchanttool/connectmodule/"; 
     14 
     15// ¥â¥¸¥å¡¼¥ë¥Õ¥¡¥¤¥ë¤Î¸ºß¥Á¥§¥Ã¥¯ 
     16if(!file_exists($paygent_credit_php_dir . "/" . $paygent_module_dir)) { 
     17    print("¥Ú¥¤¥¸¥§¥ó¥ÈÄ󶡥⥸¥å¡¼¥ë¤òÀßÃÖ¤·¤Æ¤¯¤À¤µ¤¤¡£"); 
     18    exit; 
     19} 
    1320 
    1421// paygent¥â¥¸¥å¡¼¥ë¤ÎÆɹþ 
    15 include_once("jp/co/ks/merchanttool/connectmodule/entity/ResponseDataFactory.php"); 
    16 include_once("jp/co/ks/merchanttool/connectmodule/system/PaygentB2BModule.php"); 
    17 include_once("jp/co/ks/merchanttool/connectmodule/exception/PaygentB2BModuleConnectException.php"); 
    18 include_once("jp/co/ks/merchanttool/connectmodule/exception/PaygentB2BModuleException.php"); 
     22include_once($paygent_module_dir . "entity/ResponseDataFactory.php"); 
     23include_once($paygent_module_dir . "system/PaygentB2BModule.php"); 
     24include_once($paygent_module_dir . "exception/PaygentB2BModuleConnectException.php"); 
     25include_once($paygent_module_dir . "exception/PaygentB2BModuleException.php"); 
    1926 
    2027// ¥Ú¥¤¥¸¥§¥ó¥È·èºÑ¤Î¥â¥¸¥å¡¼¥ëID¡Êdtb_module¤È¹ç¤ï¤»¤ë¡Ë 
     
    542549 
    543550/************************************************************************************************************** 
     551 * ´Ø¿ô̾   ¡§sfPaygentTest 
     552 * ½èÍýÆâÍÆ ¡§Àܳ¥Æ¥¹¥È 
     553 * °ú¿ô1    ¡§ 
     554 * °ú¿ô2    ¡§ 
     555 * °ú¿ô3    ¡§ 
     556 * Ìá¤êÃÍ   ¡§¼èÆÀ·ë²Ì 
     557 **************************************************************************************************************/ 
     558function sfPaygentTest($arrParam) { 
     559    $objQuery = new SC_Query(); 
     560     
     561    // Àܳ¥â¥¸¥å¡¼¥ë¤Î¥¤¥ó¥¹¥¿¥ó¥¹¼èÆÀ (¥³¥ó¥¹¥È¥é¥¯¥¿)¤È½é´ü²½ 
     562    $objPaygent = new PaygentB2BModule(); 
     563    $objPaygent->init(); 
     564         
     565    // ¶¦Ḁ̈ǡ¼¥¿¤Î¼èÆÀ 
     566    $arrSend = sfGetPaygentShare(PAYGENT_REF, '0', $arrParam); 
     567 
     568    // ÅÅʸ¤ÎÁ÷ÉÕ 
     569    foreach($arrSend as $key => $val) { 
     570        $objPaygent->reqPut($key, $val); 
     571    } 
     572    // ÅÅʸ¤ÎÁ÷¿® 
     573    $objPaygent->post(); 
     574     
     575    // ½èÍý·ë²Ì¼èÆÀ¡Ê¶¦ÄÌ¡Ë 
     576    $resultStatus = $objPaygent->getResultStatus(); # ½èÍý·ë²Ì 0=Àµ¾ï½ªÎ», 1=°Û¾ï½ªÎ» 
     577             
     578    if($resultStatus == 0) { 
     579        return true; 
     580    } else { 
     581        return false; 
     582    } 
     583} 
     584 
     585/************************************************************************************************************** 
    544586 * ´Ø¿ô̾   ¡§sfCheckPaymentStatus 
    545587 * ½èÍýÆâÍÆ ¡§Æþ¶â¥¹¥Æ¡¼¥¿¥¹³Îǧ¥Ð¥Ã¥Á 
  • branches/feature-module-paygent/data/downloads/module/mdl_paygent/mdl_paygent.php

    r15201 r15219  
    113113            $arrErr['atm_limit_date'] = "¢¨ »Ùʧ´ü¸ÂÆü¤Ï¡¢0¡Á60Æü¤Þ¤Ç¤Î´Ö¤ÇÀßÄꤷ¤Æ¤¯¤À¤µ¤¤¡£<br>"; 
    114114    } 
     115     
     116    /** ¶¦ÄÌÅÅʸ **/     
     117    // ¥Þ¡¼¥Á¥ã¥ó¥ÈID 
     118    $arrParam['merchant_id'] = $objFormParam->getValue('merchant_id'); 
     119    // ÀܳID 
     120    $arrParam['connect_id'] = $objFormParam->getValue('connect_id'); 
     121    // Àܳ¥Ñ¥¹¥ï¡¼¥É 
     122    $arrParam['connect_password'] = $objFormParam->getValue('connect_password'); 
     123 
     124    // Àܳ¥Æ¥¹¥È¤ò¼Â¹Ô¤¹¤ë¡£ 
     125    if(!sfPaygentTest($arrParam)) { 
     126        $arrErr['err'] = "¢¨ Àܳ»î¸³¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£"; 
     127    }    
     128     
    115129    return $arrErr; 
    116130} 
  • branches/feature-module-paygent/data/downloads/module/mdl_paygent/mdl_paygent.tpl

    r15196 r15219  
    145145                                    </table> 
    146146                                     
     147                                    <!--{if $arrErr.err != ""}--> 
     148                                    <table width="442" border="0" cellspacing="0" cellpadding="0" summary=" "> 
     149                                        <tr class="fs12n"> 
     150                                            <td width="442" bgcolor="#ffffff"><span class="red12"><!--{$arrErr.err}--></span><td> 
     151                                        </tr> 
     152                                    </table> 
     153                                    <!--{/if}--> 
     154                                     
    147155                                    <table width="442" border="0" cellspacing="1" cellpadding="8" summary=" "> 
    148156                                        <tr class="fs12n"> 
Note: See TracChangeset for help on using the changeset viewer.