* GNU General Public License for more details. * * @category PayIntelligent * @package ratepay * @copyright (C) 2012 PayIntelligent GmbH <http://www.payintelligent.de/> * @license GPLv2 */ /** * RatePAY logging template, displays the XML */ require_once 'includes/application_top.php'; require_once '../lang/' . $_SESSION['language'] . '/admin/modules/payment/ratepay.php'; require_once '../includes/classes/ratepay/helpers/Data.php'; require_once '../includes/classes/ratepay/helpers/Db.php'; require_once '../includes/classes/ratepay/helpers/Globals.php'; rpGlobals::hasParam('id') ? $log = rpDb::getLogEntry(rpGlobals::getParam('id')) : die('Page not allowed!'); ?> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> <?php require DIR_WS_INCLUDES . 'header.php'; ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?> " valign="top">
/** * Save rate details to the db * * @param int$orderId */ protected function _saveRateDetails($orderId) { $data = array('order_number' => $orderId, 'total_amount' => rpSession::getRpSessionEntry('ratepay_rate_total_amount'), 'amount' => rpSession::getRpSessionEntry('ratepay_rate_amount'), 'interest_amount' => rpSession::getRpSessionEntry('ratepay_rate_interest_amount'), 'service_charge' => rpSession::getRpSessionEntry('ratepay_rate_service_charge'), 'annual_percentage_rate' => rpSession::getRpSessionEntry('ratepay_rate_annual_percentage_rate'), 'monthly_debit_interest' => rpSession::getRpSessionEntry('ratepay_rate_monthly_debit_interest'), 'number_of_rates' => rpSession::getRpSessionEntry('ratepay_rate_number_of_rates'), 'rate' => rpSession::getRpSessionEntry('ratepay_rate_rate'), 'last_rate' => rpSession::getRpSessionEntry('ratepay_rate_last_rate')); rpDb::setRatepayRateDetails($data); }
* GNU General Public License for more details. * * @category PayIntelligent * @package ratepay * @copyright (C) 2012 PayIntelligent GmbH <http://www.payintelligent.de/> * @license GPLv2 */ /** * RatePAY log overview, displays all log entrys */ require_once 'includes/application_top.php'; require_once '../lang/' . $_SESSION['language'] . '/admin/modules/payment/ratepay.php'; require_once '../includes/classes/ratepay/helpers/Data.php'; require_once '../includes/classes/ratepay/helpers/Db.php'; require_once '../includes/classes/ratepay/helpers/Globals.php'; $logs = rpGlobals::hasParam('orderby') ? rpDb::getLogEntrys(rpGlobals::getParam('orderby')) : rpDb::getLogEntrys(); $logical = rpData::getLoggingLogical(); ?> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> <!-- header //--> <?php require DIR_WS_INCLUDES . 'header.php'; ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH;
private static function getDeliverPostArray($orderId, $items) { $items[rpDb::getMaxCreditId($orderId)] = 1; return array('items' => $items, 'order_number' => $orderId, 'ship' => "versenden"); }
</th> <th class="dataTableHeadingContent"><?php echo RATEPAY_ORDER_RATEPAY_ADMIN_ACTION; ?> </th> <th class="dataTableHeadingContent"><?php echo RATEPAY_ORDER_RATEPAY_ADMIN_ACTION; ?> </th> <th class="dataTableHeadingContent"><?php echo RATEPAY_ORDER_RATEPAY_ADMIN_DATE; ?> </th> </tr> <?php foreach (rpDb::getRpHistory($orderId) as $entry) { ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo $entry['quantity']; ?> </td> <td class="dataTableContent"><?php echo $entry['article_number']; ?> </td> <td class="dataTableContent"><?php echo $entry['article_name']; ?> </td> <td class="dataTableContent"><?php
public function selection() { global $order; $display = parent::selection(); rpSession::setRpSessionEntry('basketAmount', rpData::getBasketAmount($order)); if (!is_null($display)) { $minVarName = 'min' . ucfirst(strtolower($order->billing['country']['iso_code_2'])); $maxVarName = 'max' . ucfirst(strtolower($order->billing['country']['iso_code_2'])); $privacy = ''; $privacyConstant = 'MODULE_PAYMENT_' . strtoupper($this->code) . '_RATEPAY_PRIVACY_URL_' . strtoupper($order->billing['country']['iso_code_2']); if (defined($privacyConstant)) { $privacy = constant($privacyConstant); } $smarty = new Smarty(); $smarty->assign('ratepayPrivacyUrl', $privacy); $smarty->assign('RATEPAY_DATA_1', RATEPAY_SEPA_DATA_1); $smarty->assign('RATEPAY_DATA_2', RATEPAY_SEPA_DATA_2); $smarty->assign('RATEPAY_DATA_3', RATEPAY_SEPA_DATA_3); $smarty->assign('RATEPAY_INFO_1', RATEPAY_SEPA_INFO_1); $smarty->assign('RATEPAY_INFO_2', RATEPAY_SEPA_INFO_2); $smarty->assign('RATEPAY_INFO_3', RATEPAY_SEPA_INFO_3); $smarty->assign('RATEPAY_INFO_4', RATEPAY_SEPA_INFO_4); $smarty->assign('RATEPAY_INFO_5', RATEPAY_SEPA_INFO_5); $smarty->assign('RATEPAY_INFO_6', RATEPAY_SEPA_INFO_6); $smarty->assign('RATEPAY_INFO_7', RATEPAY_SEPA_INFO_7); $smarty->assign('RATEPAY_ACCOUNT_HOLDER', RATEPAY_SEPA_ACCOUNT_HOLDER); $smarty->assign('RATEPAY_ACCOUNT_NUMBER', RATEPAY_SEPA_ACCOUNT_NUMBER); $smarty->assign('RATEPAY_ACCOUNT_SORT_CODE', RATEPAY_SEPA_ACCOUNT_SORT_CODE); $smarty->assign('RATEPAY_ACCOUNT_BANK_NAME', RATEPAY_SEPA_ACCOUNT_BANK_NAME); $smarty->assign('bankData', $this->getBankData()); $smarty->caching = 0; /* BEGINN OF DEVICE FINGERPRINT CODE */ if (!rpSession::getRpSessionEntry('RATEPAY_DFP_TOKEN') && rpDb::getRpDfpSId()) { $ratepay_dfp_token = md5($order->info['total'] . microtime()); rpSession::setRpSessionEntry('RATEPAY_DFP_TOKEN', $ratepay_dfp_token); $smarty->assign('RATEPAY_DFP_TOKEN', $ratepay_dfp_token); $smarty->assign('RATEPAY_DFP_SNIPPET_ID', rpDb::getRpDfpSId()); } /* END OF DEVICE FINGERPRINT CODE */ //CS Aenderung des Value von $display['module'] fuer die Ausgabe $display['module'] = $this->public_title; $display['fields'][] = array('title' => '', 'field' => $smarty->fetch(CURRENT_TEMPLATE . '/module/ratepay_sepa.html')); } return $display; }
/** * Call PAYMENT_CONFIRM request * * @global order $order * @param string $transactionId * @param string $transactionShortId * @param int $orderId * @return array */ protected function _paymentConfirm($transactionId, $transactionShortId, $orderId) { global $order; $data = array('HeadInfo' => rpRequestMapper::getHeadInfoModel($order, $transactionId, $transactionShortId, $orderId)); $requestService = new rpRequestService($this->sandbox, $data); $result = $requestService->callPaymentConfirm(); rpDb::xmlLog($order, $requestService->getRequest(), $orderId, $requestService->getResponse()); return $result; }
/** * Retrieve paymentInfo model * * @param order $order * @param int $orderId * @return rpPaymentInfo */ public static function getPaymentInfoModel(order $order, $orderId = null, array $post = array(), $subType = false) { $paymentInfo = new rpPaymentInfo(); $paymentInfo->setCurrency($order->info['currency']); $paymentInfo->setMethod(rpData::getRpPaymentMethod($order->info['payment_method'])); if ($subType != 'credit' && $subType != 'return' && $subType != 'cancellation') { $paymentInfo->setAmount(rpData::getPaymentAmount($order, $orderId, $post)); if ($order->info['payment_method'] == 'ratepay_rate') { if (is_null($orderId)) { $paymentInfo->setDebitType('BANK-TRANSFER')->setInstallmentAmount(rpSession::getRpSessionEntry('ratepay_rate_rate'))->setInstallmentNumber(rpSession::getRpSessionEntry('ratepay_rate_number_of_rates'))->setInterestRate(rpSession::getRpSessionEntry('ratepay_rate_interest_rate'))->setLastInstallmentAmount(rpSession::getRpSessionEntry('ratepay_rate_last_rate'))->setPaymentFirstDay(rpSession::getRpSessionEntry('ratepay_payment_firstday')); } else { $details = rpDb::getRatepayRateDetails($orderId); $paymentInfo->setDebitType('BANK-TRANSFER')->setInstallmentAmount($details['rate'])->setInstallmentNumber($details['number_of_rates'])->setInterestRate($details['interest_amount'])->setLastInstallmentAmount($details['last_rate'])->setPaymentFirstDay($details['payment_firstday']); } } } return $paymentInfo; }
public function selection() { global $order; $display = parent::selection(); if (!is_null($display)) { $minVarName = 'min' . ucfirst(strtolower($order->billing['country']['iso_code_2'])); $maxVarName = 'max' . ucfirst(strtolower($order->billing['country']['iso_code_2'])); $privacy = ''; $privacyConstant = 'MODULE_PAYMENT_' . strtoupper($this->code) . '_RATEPAY_PRIVACY_URL_' . strtoupper($order->billing['country']['iso_code_2']); if (defined($privacyConstant)) { $privacy = constant($privacyConstant); } $smarty = new Smarty(); /* BEGINN OF DEVICE FINGERPRINT CODE */ if (!rpSession::getRpSessionEntry('RATEPAY_DFP_TOKEN') && rpDb::getRpDfpSId()) { $ratepay_dfp_token = md5($order->info['total'] . microtime()); rpSession::setRpSessionEntry('RATEPAY_DFP_TOKEN', $ratepay_dfp_token); $smarty->assign('RATEPAY_DFP_TOKEN', $ratepay_dfp_token); $smarty->assign('RATEPAY_DFP_SNIPPET_ID', rpDb::getRpDfpSId()); } /* END OF DEVICE FINGERPRINT CODE */ //CS Aenderung des Value von $display['module'] fuer die Ausgabe $display['module'] = $this->public_title; $display['fields'][] = array('title' => '', 'field' => $smarty->fetch(CURRENT_TEMPLATE . '/module/ratepay_rechnung.html')); } return $display; }
/** * Is full return * * @param array $post * @param int $orderId * @return boolean */ public static function isFullReturn($post, $orderId) { foreach (rpDb::getRpItems($orderId) as $item) { if (!($item['ordered'] == $post[$item['id']]['toRefund'])) { return false; } } return true; }
/** * Insert ratepay order data * * @param order $order * @param int $orderId */ public static function setRatepayOrderData(order $order, $orderId) { $payment = $order->info['payment_method']; $sql = "INSERT INTO " . $payment . "_orders (" . "order_number, " . "transaction_id, " . "transaction_short_id, " . "descriptor," . "customers_birth," . "fax," . "customers_country_code," . "gender" . ") VALUES ('" . xtc_db_input($orderId) . "', '" . xtc_db_input(rpSession::getRpSessionEntry('transactionId')) . "', '" . xtc_db_input(rpSession::getRpSessionEntry('transactionShortId')) . "','" . xtc_db_input(rpSession::getRpSessionEntry('descriptor')) . "','" . xtc_db_input(rpDb::getCustomersDob(null, rpSession::getSessionEntry('customer_id'))) . "','" . xtc_db_input(rpDb::getCustomersFax(null, rpSession::getSessionEntry('customer_id'))) . "','" . xtc_db_input(rpSession::getRpSessionEntry('customers_country_code')) . "','" . xtc_db_input(rpDb::getXtCustomerEntry(rpSession::getSessionEntry('customer_id'), 'customers_gender')) . "')"; xtc_db_query($sql); self::setRpOrderItems($order, $orderId, $payment); }