_loggable = TRUE; $this->tableFields = array_keys($this->getTableSQLFields()); $this->_tablepkey = 'id'; //virtuemart_sofort_id'; $this->_tableId = 'id'; //'virtuemart_sofort_id'; $varsToPush = $this->getVarsToPush(); $this->setConfigParameterable($this->_configTableFieldName, $varsToPush); } /** * @return string */ public function getVmPluginCreateTableSQL () { return $this->createTableSQL('Payment Sofort Ideal Table'); } /** * @return array */ function getTableSQLFields () { $SQLfields = array( 'id' => 'int(11) UNSIGNED NOT NULL AUTO_INCREMENT', 'virtuemart_order_id' => 'int(1) UNSIGNED', 'order_number' => 'char(64)', 'virtuemart_paymentmethod_id' => 'mediumint(1) UNSIGNED', 'payment_name' => 'varchar(1000)', 'payment_order_total' => 'decimal(15,5) NOT NULL', 'payment_currency' => 'smallint(1)', 'cost_per_transaction' => 'decimal(10,2)', 'cost_percent_total' => 'decimal(10,2)', 'tax_id' => 'smallint(1)', 'sofort_custom' => 'varchar(255)', 'sofort_ideal_hidden_response_user_id' => 'int(1) UNSIGNED', 'sofort_ideal_hidden_response_project_id' => 'int(1) UNSIGNED', 'sofort_ideal_response_transaction' => 'varchar(27)', 'sofort_ideal_response_sender_holder' => 'varchar(255)', 'sofort_ideal_response_sender_account_number' => 'varchar(30)', 'sofort_ideal_response_sender_bank_name' => 'varchar(255)', 'sofort_ideal_response_sender_bank_bic' => 'varchar(50)', 'sofort_ideal_response_sender_iban' => 'varchar(50)', 'sofort_ideal_response_sender_country_id' => 'varchar(2)', 'sofort_ideal_hidden_response_recipient_holder' => 'varchar(255)', 'sofort_ideal_hidden_response_recipient_account_number' => 'varchar(30)', 'sofort_ideal_hidden_response_recipient_bank_code' => 'varchar(30)', 'sofort_ideal_hidden_response_recipient_bank_name' => 'varchar(255)', 'sofort_ideal_hidden_response_recipient_bank_bic' => 'varchar(50)', 'sofort_ideal_hidden_response_recipient_iban' => 'varchar(50)', 'sofort_ideal_hidden_response_recipient_country_id' => 'varchar(2)', 'sofort_ideal_response_amount' => 'decimal(15,5) NOT NULL', 'sofort_ideal_response_currency_id' => 'varchar(3)', 'sofort_ideal_hidden_response_reason_1' => 'char(255)', 'sofort_ideal_response_created' => 'varchar(30)', 'sofort_ideal_response_status' => 'varchar(20)', // this parameter is not documented, but it is returned, and important for order status update 'sofort_ideal_response_status_reason' => 'varchar(20)', 'sofort_ideal_response_status_modified' => 'varchar(20)', 'sofort_ideal_hidden_response_hash' => 'varchar(20)', // hash is stored, but we do not need to display it // even though this parameter is in the doc //'sofort_ideal_response_amount_refunded' => 'decimal(15,5) NOT NULL', 'sofort_ideal_hidden_response_amount_refunded_integer' => 'int(1) ', ); return $SQLfields; } /** * This shows the plugin for choosing in the payment list of the checkout process. * * @author Valerie Cartan Isaksen */ function plgVmDisplayListFEPayment (VirtueMartCart $cart, $selected = 0, &$htmlIn) { if ($this->getPluginMethods($cart->vendorId) === 0) { if (empty($this->_name)) { $app = JFactory::getApplication(); $app->enqueueMessage(vmText::_('COM_VIRTUEMART_CART_NO_' . strtoupper($this->_psType))); return false; } else { return false; } } $htmla = array(); $html = ''; vmdebug('methods', $this->methods); VmConfig::loadJLang('com_virtuemart'); $currency = CurrencyDisplay::getInstance(); foreach ($this->methods as $method) { if ($this->checkConditions($cart, $method, $cart->pricesUnformatted)) { $methodSalesPrice = $this->calculateSalesPrice($cart, $method, $cart->pricesUnformatted); //$method->payment_name = $method->payment_name if (!class_exists('SofortLib')) { require(JPATH_ROOT . DS . 'plugins' . DS . 'vmpayment' . DS . 'sofort' . DS . 'sofort' . DS . 'library' . DS . 'sofortLib.php'); } if (!class_exists('SofortLib_iDealClassic')) { require(JPATH_ROOT . DS . 'plugins' . DS . 'vmpayment' . DS . 'sofort' . DS . 'sofort' . DS . 'library' . DS . 'sofortLib_ideal_classic.php'); } $selected_bank = self::_getSelectedBank($method->virtuemart_paymentmethod_id); if (empty($method->configuration_key) or empty($method->project_password)) { vmError('Missing essentials infos for this published payment. Check the configuration key and the password:'. $method->payment_name. ' ('.$method->virtuemart_paymentmethod_id.')'); continue; } $sofort_ideal = new SofortLib_iDealClassic(trim($method->configuration_key), trim($method->project_password)); $relatedBanks = $sofort_ideal->getRelatedBanks(); if (empty($relatedBanks)) { vmError('getRelatedBanks: error, returned NULL'.$method->virtuemart_paymentmethod_id. '.'); continue; } $relatedBanksDropDown = $this->getRelatedBanksDropDown($relatedBanks, $method->virtuemart_paymentmethod_id, $selected_bank); $logo = $this->displayLogos($method->payment_logos); $payment_cost = ''; if ($methodSalesPrice) { $payment_cost = $currency->priceDisplay($methodSalesPrice); } if ($selected == $method->virtuemart_paymentmethod_id) { $checked = 'checked="checked"'; } else { $checked = ''; } $html = $this->renderByLayout('display_payment', array( 'plugin' => $method, 'checked' => $checked, 'payment_logo' => $logo, 'payment_cost' => $payment_cost, 'relatedBanks' => $relatedBanksDropDown )); $htmla[] = $html; } } if (!empty($htmla)) { $htmlIn[] = $htmla; } return true; } private function _getSelectedBank ($paymentmethod_id) { $session_params = self::_getSofortIdealFromSession(); if (!isset($session_params['sofort_ideal_bank_selected_' . $paymentmethod_id])) { return NULL; } return $session_params['sofort_ideal_bank_selected_' . $paymentmethod_id]; } private function getRelatedBanksDropDown ($relatedBanks, $paymentmethod_id, $selected_bank) { //vmdebug('getRelatedBanks', $relatedBanks); $attrs = ''; $idA = $id = 'sofort_ideal_bank_selected_' . $paymentmethod_id; $options[] = array('value' => '', 'text' => vmText::_('VMPAYMENT_SOFORT_IDEAL_PLEASE_SELECT_BANK')); foreach ($relatedBanks as $key => $relatedBank) { $code = array('code' => $relatedBank['code'], 'name' => $relatedBank['name']); $options[] = JHTML::_('select.option', json_encode($code), $relatedBank['name']); } return JHTML::_('select.genericlist', $options, $idA, $attrs, 'value', 'text', $selected_bank); } /** * This is for checking the input data of the payment method within the checkout * * @author Valerie Cartan Isaksen */ function plgVmOnCheckoutCheckDataPayment (VirtueMartCart $cart) { if (!$this->selectedThisByMethodId($cart->virtuemart_paymentmethod_id)) { return NULL; // Another method was selected, do nothing } $payment_params = self::_getSofortIdealFromSession(); $error_msg = ""; // STEP 1. Check the validity of the data if (!$this->_validate_sofortideal_data($payment_params, $cart->virtuemart_paymentmethod_id, $error_msg)) { return false; } self::_setSofortIdealIntoSession($payment_params); return true; } /** * @param $cart * @param $order * @return bool','null */ function plgVmConfirmedOrder ($cart, $order) { if (!($method = $this->getVmPluginMethod($order['details']['BT']->virtuemart_paymentmethod_id))) { return NULL; // Another method was selected, do nothing } if (!$this->selectedThisElement($method->payment_element)) { return FALSE; } $this->setInConfirmOrder($cart); $session = JFactory::getSession(); $return_context = $session->getId(); $this->_debug = $method->debug; $this->logInfo('plgVmConfirmedOrder order number: ' . $order['details']['BT']->order_number, 'message'); vmdebug('SOFORT plgVmConfirmedOrder'); if (!class_exists('VirtueMartModelOrders')) { require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php'); } if (!class_exists('VirtueMartModelCurrency')) { require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php'); } if (!class_exists('TableVendors')) { require(JPATH_VM_ADMINISTRATOR . DS . 'tables' . DS . 'vendors.php'); } $currency_code_3 = self::PAYMENT_CURRENCY_CODE_3; // $currency_id = shopFunctions::getCurrencyIDByName($currency_code_3); $totalInPaymentCurrency = vmPSPlugin::getAmountInCurrency($order['details']['BT']->order_total,$currency_id); $cd = CurrencyDisplay::getInstance($cart->pricesCurrency); $address = ((isset($order['details']['ST'])) ? $order['details']['ST'] : $order['details']['BT']); $cd = CurrencyDisplay::getInstance($cart->pricesCurrency); if ($totalInPaymentCurrency <= 0) { vmInfo(vmText::sprintf('VMPAYMENT_SOFORT_AMOUNT_INCORRECT', $order['details']['BT']->order_total, $totalInPaymentCurrency['value'], $currency_code_3)); return FALSE; } // Prepare data that should be stored in the database $dbValues['order_number'] = $order['details']['BT']->order_number; $dbValues['payment_name'] = $this->renderPluginName($method, 'order'); $dbValues['virtuemart_paymentmethod_id'] = $cart->virtuemart_paymentmethod_id; $dbValues['cost_per_transaction'] = $method->cost_per_transaction; $dbValues['cost_percent_total'] = $method->cost_percent_total; $dbValues['payment_currency'] = $currency_id; $dbValues['payment_order_total'] = $totalInPaymentCurrency['value']; $dbValues['tax_id'] = $method->tax_id; $dbValues['sofort_custom'] = $return_context; $this->storePSPluginInternalData($dbValues); if (!class_exists('SofortLib')) { require(JPATH_ROOT . DS . 'plugins' . DS . 'vmpayment' . DS . 'sofort' . DS . 'sofort' . DS . 'library' . DS . 'sofortLib.php'); } if (!class_exists('SofortLib_iDealClassic')) { require(JPATH_ROOT . DS . 'plugins' . DS . 'vmpayment' . DS . 'sofort' . DS . 'sofort' . DS . 'library' . DS . 'sofortLib_ideal_classic.php'); } $sofort_ideal = new SofortLib_iDealClassic(trim($method->configuration_key), trim($method->project_password)); $sofort_ideal->setVersion(self::RELEASE); $sofort_ideal->setAmount($totalInPaymentCurrency['value'], $currency_code_3); $sofort_ideal->setSenderCountryId(ShopFunctions::getCountryByID($address->virtuemart_country_id, 'country_2_code')); $sofort_ideal->setReason($order['details']['BT']->order_number); $sofort_ideal->addUserVariable($order['details']['BT']->virtuemart_paymentmethod_id); //$sofort_ideal->setSuccessUrl(self::getSuccessUrl($order)); //user_variable_3 //$sofort_ideal->setAbortUrl(self::getCancelUrl($order)); //user_variable_4 //$sofort_ideal->setNotificationUrl(self::getNotificationUrl( $order['details']['BT']->order_number)); //user_variable_5 $sofort_ideal->setSenderCountryId(ShopFunctions::getCountryByID($address->virtuemart_country_id, 'country_2_code')); //sender_country_id $sofort_ideal->setSenderBankCode(self::_getSelectedBankCode($order['details']['BT']->virtuemart_paymentmethod_id)); $url = $sofort_ideal->getPaymentUrl(); //$this->storePSPluginInternalData($dbValues); $mainframe = JFactory::getApplication(); $mainframe->redirect($url); } function displayErrors ($errors) { foreach ($errors as $error) { // TODO vmInfo(vmText::sprintf('VMPAYMENT_SOFORT_ERROR_FROM', $error ['message'], $error ['field'], $error ['code'])); if ($error ['message'] == 401) { vmdebug('check you payment parameters: custom_id, project_id, api key'); } } } function _getSelectedBankCode ($paymentmethod_id) { $selected_bank = self::_getSelectedBank($paymentmethod_id); $selected_bank_decoded = json_decode($selected_bank); return $selected_bank_decoded->code; } /** * @param $html : Clients information * @return bool','null','string */ function plgVmOnPaymentResponseReceived (&$html) { VmConfig::loadJLang('com_virtuemart_orders', TRUE); if (!class_exists('CurrencyDisplay')) { require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'); } if (!class_exists('VirtueMartCart')) { require(JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php'); } if (!class_exists('shopFunctionsF')) { require(JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php'); } if (!class_exists('VirtueMartModelOrders')) { require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php'); } $virtuemart_paymentmethod_id = vRequest::getInt('pm', 0); $order_number = vRequest::getString('on', 0); if (!($method = $this->getVmPluginMethod($virtuemart_paymentmethod_id))) { return NULL; // Another method was selected, do nothing } if (!$this->selectedThisElement($method->payment_element)) { return NULL; } if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) { return NULL; } if (!($paymentTables = $this->getDatasByOrderId($virtuemart_order_id))) { // JError::raiseWarning(500, $db->getErrorMsg()); return ''; } VmConfig::loadJLang('com_virtuemart'); $orderModel = VmModel::getModel('orders'); $order = $orderModel->getOrder($virtuemart_order_id); $paymentCurrency = CurrencyDisplay::getInstance($order['details']['BT']->order_currency); $totalInPaymentCurrency = vmPSPlugin::getAmountInCurrency($order['details']['BT']->order_total,$method->payment_currency); $cart = VirtueMartCart::getCart(); $currencyDisplay = CurrencyDisplay::getInstance($cart->pricesCurrency); $nb = count($paymentTables); $pluginName = $this->renderPluginName($method, 'post_payment'); $html = $this->renderByLayout('post_payment', array( 'order' =>$order, 'paymentInfos' => $paymentTables[$nb - 1], 'pluginName' => $pluginName, 'displayTotalInPaymentCurrency' => $totalInPaymentCurrency['display'] )); vmdebug('_getPaymentResponseHtml' ,$paymentTables ); return $html; } /** * @return bool|null */ function plgVmOnUserPaymentCancel () { $order_number = vRequest::getString('on', ''); $virtuemart_paymentmethod_id = vRequest::getInt('pm', ''); // cancel / abort link must be insterted in the SOFORT BE // must be http://mysite.com/index.php?option=com_virtuemart&view=pluginresponse&task=pluginUserPaymentCancel&on=-REASON1- $error_codes = vRequest::getString('error_codes', ''); if (!empty($error_codes)) { $errors = explode(",", $error_codes); foreach ($errors as $error) { // TODO $lang = JFactory::getLanguage(); $lang_key = 'VMPAYMENT_SOFORT_IDEAL_ERROR_CODES_' . $error; if ($lang->hasKey($lang_key)) { vmInfo(vmText::_($lang_key)); } else { vmInfo(vmText::sprintf('VMPAYMENT_SOFORT_IDEAL_ERROR_CODES_UNKNOWN_CODE', $error)); } } //return false; } if (!class_exists('VirtueMartModelOrders')) { require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php'); } if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) { return NULL; } if (!($paymentTable = $this->getDataByOrderId($virtuemart_order_id))) { return NULL; } if (!($method = $this->getVmPluginMethod($paymentTable->virtuemart_paymentmethod_id))) { return NULL; // Another method was selected, do nothing } if (!$this->selectedThisElement($method->payment_element)) { //vmdebug('IDEAL plgVmOnPaymentResponseReceived NOT selectedThisElement' ); return NULL; } vmdebug(__CLASS__ . '::' . __FUNCTION__, 'VMPAYMENT_SOFORT_PAYMENT_CANCELLED', $error_codes); if (empty($error_codes)) { VmInfo(vmText::_('VMPAYMENT_SOFORT_PAYMENT_CANCELLED')); $comment=''; } else { $comment=vmText::_($lang_key); } $session = JFactory::getSession(); $return_context = $session->getId(); vmDebug('handlePaymentUserCancel', $virtuemart_order_id, $paymentTable->sofort_custom, $return_context); if (strcmp($paymentTable->sofort_custom, $return_context) === 0) { vmDebug('handlePaymentUserCancel', $virtuemart_order_id); $this->handlePaymentUserCancel($virtuemart_order_id, $method->status_canceled, $comment); } else { vmDebug('Return context', $paymentTable->sofort_custom, $return_context); } return TRUE; } /* * plgVmOnPaymentNotification() - This event is fired by Offline Payment. It can be used to validate the payment data as entered by the user. * Return: * Parameters: * None * @author Valerie Isaksen */ /** * @return bool','null */ function plgVmOnPaymentNotification () { /* $this->_debug = true; $this->logInfo('plgVmOnPaymentNotification '.var_export($_POST, true) , 'message') ; $this->logInfo('plgVmOnPaymentNotification '.var_export($_REQUEST, true) , 'message'); // $paymentmethod_id = vRequest::getString('reason_2'); */ $order_number = vRequest::getString('reason_1'); // is order number if (!class_exists('VirtueMartModelOrders')) { require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php'); } if (empty($order_number)) { return FALSE; } if (!($virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($order_number))) { return FALSE; } if (!($payments = $this->getDatasByOrderId($virtuemart_order_id))) { return FALSE; } $method = $this->getVmPluginMethod($payments[0]->virtuemart_paymentmethod_id); if (!$this->selectedThisElement($method->payment_element)) { return false; } $hash_keys = array( 'transaction', 'user_id', 'project_id', 'sender_holder', 'sender_account_number', 'sender_bank_name', 'sender_bank_bic', 'sender_iban', 'sender_country_id', 'recipient_holder', 'recipient_account_number', 'recipient_bank_code', 'recipient_bank_name', 'recipient_bank_bic', 'recipient_iban', 'recipient_country_id', 'amount', 'currency_id', 'reason_1', 'reason_2', 'user_variable_0', 'user_variable_1', 'user_variable_2', 'user_variable_3', 'user_variable_4', 'user_variable_5', 'created', 'status', 'status_modified', 'notification_password' ); foreach ($hash_keys as $key) { $hash_data[$key] = vRequest::getString($key, ''); } $hash_data['notification_password'] = $method->notification_password; if (!$this->checkHash($hash_data)) { return false; } if (!class_exists('VirtueMartModelOrders')) { require(JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php'); } $db = JFactory::getDBO(); $query = 'SHOW COLUMNS FROM `' . $this->_tablename . '` '; $db->setQuery($query); $columns = $db->loadColumn(0); $prefix = 'sofort_ideal_response_'; $prefix_hidden = 'sofort_ideal_hidden_response_'; $prefix_len = strlen($prefix); $prefix_hidden_len = strlen($prefix_hidden); foreach ($columns as $key) { if (substr($key, 0, $prefix_len) == $prefix) { $postKey = substr($key, $prefix_len); $dbvalues[$key] = vRequest::getString($postKey, ''); } elseif (substr($key, 0, $prefix_hidden_len) == $prefix_hidden) { $postKey = substr($key, $prefix_hidden_len); $dbvalues[$key] = vRequest::getString($postKey, ''); } } $dbvalues['hidden_hash'] = vRequest::getString('hash', '');; $dbvalues['virtuemart_paymentmethod_id'] = $payments[0]->virtuemart_paymentmethod_id; $dbvalues['virtuemart_order_id'] = $virtuemart_order_id; $dbvalues['order_number'] = $order_number; $modelOrder = VmModel::getModel('orders'); $order = array(); $this->logInfo('before getNewOrderStatus '. var_export($dbvalues, true), 'message'); $status = $this->getNewOrderStatus($dbvalues); $order['order_status'] = $method->$status; $order['comments'] = vmText::_('VMPAYMENT_SOFORT_IDEAL_RESPONSE_' . $status); $order['customer_notified'] = 1; //$this->logInfo('before storePSPluginInternalData ' , 'message'); $this->storePSPluginInternalData($dbvalues); $this->logInfo('after storePSPluginInternalData '. var_export($dbvalues, true), 'message'); $this->logInfo('plgVmOnPaymentNotification return new_status:' . $order['order_status'], 'message'); $modelOrder->updateStatusForOneOrder($virtuemart_order_id, $order, false); //// remove vmcart if (isset($payments[0]->sofort_custom)) { $this->emptyCart($payments[0]->sofort_custom, $order_number); } } private function checkHash ($data) { $hash_received = vRequest::getString('hash'); $data_implode = implode('|', $data); $hash_calculated = sha1($data_implode); if ($hash_calculated != $hash_received) { $this->logInfo('SOFORT IDEAL plgVmOnPaymentNotification Incorrect HASH calculated value:' . $hash_calculated . ' received value:' . $hash_received, 'message'); $this->logInfo(' data:' . var_export($data, true), 'message'); $emailBody = "Hello,\n\nerror while receiving a SOFORT IDEAL NOTIFICATION" . "\n"; $emailBody .= "Incorrect HASH calculated value " . $hash_calculated . " received value" . $hash_received . "\n"; //$emailBody .= "Calculated with " . var_export($data, true) ."\n"; $this->sendEmailToVendorAndAdmins(vmText::_('VMPAYMENT_SOFORT_ERROR_NOTIFICATION'), $emailBody); return false; } return true; } /* * Not documented functionality * */ private function getNewOrderStatus ($dbvalues) { $newOrderStatus = array( 'pending' => array('not_credited_yet' => 'status_pending'), 'received' => array('credited' => 'status_confirmed'), 'loss' => array('not_credited' => 'status_canceled'), 'refunded' => array('refunded' => 'status_refunded','compensation' => 'status_compensation'), // Special case is the following status that can occur (only with iDEAL payments), //if after a timeout in our system the payment is marked as loss and then iDEAL reports (too late) a successful iDEAL payment. // Then our SOFORT backend starts an automatic refund which is reported to the shopsystem as follows: 'late_succeed' => array('automatic_refund_to_customer' => 'status_refunded'), ); $this->logInfo('IN getNewOrderStatus '. $dbvalues['sofort_ideal_response_status'].":". $dbvalues['sofort_ideal_response_status_reason'], 'message'); if (!(array_key_exists($dbvalues['sofort_ideal_response_status'], $newOrderStatus) AND array_key_exists($dbvalues['sofort_ideal_response_status_reason'], $newOrderStatus[$dbvalues['sofort_ideal_response_status']])) ) { // received an unknown combination. // $this->logInfo('IN 1 getNewOrderStatus array_key_exists PROBLEM' , 'message'); $this->sendEmailToVendorAndAdmins(vmText::_('VMPAYMENT_SOFORT_ERROR_ORDER_STATUS_SUB'), vmText::sprintf('VMPAYMENT_SOFORT_ERROR_ORDER_STATUS_BODY', $dbvalues['sofort_ideal_response_status'], $dbvalues['sofort_ideal_response_status_reason'], $dbvalues['order_number'])); $this->logInfo('IN 1 sendEmailToVendorAndAdmins '.$dbvalues['sofort_ideal_response_status'].'/'.$dbvalues['sofort_ideal_response_status_reason'] , 'message'); $this->logInfo(' '.array_key_exists($dbvalues['sofort_ideal_response_status'], $newOrderStatus).'/'.array_key_exists($dbvalues['sofort_ideal_response_status_reason'], $newOrderStatus[$dbvalues['sofort_ideal_response_status']]) , 'message'); return 'pending'; } $this->logInfo('IN xx getNewOrderStatus ' . $newOrderStatus[$dbvalues['sofort_ideal_response_status']][$dbvalues['sofort_ideal_response_status_reason']], 'message'); return $newOrderStatus[$dbvalues['sofort_ideal_response_status']][$dbvalues['sofort_ideal_response_status_reason']]; } /** * Display stored payment data for an order * @param int $virtuemart_order_id * @param int $payment_method_id * @see components/com_virtuemart/helpers/vmPSPlugin::plgVmOnShowOrderBEPayment() */ function plgVmOnShowOrderBEPayment ($virtuemart_order_id, $payment_method_id) { if (!$this->selectedThisByMethodId($payment_method_id)) { return NULL; // Another method was selected, do nothing } if (!($payments = $this->getDatasByOrderId($virtuemart_order_id))) { // JError::raiseWarning(500, $db->getErrorMsg()); return ''; } $html = '
' . vmText::_('COM_VIRTUEMART_DATE') . ' | ' . $payment->created_on . ' |