Index: /branches/beta/data/downloads/module/mdl_paygent/mdl_paygent.inc
===================================================================
--- /branches/beta/data/downloads/module/mdl_paygent/mdl_paygent.inc	(revision 16951)
+++ /branches/beta/data/downloads/module/mdl_paygent/mdl_paygent.inc	(revision 17012)
@@ -42,15 +42,15 @@
 	090¡§·èºÑ¾ðÊó¾È²ñ
 	091¡§º¹Ê¬¾È²ñ
-*/ 
-define("PAYGENT_BANK", '060');
+*/
 define("PAYGENT_ATM", '010');
-define("PAYGENT_CONVENI", '030');
 define("PAYGENT_CREDIT", '020');
-// ¥Ð¥Ã¥Á¤Ç»ÈÍÑ¤¹¤ë¡£
-define("PAYGENT_REF", '091');
-
 define("PAYGENT_AUTH_CANCEL", '021');
 define("PAYGENT_CARD_COMMIT", '022');
 define("PAYGENT_CARD_COMMIT_CANCEL", '023');
+define("PAYGENT_CARD_3D", '024');
+define("PAYGENT_CONVENI", '030');
+define("PAYGENT_BANK", '060');
+// ¥Ð¥Ã¥Á¤Ç»ÈÍÑ¤¹¤ë¡£
+define("PAYGENT_REF", '091');
 
 // Ìµ¸Â¥ë¡¼¥×¤òÈò¤±¤ë
@@ -171,5 +171,5 @@
 	$p->init();
 	
-	//¡¡¥¯¥ì¥¸¥Ã¥ÈÍÑ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
+	// ¥¯¥ì¥¸¥Ã¥ÈÍÑ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
 	$arrPaymentDB = sfGetPaymentDB(MDL_PAYGENT_ID, "AND memo03 = 1");
 	$arrOtherParam = unserialize($arrPaymentDB[0]['other_param']);
@@ -196,7 +196,17 @@
 	$arrSend['payment_class'] = $payment_class;
 	// Ê¬³ä²ó¿ô
-	$arrSend['split_count'] = $split_count;	
-	// 3D¥»¥­¥å¥¢ÉÞÍÜ¶èÊ¬
-	$arrSend['3dsecure_ryaku'] = '1';
+	$arrSend['split_count'] = $split_count;
+	/** 3D¥»¥­¥å¥¢´ØÏ¢ **/
+	if ($arrOtherParam['credit_3d'] != 1 || GC_MobileUserAgent::isMobile()) {
+		// 3D¥»¥­¥å¥¢ÉÔÍ×¶èÊ¬
+		$arrSend['3dsecure_ryaku'] = '1';
+	} else {
+		// HttpAccept
+		$arrSend['http_accept'] = $_SERVER['HTTP_ACCEPT'];
+		// HttpUserAgent
+		$arrSend['http_user_agent'] = $_SERVER['HTTP_USER_AGENT'];
+		// 3D¥»¥­¥å¥¢Ìá¤êURL
+		$arrSend['term_url'] = SSL_URL. "shopping/load_payment_module.php?mode=credit_3d&uniqid=". $uniqid;
+	}
 	
 	// ÅÅÊ¸¤ÎÁ÷ÉÕ
@@ -204,8 +214,44 @@
 		$p->reqPut($key, $val);
 	}
-	
 	// ÅÅÊ¸¤ÎÁ÷¿®
 	$p->post();
