Version Notes
4.1.1
- Fixed error on redirect with expired session
- Improved compatibility with DIBS FlexWin Magento extension
- Fixed order statuses bug
- Fixed account parameter bugs
- Fixed layout
- Fixed crash on dibspw_results table remove
- Fixed logo appearance bugs
- Fixed bug with message appearance in inappropriate places
- Added Sort Order option
- A lot of other fixes and improvements
4.1.0
- New module for DIBS Payment Window and Mobile Payment Window integration methods.
Download this release
Release Info
| Developer | DIBS A/S |
| Extension | Dibspw |
| Version | 4.1.1 |
| Comparing to | |
| See all releases | |
Code changes from version 4.1.0 to 4.1.1
- app/code/community/Dibspw/Adminhtml/Block/Sales/Order/View/Tab/Info.php +3 -87
- app/code/community/Dibspw/Dibspw/Block/Failure.php +7 -7
- app/code/community/Dibspw/Dibspw/Block/Form.php +5 -12
- app/code/community/Dibspw/Dibspw/Block/Redirect.php +3 -10
- app/code/community/Dibspw/Dibspw/Helper/Data.php +2 -7
- app/code/community/Dibspw/Dibspw/Model/Dibspw.php +6 -71
- app/code/community/Dibspw/Dibspw/Model/System/Config/Source/Orderstatusafter.php +7 -32
- app/code/community/Dibspw/Dibspw/Model/System/Config/Source/Orderstatusbefore.php +8 -33
- app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_api.php +2 -6
- app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_helpers.php +2 -2
- app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_helpers_cms.php +121 -24
- app/code/community/Dibspw/Dibspw/controllers/DibspwController.php +77 -79
- app/code/community/Dibspw/Dibspw/etc/config.xml +3 -2
- app/code/community/Dibspw/Dibspw/etc/system.xml +32 -24
- app/code/community/Dibspw/Dibspw/sql/dibspw_setup/{mysql4-install-4.1.0.php → mysql4-install-4.1.1.php} +4 -4
- app/code/community/Dibspw/Dibspw/sql/dibspw_setup/{mysql4-upgrade-4.0.1-4.1.0.php → mysql4-upgrade-4.1.0-4.1.1.php} +5 -5
- app/code/community/Dibspw/Sales/Block/Order/Info.php +7 -109
- app/code/community/Dibspw/Sales/Block/Order/Print.php +7 -69
- app/design/frontend/base/default/template/Dibspw/Dibspw/redirect.phtml +0 -49
- app/design/frontend/base/default/template/dibspw/dibspw/failure.phtml +25 -0
- app/design/frontend/{default/default/template/Dibspw/Dibspw → base/default/template/dibspw/dibspw}/form.phtml +16 -9
- app/design/frontend/base/default/template/dibspw/dibspw/redirect.phtml +38 -0
- app/locale/da_DK/Mage_Dibspw.csv +2 -0
- app/locale/en_US/Mage_Dibspw.csv +2 -0
- app/locale/nb_NO/Mage_Dibspw.csv +2 -0
- app/locale/nn_NO/Mage_Dibspw.csv +2 -0
- app/locale/sv_SE/Mage_Dibspw.csv +2 -0
- package.xml +20 -7
app/code/community/Dibspw/Adminhtml/Block/Sales/Order/View/Tab/Info.php
CHANGED
|
@@ -31,101 +31,17 @@
|
|
| 31 |
* @package Mage_Adminhtml
|
| 32 |
* @author Magento Core Team <core@magentocommerce.com>
|
| 33 |
*/
|
| 34 |
-
|
| 35 |
class Dibspw_Adminhtml_Block_Sales_Order_View_Tab_Info extends Mage_Adminhtml_Block_Sales_Order_View_Tab_Info {
|
| 36 |
|
| 37 |
-
protected function PaymentPart($paymentstr) {
|
| 38 |
-
$PaymentPartStr = explode(',',$paymentstr,2);
|
| 39 |
-
return $PaymentPartStr[0];
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
public function getPaymentHtml() {
|
| 43 |
$res = parent::getPaymentHtml();
|
| 44 |
-
|
| 45 |
-
$sButtons = '';
|
| 46 |
$oOrder = $this->getSource();
|
| 47 |
-
$standard = Mage::getModel('dibspw/Dibspw');
|
| 48 |
$oPaymentObj = $oOrder->getPayment()->getMethodInstance();
|
| 49 |
$sPaymentClass = get_class($oPaymentObj);
|
| 50 |
-
if(strpos($sPaymentClass, "
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
}
|
| 54 |
-
|
| 55 |
-
// Read info directly from the database
|
| 56 |
-
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
| 57 |
-
$sTablePrefix = Mage::getConfig()->getTablePrefix();
|
| 58 |
-
$row = $read->fetchRow("SELECT `status`, `transaction`, `amount`, `currency`, `fee`, `paytype`, `ext_info`
|
| 59 |
-
FROM " . $sTablePrefix . dibs_pw_api::api_dibs_get_tableName() . "
|
| 60 |
-
WHERE orderid = " . $this->getOrder()->getIncrementId());
|
| 61 |
-
|
| 62 |
-
if (count($row) > 0) {
|
| 63 |
-
if ($row['status'] == 'ACCEPTED') {
|
| 64 |
-
$row['ext'] = array();
|
| 65 |
-
if(isset($row['ext_info']) && $row['ext_info'] != NULL) {
|
| 66 |
-
$row['ext'] = unserialize($row['ext_info']);
|
| 67 |
-
}
|
| 68 |
-
// Payment has been made to this order
|
| 69 |
-
$res .= "<br><br>" . "<table border='0' width='100%'>";
|
| 70 |
-
$res .= "<tr><td colspan='2'><b>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_7') . "</b></td></tr>";
|
| 71 |
-
|
| 72 |
-
if ($row['transaction'] != '0') {
|
| 73 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_8') . "</td>";
|
| 74 |
-
$res .= "<td>" . $row['transaction'] . "</td></tr>";
|
| 75 |
-
}
|
| 76 |
-
|
| 77 |
-
if ($row['amount'] != '0') {
|
| 78 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_9') . "</td>";
|
| 79 |
-
$res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . " " . number_format(((int)$row['amount']) / 100, 2, ',', ' ') . "</td></tr>";
|
| 80 |
-
}
|
| 81 |
-
|
| 82 |
-
if ($row['currency'] != '0') {
|
| 83 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_10') . "</td>";
|
| 84 |
-
$res .= "<td>" . $row['currency'] . "</td></tr>";
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
if ($row['fee'] != '0') {
|
| 88 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_11') . "</td>";
|
| 89 |
-
$res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . " " . number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
if ($row['paytype'] != '0') {
|
| 93 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_12') . "</td>";
|
| 94 |
-
$res .= "<td>" . $this->printLogo($row['paytype']) . "</td></tr>";
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
if ($row['ext']['acquirer'] != '0') {
|
| 98 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_16') . "</td>";
|
| 99 |
-
$res .= "<td>" . $row['ext']['acquirer'] . "</td></tr>";
|
| 100 |
-
}
|
| 101 |
-
|
| 102 |
-
if ($row['ext']['enrolled'] != '0') {
|
| 103 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_17') . "</td>";
|
| 104 |
-
$res .= "<td>" . $row['ext']['enrolled'] . "</td></tr>";
|
| 105 |
-
}
|
| 106 |
-
|
| 107 |
-
$res .= '<tr><td colspan="2">' . $sButtons . '</td></tr>';
|
| 108 |
-
|
| 109 |
-
$res .= "</table><br>";
|
| 110 |
-
$res .= "<a href='https://payment.architrade.com/admin/' target='_blank'>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_18') . "</a>";
|
| 111 |
-
$res .= "<br><br>";
|
| 112 |
-
}
|
| 113 |
-
else {
|
| 114 |
-
$res .= "<br>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_19') . "<br>";
|
| 115 |
-
}
|
| 116 |
-
}
|
| 117 |
-
|
| 118 |
-
return $res;
|
| 119 |
-
}
|
| 120 |
-
|
| 121 |
-
public function printLogo($paytype) {
|
| 122 |
-
if(preg_match("/[a-z\(\)]+/is", $this->PaymentPart($paytype))) {
|
| 123 |
-
$res = '<img src="' . $this->getSkinUrl('images/Dibspw/Dibspw/' .
|
| 124 |
-
preg_replace("/\(\)_/s", "", strtolower($this->PaymentPart($paytype))) . '.gif') .
|
| 125 |
-
'" border="0" />';
|
| 126 |
}
|
| 127 |
-
else $res = '<img src="' . $this->getSkinUrl('images/Dibspw/Dibspw/dibs.gif') .
|
| 128 |
-
'" border="0" />';
|
| 129 |
|
| 130 |
return $res;
|
| 131 |
}
|
| 31 |
* @package Mage_Adminhtml
|
| 32 |
* @author Magento Core Team <core@magentocommerce.com>
|
| 33 |
*/
|
|
|
|
| 34 |
class Dibspw_Adminhtml_Block_Sales_Order_View_Tab_Info extends Mage_Adminhtml_Block_Sales_Order_View_Tab_Info {
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
public function getPaymentHtml() {
|
| 37 |
$res = parent::getPaymentHtml();
|
|
|
|
|
|
|
| 38 |
$oOrder = $this->getSource();
|
|
|
|
| 39 |
$oPaymentObj = $oOrder->getPayment()->getMethodInstance();
|
| 40 |
$sPaymentClass = get_class($oPaymentObj);
|
| 41 |
+
if($sPaymentClass !== FALSE && (strpos($sPaymentClass, "Dibsfw") !== FALSE ||
|
| 42 |
+
strpos($sPaymentClass, "Dibspw") !== FALSE)) {
|
| 43 |
+
$res .= $oPaymentObj->cms_dibs_getAdminOrderInfo($oOrder);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
}
|
|
|
|
|
|
|
| 45 |
|
| 46 |
return $res;
|
| 47 |
}
|
app/code/community/Dibspw/Dibspw/Block/Failure.php
CHANGED
|
@@ -21,14 +21,14 @@
|
|
| 21 |
* @category Mage
|
| 22 |
* @package Mage_Core
|
| 23 |
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
| 24 |
-
* Modifications copyrighted by
|
| 25 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 26 |
*/
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
}
|
| 21 |
* @category Mage
|
| 22 |
* @package Mage_Core
|
| 23 |
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
| 24 |
+
* Modifications copyrighted by Dibs A/S, (c) 2010.
|
| 25 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 26 |
*/
|
| 27 |
|
| 28 |
+
class Dibspw_Dibspw_Block_Failure extends Mage_Core_Block_Template {
|
| 29 |
+
|
| 30 |
+
protected function _construct() {
|
| 31 |
+
parent::_construct();
|
| 32 |
+
$this->setTemplate('dibspw/dibspw/failure.phtml');
|
| 33 |
+
}
|
| 34 |
}
|
app/code/community/Dibspw/Dibspw/Block/Form.php
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
<?php
|
| 2 |
-
|
| 3 |
/**
|
| 4 |
* Magento
|
| 5 |
*
|
|
@@ -22,20 +21,14 @@
|
|
| 22 |
* @category Mage
|
| 23 |
* @package Mage_Core
|
| 24 |
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
| 25 |
-
* Modifications copyrighted by
|
| 26 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 27 |
*/
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
class Dibspw_Dibspw_Block_Form extends Mage_Payment_Block_Form
|
| 34 |
-
{
|
| 35 |
-
protected function _construct()
|
| 36 |
-
{
|
| 37 |
-
|
| 38 |
-
$this->setTemplate('Dibspw/Dibspw/form.phtml');
|
| 39 |
parent::_construct();
|
|
|
|
| 40 |
}
|
| 41 |
}
|
| 1 |
<?php
|
|
|
|
| 2 |
/**
|
| 3 |
* Magento
|
| 4 |
*
|
| 21 |
* @category Mage
|
| 22 |
* @package Mage_Core
|
| 23 |
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
| 24 |
+
* Modifications copyrighted by Dibs A/S, (c) 2012.
|
| 25 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 26 |
*/
|
| 27 |
|
| 28 |
+
class Dibspw_Dibspw_Block_Form extends Mage_Payment_Block_Form {
|
| 29 |
+
|
| 30 |
+
protected function _construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
parent::_construct();
|
| 32 |
+
$this->setTemplate('dibspw/dibspw/form.phtml');
|
| 33 |
}
|
| 34 |
}
|
app/code/community/Dibspw/Dibspw/Block/Redirect.php
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
<?php
|
| 2 |
-
|
| 3 |
/**
|
| 4 |
* Magento
|
| 5 |
*
|
|
@@ -26,16 +25,10 @@
|
|
| 26 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 27 |
*/
|
| 28 |
|
| 29 |
-
class Dibspw_Dibspw_Block_Redirect extends Mage_Core_Block_Template
|
| 30 |
-
{
|
| 31 |
-
/**
|
| 32 |
-
* Constructor. Set template.
|
| 33 |
-
*/
|
| 34 |
|
| 35 |
-
protected function _construct()
|
| 36 |
-
{
|
| 37 |
parent::_construct();
|
| 38 |
-
$this->setTemplate('
|
| 39 |
}
|
| 40 |
-
|
| 41 |
}
|
| 1 |
<?php
|
|
|
|
| 2 |
/**
|
| 3 |
* Magento
|
| 4 |
*
|
| 25 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 26 |
*/
|
| 27 |
|
| 28 |
+
class Dibspw_Dibspw_Block_Redirect extends Mage_Core_Block_Template {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
protected function _construct() {
|
|
|
|
| 31 |
parent::_construct();
|
| 32 |
+
$this->setTemplate('dibspw/dibspw/redirect.phtml');
|
| 33 |
}
|
|
|
|
| 34 |
}
|
app/code/community/Dibspw/Dibspw/Helper/Data.php
CHANGED
|
@@ -22,15 +22,10 @@
|
|
| 22 |
* @category Mage
|
| 23 |
* @package Mage_Adminhtml
|
| 24 |
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
| 25 |
-
* Modifications copyrighted by Dibs A/S, (c)
|
| 26 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 27 |
*/
|
| 28 |
|
| 29 |
-
|
| 30 |
-
* Payment Helper
|
| 31 |
-
**/
|
| 32 |
-
|
| 33 |
-
class Dibspw_Dibspw_Helper_Data extends Mage_Payment_Helper_Data
|
| 34 |
-
{
|
| 35 |
|
| 36 |
}
|
| 22 |
* @category Mage
|
| 23 |
* @package Mage_Adminhtml
|
| 24 |
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
| 25 |
+
* Modifications copyrighted by Dibs A/S, (c) 2012.
|
| 26 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 27 |
*/
|
| 28 |
|
| 29 |
+
class Dibspw_Dibspw_Helper_Data extends Mage_Payment_Helper_Data {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
}
|
app/code/community/Dibspw/Dibspw/Model/Dibspw.php
CHANGED
|
@@ -20,9 +20,6 @@
|
|
| 20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 21 |
*/
|
| 22 |
|
| 23 |
-
/**
|
| 24 |
-
* Payment Model
|
| 25 |
-
**/
|
| 26 |
require_once dirname(__FILE__) . '/dibs_api/pw/dibs_pw_api.php';
|
| 27 |
|
| 28 |
class Dibspw_Dibspw_Model_Dibspw extends dibs_pw_api {
|
|
@@ -30,55 +27,27 @@ class Dibspw_Dibspw_Model_Dibspw extends dibs_pw_api {
|
|
| 30 |
protected $_code = 'Dibspw';
|
| 31 |
protected $_formBlockType = 'Dibspw_Dibspw_block_form';
|
| 32 |
|
| 33 |
-
/**
|
| 34 |
-
* Get Dibs session namespace
|
| 35 |
-
*
|
| 36 |
-
* @return Dibspw_Dibspw_Model_Session
|
| 37 |
-
*/
|
| 38 |
-
public function getSession() {
|
| 39 |
-
return Mage::getSingleton('Dibspw/session');
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
/**
|
| 43 |
-
* Get checkout session namespace
|
| 44 |
-
*
|
| 45 |
-
* @return Mage_Checkout_Model_Session
|
| 46 |
-
*/
|
| 47 |
-
public function getCheckout() {
|
| 48 |
-
return Mage::getSingleton('checkout/session');
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
/**
|
| 52 |
-
* Get current quote
|
| 53 |
-
*
|
| 54 |
-
* @return Mage_Sales_Model_Quote
|
| 55 |
-
*/
|
| 56 |
-
public function getQuote() {
|
| 57 |
-
return $this->getCheckout()->getQuote();
|
| 58 |
-
}
|
| 59 |
-
|
| 60 |
/*
|
| 61 |
* Validate the currency code is avaialable to use for dibs or not
|
| 62 |
*/
|
| 63 |
public function validate() {
|
| 64 |
parent::validate();
|
| 65 |
-
$
|
| 66 |
-
if (!array_key_exists($
|
| 67 |
-
Mage::throwException(Mage::helper('Dibspw')->__('Selected currency code (' .
|
| 68 |
-
|
| 69 |
}
|
| 70 |
return $this;
|
| 71 |
}
|
| 72 |
|
| 73 |
public function getCheckoutFormFields() {
|
| 74 |
$order = Mage::getModel('sales/order');
|
| 75 |
-
$order->loadByIncrementId(
|
| 76 |
$aFields = $this->api_dibs_get_requestFields($order);
|
| 77 |
|
| 78 |
return $aFields;
|
| 79 |
}
|
| 80 |
|
| 81 |
-
|
| 82 |
/**
|
| 83 |
* Using internal pages for input payment data
|
| 84 |
*
|
|
@@ -98,40 +67,6 @@ class Dibspw_Dibspw_Model_Dibspw extends dibs_pw_api {
|
|
| 98 |
}
|
| 99 |
|
| 100 |
public function getOrderPlaceRedirectUrl() {
|
| 101 |
-
return Mage::getUrl('Dibspw/Dibspw/redirect');
|
| 102 |
-
}
|
| 103 |
-
|
| 104 |
-
/**
|
| 105 |
-
* Calculates if any of the trusted logos are to be shown - in that case return true
|
| 106 |
-
*/
|
| 107 |
-
public function showTrustedList() {
|
| 108 |
-
$logoArray = explode(',', $this->getConfigData('dibslogos'));
|
| 109 |
-
foreach($logoArray as $item) {
|
| 110 |
-
if ($item == 'DIBS' || $item == 'VISA_SECURE' || $item == 'MC_SECURE' ||
|
| 111 |
-
$item == 'JCB_SECURE' || $item == 'PCI') {
|
| 112 |
-
|
| 113 |
-
return true;
|
| 114 |
-
}
|
| 115 |
-
}
|
| 116 |
-
return false;
|
| 117 |
-
}
|
| 118 |
-
|
| 119 |
-
/**
|
| 120 |
-
* Calculates if any of the card logos are to be shown - in that case return true
|
| 121 |
-
*/
|
| 122 |
-
public function showCardsList() {
|
| 123 |
-
$logoArray = explode(',', $this->getConfigData('dibslogos'));
|
| 124 |
-
foreach($logoArray as $item) {
|
| 125 |
-
if ($item == 'AMEX' || $item == 'BAX' || $item == 'DIN' || $item == 'DK' ||
|
| 126 |
-
$item == 'FFK' || $item == 'JCB' || $item == 'MC' || $item == 'MTRO' ||
|
| 127 |
-
$item == 'MOCA' || $item == 'VISA' || $item == 'ELEC' || $item == 'AKTIA' ||
|
| 128 |
-
$item == 'DNB' || $item == 'EDK' || $item == 'ELV' || $item == 'EW' ||
|
| 129 |
-
$item == 'FSB' || $item == 'GIT' || $item == 'ING' || $item == 'SEB' ||
|
| 130 |
-
$item == 'SHB' || $item == 'SOLO' || $item == 'VAL') {
|
| 131 |
-
|
| 132 |
-
return true;
|
| 133 |
-
}
|
| 134 |
-
}
|
| 135 |
-
return false;
|
| 136 |
}
|
| 137 |
}
|
| 20 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 21 |
*/
|
| 22 |
|
|
|
|
|
|
|
|
|
|
| 23 |
require_once dirname(__FILE__) . '/dibs_api/pw/dibs_pw_api.php';
|
| 24 |
|
| 25 |
class Dibspw_Dibspw_Model_Dibspw extends dibs_pw_api {
|
| 27 |
protected $_code = 'Dibspw';
|
| 28 |
protected $_formBlockType = 'Dibspw_Dibspw_block_form';
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
/*
|
| 31 |
* Validate the currency code is avaialable to use for dibs or not
|
| 32 |
*/
|
| 33 |
public function validate() {
|
| 34 |
parent::validate();
|
| 35 |
+
$sCurrencyCode = Mage::getSingleton('checkout/session')->getQuote()->getBaseCurrencyCode();
|
| 36 |
+
if (!array_key_exists($sCurrencyCode, dibs_pw_api::api_dibs_get_currencyArray())) {
|
| 37 |
+
Mage::throwException(Mage::helper('Dibspw')->__('Selected currency code (' .
|
| 38 |
+
$sCurrencyCode . ') is not compatabile with Dibs'));
|
| 39 |
}
|
| 40 |
return $this;
|
| 41 |
}
|
| 42 |
|
| 43 |
public function getCheckoutFormFields() {
|
| 44 |
$order = Mage::getModel('sales/order');
|
| 45 |
+
$order->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
|
| 46 |
$aFields = $this->api_dibs_get_requestFields($order);
|
| 47 |
|
| 48 |
return $aFields;
|
| 49 |
}
|
| 50 |
|
|
|
|
| 51 |
/**
|
| 52 |
* Using internal pages for input payment data
|
| 53 |
*
|
| 67 |
}
|
| 68 |
|
| 69 |
public function getOrderPlaceRedirectUrl() {
|
| 70 |
+
return Mage::getUrl('Dibspw/Dibspw/redirect', array('_secure' => true));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
}
|
| 72 |
}
|
app/code/community/Dibspw/Dibspw/Model/System/Config/Source/Orderstatusafter.php
CHANGED
|
@@ -21,38 +21,13 @@
|
|
| 21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 22 |
*/
|
| 23 |
|
| 24 |
-
class Dibspw_Dibspw_Model_System_Config_Source_Orderstatusafter
|
| 25 |
-
{
|
| 26 |
-
// set null to enable all possible
|
| 27 |
-
protected $_stateStatuses = array(
|
| 28 |
-
// Mage_Sales_Model_Order::STATE_NEW,
|
| 29 |
-
// Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,
|
| 30 |
-
Mage_Sales_Model_Order::STATE_PROCESSING,
|
| 31 |
-
// Mage_Sales_Model_Order::STATE_COMPLETE,
|
| 32 |
-
// Mage_Sales_Model_Order::STATE_CLOSED,
|
| 33 |
-
// Mage_Sales_Model_Order::STATE_CANCELED,
|
| 34 |
-
Mage_Sales_Model_Order::STATE_HOLDED,
|
| 35 |
-
);
|
| 36 |
|
| 37 |
-
public function toOptionArray()
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
| 44 |
-
}
|
| 45 |
-
$options = array();
|
| 46 |
-
$options[] = array(
|
| 47 |
-
'value' => '',
|
| 48 |
-
'label' => Mage::helper('adminhtml')->__('-- Please Select --')
|
| 49 |
-
);
|
| 50 |
-
foreach ($statuses as $code=>$label) {
|
| 51 |
-
$options[] = array(
|
| 52 |
-
'value' => $code,
|
| 53 |
-
'label' => $label
|
| 54 |
-
);
|
| 55 |
-
}
|
| 56 |
-
return $options;
|
| 57 |
}
|
| 58 |
}
|
| 21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 22 |
*/
|
| 23 |
|
| 24 |
+
class Dibspw_Dibspw_Model_System_Config_Source_Orderstatusafter {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
public function toOptionArray() {
|
| 27 |
+
$aStatuses = Mage::getSingleton('sales/order_config')->getStates();
|
| 28 |
+
$aOpts = array();
|
| 29 |
+
$aOpts[] = array('value' => '', 'label' => Mage::helper('adminhtml')->__('-- Please Select --'));
|
| 30 |
+
foreach($aStatuses as $sCode => $sLabel) $aOpts[] = array('value' => $sCode, 'label' => $sLabel);
|
| 31 |
+
return $aOpts;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
}
|
| 33 |
}
|
app/code/community/Dibspw/Dibspw/Model/System/Config/Source/Orderstatusbefore.php
CHANGED
|
@@ -21,38 +21,13 @@
|
|
| 21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 22 |
*/
|
| 23 |
|
| 24 |
-
class Dibspw_Dibspw_Model_System_Config_Source_Orderstatusbefore
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
// Mage_Sales_Model_Order::STATE_CLOSED,
|
| 33 |
-
// Mage_Sales_Model_Order::STATE_CANCELED,
|
| 34 |
-
// Mage_Sales_Model_Order::STATE_HOLDED,
|
| 35 |
-
);
|
| 36 |
-
|
| 37 |
-
public function toOptionArray()
|
| 38 |
-
{
|
| 39 |
-
if ($this->_stateStatuses) {
|
| 40 |
-
$statuses = Mage::getSingleton('sales/order_config')->getStateStatuses($this->_stateStatuses);
|
| 41 |
-
}
|
| 42 |
-
else {
|
| 43 |
-
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
| 44 |
-
}
|
| 45 |
-
$options = array();
|
| 46 |
-
$options[] = array(
|
| 47 |
-
'value' => '',
|
| 48 |
-
'label' => Mage::helper('adminhtml')->__('-- Please Select --')
|
| 49 |
-
);
|
| 50 |
-
foreach ($statuses as $code=>$label) {
|
| 51 |
-
$options[] = array(
|
| 52 |
-
'value' => $code,
|
| 53 |
-
'label' => $label
|
| 54 |
-
);
|
| 55 |
-
}
|
| 56 |
-
return $options;
|
| 57 |
}
|
| 58 |
}
|
| 21 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 22 |
*/
|
| 23 |
|
| 24 |
+
class Dibspw_Dibspw_Model_System_Config_Source_Orderstatusbefore {
|
| 25 |
+
|
| 26 |
+
public function toOptionArray() {
|
| 27 |
+
$aStatuses = Mage::getSingleton('sales/order_config')->getStates();
|
| 28 |
+
$aOpts = array();
|
| 29 |
+
$aOpts[] = array('value' => '', 'label' => Mage::helper('adminhtml')->__('-- Please Select --'));
|
| 30 |
+
foreach($aStatuses as $sCode => $sLabel) $aOpts[] = array('value' => $sCode, 'label' => $sLabel);
|
| 31 |
+
return $aOpts;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
}
|
| 33 |
}
|
app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_api.php
CHANGED
|
@@ -177,9 +177,7 @@ class dibs_pw_api extends dibs_pw_helpers {
|
|
| 177 |
$oOrder = $this->api_dibs_invoiceOrderObject($mOrderInfo);
|
| 178 |
foreach($oOrder->addr as $sKey => $sVal) {
|
| 179 |
$sVal = trim($sVal);
|
| 180 |
-
if(!empty($sVal))
|
| 181 |
-
$aData[$sKey] = self::api_dibs_utf8Fix($sVal);
|
| 182 |
-
}
|
| 183 |
}
|
| 184 |
if(isset($oOrder->ship->rate) && $oOrder->ship->rate > 0) {
|
| 185 |
$aData['shippingFee'] = self::api_dibs_round($oOrder->ship->rate);
|
|
@@ -254,7 +252,7 @@ class dibs_pw_api extends dibs_pw_helpers {
|
|
| 254 |
/**
|
| 255 |
* Creates dibs_results DB if not exists.
|
| 256 |
*/
|
| 257 |
-
|
| 258 |
$this->helper_dibs_db_write(
|
| 259 |
"CREATE TABLE IF NOT EXISTS `" . $this->helper_dibs_tools_prefix() .
|
| 260 |
self::api_dibs_get_tableName() . "` (
|
|
@@ -303,8 +301,6 @@ class dibs_pw_api extends dibs_pw_helpers {
|
|
| 303 |
if(!isset($_POST['amount'])) return 22;
|
| 304 |
$iAmount = (isset($_POST['voucherAmount']) && $_POST['voucherAmount'] > 0) ?
|
| 305 |
$_POST['amountOriginal'] : $_POST['amount'];
|
| 306 |
-
if(isset($_POST['s_pw']) && $_POST['s_pw'] == 3 &&
|
| 307 |
-
isset($_POST['fee']) && $_POST['fee'] > 0) $iAmount = $iAmount - $_POST['fee'];
|
| 308 |
if(abs((int)$iAmount - (int)self::api_dibs_round($mOrder->amount)) >= 0.01) return 21;
|
| 309 |
if(!isset($_POST['currency'])) return 32;
|
| 310 |
if((int)$mOrder->currency != (int)$_POST['currency']) return 31;
|
| 177 |
$oOrder = $this->api_dibs_invoiceOrderObject($mOrderInfo);
|
| 178 |
foreach($oOrder->addr as $sKey => $sVal) {
|
| 179 |
$sVal = trim($sVal);
|
| 180 |
+
if(!empty($sVal)) $aData[$sKey] = self::api_dibs_utf8Fix($sVal);
|
|
|
|
|
|
|
| 181 |
}
|
| 182 |
if(isset($oOrder->ship->rate) && $oOrder->ship->rate > 0) {
|
| 183 |
$aData['shippingFee'] = self::api_dibs_round($oOrder->ship->rate);
|
| 252 |
/**
|
| 253 |
* Creates dibs_results DB if not exists.
|
| 254 |
*/
|
| 255 |
+
public final function api_dibs_checkTable() {
|
| 256 |
$this->helper_dibs_db_write(
|
| 257 |
"CREATE TABLE IF NOT EXISTS `" . $this->helper_dibs_tools_prefix() .
|
| 258 |
self::api_dibs_get_tableName() . "` (
|
| 301 |
if(!isset($_POST['amount'])) return 22;
|
| 302 |
$iAmount = (isset($_POST['voucherAmount']) && $_POST['voucherAmount'] > 0) ?
|
| 303 |
$_POST['amountOriginal'] : $_POST['amount'];
|
|
|
|
|
|
|
| 304 |
if(abs((int)$iAmount - (int)self::api_dibs_round($mOrder->amount)) >= 0.01) return 21;
|
| 305 |
if(!isset($_POST['currency'])) return 32;
|
| 306 |
if((int)$mOrder->currency != (int)$_POST['currency']) return 31;
|
app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_helpers.php
CHANGED
|
@@ -62,7 +62,7 @@ class dibs_pw_helpers extends dibs_pw_helpers_cms implements dibs_pw_helpers_int
|
|
| 62 |
* @return string
|
| 63 |
*/
|
| 64 |
function helper_dibs_tools_url($sLink) {
|
| 65 |
-
return Mage::getUrl($sLink);
|
| 66 |
}
|
| 67 |
|
| 68 |
/**
|
|
@@ -177,7 +177,7 @@ class dibs_pw_helpers extends dibs_pw_helpers_cms implements dibs_pw_helpers_int
|
|
| 177 |
*/
|
| 178 |
function helper_dibs_obj_etc($mOrderInfo) {
|
| 179 |
return (object)array(
|
| 180 |
-
'sysmod' => '
|
| 181 |
'callbackfix' => $this->helper_dibs_tools_url("Dibspw/Dibspw/callback")
|
| 182 |
);
|
| 183 |
}
|
| 62 |
* @return string
|
| 63 |
*/
|
| 64 |
function helper_dibs_tools_url($sLink) {
|
| 65 |
+
return Mage::getUrl($sLink, array('_secure' => true));
|
| 66 |
}
|
| 67 |
|
| 68 |
/**
|
| 177 |
*/
|
| 178 |
function helper_dibs_obj_etc($mOrderInfo) {
|
| 179 |
return (object)array(
|
| 180 |
+
'sysmod' => 'mgn1_4_1_1',
|
| 181 |
'callbackfix' => $this->helper_dibs_tools_url("Dibspw/Dibspw/callback")
|
| 182 |
);
|
| 183 |
}
|
app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_helpers_cms.php
CHANGED
|
@@ -2,23 +2,125 @@
|
|
| 2 |
class dibs_pw_helpers_cms extends Mage_Payment_Model_Method_Abstract {
|
| 3 |
protected $_code = 'Dibspw';
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
function cms_get_shippingTaxPercent($oOrder) {
|
| 23 |
if($oOrder['shipping_tax_amount'] == 0 || $oOrder['shipping_amount'] == 0) return 0;
|
| 24 |
else {
|
|
@@ -26,11 +128,6 @@ class dibs_pw_helpers_cms extends Mage_Payment_Model_Method_Abstract {
|
|
| 26 |
}
|
| 27 |
}
|
| 28 |
|
| 29 |
-
public function cms_get_imghtml($item) {
|
| 30 |
-
return '<img src="' . $this->getSkinUrl('images/Dibspw/Dibspw/' .
|
| 31 |
-
preg_replace("/\(\)_/s", "", strtolower($item)) . '.gif') .
|
| 32 |
-
'" border="0" /> ';
|
| 33 |
-
}
|
| 34 |
|
| 35 |
public function setOrderStatusAfterPayment(){
|
| 36 |
$order = Mage::getModel('sales/order');
|
|
@@ -38,12 +135,12 @@ class dibs_pw_helpers_cms extends Mage_Payment_Model_Method_Abstract {
|
|
| 38 |
$order->setState($this->getConfigData('order_status_after_payment'),
|
| 39 |
true,
|
| 40 |
Mage::helper('dibspw')->__('DIBSPW_LABEL_22'));
|
| 41 |
-
|
| 42 |
-
// $this->__('DIBSPW_LABEL_22'));
|
| 43 |
$order->save();
|
| 44 |
}
|
| 45 |
|
| 46 |
-
|
|
|
|
| 47 |
// Load the session object
|
| 48 |
$session = Mage::getSingleton('checkout/session');
|
| 49 |
$session->setDibspwStandardQuoteId($session->getQuoteId());
|
| 2 |
class dibs_pw_helpers_cms extends Mage_Payment_Model_Method_Abstract {
|
| 3 |
protected $_code = 'Dibspw';
|
| 4 |
|
| 5 |
+
public function cms_dibs_getOrderInfo($oOrder) {
|
| 6 |
+
$res = "";
|
| 7 |
+
$this->api_dibs_checkTable();
|
| 8 |
+
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
| 9 |
+
$row = $read->fetchRow("SELECT * FROM " . Mage::getConfig()->getTablePrefix() .
|
| 10 |
+
dibs_pw_api::api_dibs_get_tableName() .
|
| 11 |
+
" WHERE orderid = " . $oOrder->getIncrementId());
|
| 12 |
+
|
| 13 |
+
if (count($row) > 0) {
|
| 14 |
+
if ($row['status'] == 'ACCEPTED') {
|
| 15 |
+
$res .= "<table border='0' width='100%'>";
|
| 16 |
+
|
| 17 |
+
if ($row['transaction'] != '0') {
|
| 18 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_8') . "</td>" .
|
| 19 |
+
"<td>" . $row['transaction'] . "</td></tr>";
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
if ($row['paytype'] != '0') {
|
| 23 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_12') . "</td>" .
|
| 24 |
+
"<td>" . $this->cms_dibs_printLogo($row['paytype']) . "</td></tr>";
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
if ($row['fee'] != '0') {
|
| 28 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_11') . "</td>" .
|
| 29 |
+
"<td>" . $oOrder->getOrderCurrencyCode() . " " .
|
| 30 |
+
number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
$res .= "</table><br />";
|
| 34 |
+
}
|
| 35 |
+
else $res .= "<br />" . Mage::helper('dibspw')->__('DIBSPW_LABEL_19') . "<br />";
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
return $res;
|
| 39 |
+
}
|
| 40 |
|
| 41 |
+
public function cms_dibs_getAdminOrderInfo($oOrder) {
|
| 42 |
+
$res = "";
|
| 43 |
+
$this->api_dibs_checkTable();
|
| 44 |
+
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
| 45 |
+
$row = $read->fetchRow("SELECT `status`, `transaction`, `amount`, `currency`, `fee`,
|
| 46 |
+
`paytype`, `ext_info` FROM " . Mage::getConfig()->getTablePrefix() .
|
| 47 |
+
dibs_pw_api::api_dibs_get_tableName() . "
|
| 48 |
+
WHERE orderid = " . $oOrder->getIncrementId());
|
| 49 |
+
|
| 50 |
+
if(count($row) > 0) {
|
| 51 |
+
if($row['status'] == 'ACCEPTED') {
|
| 52 |
+
$row['ext'] = (isset($row['ext_info']) && $row['ext_info'] != NULL) ?
|
| 53 |
+
unserialize($row['ext_info']) : array();
|
| 54 |
+
|
| 55 |
+
$res .= "<br /><br />" . "<table border='0' width='100%'><tr><td colspan='2'><b>" .
|
| 56 |
+
Mage::helper('dibspw')->__('DIBSPW_LABEL_7') . "</b></td></tr>";
|
| 57 |
+
|
| 58 |
+
if($row['transaction'] != '0') {
|
| 59 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_8') . "</td>" .
|
| 60 |
+
"<td>" . $row['transaction'] . "</td></tr>";
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
if($row['amount'] != '0') {
|
| 64 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_9') . "</td>" .
|
| 65 |
+
"<td>" . $oOrder->getOrderCurrencyCode() . " " .
|
| 66 |
+
number_format(((int) $row['amount']) / 100, 2, ',', ' ') . "</td></tr>";
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
if($row['currency'] != '0') {
|
| 70 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_10') . "</td>" .
|
| 71 |
+
"<td>" . $row['currency'] . "</td></tr>";
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
if($row['fee'] != '0') {
|
| 75 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_11') . "</td>" .
|
| 76 |
+
"<td>" . $oOrder->getOrderCurrencyCode() . " " .
|
| 77 |
+
number_format(((int) $row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
if($row['paytype'] != '0') {
|
| 81 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_12') . "</td>" .
|
| 82 |
+
"<td>" . $this->cms_dibs_printLogo($row['paytype']) . "</td></tr>";
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
if($row['ext']['acquirer'] != '0') {
|
| 86 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_16') . "</td>";
|
| 87 |
+
"<td>" . $row['ext']['acquirer'] . "</td></tr>";
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
if($row['ext']['enrolled'] != '0') {
|
| 91 |
+
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_17') . "</td>";
|
| 92 |
+
"<td>" . $row['ext']['enrolled'] . "</td></tr>";
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
$res .= "</table><br /><a href='https://payment.architrade.com/admin/' target='_blank'>" .
|
| 96 |
+
Mage::helper('dibspw')->__('DIBSPW_LABEL_18') . "</a><br /><br />";
|
| 97 |
+
}
|
| 98 |
+
else $res .= "<br>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_19') . "<br>";
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
return $res;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
private function cms_dibs_getPaymentPart($sPaymentstr) {
|
| 105 |
+
$aPaymentPartStr = explode(',', $sPaymentstr, 2);
|
| 106 |
+
return $aPaymentPartStr[0];
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
public function cms_dibs_printLogo($paytype) {
|
| 110 |
+
$sImgHtml = "";
|
| 111 |
+
$sLogo = $this->cms_dibs_getPaymentPart($paytype);
|
| 112 |
+
if(preg_match("/[a-z\(\)_]+/is", $sLogo)) $sImgHtml = $this->cms_get_imgHtml($sLogo);
|
| 113 |
+
return !empty($sImgHtml) ? $sImgHtml : $this->cms_get_imgHtml("dibs");
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
public function cms_get_imgHtml($sLogo) {
|
| 117 |
+
$sImgUrl = Mage::getDesign()->getSkinUrl('images/Dibspw/Dibspw/' .
|
| 118 |
+
preg_replace("/(\(|\)|_)/s", "",
|
| 119 |
+
strtolower($sLogo)) . '.gif');
|
| 120 |
+
return (file_exists("." . strstr($sImgUrl, "/skin/"))) ?
|
| 121 |
+
'<img src="' . $sImgUrl . '" alt="' . htmlentities($sLogo) . '" />' : "";
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
function cms_get_shippingTaxPercent($oOrder) {
|
| 125 |
if($oOrder['shipping_tax_amount'] == 0 || $oOrder['shipping_amount'] == 0) return 0;
|
| 126 |
else {
|
| 128 |
}
|
| 129 |
}
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
public function setOrderStatusAfterPayment(){
|
| 133 |
$order = Mage::getModel('sales/order');
|
| 135 |
$order->setState($this->getConfigData('order_status_after_payment'),
|
| 136 |
true,
|
| 137 |
Mage::helper('dibspw')->__('DIBSPW_LABEL_22'));
|
| 138 |
+
|
|
|
|
| 139 |
$order->save();
|
| 140 |
}
|
| 141 |
|
| 142 |
+
// Remove from stock (if used)
|
| 143 |
+
public function removeFromStock() {
|
| 144 |
// Load the session object
|
| 145 |
$session = Mage::getSingleton('checkout/session');
|
| 146 |
$session->setDibspwStandardQuoteId($session->getQuoteId());
|
app/code/community/Dibspw/Dibspw/controllers/DibspwController.php
CHANGED
|
@@ -25,105 +25,59 @@
|
|
| 25 |
**/
|
| 26 |
|
| 27 |
class Dibspw_Dibspw_DibspwController extends Mage_Core_Controller_Front_Action {
|
| 28 |
-
|
| 29 |
private $oDibsModel;
|
| 30 |
|
| 31 |
function _construct() {
|
| 32 |
$this->oDibsModel= Mage::getModel('dibspw/Dibspw');
|
| 33 |
}
|
| 34 |
|
| 35 |
-
protected function _expireAjax(){
|
| 36 |
-
if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
|
| 37 |
-
$this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
|
| 38 |
-
exit;
|
| 39 |
-
}
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
public function addToStock() {
|
| 43 |
-
// Load the session object
|
| 44 |
-
$session = Mage::getSingleton('checkout/session');
|
| 45 |
-
$session->setDibspwStandardQuoteId($session->getQuoteId());
|
| 46 |
-
|
| 47 |
-
// Load the order object
|
| 48 |
-
$order = $this->getOrder();
|
| 49 |
-
|
| 50 |
-
// add items back on stock
|
| 51 |
-
// Put the order back on stock as it is not yet paid!
|
| 52 |
-
// http://www.magentocommerce.com/wiki/groups/132/protx_form_-_subtracting_stock_on_successful_payment
|
| 53 |
-
|
| 54 |
-
if (((int)$this->oDibsModel->getConfigData('handlestock')) == 1) {
|
| 55 |
-
if(!isset($_SESSION['stock_removed']) ||
|
| 56 |
-
$_SESSION['stock_removed'] != $session->getLastRealOrderId()) {
|
| 57 |
-
/* Put the stock back on, we don't want it taken off yet */
|
| 58 |
-
$items = $order->getAllItems(); // Get all items from the order
|
| 59 |
-
if ($items) {
|
| 60 |
-
foreach($items as $item) {
|
| 61 |
-
$quantity = $item->getQtyOrdered(); // get Qty ordered
|
| 62 |
-
$product_id = $item->getProductId(); // get it's ID
|
| 63 |
-
// Load the stock for this product
|
| 64 |
-
$stock = Mage::getModel('cataloginventory/stock_item')
|
| 65 |
-
->loadByProduct($product_id);
|
| 66 |
-
$stock->setQty($stock->getQty()+$quantity); // Set to new Qty
|
| 67 |
-
$stock->save(); // Save
|
| 68 |
-
continue;
|
| 69 |
-
}
|
| 70 |
-
}
|
| 71 |
-
|
| 72 |
-
// Flag so that stock is only updated once!
|
| 73 |
-
$_SESSION['stock_removed'] = $session->getLastRealOrderId();
|
| 74 |
-
|
| 75 |
-
}
|
| 76 |
-
}
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
// Remove from stock (if used)
|
| 80 |
public function redirectAction(){
|
| 81 |
// Load the session object
|
| 82 |
$session = Mage::getSingleton('checkout/session');
|
| 83 |
$session->setDibspwQuoteId($session->getQuoteId());
|
| 84 |
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
$this->
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
$order = Mage::getModel('sales/order');
|
| 95 |
-
$order->loadByIncrementId($session->getLastRealOrderId());
|
| 96 |
-
$order->addStatusToHistory($order->getStatus(),$this->__('DIBSPW_LABEL_3'));
|
| 97 |
-
$order->save();
|
| 98 |
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
$
|
|
|
|
|
|
|
| 108 |
}
|
| 109 |
-
|
|
|
|
| 110 |
}
|
| 111 |
-
|
| 112 |
public function successAction() {
|
| 113 |
$session = Mage::getSingleton('checkout/session');
|
| 114 |
$session->setQuoteId($session->getDibspwStandardQuoteId(true));
|
| 115 |
-
$
|
| 116 |
$fields = array();
|
| 117 |
|
| 118 |
-
$this->oDibsModel->api_dibs_action_success($
|
| 119 |
Mage::app()->getFrontController()->getResponse()->setRedirect(
|
| 120 |
$this->oDibsModel->helper_dibs_tools_url('checkout/onepage/success')
|
| 121 |
);
|
| 122 |
}
|
| 123 |
|
| 124 |
public function callbackAction() {
|
| 125 |
-
$
|
| 126 |
-
$this->oDibsModel->api_dibs_action_callback($
|
| 127 |
}
|
| 128 |
|
| 129 |
/**
|
|
@@ -135,12 +89,12 @@ class Dibspw_Dibspw_DibspwController extends Mage_Core_Controller_Front_Action {
|
|
| 135 |
$fields = array();
|
| 136 |
|
| 137 |
// Save order comment
|
| 138 |
-
$
|
| 139 |
|
| 140 |
if (isset($_POST['orderid'])) {
|
| 141 |
-
$
|
| 142 |
-
$
|
| 143 |
-
$
|
| 144 |
|
| 145 |
// Add items back on stock (if used)
|
| 146 |
$this->oDibsModel->removeFromStock();
|
|
@@ -151,5 +105,49 @@ class Dibspw_Dibspw_DibspwController extends Mage_Core_Controller_Front_Action {
|
|
| 151 |
Mage::app()->getFrontController()->getResponse()->setRedirect(
|
| 152 |
$this->oDibsModel->helper_dibs_tools_url('checkout/cart')
|
| 153 |
);
|
| 154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
}
|
| 25 |
**/
|
| 26 |
|
| 27 |
class Dibspw_Dibspw_DibspwController extends Mage_Core_Controller_Front_Action {
|
| 28 |
+
|
| 29 |
private $oDibsModel;
|
| 30 |
|
| 31 |
function _construct() {
|
| 32 |
$this->oDibsModel= Mage::getModel('dibspw/Dibspw');
|
| 33 |
}
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
public function redirectAction(){
|
| 36 |
// Load the session object
|
| 37 |
$session = Mage::getSingleton('checkout/session');
|
| 38 |
$session->setDibspwQuoteId($session->getQuoteId());
|
| 39 |
|
| 40 |
+
$oOrder = Mage::getModel('sales/order');
|
| 41 |
+
$oOrder->loadByIncrementId($session->getLastRealOrderId());
|
| 42 |
+
$this->loadLayout();
|
| 43 |
+
if($oOrder->getPayment() !== FALSE) {
|
| 44 |
+
// Create the POST to DIBS (Inside Magento Checkout)
|
| 45 |
+
$this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('dibspw/redirect'));
|
| 46 |
+
|
| 47 |
+
// Create the POST to DIBS (In Separate "Blank" Window)
|
| 48 |
+
// $this->getResponse()->setBody($this->getLayout()->createBlock('Dibspw/redirect')->toHtml());
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
// Save order comment
|
| 51 |
+
foreach($oOrder->getAllStatusHistory() as $oOrderStatusItem) {
|
| 52 |
+
$sOrderComment = $oOrderStatusItem->getComment();
|
| 53 |
+
break;
|
| 54 |
+
}
|
| 55 |
+
if($sOrderComment != $this->__('DIBSPW_LABEL_3')) {
|
| 56 |
+
$oOrder->addStatusToHistory($oOrder->getStatus(), $this->__('DIBSPW_LABEL_3'));
|
| 57 |
+
}
|
| 58 |
+
$oOrder->save();
|
| 59 |
+
// Add items back on stock (if used)
|
| 60 |
+
$this->addToStock();
|
| 61 |
}
|
| 62 |
+
else $this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('dibspw/failure'));
|
| 63 |
+
$this->renderLayout();
|
| 64 |
}
|
| 65 |
+
|
| 66 |
public function successAction() {
|
| 67 |
$session = Mage::getSingleton('checkout/session');
|
| 68 |
$session->setQuoteId($session->getDibspwStandardQuoteId(true));
|
| 69 |
+
$oOrder = Mage::getModel('sales/order');
|
| 70 |
$fields = array();
|
| 71 |
|
| 72 |
+
$this->oDibsModel->api_dibs_action_success($oOrder);
|
| 73 |
Mage::app()->getFrontController()->getResponse()->setRedirect(
|
| 74 |
$this->oDibsModel->helper_dibs_tools_url('checkout/onepage/success')
|
| 75 |
);
|
| 76 |
}
|
| 77 |
|
| 78 |
public function callbackAction() {
|
| 79 |
+
$oOrder = Mage::getModel('sales/order');
|
| 80 |
+
$this->oDibsModel->api_dibs_action_callback($oOrder);
|
| 81 |
}
|
| 82 |
|
| 83 |
/**
|
| 89 |
$fields = array();
|
| 90 |
|
| 91 |
// Save order comment
|
| 92 |
+
$oOrder = Mage::getModel('sales/order');
|
| 93 |
|
| 94 |
if (isset($_POST['orderid'])) {
|
| 95 |
+
$oOrder->loadByIncrementId((int)$_REQUEST['orderid']);
|
| 96 |
+
$oOrder->registerCancellation($this->__('DIBSPW_LABEL_20'));
|
| 97 |
+
$oOrder->save();
|
| 98 |
|
| 99 |
// Add items back on stock (if used)
|
| 100 |
$this->oDibsModel->removeFromStock();
|
| 105 |
Mage::app()->getFrontController()->getResponse()->setRedirect(
|
| 106 |
$this->oDibsModel->helper_dibs_tools_url('checkout/cart')
|
| 107 |
);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
protected function _expireAjax(){
|
| 111 |
+
if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
|
| 112 |
+
$this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
|
| 113 |
+
exit;
|
| 114 |
+
}
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
public function addToStock() {
|
| 118 |
+
// Load the session object
|
| 119 |
+
$session = Mage::getSingleton('checkout/session');
|
| 120 |
+
$session->setDibspwStandardQuoteId($session->getQuoteId());
|
| 121 |
+
|
| 122 |
+
$oOrder = Mage::getModel('sales/order');
|
| 123 |
+
$oOrder->loadByIncrementId($session->getLastRealOrderId());
|
| 124 |
+
|
| 125 |
+
// add items back on stock
|
| 126 |
+
// Put the order back on stock as it is not yet paid!
|
| 127 |
+
// http://www.magentocommerce.com/wiki/groups/132/protx_form_-_subtracting_stock_on_successful_payment
|
| 128 |
+
|
| 129 |
+
if (((int)$this->oDibsModel->getConfigData('handlestock')) == 1) {
|
| 130 |
+
if(!isset($_SESSION['stock_removed']) ||
|
| 131 |
+
$_SESSION['stock_removed'] != $session->getLastRealOrderId()) {
|
| 132 |
+
/* Put the stock back on, we don't want it taken off yet */
|
| 133 |
+
$items = $oOrder->getAllItems(); // Get all items from the order
|
| 134 |
+
if ($items) {
|
| 135 |
+
foreach($items as $item) {
|
| 136 |
+
$quantity = $item->getQtyOrdered(); // get Qty ordered
|
| 137 |
+
$product_id = $item->getProductId(); // get it's ID
|
| 138 |
+
// Load the stock for this product
|
| 139 |
+
$stock = Mage::getModel('cataloginventory/stock_item')
|
| 140 |
+
->loadByProduct($product_id);
|
| 141 |
+
$stock->setQty($stock->getQty()+$quantity); // Set to new Qty
|
| 142 |
+
$stock->save(); // Save
|
| 143 |
+
continue;
|
| 144 |
+
}
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
// Flag so that stock is only updated once!
|
| 148 |
+
$_SESSION['stock_removed'] = $session->getLastRealOrderId();
|
| 149 |
+
|
| 150 |
+
}
|
| 151 |
+
}
|
| 152 |
+
}
|
| 153 |
}
|
app/code/community/Dibspw/Dibspw/etc/config.xml
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
<config>
|
| 25 |
<modules>
|
| 26 |
<Dibspw_Dibspw>
|
| 27 |
-
<version>4.1.
|
| 28 |
<depends>
|
| 29 |
<Mage_Paygate />
|
| 30 |
</depends>
|
|
@@ -117,7 +117,7 @@
|
|
| 117 |
<url_accept>checkout/success</url_accept>
|
| 118 |
<url_callback>checkout/cart</url_callback>
|
| 119 |
<model>dibspw/Dibspw</model>
|
| 120 |
-
<order_status>
|
| 121 |
<order_status_after_payment>processing</order_status_after_payment>
|
| 122 |
<DIBSPW_testmode>1</DIBSPW_testmode>
|
| 123 |
<title>DIBS Payment Window | Secure Payment Services</title>
|
|
@@ -131,6 +131,7 @@
|
|
| 131 |
<dibspwlogos>DIBS</dibspwlogos>
|
| 132 |
<handlestock>1</handlestock>
|
| 133 |
<DIBSPW_distr>empty</DIBSPW_distr>
|
|
|
|
| 134 |
</Dibspw>
|
| 135 |
</payment>
|
| 136 |
</default>
|
| 24 |
<config>
|
| 25 |
<modules>
|
| 26 |
<Dibspw_Dibspw>
|
| 27 |
+
<version>4.1.1</version>
|
| 28 |
<depends>
|
| 29 |
<Mage_Paygate />
|
| 30 |
</depends>
|
| 117 |
<url_accept>checkout/success</url_accept>
|
| 118 |
<url_callback>checkout/cart</url_callback>
|
| 119 |
<model>dibspw/Dibspw</model>
|
| 120 |
+
<order_status>pending_payment</order_status>
|
| 121 |
<order_status_after_payment>processing</order_status_after_payment>
|
| 122 |
<DIBSPW_testmode>1</DIBSPW_testmode>
|
| 123 |
<title>DIBS Payment Window | Secure Payment Services</title>
|
| 131 |
<dibspwlogos>DIBS</dibspwlogos>
|
| 132 |
<handlestock>1</handlestock>
|
| 133 |
<DIBSPW_distr>empty</DIBSPW_distr>
|
| 134 |
+
<sort_order>0</sort_order>
|
| 135 |
</Dibspw>
|
| 136 |
</payment>
|
| 137 |
</default>
|
app/code/community/Dibspw/Dibspw/etc/system.xml
CHANGED
|
@@ -31,7 +31,7 @@
|
|
| 31 |
<sort_order>1</sort_order>
|
| 32 |
<show_in_default>1</show_in_default>
|
| 33 |
<show_in_website>1</show_in_website>
|
| 34 |
-
<show_in_store>
|
| 35 |
<fields>
|
| 36 |
<active translate="label">
|
| 37 |
<label>Enabled</label>
|
|
@@ -40,7 +40,7 @@
|
|
| 40 |
<sort_order>1</sort_order>
|
| 41 |
<show_in_default>1</show_in_default>
|
| 42 |
<show_in_website>1</show_in_website>
|
| 43 |
-
<show_in_store>
|
| 44 |
</active>
|
| 45 |
<title translate="label">
|
| 46 |
<label>Title (Payment method name displayed for customers. Ex: DibsGW) </label>
|
|
@@ -48,7 +48,7 @@
|
|
| 48 |
<sort_order>2</sort_order>
|
| 49 |
<show_in_default>1</show_in_default>
|
| 50 |
<show_in_website>1</show_in_website>
|
| 51 |
-
<show_in_store>
|
| 52 |
</title>
|
| 53 |
<DIBSPW_mid translate="label">
|
| 54 |
<label>DIBS Merchant ID</label>
|
|
@@ -63,9 +63,9 @@
|
|
| 63 |
<frontend_type>select</frontend_type>
|
| 64 |
<source_model>dibspw/system_config_source_paymentwindow</source_model>
|
| 65 |
<sort_order>4</sort_order>
|
| 66 |
-
<show_in_default>
|
| 67 |
-
<show_in_website>
|
| 68 |
-
<show_in_store>
|
| 69 |
</DIBSPW_method>
|
| 70 |
<DIBSPW_HMAC translate="label">
|
| 71 |
<label>HMAC Key</label>
|
|
@@ -73,7 +73,7 @@
|
|
| 73 |
<sort_order>5</sort_order>
|
| 74 |
<show_in_default>1</show_in_default>
|
| 75 |
<show_in_website>1</show_in_website>
|
| 76 |
-
<show_in_store>
|
| 77 |
</DIBSPW_HMAC>
|
| 78 |
<DIBSPW_testmode translate="label">
|
| 79 |
<label>Test mode</label>
|
|
@@ -91,7 +91,7 @@
|
|
| 91 |
<sort_order>7</sort_order>
|
| 92 |
<show_in_default>1</show_in_default>
|
| 93 |
<show_in_website>1</show_in_website>
|
| 94 |
-
<show_in_store>
|
| 95 |
</DIBSPW_fee>
|
| 96 |
<DIBSPW_capturenow translate="label">
|
| 97 |
<label>Capture now</label>
|
|
@@ -100,7 +100,7 @@
|
|
| 100 |
<sort_order>8</sort_order>
|
| 101 |
<show_in_default>1</show_in_default>
|
| 102 |
<show_in_website>1</show_in_website>
|
| 103 |
-
<show_in_store>
|
| 104 |
</DIBSPW_capturenow>
|
| 105 |
<DIBSPW_voucher translate="label">
|
| 106 |
<label>Voucher Usage (Mobile PW only)</label>
|
|
@@ -109,7 +109,7 @@
|
|
| 109 |
<sort_order>9</sort_order>
|
| 110 |
<show_in_default>1</show_in_default>
|
| 111 |
<show_in_website>1</show_in_website>
|
| 112 |
-
<show_in_store>
|
| 113 |
</DIBSPW_voucher>
|
| 114 |
<DIBSPW_uniq translate="label">
|
| 115 |
<label>Unique order ID (Mobile PW only)</label>
|
|
@@ -118,7 +118,7 @@
|
|
| 118 |
<sort_order>10</sort_order>
|
| 119 |
<show_in_default>1</show_in_default>
|
| 120 |
<show_in_website>1</show_in_website>
|
| 121 |
-
<show_in_store>
|
| 122 |
</DIBSPW_uniq>
|
| 123 |
<DIBSPW_paytype translate="label">
|
| 124 |
<label>Paytype</label>
|
|
@@ -126,16 +126,16 @@
|
|
| 126 |
<sort_order>11</sort_order>
|
| 127 |
<show_in_default>1</show_in_default>
|
| 128 |
<show_in_website>1</show_in_website>
|
| 129 |
-
<show_in_store>
|
| 130 |
</DIBSPW_paytype>
|
| 131 |
<DIBSPW_lang translate="label">
|
| 132 |
<label>Language Payment Window</label>
|
| 133 |
<frontend_type>select</frontend_type>
|
| 134 |
<source_model>dibspw/system_config_source_lang</source_model>
|
| 135 |
<sort_order>12</sort_order>
|
| 136 |
-
<show_in_default>
|
| 137 |
-
<show_in_website>
|
| 138 |
-
<show_in_store>
|
| 139 |
</DIBSPW_lang>
|
| 140 |
<DIBSPW_account translate="label">
|
| 141 |
<label>Account</label>
|
|
@@ -143,7 +143,7 @@
|
|
| 143 |
<sort_order>13</sort_order>
|
| 144 |
<show_in_default>1</show_in_default>
|
| 145 |
<show_in_website>1</show_in_website>
|
| 146 |
-
<show_in_store>
|
| 147 |
</DIBSPW_account>
|
| 148 |
<DIBSPW_distr translate="label">
|
| 149 |
<label>Distribution method (Only relevant for PayByBill payment type).</label>
|
|
@@ -152,7 +152,7 @@
|
|
| 152 |
<sort_order>14</sort_order>
|
| 153 |
<show_in_default>1</show_in_default>
|
| 154 |
<show_in_website>1</show_in_website>
|
| 155 |
-
<show_in_store>
|
| 156 |
</DIBSPW_distr>
|
| 157 |
<order_status translate="label">
|
| 158 |
<label>Order status (Before the payment is made)</label>
|
|
@@ -161,7 +161,7 @@
|
|
| 161 |
<sort_order>15</sort_order>
|
| 162 |
<show_in_default>1</show_in_default>
|
| 163 |
<show_in_website>1</show_in_website>
|
| 164 |
-
<show_in_store>
|
| 165 |
</order_status>
|
| 166 |
<order_status_after_payment translate="label">
|
| 167 |
<label>New order status (When the payment is made)</label>
|
|
@@ -170,7 +170,7 @@
|
|
| 170 |
<sort_order>16</sort_order>
|
| 171 |
<show_in_default>1</show_in_default>
|
| 172 |
<show_in_website>1</show_in_website>
|
| 173 |
-
<show_in_store>
|
| 174 |
</order_status_after_payment>
|
| 175 |
<sendmailorderconfirmation translate="label">
|
| 176 |
<label>Send Email Order Confirmation. Enabling this setting will result in an email confirmation is send to the cardholder as the payment is made.</label>
|
|
@@ -179,17 +179,17 @@
|
|
| 179 |
<sort_order>17</sort_order>
|
| 180 |
<show_in_default>1</show_in_default>
|
| 181 |
<show_in_website>1</show_in_website>
|
| 182 |
-
<show_in_store>
|
| 183 |
</sendmailorderconfirmation>
|
| 184 |
-
<
|
| 185 |
<label>Which logos to show</label>
|
| 186 |
<frontend_type>multiselect</frontend_type>
|
| 187 |
<source_model>dibspw/system_config_source_dibslogos</source_model>
|
| 188 |
<sort_order>18</sort_order>
|
| 189 |
<show_in_default>1</show_in_default>
|
| 190 |
<show_in_website>1</show_in_website>
|
| 191 |
-
<show_in_store>
|
| 192 |
-
</
|
| 193 |
<handlestock translate="label">
|
| 194 |
<label>Handle stock. The quantity purchased in stock will at first be decremented as the payment is made.</label>
|
| 195 |
<frontend_type>select</frontend_type>
|
|
@@ -197,8 +197,16 @@
|
|
| 197 |
<sort_order>19</sort_order>
|
| 198 |
<show_in_default>1</show_in_default>
|
| 199 |
<show_in_website>1</show_in_website>
|
| 200 |
-
<show_in_store>
|
| 201 |
</handlestock>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
</fields>
|
| 203 |
</Dibspw>
|
| 204 |
</groups>
|
| 31 |
<sort_order>1</sort_order>
|
| 32 |
<show_in_default>1</show_in_default>
|
| 33 |
<show_in_website>1</show_in_website>
|
| 34 |
+
<show_in_store>1</show_in_store>
|
| 35 |
<fields>
|
| 36 |
<active translate="label">
|
| 37 |
<label>Enabled</label>
|
| 40 |
<sort_order>1</sort_order>
|
| 41 |
<show_in_default>1</show_in_default>
|
| 42 |
<show_in_website>1</show_in_website>
|
| 43 |
+
<show_in_store>1</show_in_store>
|
| 44 |
</active>
|
| 45 |
<title translate="label">
|
| 46 |
<label>Title (Payment method name displayed for customers. Ex: DibsGW) </label>
|
| 48 |
<sort_order>2</sort_order>
|
| 49 |
<show_in_default>1</show_in_default>
|
| 50 |
<show_in_website>1</show_in_website>
|
| 51 |
+
<show_in_store>1</show_in_store>
|
| 52 |
</title>
|
| 53 |
<DIBSPW_mid translate="label">
|
| 54 |
<label>DIBS Merchant ID</label>
|
| 63 |
<frontend_type>select</frontend_type>
|
| 64 |
<source_model>dibspw/system_config_source_paymentwindow</source_model>
|
| 65 |
<sort_order>4</sort_order>
|
| 66 |
+
<show_in_default>1</show_in_default>
|
| 67 |
+
<show_in_website>1</show_in_website>
|
| 68 |
+
<show_in_store>1</show_in_store>
|
| 69 |
</DIBSPW_method>
|
| 70 |
<DIBSPW_HMAC translate="label">
|
| 71 |
<label>HMAC Key</label>
|
| 73 |
<sort_order>5</sort_order>
|
| 74 |
<show_in_default>1</show_in_default>
|
| 75 |
<show_in_website>1</show_in_website>
|
| 76 |
+
<show_in_store>1</show_in_store>
|
| 77 |
</DIBSPW_HMAC>
|
| 78 |
<DIBSPW_testmode translate="label">
|
| 79 |
<label>Test mode</label>
|
| 91 |
<sort_order>7</sort_order>
|
| 92 |
<show_in_default>1</show_in_default>
|
| 93 |
<show_in_website>1</show_in_website>
|
| 94 |
+
<show_in_store>1</show_in_store>
|
| 95 |
</DIBSPW_fee>
|
| 96 |
<DIBSPW_capturenow translate="label">
|
| 97 |
<label>Capture now</label>
|
| 100 |
<sort_order>8</sort_order>
|
| 101 |
<show_in_default>1</show_in_default>
|
| 102 |
<show_in_website>1</show_in_website>
|
| 103 |
+
<show_in_store>1</show_in_store>
|
| 104 |
</DIBSPW_capturenow>
|
| 105 |
<DIBSPW_voucher translate="label">
|
| 106 |
<label>Voucher Usage (Mobile PW only)</label>
|
| 109 |
<sort_order>9</sort_order>
|
| 110 |
<show_in_default>1</show_in_default>
|
| 111 |
<show_in_website>1</show_in_website>
|
| 112 |
+
<show_in_store>1</show_in_store>
|
| 113 |
</DIBSPW_voucher>
|
| 114 |
<DIBSPW_uniq translate="label">
|
| 115 |
<label>Unique order ID (Mobile PW only)</label>
|
| 118 |
<sort_order>10</sort_order>
|
| 119 |
<show_in_default>1</show_in_default>
|
| 120 |
<show_in_website>1</show_in_website>
|
| 121 |
+
<show_in_store>1</show_in_store>
|
| 122 |
</DIBSPW_uniq>
|
| 123 |
<DIBSPW_paytype translate="label">
|
| 124 |
<label>Paytype</label>
|
| 126 |
<sort_order>11</sort_order>
|
| 127 |
<show_in_default>1</show_in_default>
|
| 128 |
<show_in_website>1</show_in_website>
|
| 129 |
+
<show_in_store>1</show_in_store>
|
| 130 |
</DIBSPW_paytype>
|
| 131 |
<DIBSPW_lang translate="label">
|
| 132 |
<label>Language Payment Window</label>
|
| 133 |
<frontend_type>select</frontend_type>
|
| 134 |
<source_model>dibspw/system_config_source_lang</source_model>
|
| 135 |
<sort_order>12</sort_order>
|
| 136 |
+
<show_in_default>1</show_in_default>
|
| 137 |
+
<show_in_website>1</show_in_website>
|
| 138 |
+
<show_in_store>1</show_in_store>
|
| 139 |
</DIBSPW_lang>
|
| 140 |
<DIBSPW_account translate="label">
|
| 141 |
<label>Account</label>
|
| 143 |
<sort_order>13</sort_order>
|
| 144 |
<show_in_default>1</show_in_default>
|
| 145 |
<show_in_website>1</show_in_website>
|
| 146 |
+
<show_in_store>1</show_in_store>
|
| 147 |
</DIBSPW_account>
|
| 148 |
<DIBSPW_distr translate="label">
|
| 149 |
<label>Distribution method (Only relevant for PayByBill payment type).</label>
|
| 152 |
<sort_order>14</sort_order>
|
| 153 |
<show_in_default>1</show_in_default>
|
| 154 |
<show_in_website>1</show_in_website>
|
| 155 |
+
<show_in_store>1</show_in_store>
|
| 156 |
</DIBSPW_distr>
|
| 157 |
<order_status translate="label">
|
| 158 |
<label>Order status (Before the payment is made)</label>
|
| 161 |
<sort_order>15</sort_order>
|
| 162 |
<show_in_default>1</show_in_default>
|
| 163 |
<show_in_website>1</show_in_website>
|
| 164 |
+
<show_in_store>1</show_in_store>
|
| 165 |
</order_status>
|
| 166 |
<order_status_after_payment translate="label">
|
| 167 |
<label>New order status (When the payment is made)</label>
|
| 170 |
<sort_order>16</sort_order>
|
| 171 |
<show_in_default>1</show_in_default>
|
| 172 |
<show_in_website>1</show_in_website>
|
| 173 |
+
<show_in_store>1</show_in_store>
|
| 174 |
</order_status_after_payment>
|
| 175 |
<sendmailorderconfirmation translate="label">
|
| 176 |
<label>Send Email Order Confirmation. Enabling this setting will result in an email confirmation is send to the cardholder as the payment is made.</label>
|
| 179 |
<sort_order>17</sort_order>
|
| 180 |
<show_in_default>1</show_in_default>
|
| 181 |
<show_in_website>1</show_in_website>
|
| 182 |
+
<show_in_store>1</show_in_store>
|
| 183 |
</sendmailorderconfirmation>
|
| 184 |
+
<dibspwlogos translate="label">
|
| 185 |
<label>Which logos to show</label>
|
| 186 |
<frontend_type>multiselect</frontend_type>
|
| 187 |
<source_model>dibspw/system_config_source_dibslogos</source_model>
|
| 188 |
<sort_order>18</sort_order>
|
| 189 |
<show_in_default>1</show_in_default>
|
| 190 |
<show_in_website>1</show_in_website>
|
| 191 |
+
<show_in_store>1</show_in_store>
|
| 192 |
+
</dibspwlogos>
|
| 193 |
<handlestock translate="label">
|
| 194 |
<label>Handle stock. The quantity purchased in stock will at first be decremented as the payment is made.</label>
|
| 195 |
<frontend_type>select</frontend_type>
|
| 197 |
<sort_order>19</sort_order>
|
| 198 |
<show_in_default>1</show_in_default>
|
| 199 |
<show_in_website>1</show_in_website>
|
| 200 |
+
<show_in_store>1</show_in_store>
|
| 201 |
</handlestock>
|
| 202 |
+
<sort_order translate="label">
|
| 203 |
+
<label>Sort Order</label>
|
| 204 |
+
<frontend_type>text</frontend_type>
|
| 205 |
+
<sort_order>20</sort_order>
|
| 206 |
+
<show_in_default>1</show_in_default>
|
| 207 |
+
<show_in_website>1</show_in_website>
|
| 208 |
+
<show_in_store>1</show_in_store>
|
| 209 |
+
</sort_order>
|
| 210 |
</fields>
|
| 211 |
</Dibspw>
|
| 212 |
</groups>
|
app/code/community/Dibspw/Dibspw/sql/dibspw_setup/{mysql4-install-4.1.0.php → mysql4-install-4.1.1.php}
RENAMED
|
@@ -28,11 +28,11 @@
|
|
| 28 |
$installer = $this;
|
| 29 |
|
| 30 |
$installer->startSetup();
|
| 31 |
-
$
|
| 32 |
-
$
|
| 33 |
$sTablePrefix = Mage::getConfig()->getTablePrefix();
|
| 34 |
$installer->run("
|
| 35 |
-
delete from "
|
| 36 |
CREATE TABLE IF NOT EXISTS `" . $sTablePrefix . "dibspw_results` (
|
| 37 |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
| 38 |
`orderid` varchar(100) NOT NULL DEFAULT '',
|
|
@@ -58,6 +58,6 @@ $installer->run("
|
|
| 58 |
PRIMARY KEY (`id`),
|
| 59 |
KEY `orderid` (`orderid`)
|
| 60 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
| 61 |
-
UPDATE "
|
| 62 |
");
|
| 63 |
$installer->endSetup();
|
| 28 |
$installer = $this;
|
| 29 |
|
| 30 |
$installer->startSetup();
|
| 31 |
+
$sTableName_CoreResource = Mage::getSingleton('core/resource')->getTableName('core_resource');
|
| 32 |
+
$sTableName_SalesFlatOrderPayment = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
|
| 33 |
$sTablePrefix = Mage::getConfig()->getTablePrefix();
|
| 34 |
$installer->run("
|
| 35 |
+
delete from " . $sTableName_CoreResource . " where code = 'dibspw_setup';
|
| 36 |
CREATE TABLE IF NOT EXISTS `" . $sTablePrefix . "dibspw_results` (
|
| 37 |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
| 38 |
`orderid` varchar(100) NOT NULL DEFAULT '',
|
| 58 |
PRIMARY KEY (`id`),
|
| 59 |
KEY `orderid` (`orderid`)
|
| 60 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
| 61 |
+
UPDATE " . $sTableName_SalesFlatOrderPayment . " SET method='Dibspw' WHERE method='dibspw_standard';
|
| 62 |
");
|
| 63 |
$installer->endSetup();
|
app/code/community/Dibspw/Dibspw/sql/dibspw_setup/{mysql4-upgrade-4.0.1-4.1.0.php → mysql4-upgrade-4.1.0-4.1.1.php}
RENAMED
|
@@ -28,12 +28,12 @@
|
|
| 28 |
$installer = $this;
|
| 29 |
|
| 30 |
$installer->startSetup();
|
| 31 |
-
$
|
| 32 |
-
$
|
| 33 |
$sTablePrefix = Mage::getConfig()->getTablePrefix();
|
| 34 |
$installer->run("
|
| 35 |
-
delete from "
|
| 36 |
-
CREATE TABLE IF NOT EXISTS `" . $sTablePrefix ."dibspw_results` (
|
| 37 |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
| 38 |
`orderid` varchar(100) NOT NULL DEFAULT '',
|
| 39 |
`status` varchar(10) NOT NULL DEFAULT '0',
|
|
@@ -58,6 +58,6 @@ $installer->run("
|
|
| 58 |
PRIMARY KEY (`id`),
|
| 59 |
KEY `orderid` (`orderid`)
|
| 60 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
| 61 |
-
UPDATE "
|
| 62 |
");
|
| 63 |
$installer->endSetup();
|
| 28 |
$installer = $this;
|
| 29 |
|
| 30 |
$installer->startSetup();
|
| 31 |
+
$sTableName_CoreResource = Mage::getSingleton('core/resource')->getTableName('core_resource');
|
| 32 |
+
$sTableName_SalesFlatOrderPayment = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
|
| 33 |
$sTablePrefix = Mage::getConfig()->getTablePrefix();
|
| 34 |
$installer->run("
|
| 35 |
+
delete from " . $sTableName_CoreResource . " where code = 'dibspw_setup';
|
| 36 |
+
CREATE TABLE IF NOT EXISTS `" . $sTablePrefix . "dibspw_results` (
|
| 37 |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
| 38 |
`orderid` varchar(100) NOT NULL DEFAULT '',
|
| 39 |
`status` varchar(10) NOT NULL DEFAULT '0',
|
| 58 |
PRIMARY KEY (`id`),
|
| 59 |
KEY `orderid` (`orderid`)
|
| 60 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
| 61 |
+
UPDATE " . $sTableName_SalesFlatOrderPayment . " SET method='Dibspw' WHERE method='dibspw_standard';
|
| 62 |
");
|
| 63 |
$installer->endSetup();
|
app/code/community/Dibspw/Sales/Block/Order/Info.php
CHANGED
|
@@ -31,121 +31,19 @@
|
|
| 31 |
* @package Mage_Sale
|
| 32 |
* @author Magento Core Team <core@magentocommerce.com>
|
| 33 |
*/
|
| 34 |
-
class Dibspw_Sales_Block_Order_Info extends Mage_Sales_Block_Order_Info
|
| 35 |
-
{
|
| 36 |
-
protected $_links = array();
|
| 37 |
|
| 38 |
-
|
| 39 |
-
parent::_construct();
|
| 40 |
-
$this->setTemplate('sales/order/info.phtml');
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
protected function PaymentPart($paymentstr) {
|
| 44 |
-
$PaymentPartStr = explode(',',$paymentstr,2);
|
| 45 |
-
return $PaymentPartStr[0];
|
| 46 |
-
}
|
| 47 |
-
|
| 48 |
-
protected function _prepareLayout() {
|
| 49 |
-
$headBlock = $this->getLayout()->getBlock('head');
|
| 50 |
-
if ($headBlock) {
|
| 51 |
-
$headBlock->setTitle($this->__('Order # %s', $this->getOrder()->getRealOrderId()));
|
| 52 |
-
}
|
| 53 |
-
$this->setChild(
|
| 54 |
-
'payment_info',
|
| 55 |
-
$this->helper('payment')->getInfoBlock($this->getOrder()->getPayment())
|
| 56 |
-
);
|
| 57 |
-
}
|
| 58 |
|
| 59 |
public function getPaymentInfoHtml() {
|
| 60 |
-
|
| 61 |
$res = $this->getChildHtml('payment_info');
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
" where orderid = " . $this->getOrder()->getIncrementId());
|
| 69 |
-
if (count($row) > 0) {
|
| 70 |
-
if ($row['status'] == 'ACCEPTED') {
|
| 71 |
-
$res .= "<table border='0' width='100%'>";
|
| 72 |
-
if ($row['transact'] != '0') {
|
| 73 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_8') . "</td>";
|
| 74 |
-
$res .= "<td>" . $row['transact'] . "</td></tr>";
|
| 75 |
-
}
|
| 76 |
-
if ($row['paytype'] != '0') {
|
| 77 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_12') . "</td>";
|
| 78 |
-
$res .= "<td>" . $this->printLogo($row['paytype']) . "</td></tr>";
|
| 79 |
-
}
|
| 80 |
-
if ($row['fee'] != '0') {
|
| 81 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_11') . "</td>";
|
| 82 |
-
$res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . " " .
|
| 83 |
-
number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
|
| 84 |
-
}
|
| 85 |
-
$res .= "</table><br>";
|
| 86 |
-
|
| 87 |
-
}
|
| 88 |
-
else {
|
| 89 |
-
$res .= "<br>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_19') . "<br>";
|
| 90 |
-
}
|
| 91 |
}
|
| 92 |
-
|
| 93 |
-
return $res;
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
public function printLogo($paytype) {
|
| 97 |
-
if(preg_match("/[a-z\(\)]+/is", $this->PaymentPart($paytype))) {
|
| 98 |
-
$res = '<img src="' . $this->getSkinUrl('images/Dibspw/Dibspw/' .
|
| 99 |
-
preg_replace("/\(\)_/s", "", strtolower($this->PaymentPart($paytype))) . '.gif') .
|
| 100 |
-
'" border="0" />';
|
| 101 |
-
}
|
| 102 |
-
else $res = '<img src="' . $this->getSkinUrl('images/Dibspw/Dibspw/dibs.gif') .
|
| 103 |
-
'" border="0" />';
|
| 104 |
|
| 105 |
return $res;
|
| 106 |
}
|
| 107 |
-
|
| 108 |
-
/**
|
| 109 |
-
* Retrieve current order model instance
|
| 110 |
-
*
|
| 111 |
-
* @return Mage_Sales_Model_Order
|
| 112 |
-
*/
|
| 113 |
-
public function getOrder() {
|
| 114 |
-
return Mage::registry('current_order');
|
| 115 |
-
}
|
| 116 |
-
|
| 117 |
-
public function addLink($name, $path, $label) {
|
| 118 |
-
$this->_links[$name] = new Varien_Object(array(
|
| 119 |
-
'name' => $name,
|
| 120 |
-
'label' => $label,
|
| 121 |
-
'url' => empty($path) ? '' : Mage::getUrl($path, array('order_id' => $this->getOrder()->getId()))
|
| 122 |
-
));
|
| 123 |
-
return $this;
|
| 124 |
-
}
|
| 125 |
-
|
| 126 |
-
public function getLinks() {
|
| 127 |
-
$this->checkLinks();
|
| 128 |
-
return $this->_links;
|
| 129 |
-
}
|
| 130 |
-
|
| 131 |
-
private function checkLinks() {
|
| 132 |
-
$order = $this->getOrder();
|
| 133 |
-
if (!$order->hasInvoices()) {
|
| 134 |
-
unset($this->_links['invoice']);
|
| 135 |
-
}
|
| 136 |
-
if (!$order->hasShipments()) {
|
| 137 |
-
unset($this->_links['shipment']);
|
| 138 |
-
}
|
| 139 |
-
if (!$order->hasCreditmemos()) {
|
| 140 |
-
unset($this->_links['creditmemo']);
|
| 141 |
-
}
|
| 142 |
-
}
|
| 143 |
-
|
| 144 |
-
public function getReorderUrl($order) {
|
| 145 |
-
return $this->getUrl('sales/order/reorder', array('order_id' => $order->getId()));
|
| 146 |
-
}
|
| 147 |
-
|
| 148 |
-
public function getPrintUrl($order) {
|
| 149 |
-
return $this->getUrl('sales/order/print', array('order_id' => $order->getId()));
|
| 150 |
-
}
|
| 151 |
}
|
| 31 |
* @package Mage_Sale
|
| 32 |
* @author Magento Core Team <core@magentocommerce.com>
|
| 33 |
*/
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
class Dibspw_Sales_Block_Order_Info extends Mage_Sales_Block_Order_Info {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
public function getPaymentInfoHtml() {
|
|
|
|
| 38 |
$res = $this->getChildHtml('payment_info');
|
| 39 |
+
$oOrder = $this->getOrder();
|
| 40 |
+
$oPaymentObj = $oOrder->getPayment()->getMethodInstance();
|
| 41 |
+
$sPaymentClass = get_class($oPaymentObj);
|
| 42 |
+
if($sPaymentClass !== FALSE && (strpos($sPaymentClass, "Dibsfw") !== FALSE ||
|
| 43 |
+
strpos($sPaymentClass, "Dibspw") !== FALSE)) {
|
| 44 |
+
$res .= $oPaymentObj->cms_dibs_getOrderInfo($oOrder);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
return $res;
|
| 48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
app/code/community/Dibspw/Sales/Block/Order/Print.php
CHANGED
|
@@ -34,78 +34,16 @@
|
|
| 34 |
|
| 35 |
class Dibspw_Sales_Block_Order_Print extends Mage_Sales_Block_Order_Print {
|
| 36 |
|
| 37 |
-
protected function _prepareLayout() {
|
| 38 |
-
$headBlock = $this->getLayout()->getBlock('head');
|
| 39 |
-
if ($headBlock) {
|
| 40 |
-
$headBlock->setTitle($this->__('Print Order # %s',
|
| 41 |
-
$this->getOrder()->getRealOrderId()));
|
| 42 |
-
}
|
| 43 |
-
|
| 44 |
-
$this->setChild(
|
| 45 |
-
'payment_info',
|
| 46 |
-
$this->helper('payment')->getInfoBlock($this->getOrder()->getPayment())
|
| 47 |
-
);
|
| 48 |
-
}
|
| 49 |
-
|
| 50 |
public function getPaymentInfoHtml() {
|
| 51 |
-
|
| 52 |
$res = $this->getChildHtml('payment_info');
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
" where orderid = " . $this->getOrder()->getIncrementId());
|
| 60 |
-
if (count($row) > 0){
|
| 61 |
-
if ($row['status'] == 'ACCEPTED') {
|
| 62 |
-
$res .= "<table border='0' width='100%'>";
|
| 63 |
-
if ($row['transact'] != '0') {
|
| 64 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_8') . "</td>";
|
| 65 |
-
$res .= "<td>" . $row['transact'] . "</td></tr>";
|
| 66 |
-
}
|
| 67 |
-
if ($row['paytype'] != '0') {
|
| 68 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_12') . "</td>";
|
| 69 |
-
$res .= "<td>" . $this->printLogo($row['paytype']) . "</td></tr>";
|
| 70 |
-
}
|
| 71 |
-
if ($row['fee'] != '0') {
|
| 72 |
-
$res .= "<tr><td>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_11') . "</td>";
|
| 73 |
-
$res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . " " .
|
| 74 |
-
number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
|
| 75 |
-
}
|
| 76 |
-
$res .= "</table><br>";
|
| 77 |
-
|
| 78 |
-
}
|
| 79 |
-
else {
|
| 80 |
-
$res .= "<br>" . Mage::helper('dibspw')->__('DIBSPW_LABEL_19') . "<br>";
|
| 81 |
-
}
|
| 82 |
}
|
| 83 |
-
|
| 84 |
return $res;
|
| 85 |
}
|
| 86 |
-
|
| 87 |
-
public function printLogo($paytype) {
|
| 88 |
-
if(preg_match("/[a-z\(\)]+/is", $paytype)) {
|
| 89 |
-
$res = '<img src="' . $this->getSkinUrl('images/Dibspw/Dibspw/' .
|
| 90 |
-
preg_replace("/\(\)_/s", "", strtolower($paytype)) . '.gif') .
|
| 91 |
-
'" border="0" />';
|
| 92 |
-
}
|
| 93 |
-
else $res = '<img src="' . $this->getSkinUrl('images/Dibspw/Dibspw/dibs.gif') .
|
| 94 |
-
'" border="0" />';
|
| 95 |
-
|
| 96 |
-
return $res;
|
| 97 |
-
}
|
| 98 |
-
|
| 99 |
-
public function getOrder()
|
| 100 |
-
{
|
| 101 |
-
return Mage::registry('current_order');
|
| 102 |
-
}
|
| 103 |
-
|
| 104 |
-
protected function _prepareItem(Mage_Core_Block_Abstract $renderer)
|
| 105 |
-
{
|
| 106 |
-
$renderer->setPrintStatus(true);
|
| 107 |
-
|
| 108 |
-
return parent::_prepareItem($renderer);
|
| 109 |
-
}
|
| 110 |
-
|
| 111 |
}
|
| 34 |
|
| 35 |
class Dibspw_Sales_Block_Order_Print extends Mage_Sales_Block_Order_Print {
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
public function getPaymentInfoHtml() {
|
|
|
|
| 38 |
$res = $this->getChildHtml('payment_info');
|
| 39 |
+
$oOrder = $this->getOrder();
|
| 40 |
+
$oPaymentObj = $oOrder->getPayment()->getMethodInstance();
|
| 41 |
+
$sPaymentClass = get_class($oPaymentObj);
|
| 42 |
+
if($sPaymentClass !== FALSE && (strpos($sPaymentClass, "Dibsfw") !== FALSE ||
|
| 43 |
+
strpos($sPaymentClass, "Dibspw") !== FALSE)) {
|
| 44 |
+
$res .= $oPaymentObj->cms_dibs_getOrderInfo($oOrder);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
}
|
| 46 |
+
|
| 47 |
return $res;
|
| 48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
app/design/frontend/base/default/template/Dibspw/Dibspw/redirect.phtml
DELETED
|
@@ -1,49 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
/**
|
| 4 |
-
* Dibs A/S
|
| 5 |
-
* Dibs Payment Extension
|
| 6 |
-
*
|
| 7 |
-
* NOTICE OF LICENSE
|
| 8 |
-
*
|
| 9 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 10 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 11 |
-
* It is also available through the world-wide-web at this URL:
|
| 12 |
-
* http://opensource.org/licenses/osl-3.0.php
|
| 13 |
-
* If you did not receive a copy of the license and are unable to
|
| 14 |
-
* obtain it through the world-wide-web, please send an email
|
| 15 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 16 |
-
*
|
| 17 |
-
* @category Payments & Gateways Extensions
|
| 18 |
-
* @package Dibspw_DibspwModule
|
| 19 |
-
* @author Dibs A/S
|
| 20 |
-
* @copyright Copyright (c) 2010 Dibs A/S. (http://www.dibs.dk/)
|
| 21 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 22 |
-
*/
|
| 23 |
-
?>
|
| 24 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| 25 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
| 26 |
-
<head>
|
| 27 |
-
<title>DIBS Payment</title>
|
| 28 |
-
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/>
|
| 29 |
-
</head>
|
| 30 |
-
<body>
|
| 31 |
-
<?
|
| 32 |
-
$oPaymate = Mage::getModel('dibspw/Dibspw');
|
| 33 |
-
$aDibsparmeter = $oPaymate->getCheckoutFormFields();
|
| 34 |
-
?>
|
| 35 |
-
<h2> You will be redirected to DIBS in a few seconds...</h2>
|
| 36 |
-
<form method="post" name="payment" id="payment" action ="<?
|
| 37 |
-
echo $oPaymate->api_dibs_get_formAction()
|
| 38 |
-
?>">
|
| 39 |
-
<? foreach ($aDibsparmeter as $field=>$value) {?>
|
| 40 |
-
<input type="hidden" name="<? echo $field ?>" value="<? echo $value ?>" />
|
| 41 |
-
<?}?>
|
| 42 |
-
</form>
|
| 43 |
-
|
| 44 |
-
<script type="text/javascript">
|
| 45 |
-
setTimeout("document.getElementById('payment').submit();", 1000);
|
| 46 |
-
</script>
|
| 47 |
-
|
| 48 |
-
</body>
|
| 49 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/dibspw/dibspw/failure.phtml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* Dibs A/S
|
| 5 |
+
* Dibs Payment Extension
|
| 6 |
+
*
|
| 7 |
+
* NOTICE OF LICENSE
|
| 8 |
+
*
|
| 9 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 10 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 11 |
+
* It is also available through the world-wide-web at this URL:
|
| 12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 13 |
+
* If you did not receive a copy of the license and are unable to
|
| 14 |
+
* obtain it through the world-wide-web, please send an email
|
| 15 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 16 |
+
*
|
| 17 |
+
* @category Payments & Gateways Extensions
|
| 18 |
+
* @package Dibspw_DibspwModule
|
| 19 |
+
* @author Dibs A/S
|
| 20 |
+
* @copyright Copyright (c) 2010 Dibs A/S. (http://www.dibs.dk/)
|
| 21 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 22 |
+
*/
|
| 23 |
+
|
| 24 |
+
echo "<h2>" . $this->__('DIBSPW_LABEL_23') . "</h2>";
|
| 25 |
+
?>
|
app/design/frontend/{default/default/template/Dibspw/Dibspw → base/default/template/dibspw/dibspw}/form.phtml
RENAMED
|
@@ -29,19 +29,26 @@ $sHTML = '<fieldset class="form-list">
|
|
| 29 |
$logoArray = explode(',', $paymate->getConfigData('dibspwlogos'));
|
| 30 |
$sTrusted = '';
|
| 31 |
$sCards = '';
|
|
|
|
|
|
|
| 32 |
foreach($logoArray as $item) {
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
| 35 |
}
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
$sCards .=
|
|
|
|
| 39 |
}
|
| 40 |
}
|
| 41 |
|
| 42 |
-
if($
|
| 43 |
-
$sHTML .= $
|
| 44 |
-
|
| 45 |
-
$sHTML .= $sCards;
|
| 46 |
$sHTML .= '</li></ul></fieldset>';
|
|
|
|
|
|
|
| 47 |
?>
|
| 29 |
$logoArray = explode(',', $paymate->getConfigData('dibspwlogos'));
|
| 30 |
$sTrusted = '';
|
| 31 |
$sCards = '';
|
| 32 |
+
$iCards = 1;
|
| 33 |
+
$iTrusted = 1;
|
| 34 |
foreach($logoArray as $item) {
|
| 35 |
+
$mSecured = (boolean)preg_match("/^(DIBS|PCI|.*_SECURE.*)$/s", $item);
|
| 36 |
+
if($mSecured === TRUE){
|
| 37 |
+
$sTrusted .= $paymate->cms_get_imgHtml($item) . " ";
|
| 38 |
+
if($iTrusted%12 == 0) $sTrusted .= "<br />";
|
| 39 |
+
$iTrusted++;
|
| 40 |
}
|
| 41 |
+
else {
|
| 42 |
+
$sCards .= $paymate->cms_get_imgHtml($item) . " ";
|
| 43 |
+
if($iCards%12 == 0) $sCards .= "<br />";
|
| 44 |
+
$iCards++;
|
| 45 |
}
|
| 46 |
}
|
| 47 |
|
| 48 |
+
if(!empty($sTrusted)) $sHTML .= '<br /><br />' . $sTrusted;
|
| 49 |
+
if(!empty($sCards)) $sHTML .= '<br /><br />' . $this->__('DIBSPW_LABEL_2') . '<br />' . $sCards;
|
| 50 |
+
|
|
|
|
| 51 |
$sHTML .= '</li></ul></fieldset>';
|
| 52 |
+
|
| 53 |
+
echo $sHTML;
|
| 54 |
?>
|
app/design/frontend/base/default/template/dibspw/dibspw/redirect.phtml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* Dibs A/S
|
| 5 |
+
* Dibs Payment Extension
|
| 6 |
+
*
|
| 7 |
+
* NOTICE OF LICENSE
|
| 8 |
+
*
|
| 9 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
| 10 |
+
* that is bundled with this package in the file LICENSE.txt.
|
| 11 |
+
* It is also available through the world-wide-web at this URL:
|
| 12 |
+
* http://opensource.org/licenses/osl-3.0.php
|
| 13 |
+
* If you did not receive a copy of the license and are unable to
|
| 14 |
+
* obtain it through the world-wide-web, please send an email
|
| 15 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 16 |
+
*
|
| 17 |
+
* @category Payments & Gateways Extensions
|
| 18 |
+
* @package Dibspw_DibspwModule
|
| 19 |
+
* @author Dibs A/S
|
| 20 |
+
* @copyright Copyright (c) 2010 Dibs A/S. (http://www.dibs.dk/)
|
| 21 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 22 |
+
*/
|
| 23 |
+
|
| 24 |
+
$oPaymate = Mage::getModel('dibspw/Dibspw');
|
| 25 |
+
$aDibsparmeter = $oPaymate->getCheckoutFormFields();
|
| 26 |
+
?>
|
| 27 |
+
<h2><?php echo $this->__('DIBSPW_LABEL_24') ?></h2>
|
| 28 |
+
<form method="post" id="dibspw-payment" action ="<?php echo $oPaymate->api_dibs_get_formAction() ?>">
|
| 29 |
+
<div>
|
| 30 |
+
<?php foreach($aDibsparmeter as $sField => $sVal) {?>
|
| 31 |
+
<input type="hidden" name="<?php echo $sField ?>" value="<?php echo $sVal ?>" />
|
| 32 |
+
<?php } ?>
|
| 33 |
+
</div>
|
| 34 |
+
</form>
|
| 35 |
+
|
| 36 |
+
<script type="text/javascript">
|
| 37 |
+
setTimeout("document.getElementById('dibspw-payment').submit();", 1000);
|
| 38 |
+
</script>
|
app/locale/da_DK/Mage_Dibspw.csv
CHANGED
|
@@ -20,6 +20,8 @@
|
|
| 20 |
"DIBSPW_LABEL_20","Kortholder har annulleret betalingsforløbet"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' modtaget fra DIBS Payment Services (www.dibs.dk)"
|
| 22 |
"DIBSPW_LABEL_22","Kortholder returneret til butikken fra DIBS Payment Services (www.dibs.dk)"
|
|
|
|
|
|
|
| 23 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 24 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 25 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
| 20 |
"DIBSPW_LABEL_20","Kortholder har annulleret betalingsforløbet"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' modtaget fra DIBS Payment Services (www.dibs.dk)"
|
| 22 |
"DIBSPW_LABEL_22","Kortholder returneret til butikken fra DIBS Payment Services (www.dibs.dk)"
|
| 23 |
+
"DIBSPW_LABEL_23","Empty or expired order data. Please try to checkout again."
|
| 24 |
+
"DIBSPW_LABEL_24","You will be redirected to DIBS in a few seconds..."
|
| 25 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 26 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 27 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
app/locale/en_US/Mage_Dibspw.csv
CHANGED
|
@@ -20,6 +20,8 @@
|
|
| 20 |
"DIBSPW_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' received from DIBS Payment Services (www.dibspayment.com)"
|
| 22 |
"DIBSPW_LABEL_22","Customer successfully returned back to store from DIBS Payment Services (www.dibspayment.com)"
|
|
|
|
|
|
|
| 23 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 24 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 25 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
| 20 |
"DIBSPW_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' received from DIBS Payment Services (www.dibspayment.com)"
|
| 22 |
"DIBSPW_LABEL_22","Customer successfully returned back to store from DIBS Payment Services (www.dibspayment.com)"
|
| 23 |
+
"DIBSPW_LABEL_23","Empty or expired order data. Please try to checkout again."
|
| 24 |
+
"DIBSPW_LABEL_24","You will be redirected to DIBS in a few seconds..."
|
| 25 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 26 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 27 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
app/locale/nb_NO/Mage_Dibspw.csv
CHANGED
|
@@ -20,6 +20,8 @@
|
|
| 20 |
"DIBSPW_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
|
| 22 |
"DIBSPW_LABEL_22","Kunden har returnert vellykket tilbake til butikk fra DIBS Payment Services (www.dibs.no)"
|
|
|
|
|
|
|
| 23 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 24 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 25 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
| 20 |
"DIBSPW_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
|
| 22 |
"DIBSPW_LABEL_22","Kunden har returnert vellykket tilbake til butikk fra DIBS Payment Services (www.dibs.no)"
|
| 23 |
+
"DIBSPW_LABEL_23","Empty or expired order data. Please try to checkout again."
|
| 24 |
+
"DIBSPW_LABEL_24","You will be redirected to DIBS in a few seconds..."
|
| 25 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 26 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 27 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
app/locale/nn_NO/Mage_Dibspw.csv
CHANGED
|
@@ -20,6 +20,8 @@
|
|
| 20 |
"DIBSPW_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
|
| 22 |
"DIBSPW_LABEL_22","Kunden har returnert vellykket tilbake til butikk fra DIBS Payment Services (www.dibs.no)"
|
|
|
|
|
|
|
| 23 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 24 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 25 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
| 20 |
"DIBSPW_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
|
| 22 |
"DIBSPW_LABEL_22","Kunden har returnert vellykket tilbake til butikk fra DIBS Payment Services (www.dibs.no)"
|
| 23 |
+
"DIBSPW_LABEL_23","Empty or expired order data. Please try to checkout again."
|
| 24 |
+
"DIBSPW_LABEL_24","You will be redirected to DIBS in a few seconds..."
|
| 25 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 26 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 27 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
app/locale/sv_SE/Mage_Dibspw.csv
CHANGED
|
@@ -20,6 +20,8 @@
|
|
| 20 |
"DIBSPW_LABEL_20","Kunden har avbrutit betalningsprocessen - DIBS Payment Services (www.dibs.se)"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' mottagen från DIBS Payment Services (www.dibs.se)"
|
| 22 |
"DIBSPW_LABEL_22","Kunden har kommit tillbaka till butiken från DIBS Payment Services (www.dibs.se)"
|
|
|
|
|
|
|
| 23 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 24 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 25 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
| 20 |
"DIBSPW_LABEL_20","Kunden har avbrutit betalningsprocessen - DIBS Payment Services (www.dibs.se)"
|
| 21 |
"DIBSPW_LABEL_21","'Callback' mottagen från DIBS Payment Services (www.dibs.se)"
|
| 22 |
"DIBSPW_LABEL_22","Kunden har kommit tillbaka till butiken från DIBS Payment Services (www.dibs.se)"
|
| 23 |
+
"DIBSPW_LABEL_23","Empty or expired order data. Please try to checkout again."
|
| 24 |
+
"DIBSPW_LABEL_24","You will be redirected to DIBS in a few seconds..."
|
| 25 |
"dibspw_txt_err_fatal", "A fatal error has occured."
|
| 26 |
"dibspw_txt_msg_toshop", "Return to shop"
|
| 27 |
"dibspw_txt_err_11", "Unknown orderid was returned from DIBS payment gateway."
|
package.xml
CHANGED
|
@@ -1,12 +1,13 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Dibspw</name>
|
| 4 |
-
<version>4.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
-
<summary>Accept all types of payments from DIBS - Secure Internet Payment Service Provider
|
|
|
|
| 10 |
<description>This is the payment gateway module for the DIBS payment gateway - http://www.dibspayment.com
|
| 11 |

|
| 12 |
DIBS Payment Services is the leading Scandinavian Internet service provider.
|
|
@@ -32,12 +33,24 @@ Card types accepted by the DIBS payment gateway:
|
|
| 32 |
- Nordea e-betaling
|
| 33 |

|
| 34 |
A complete list can be found at http://www.dibspayment.com/</description>
|
| 35 |
-
<notes>4.1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
- New module for DIBS Payment Window and Mobile Payment Window integration methods.</notes>
|
| 37 |
-
<authors><author><name>DIBS A/S</name><user>
|
| 38 |
-
<date>2012-
|
| 39 |
-
<time>
|
| 40 |
-
<contents><target name="magecommunity"><dir name="Dibspw"><dir name="Adminhtml"><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Info.php" hash="
|
| 41 |
<compatible/>
|
| 42 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 43 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Dibspw</name>
|
| 4 |
+
<version>4.1.1</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
+
<summary>Accept all types of payments from DIBS - Secure Internet Payment Service Provider.
|
| 10 |
+
DIBS Payment Window and Mobile Payment Window integration.</summary>
|
| 11 |
<description>This is the payment gateway module for the DIBS payment gateway - http://www.dibspayment.com
|
| 12 |

|
| 13 |
DIBS Payment Services is the leading Scandinavian Internet service provider.
|
| 33 |
- Nordea e-betaling
|
| 34 |

|
| 35 |
A complete list can be found at http://www.dibspayment.com/</description>
|
| 36 |
+
<notes>4.1.1
|
| 37 |
+
- Fixed error on redirect with expired session
|
| 38 |
+
- Improved compatibility with DIBS FlexWin Magento extension
|
| 39 |
+
- Fixed order statuses bug
|
| 40 |
+
- Fixed account parameter bugs
|
| 41 |
+
- Fixed layout
|
| 42 |
+
- Fixed crash on dibspw_results table remove
|
| 43 |
+
- Fixed logo appearance bugs
|
| 44 |
+
- Fixed bug with message appearance in inappropriate places
|
| 45 |
+
- Added Sort Order option
|
| 46 |
+
- A lot of other fixes and improvements
|
| 47 |
+

|
| 48 |
+
4.1.0
|
| 49 |
- New module for DIBS Payment Window and Mobile Payment Window integration methods.</notes>
|
| 50 |
+
<authors><author><name>DIBS A/S</name><user>niso</user><email>info@dibs.dk</email></author><author><name>DIBS A/S</name><user>dibs</user><email>vlya@dibs.dk</email></author></authors>
|
| 51 |
+
<date>2012-04-24</date>
|
| 52 |
+
<time>11:42:54</time>
|
| 53 |
+
<contents><target name="magecommunity"><dir name="Dibspw"><dir name="Adminhtml"><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Info.php" hash="22bec7d1777605cc423407471916f0eb"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="594dbf5043a234d9a78013e8b810b5e4"/></dir></dir><dir name="Dibspw"><dir name="Block"><file name="Failure.php" hash="17e6a66c34637fac033d3e04c9e6a45e"/><file name="Form.php" hash="ac2155fe9ed943a258118dfb127ea30f"/><file name="Redirect.php" hash="b67600699025f99eaadb6cc7f27b42b1"/></dir><dir name="Helper"><file name="Data.php" hash="3ac20dd79b0d2e0cc1609f6b65d330c5"/></dir><dir name="Model"><file name="Dibspw.php" hash="5a14f9b555a35a86e34d0a2b3fa544e6"/><dir name="Mysql4"><file name="Setup.php" hash="1c135886bc8a0794310ec7cb70e04e64"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Dibslogos.php" hash="11144f7fbfd82c6e4f54cc2e0d204525"/><file name="Dibspaytypes.php" hash="09b971321fc63ef845236f8087dc45c6"/><file name="Dibsyesno.php" hash="5f576ff3909cec6d880409c40b86f91a"/><file name="Lang.php" hash="1ea6118edd5624bc1f750a178ccb44ea"/><file name="Orderstatusafter.php" hash="4be3d3a1b7990b4f9f5f65e933266ce4"/><file name="Orderstatusbefore.php" hash="79ba55f79c39736971ea7650c959b3d6"/><file name="PBBdistribution.php" hash="9d4d91386c1d4f848a2357666af473f1"/><file name="Paymentwindow.php" hash="6568402efdbef3d2820353730d876f3e"/></dir></dir></dir><dir name="dibs_api"><dir name="pw"><file name="dibs_pw_api.php" hash="276b73c6df9fea8cc3913799acfc329c"/><file name="dibs_pw_helpers.php" hash="e3324beecab4c8af8b3835f7ae413185"/><file name="dibs_pw_helpers_cms.php" hash="84b9a3be13845f80715475f9505d9044"/><file name="dibs_pw_helpers_interface.php" hash="17a79ee1e27fdd1c6590c07133ba8c04"/></dir></dir></dir><dir name="controllers"><file name="DibspwController.php" hash="635f0688d0f9c1fea2658d289a170f29"/></dir><dir name="etc"><file name="config.xml" hash="6492c01a95913e32acf14964f216e33a"/><file name="system.xml" hash="f4d105f73d41de936496115024b0f6cf"/></dir><dir name="sql"><dir name="dibspw_setup"><file name="mysql4-install-4.1.1.php" hash="0bbcb740b5a1d9d23a5293490224bf70"/><file name="mysql4-upgrade-4.1.0-4.1.1.php" hash="0bbcb740b5a1d9d23a5293490224bf70"/></dir></dir></dir><dir name="Sales"><dir name="Block"><dir name="Order"><file name="Info.php" hash="5d72806c0cdebc487ae770ed24d97113"/><file name="Print.php" hash="7e49bf2f625fc04254c0a9afbcef906e"/></dir></dir><dir name="etc"><file name="config.xml" hash="bc9fda3461591b51b4d9e1daacc7324f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Dibspw_Dibspw.xml" hash="7c82595e6638c292f71a0ad5be4ecaf0"/><file name="Dibspw_Sales.xml" hash="8b5f3d89fb38cc873dd0f5d95267059c"/><file name="Dibspw_Adminhtml.xml" hash="615925971da5c5c48e755c330205d709"/></dir></target><target name="magelocale"><dir name="da_DK"><file name="Mage_Dibspw.csv" hash="17ebd5341700138ea3083b3c4ddd8c3c"/></dir><dir name="en_US"><file name="Mage_Dibspw.csv" hash="87ff9cf9325ad9b593fd8403efa31e03"/></dir><dir name="nb_NO"><file name="Mage_Dibspw.csv" hash="7b4f9d8cc755bd350bb254898142c318"/></dir><dir name="nn_NO"><file name="Mage_Dibspw.csv" hash="7b4f9d8cc755bd350bb254898142c318"/></dir><dir name="sv_SE"><file name="Mage_Dibspw.csv" hash="b7afba709f90fb3e3bf5a7455b2068a3"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="dibspw"><dir name="dibspw"><file name="failure.phtml" hash="f5a7ed44946651f7ad4b1beeca7499be"/><file name="form.phtml" hash="12136fc3a935e00ec77dc7658b7c9288"/><file name="redirect.phtml" hash="b85fe4f98a059d3048738678299281c6"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="images"><dir name="Dibspw"><dir name="Dibspw"><file name="aktia.gif" hash="7afe00b19b4194fa4ffbdf20cdd469c1"/><file name="amex.gif" hash="f35f89ccdcb954e02a07f6c0a29c7b43"/><file name="bax.gif" hash="c315574fd839dae52a1316b6d8b836b6"/><file name="dibs.gif" hash="8b308757472fc5aaaedfefd5c79a2d54"/><file name="din.gif" hash="fabce04659a94993a230285b9a4651e9"/><file name="dk.gif" hash="daa5d5d2c0d541579b0e13aa3cd9d65b"/><file name="dnb.gif" hash="1f616c382b72248334f6aa1ca910003b"/><file name="edk.gif" hash="4485910a0fb40512233c1a59ddd31015"/><file name="elec.gif" hash="e5371ba0da9bb14990d1b8163cedd066"/><file name="elv.gif" hash="3bd20355343bd250a6a704fdbaf9ba62"/><file name="ew.gif" hash="b50385f7d878be6a3834310d1fbc3a1d"/><file name="ffk.gif" hash="d9cd7fa26230a850114b2dc99aea3b22"/><file name="fsb.gif" hash="d6da3e67f8096811c2ad0135b2aad80a"/><file name="git.gif" hash="b70e244f36e7aec94fe3f6373e1ae8d7"/><file name="ing.gif" hash="40f07b266bcd5953bb6c079f7eeaae67"/><file name="jcb.gif" hash="aea8c54e043a75b26887fa1307ad4312"/><file name="jcbsecure.gif" hash="1c687214f79b73d7e99f5011c9c22bce"/><file name="loading.gif" hash="7e99e1159a3686f6aa4f90043c554483"/><file name="mc.gif" hash="2680e078159e5aedb561c3a705801a44"/><file name="mcsecure.gif" hash="730735c1e2d36d9fa3bd6468fa0b1a7d"/><file name="moca.gif" hash="befd2f10976c0ab40333f01fc6db4743"/><file name="mtro.gif" hash="d5df5f7986a21bf5a78b9c7a3656facd"/><file name="oko.gif" hash="1cde3c12036ebd74a643aee2ffb0513a"/><file name="pbb.gif" hash="fff306c0ea2e7568eef562ec3dc6edd8"/><file name="pbbtest.gif" hash="fff306c0ea2e7568eef562ec3dc6edd8"/><file name="pci.gif" hash="b55a87df550ea6789c17e389604e28e1"/><file name="seb.gif" hash="502b1dbeb81bce51abd1ea149d4dde14"/><file name="shb.gif" hash="0aa7c7fab4133ff4843c0ae73cabe9de"/><file name="solo.gif" hash="17b9be1a06125dcc7d1a6be8fea38dd6"/><file name="val.gif" hash="e62b75eb172934e118a70366baac51ee"/><file name="visa.gif" hash="b61251f8c428aa5dca017c9f374957ef"/><file name="visasecure.gif" hash="517118742fce249485c8eaf6df174764"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="Dibspw"><dir name="Dibspw"><file name="aktia.gif" hash="7afe00b19b4194fa4ffbdf20cdd469c1"/><file name="amex.gif" hash="f35f89ccdcb954e02a07f6c0a29c7b43"/><file name="bax.gif" hash="c315574fd839dae52a1316b6d8b836b6"/><file name="dibs.gif" hash="8b308757472fc5aaaedfefd5c79a2d54"/><file name="din.gif" hash="fabce04659a94993a230285b9a4651e9"/><file name="dk.gif" hash="daa5d5d2c0d541579b0e13aa3cd9d65b"/><file name="dnb.gif" hash="1f616c382b72248334f6aa1ca910003b"/><file name="edk.gif" hash="4485910a0fb40512233c1a59ddd31015"/><file name="elec.gif" hash="e5371ba0da9bb14990d1b8163cedd066"/><file name="elv.gif" hash="3bd20355343bd250a6a704fdbaf9ba62"/><file name="ew.gif" hash="b50385f7d878be6a3834310d1fbc3a1d"/><file name="ffk.gif" hash="d9cd7fa26230a850114b2dc99aea3b22"/><file name="fsb.gif" hash="d6da3e67f8096811c2ad0135b2aad80a"/><file name="git.gif" hash="b70e244f36e7aec94fe3f6373e1ae8d7"/><file name="ing.gif" hash="40f07b266bcd5953bb6c079f7eeaae67"/><file name="jcb.gif" hash="aea8c54e043a75b26887fa1307ad4312"/><file name="jcbsecure.gif" hash="1c687214f79b73d7e99f5011c9c22bce"/><file name="loading.gif" hash="7e99e1159a3686f6aa4f90043c554483"/><file name="mc.gif" hash="2680e078159e5aedb561c3a705801a44"/><file name="mcsecure.gif" hash="730735c1e2d36d9fa3bd6468fa0b1a7d"/><file name="moca.gif" hash="befd2f10976c0ab40333f01fc6db4743"/><file name="mtro.gif" hash="d5df5f7986a21bf5a78b9c7a3656facd"/><file name="oko.gif" hash="1cde3c12036ebd74a643aee2ffb0513a"/><file name="pbb.gif" hash="fff306c0ea2e7568eef562ec3dc6edd8"/><file name="pbbtest.gif" hash="fff306c0ea2e7568eef562ec3dc6edd8"/><file name="pci.gif" hash="b55a87df550ea6789c17e389604e28e1"/><file name="seb.gif" hash="502b1dbeb81bce51abd1ea149d4dde14"/><file name="shb.gif" hash="0aa7c7fab4133ff4843c0ae73cabe9de"/><file name="solo.gif" hash="17b9be1a06125dcc7d1a6be8fea38dd6"/><file name="val.gif" hash="e62b75eb172934e118a70366baac51ee"/><file name="visa.gif" hash="b61251f8c428aa5dca017c9f374957ef"/><file name="visasecure.gif" hash="517118742fce249485c8eaf6df174764"/></dir></dir></dir></dir></dir></dir></target></contents>
|
| 54 |
<compatible/>
|
| 55 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 56 |
</package>
|
