'一括払い', '03' => '3回払い', '05' => '5回払い', '06' => '6回払い', '10' => '10回払い' ); // 送信パラメータ define ("SECURE_LINK_URL", "https://linkpt.cardservice.co.jp/cgi-bin/secure.cgi"); // 文字数制限 define ("CLIENTIP_LEN", 5); define ("SEND_LEN", 20); /************************************************************************************************************** * 関数名 :sfGetPaymentDB * 処理内容 :必要なデータを取得する。 * 引数1 : * 引数2 : * 引数3 : * 戻り値 :取得結果 **************************************************************************************************************/ function sfGetPaymentDB($module_id, $where = "", $arrWhereVal = array()){ $objQuery = new SC_Query(); $arrVal = array($module_id); $arrVal = array_merge($arrVal, $arrWhereVal); $arrRet = array(); $sql = "SELECT module_id, memo01 as clientip FROM dtb_payment WHERE module_id = ? " . $where; $arrRet = $objQuery->getall($sql, $arrVal); return $arrRet[0]; } /************************************************************************************************************** * 関数名 :sfPostPaymentData * 処理内容 :決済データ送信処理 * 引数1 : * 引数2 : * 引数3 : * 戻り値 :取得結果 **************************************************************************************************************/ function sfPostPaymentData($arrData, $arrInput){ $arrPaymentDB = sfGetPaymentDB(MDL_ZEUS_ID); $arrPost = array( 'clientip' => $arrPaymentDB['clientip'], 'cardnumber' => $arrInput['card_no01'].$arrInput['card_no02'].$arrInput['card_no03'].$arrInput['card_no04'], 'expyy' => $arrInput['card_year'], 'expmm' => $arrInput['card_month'], 'telno' => $arrData['order_tel01'].$arrData['order_tel02'].$arrData['order_tel03'], 'email' => $arrData['order_email'], 'sendid' => $arrData['order_id'], 'username' => $arrInput['card_name01'].$arrInput['card_name02'], 'money' => $arrData['total'], 'sendpoint' => 'eccube', 'send' => 'mall', 'pubsec' => '' ); $req = new HTTP_Request(SECURE_LINK_URL); $req->setMethod(HTTP_REQUEST_METHOD_POST); $req->addPostDataArray($arrPost); if (!PEAR::isError($req->sendRequest())) { $response = $req->getResponseBody(); $response = mb_convert_encoding($response, "EUC-JP", "Shift-JIS"); } $req->clearPostData(); gfPrintLog($response); if(ereg('Success_order', $response)) { return true; } else { return false; } return $arrVal; } /************************************************************************************************************** * 関数名 :sfZeusDisp * 処理内容 :共通の表示処理 * 引数1 : * 引数2 : * 引数3 : * 戻り値 :取得結果 **************************************************************************************************************/ function sfZeusDisp($objPage, $payment_id) { $objQuery = new SC_Query(); // 支払い方法の説明画像を取得する。 $arrRet = $objQuery->select("payment_method, payment_image", "dtb_payment", "payment_id = ?", array($payment_id)); $objPage->tpl_payment_method = $arrRet[0]['payment_method']; $objPage->tpl_payment_image = $arrRet[0]['payment_image']; return $objPage; } ?>