-
+	// ±þÅú¤ò½èÍý
+	$arrRet = sfPaygentResponse(PAYGENT_CREDIT, $p, $uniqid, $arrInput);
+	
+	return $arrRet;
+}
+
+/**************************************************************************************************************
+ * ´Ø¿ôÌ¾	¡§sfSendPaygentCredit3d
+ * ½èÍýÆâÍÆ	¡§3D¥»¥­¥å¥¢¾ðÊó¤ÎÁ÷¿®
+ * °ú¿ô1	¡§
+ * °ú¿ô2	¡§
+ * °ú¿ô3	¡§
+ * Ìá¤êÃÍ	¡§¼èÆÀ·ë²Ì
+ **************************************************************************************************************/
+function sfSendPaygetnCredit3d($arrData, $arrInput, $uniqid) {
+	// ÀÜÂ³¥â¥¸¥å¡¼¥ë¤Î¥¤¥ó¥¹¥¿¥ó¥¹¼èÆÀ (¥³¥ó¥¹¥È¥é¥¯¥¿)¤È½é´ü²½
+	$p = new PaygentB2BModule();
+	$p->init();
+	
+	// ¥¯¥ì¥¸¥Ã¥ÈÍÑ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
+	$arrPaymentDB = sfGetPaymentDB(MDL_PAYGENT_ID, "AND memo03 = 1");
+	$arrOtherParam = unserialize($arrPaymentDB[0]['other_param']);
+	
+	// ¶¦ÄÌ¥Ç¡¼¥¿¤Î¼èÆÀ
+	$arrSend = sfGetPaygentShare(PAYGENT_CARD_3D, $arrData['order_id'], $arrPaymentDB[0], $arrData['memo06']);
+	
+	/** ¸ÄÊÌÅÅÊ¸ **/
+	// ACS±þÅú
+	$arrSend['PaRes'] = $arrInput['PaRes'];
+	// ¥Þ¡¼¥Á¥ã¥ó¥È¥Ç¡¼¥¿
+	$arrSend['MD'] = $arrInput['MD'];
+	
+	// ÅÅÊ¸¤ÎÁ÷ÉÕ
+	foreach($arrSend as $key => $val) {
+		$p->reqPut($key, $val);
+	}
+	// ÅÅÊ¸¤ÎÁ÷¿®
+	$p->post();
 	// ±þÅú¤ò½èÍý
 	$arrRet = sfPaygentResponse(PAYGENT_CREDIT, $p, $uniqid, $arrInput);
@@ -227,5 +273,5 @@
 	$p->init();
 	
-	//¡¡¥³¥ó¥Ó¥ËÍÑ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
+	// ¥³¥ó¥Ó¥ËÍÑ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
 	$arrPaymentDB = sfGetPaymentDB(MDL_PAYGENT_ID, "AND memo03 = 2");
 	$arrOtherParam = unserialize($arrPaymentDB[0]['other_param']);
@@ -262,8 +308,6 @@
 		$p->reqPut($key, $enc_val);
 	}
-	
 	// ÅÅÊ¸¤ÎÁ÷¿®
 	$p->post();
-
 	// ±þÅú¤ò½èÍý
 	$arrRet = sfPaygentResponse(PAYGENT_CONVENI, $p, $uniqid, $arrInput);
@@ -285,5 +329,5 @@
 	$p->init();
 	
-	//¡¡ATM·èºÑÍÑ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
+	// ATM·èºÑÍÑ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
 	$arrPaymentDB = sfGetPaymentDB(MDL_PAYGENT_ID, "AND memo03 = 3");
 	$arrOtherParam = unserialize($arrPaymentDB[0]['other_param']);
@@ -321,8 +365,6 @@
 		$p->reqPut($key, $enc_val);
 	}
-	
 	// ÅÅÊ¸¤ÎÁ÷¿®
 	$p->post();
-	
 	// ±þÅú¤ò½èÍý
 	$arrRet = sfPaygentResponse(PAYGENT_ATM, $p, $uniqid, $arrInput);
@@ -344,5 +386,5 @@
 	$p->init();
 	
-	//¡¡¶ä¹ÔNETÍÑ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
+	// ¶ä¹ÔNETÍÑ¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ
 	$arrPaymentDB = sfGetPaymentDB(MDL_PAYGENT_ID, "AND memo03 = 4");
 	$arrOtherParam = unserialize($arrPaymentDB[0]['other_param']);
