Changeset 16542
- Timestamp:
- 2007/10/23 23:07:00 (16 years ago)
- Location:
- branches/feature-module-paygent
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-paygent/data/Smarty/templates/admin/order/edit.tpl
r11558 r16542 19 19 <!--¡ú¡ú¥á¥¤¥ó¥³¥ó¥Æ¥ó¥Ä¡ú¡ú--> 20 20 <table width="878" border="0" cellspacing="0" cellpadding="0" summary=" "> 21 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->">22 <input type="hidden" name="mode" value="edit">23 <input type="hidden" name="order_id" value="<!--{$tpl_order_id}-->">24 <input type="hidden" name="edit_customer_id" value="<!--{$tpl_order_id}-->">25 21 <tr valign="top"> 26 22 <td background="<!--{$smarty.const.URL_DIR}-->img/contents/navi_bg.gif" height="402"> … … 46 42 <!--ÅÐÏ¿¥Æ¡¼¥Ö¥ë¤³¤³¤«¤é--> 47 43 <table width="678" border="0" cellspacing="0" cellpadding="0" summary=" "> 44 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 45 <input type="hidden" name="mode" value="edit"> 46 <input type="hidden" name="order_id" value="<!--{$tpl_order_id}-->"> 47 <input type="hidden" name="edit_customer_id" value="<!--{$tpl_order_id}-->"> 48 48 <tr> 49 49 <td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_top.gif" width="678" height="7" alt=""></td> … … 61 61 </tr> 62 62 </table> 63 63 64 <!--{* ¥Ú¥¤¥¸¥§¥ó¥È¥â¥¸¥å¡¼¥ëÏ¢·ÈÍÑ *}--> 65 <!--{assign var=path value=`$smarty.const.MODULE_PATH`mdl_paygent/paygent_order.tpl}--> 66 <!--{if file_exists($path)}--> 67 <!--{include file=$path}--> 68 <!--{/if}--> 69 64 70 <!--¢§¤ªµÒÍ;ðÊ󤳤³¤«¤é--> 65 71 <table width="678" border="0" cellspacing="1" cellpadding="8" summary=" "> -
branches/feature-module-paygent/data/downloads/module/mdl_paygent/mdl_paygent.inc
r16525 r16542 51 51 define("PAYGENT_REF", '091'); 52 52 53 define("PAYGENT_AUTH_CANCEL", '021'); 54 define("PAYGENT_CARD_COMMIT", '023'); 55 define("PAYGENT_CARD_COMMIT_CANCEL", '024'); 56 57 $arrDispKind = array( 58 PAYGENT_AUTH_CANCEL => '¥«¡¼¥É·èºÑ¥ª¡¼¥½¥ê¥¥ã¥ó¥»¥ë', 59 PAYGENT_CARD_COMMIT => '¥«¡¼¥É·èºÑÇä¾å', 60 PAYGENT_CARD_COMMIT_CANCEL => '¥«¡¼¥É·èºÑÇä¾å¥¥ã¥ó¥»¥ë', 61 ); 53 62 54 63 // ¼õÃí»þ¤Î½é´ü¥¹¥Æ¡¼¥¿¥¹ … … 137 146 **************************************************************************************************************/ 138 147 function sfSendPaygentCredit($arrData, $arrInput, $uniqid) { 139 // Àܳ¥â¥¸¥å¡¼¥ë¤Î¥¤¥ó¥¹¥¿¥ó¥¹¼èÆÀ (¥³¥ó¥¹¥È¥é¥¯¥¿)¤È½é´ü²½148 // Àܳ¥â¥¸¥å¡¼¥ë¤Î¥¤¥ó¥¹¥¿¥ó¥¹¼èÆÀ (¥³¥ó¥¹¥È¥é¥¯¥¿)¤È½é´ü²½ 140 149 $p = new PaygentB2BModule(); 141 150 $p->init(); … … 472 481 $arrVal["memo05"] = $responseDetail; // ¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸ 473 482 $arrVal["memo06"] = $arrRes[0]['payment_id']; // ¾µÇ§ÈÖ¹æ 474 483 $arrVal["memo07"] = ""; // ¥¹¥Æ¡¼¥¿¥¹¼èÆÀ¤Ç»ÈÍÑ 484 $arrVal["memo08"] = $telegram_kind; 485 $arrVal["memo09"] = ""; // ¥«¡¼¥É·èºÑÏ¢·È¤Ç»ÈÍÑ 486 475 487 // ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤Ë¹¹¿· 476 488 sfRegistTempOrder($uniqid, $arrVal); … … 562 574 563 575 for($i = 0; $i < count($arrOrder); $i++) { 564 $arrRet = sfUpdatePaymentStatus($objPaygent, $arrOrder[$i]['order_id'], $arrSend); 565 } 566 567 return $arrRet; 576 sfUpdatePaymentStatus($objPaygent, $arrOrder[$i]['order_id'], $arrSend); 577 } 568 578 } 569 579 … … 604 614 605 615 /************************************************************************************************************** 606 * ´Ø¿ô̾ ¡§sf CheckPaymentStatus616 * ´Ø¿ô̾ ¡§sfUpdatePaymentStatus 607 617 * ½èÍýÆâÍÆ ¡§Æþ¶â¥¹¥Æ¡¼¥¿¥¹³Îǧ¥Ð¥Ã¥Á 608 618 * °ú¿ô1 ¡§ … … 612 622 **************************************************************************************************************/ 613 623 function sfUpdatePaymentStatus($objPaygent, $order_id, $arrSend) { 614 $objQuery = new SC_Query(); 615 616 // ¥Þ¡¼¥Á¥ã¥ó¥È¼è°úID¤ÎÆþ¤ìÂؤ¨ 617 $arrSend['trading_id'] = $order_id; 618 619 // ÅÅʸ¤ÎÁ÷ÉÕ 620 foreach($arrSend as $key => $val) { 621 $objPaygent->reqPut($key, $val); 622 } 623 // ÅÅʸ¤ÎÁ÷¿® 624 $objPaygent->post(); 625 626 // ¥ì¥¹¥Ý¥ó¥¹¤Î¼èÆÀ 627 while($objPaygent->hasResNext()) { 628 # ¥Ç¡¼¥¿¤¬Â¸ºß¤¹¤ë¸Â¤ê¡¢¼èÆÀ 629 $arrRes[] = $objPaygent->resNext(); # Í×µá·ë²Ì¼èÆÀ 630 } 631 632 foreach($arrRes[0] as $key => $val) { 633 // Shift-JIS¤Ç±þÅú¤¬¤¢¤ë¤Î¤Ç¡¢¥¨¥ó¥³¡¼¥É¤¹¤ë¡£ 634 $arrRes[0][$key] = mb_convert_encoding($val, CHAR_CODE, "Shift-JIS"); 635 gfPrintLog($key."->".$arrRes[0][$key]); 636 } 637 638 if($arrRes[0]['payment_status'] != "") { 639 gfPrintLog("¼õÃíÈÖ¹æ:" . $order_id . " »Ùʧ¥¹¥Æ¡¼¥¿¥¹:" . $arrRes[0]['payment_status']); 624 // ¥¹¥Æ¡¼¥¿¥¹¤Î¼èÆÀ 625 $payment_status = sfGetPaymentStatus($objPaygent, $order_id, $arrSend); 626 627 if($payment_status != "") { 628 gfPrintLog("¼õÃíÈÖ¹æ:" . $order_id . " »Ùʧ¥¹¥Æ¡¼¥¿¥¹:" . $payment_status); 640 629 } else { 641 630 gfPrintLog("¼õÃíÈÖ¹æ:" . $order_id . " »Ùʧ¥¹¥Æ¡¼¥¿¥¹:¼èÆÀ¤Ê¤·"); 642 631 } 643 632 644 633 // »Ùʧ¥¹¥Æ¡¼¥¿¥¹¤Î¹¹¿· 645 634 /* … … 652 641 * etc 653 642 */ 654 if($ arrRes[0]['payment_status']== '40') {643 if($payment_status == '40') { 655 644 // Æþ¶âºÑ¤ß¤ËÊѹ¹¤¹¤ë¡£ 656 645 $arrVal['status'] = ORDER_PRE_END; … … 659 648 $arrVal['memo07'] = $arrRes[0]['payment_status']; 660 649 $objQuery->update("dtb_order", $arrVal, "order_id = ?", array($order_id)); 661 662 return $arrRes[0]; 650 } 651 /************************************************************************************************************** 652 * ´Ø¿ô̾ ¡§sfGetPaymentStatus 653 * ½èÍýÆâÍÆ ¡§Æþ¶â¥¹¥Æ¡¼¥¿¥¹³Îǧ¥Ð¥Ã¥Á 654 * °ú¿ô1 ¡§ 655 * °ú¿ô2 ¡§ 656 * °ú¿ô3 ¡§ 657 * Ìá¤êÃÍ ¡§¼èÆÀ·ë²Ì 658 **************************************************************************************************************/ 659 function sfGetPaymentStatus($objPaygent, $order_id, $arrSend) { 660 $objQuery = new SC_Query(); 661 662 // ¥Þ¡¼¥Á¥ã¥ó¥È¼è°úID¤ÎÆþ¤ìÂؤ¨ 663 $arrSend['trading_id'] = $order_id; 664 665 // ÅÅʸ¤ÎÁ÷ÉÕ 666 foreach($arrSend as $key => $val) { 667 $objPaygent->reqPut($key, $val); 668 } 669 // ÅÅʸ¤ÎÁ÷¿® 670 $objPaygent->post(); 671 672 // ¥ì¥¹¥Ý¥ó¥¹¤Î¼èÆÀ 673 while($objPaygent->hasResNext()) { 674 # ¥Ç¡¼¥¿¤¬Â¸ºß¤¹¤ë¸Â¤ê¡¢¼èÆÀ 675 $arrRes[] = $objPaygent->resNext(); # Í×µá·ë²Ì¼èÆÀ 676 } 677 678 foreach($arrRes[0] as $key => $val) { 679 // Shift-JIS¤Ç±þÅú¤¬¤¢¤ë¤Î¤Ç¡¢¥¨¥ó¥³¡¼¥É¤¹¤ë¡£ 680 $arrRes[0][$key] = mb_convert_encoding($val, CHAR_CODE, "Shift-JIS"); 681 gfPrintLog($key."->".$arrRes[0][$key]); 682 } 683 684 sfPrintR($arrRes); 685 686 return $arrRes[0]['payment_status']; 687 } 688 689 /************************************************************************************************************** 690 * ´Ø¿ô̾ ¡§sfPaygentOrder($paygent_type) 691 * ½èÍýÆâÍÆ ¡§¼õÃíÏ¢·È 692 * °ú¿ô1 ¡§ 693 * °ú¿ô2 ¡§ 694 * °ú¿ô3 ¡§ 695 * Ìá¤êÃÍ ¡§¼èÆÀ·ë²Ì 696 **************************************************************************************************************/ 697 function sfPaygentOrder($paygent_type, $order_id) { 698 global $arrDispKind; 699 700 // Àܳ¥â¥¸¥å¡¼¥ë¤Î¥¤¥ó¥¹¥¿¥ó¥¹¼èÆÀ (¥³¥ó¥¹¥È¥é¥¯¥¿)¤È½é´ü²½ 701 $objPaygent = new PaygentB2BModule(); 702 $objPaygent->init(); 703 704 //¡¡ÀßÄê¥Ñ¥é¥á¡¼¥¿¤Î¼èÆÀ 705 $arrPaymentDB = sfGetPaymentDB(MDL_PAYGENT_ID); 706 707 switch($paygent_type) { 708 case 'auth_cancel': 709 $kind = PAYGENT_AUTH_CANCEL; 710 break; 711 case 'card_commit': 712 $kind = PAYGENT_CARD_COMMIT; 713 break; 714 case 'card_commit_cancel': 715 $kind = PAYGENT_CARD_COMMIT_CANCEL; 716 break; 717 } 718 $arrSend = sfGetPaygentShare($kind, $order_id, $arrPaymentDB[0]); 719 720 // ÅÅʸ¤ÎÁ÷ÉÕ 721 foreach($arrSend as $key => $val) { 722 $objPaygent->reqPut($key, $val); 723 } 724 // ÅÅʸ¤ÎÁ÷¿® 725 $objPaygent->post(); 726 727 // ¥ì¥¹¥Ý¥ó¥¹¤Î¼èÆÀ 728 while($objPaygent->hasResNext()) { 729 # ¥Ç¡¼¥¿¤¬Â¸ºß¤¹¤ë¸Â¤ê¡¢¼èÆÀ 730 $arrRes[] = $objPaygent->resNext(); # Í×µá·ë²Ì¼èÆÀ 731 } 732 733 foreach($arrRes[0] as $key => $val) { 734 // Shift-JIS¤Ç±þÅú¤¬¤¢¤ë¤Î¤Ç¡¢¥¨¥ó¥³¡¼¥É¤¹¤ë¡£ 735 $arrRes[0][$key] = mb_convert_encoding($val, CHAR_CODE, "Shift-JIS"); 736 gfPrintLog($key."->".$arrRes[0][$key]); 737 } 738 739 sfPrintR($arrRes[0]); 740 741 if($arrRes[0]['trading_id'] == $order_id) { 742 $objQuery = new SC_Query(); 743 $arrVal['memo09'] = $arrDispKind[$kind]; 744 $objQuery->update("dtb_order", $arrVal, "order_id = ?", array($order_id)); 745 $ret = $arrDispKind[$kind] . "¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£"; 746 } else { 747 $ret = $arrDispKind[$kind] . "¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£"; 748 } 749 return $ret; 663 750 } 664 751 -
branches/feature-module-paygent/html/admin/order/edit.php
r14903 r16542 6 6 */ 7 7 require_once("../require.php"); 8 9 if(file_exists(MODULE_PATH . 'mdl_paygent/mdl_paygent.inc')) { 10 require_once(MODULE_PATH . 'mdl_paygent/mdl_paygent.inc'); 11 } 8 12 9 13 class LC_Page { … … 86 90 $objPage->arrErr = lfCheek($arrInfo); 87 91 } 92 break; 93 // ¥Ú¥¤¥¸¥§¥ó¥ÈÂбþ 94 case 'paygent_order': 95 $objPage->paygent_return = sfPaygentOrder($_POST['paygent_type'], $order_id); 88 96 break; 89 97 default:
Note: See TracChangeset
for help on using the changeset viewer.