@@ -399,8 +441,6 @@
 		$p->reqPut($key, $enc_val);
 	}
-	
 	// ÅÅÊ¸¤ÎÁ÷¿®
 	$p->post();
-	
 	// ±þÅú¤ò½èÍý
 	$arrRet = sfPaygentResponse(PAYGENT_BANK, $p, $uniqid, $arrInput);
Index: /branches/beta/data/downloads/module/mdl_paygent/paygent_conveni.php
===================================================================
--- /branches/beta/data/downloads/module/mdl_paygent/paygent_conveni.php	(revision 16909)
+++ /branches/beta/data/downloads/module/mdl_paygent/paygent_conveni.php	(revision 17012)
@@ -33,4 +33,5 @@
 $objSiteInfo = $objView->objSiteInfo;
 $arrInfo = $objSiteInfo->data;
+
 // ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹
 $objFormParam = new SC_FormParam();
Index: /branches/beta/data/downloads/module/mdl_paygent/paygent_credit.php
===================================================================
--- /branches/beta/data/downloads/module/mdl_paygent/paygent_credit.php	(revision 16909)
+++ /branches/beta/data/downloads/module/mdl_paygent/paygent_credit.php	(revision 17012)
@@ -73,19 +73,36 @@
 		$arrRet = sfSendPaygentCredit($arrData, $arrInput, $uniqid);
 		
-		// À®¸ù
-		if($arrRet['result'] === "0") {
-            // Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
+		// À®¸ù¡Ê3D¥»¥­¥å¥¢Ì¤ÂÐ±þ¡Ë
+		if ($arrRet['result'] === "0") {
+            // Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿
             $objSiteSess->setRegistFlag();
 			if (GC_MobileUserAgent::isMobile()) {
-				header("Location: " . gfAddSessionId(MOBILE_URL_SHOP_COMPLETE));
+				header("Location: ". gfAddSessionId(MOBILE_URL_SHOP_COMPLETE));
 			} else {
-				header("Location: " . URL_SHOP_COMPLETE);
+				header("Location: ". URL_SHOP_COMPLETE);
 			}
+		// À®¸ù¡Ê3D¥»¥­¥å¥¢ÂÐ±þ¡Ë
+		} elseif ($arrRet['result'] === "7") {
+			// ¥«¡¼¥É²ñ¼Ò²èÌÌ¤ØÁ«°Ü¡ÊACS»ÙÊ§¿ÍÇ§¾ÚÍ×µáHTML¤òÉ½¼¨¡Ë
+			print mb_convert_encoding($arrRet['out_acs_html'], CHAR_CODE, "Shift-JIS");
+			exit;
+		// ¼ºÇÔ
 		} else {
-			// ¼ºÇÔ
 			$objPage->tpl_error = "Ç§¾Ú¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£¤ª¼ê¿ô¤Ç¤¹¤¬ÆþÎÏÆâÍÆ¤ò¤´³ÎÇ§¤¯¤À¤µ¤¤¡£";
 		}
 	}
 	break;
+}
+
+// 3D¥»¥­¥å¥¢¼Â»Ü¸å
+if ($_GET['mode'] == "credit_3d" && $_GET['uniqid'] == $uniqid) {
+	// ¥¯¥ì¥¸¥Ã¥ÈÅÅÊ¸Á÷¿®¡Ê3D¥»¥­¥å¥¢¼Â»Ü¸å¡Ë
+	$arrRet = sfSendPaygetnCredit3d($arrData, $_POST, $uniqid);
+	// À®¸ù
+	if ($arrRet['result'] === "0") {
+		// Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿
+		$objSiteSess->setRegistFlag();
+		header("Location: ". URL_SHOP_COMPLETE);
+	}
 }
 
Index: /branches/beta/data/downloads/module/mdl_paygent/mdl_paygent.php
===================================================================
--- /branches/beta/data/downloads/module/mdl_paygent/mdl_paygent.php	(revision 16909)
+++ /branches/beta/data/downloads/module/mdl_paygent/mdl_paygent.php	(revision 17012)
@@ -21,5 +21,10 @@
 	2 => 'JCB, AMEX'
 );
-	
+
+$arrActive = array(
+	1 => 'Í×',
+	0 => 'ÉÔÍ×'
+);
+
 //¥Ú¡¼¥¸´ÉÍý¥¯¥é¥¹
 class LC_Page {
@@ -35,4 +40,6 @@
 		global $arrConvenience;
 		$this->arrConvenience = $arrConvenience;
+		global $arrActive;
+		$this->arrActive = $arrActive;
 	}
 }
@@ -94,4 +101,5 @@
     // ¥Ç¥Õ¥©¥ë¥ÈÃÍ
     $arrDefault  = array(
+        'credit_3d' => "0",
         'conveni_limit_date' => 15,
         'atm_limit_date'     => 30,
@@ -104,4 +112,5 @@
 	$objFormParam->addParam("ÀÜÂ³ID", "connect_id", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
 	$objFormParam->addParam("ÀÜÂ³¥Ñ¥¹¥ï¡¼¥É", "connect_password", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
+	$objFormParam->addParam("3D¥»¥­¥å¥¢", "credit_3d", "", "n", array("EXIST_CHECK"), $arrDefault['credit_3d']);
 	$objFormParam->addParam("»ÙÊ§´ü¸ÂÆü", "conveni_limit_date", 2, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"), $arrDefault['conveni_limit_date']);
 	$objFormParam->addParam("»ÙÊ§´ü¸ÂÆü", "atm_limit_date", 2, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"), $arrDefault['atm_limit_date']);
@@ -136,7 +145,4 @@
             $arrErr['claim_kana'] = "¢¨ É½¼¨Å¹ÊÞÌ¾¡Ê¥«¥Ê¡Ë¤òÆþÎÏ¤·¤Æ¤¯¤À¤µ¤¤¡£<br>";
     }
-	
-    
-    
     /** ¶¦ÄÌÅÅÊ¸ **/	
 	// ¥Þ¡¼¥Á¥ã¥ó¥ÈID
@@ -174,4 +180,6 @@
 		// ¥¯¥ì¥¸¥Ã¥È
 		case '1':
+			$arrParam = unserialize($val['other_param']);
+			$arrDisp['credit_3d'] = $arrParam['credit_3d'];
 			break;
 		// ¥³¥ó¥Ó¥Ë
@@ -205,5 +213,5 @@
 	global $objQuery;
 	global $objSess;
-		
+	
 	// ´ØÏ¢¤¹¤ë»ÙÊ§¤¤ÊýË¡¤Îdel_flg¤òºï½ü¤Ë¤·¤Æ¤ª¤¯
 	$del_sql = "UPDATE dtb_payment SET del_flg = 1 WHERE module_id = ? ";
@@ -215,11 +223,12 @@
 		// ¥é¥ó¥¯¤ÎºÇÂçÃÍ¤ò¼èÆÀ¤¹¤ë
 		$max_rank = $objQuery->getone("SELECT max(rank) FROM dtb_payment");
-
-		// »ÙÊ§ÊýË¡¥Ç¡¼¥¿¤ò¼èÆÀ			
+		// »ÙÊ§ÊýË¡¥Ç¡¼¥¿¤ò¼èÆÀ
 		$arrPaymentData = sfGetPaymentDB(MDL_PAYGENT_ID, "AND memo03 = ?", array($val));
 		
 		// ¥¯¥ì¥¸¥Ã¥È¤Ë¥Á¥§¥Ã¥¯¤¬Æþ¤Ã¤Æ¤¤¤ì¤Ð¥¯¥ì¥¸¥Ã¥È¤òÅÐÏ¿¤¹¤ë
 		if($val == 1){
-			$arrData = array(			
+			$arrParam = array();
+			$arrParam['credit_3d'] = $_POST['credit_3d'];
+			$arrData = array(
 				"payment_method" => "PAYGENT¥¯¥ì¥¸¥Ã¥È"
 				,"fix" => 3
@@ -234,5 +243,5 @@
 				,"memo03" => $val
 				,"memo04" => $_POST["connect_password"]
-				,"memo05" => ""
+				,"memo05" => serialize($arrParam)
 				,"del_flg" => "0"
 				,"charge_flg" => "2"
@@ -246,5 +255,4 @@
 			$arrParam = array();
 			$arrParam['payment_limit_date'] = $_POST['conveni_limit_date'];
-			
 			$arrData = array(
 				"payment_method" => "PAYGENT¥³¥ó¥Ó¥Ë"
@@ -272,5 +280,4 @@
 			$arrParam['payment_detail'] = $_POST['payment_detail'];
 			$arrParam['payment_limit_date'] = $_POST['atm_limit_date'];
-			
 			$arrData = array(
 				"payment_method" => "PAYGENTATM·èºÑ"
Index: /branches/beta/data/downloads/module/mdl_paygent/paygent_bank.tpl
===================================================================
--- /branches/beta/data/downloads/module/mdl_paygent/paygent_bank.tpl	(revision 16798)
+++ /branches/beta/data/downloads/module/mdl_paygent/paygent_bank.tpl	(revision 17012)
Index: /branches/beta/data/downloads/module/mdl_paygent/mdl_paygent.tpl
===================================================================
--- /branches/beta/data/downloads/module/mdl_paygent/mdl_paygent.tpl	(revision 16746)
+++ /branches/beta/data/downloads/module/mdl_paygent/mdl_paygent.tpl	(revision 17012)
@@ -34,5 +34,5 @@
 	for(pi = 0; pi < payment.length; pi++) {
 		// ¥¯¥ì¥¸¥Ã¥È¤Î¾ì¹ç
-		list = new Array('credit[]');
+		list = new Array('credit[]', 'credit_3d');
 		if(fm[payment[pi]][0].checked){
 			fnChangeDisabled(list, false);
@@ -188,7 +188,18 @@
 										
 										<tr class="fs12n">
-											<td colspan="2" width="90" bgcolor="#f3f3f3">¢§¥³¥ó¥Ó¥ËÀßÄê</td>
-										</tr>
-																				
+											<td colspan="2" width="90" bgcolor="#f3f3f3">¢§¥¯¥ì¥¸¥Ã¥È·èºÑÀßÄê</td>
+										</tr>
+										<tr class="fs12n">
+											<td width="" bgcolor="#f3f3f3">3D¥»¥­¥å¥¢</td>
+											<td width="" bgcolor="#ffffff">
+											<!--{assign var=key value="credit_3d"}-->
+											<span class="red12"><!--{$arrErr[$key]}--></span>
+											<!--{html_radios name="$key" options=$arrActive selected=$arrForm[$key].value style=$arrErr[$key]|sfGetErrorColor}-->
+											</td>
+										</tr>
+										
+										<tr class="fs12n">
+											<td colspan="2" width="90" bgcolor="#f3f3f3">¢§¥³¥ó¥Ó¥Ë·èºÑÀßÄê</td>
+										</tr>
 										<tr class="fs12n">
 											<td width="" bgcolor="#f3f3f3">»ÙÊ§´ü¸ÂÆü</td>
@@ -203,5 +214,4 @@
 											<td colspan="2" width="90" bgcolor="#f3f3f3">¢§ATM·èºÑÀßÄê</td>
 										</tr>
-										
 										<tr class="fs12n">
 											<td width="" bgcolor="#f3f3f3">»ÙÊ§´ü¸ÂÆü</td>
