Version Notes
3.0.1
- Fixed a lot of bugs in calculations for invoice paytype.
- Fixed bugs with spical unicode symbols. E.g.: specific letters in Scandinavian alphabets.
- Magento 1.6 compatibility.
3.0.0
- Separate modules for new and old integration method (FlexWin and Payment Windows).
- New module code logic.
- Total code refactoring.
- Old Payment Window pay type removed.
- Vouchers support added.
- CGI API support added.
- Now module use mysql table prefix if it used by Magento installation.
- Fixed bug with module installation crash because of prefix in names of Magento mysql tables.
- Fixed bug with empty list of modules in Magento Connect Manager.
- Fixed inner versions mishmash in module.
Download this release
Release Info
Developer | DIBS AS |
Extension | dibsftest |
Version | 3.0.1 |
Comparing to | |
See all releases |
Version 3.0.1
- app/code/community/DibsFlex/Adminhtml/Block/Sales/Order/View/Tab/Info.php +154 -0
- app/code/community/DibsFlex/Adminhtml/etc/config.xml +34 -0
- app/code/community/DibsFlex/DibsFlex/Block/Failure.php +34 -0
- app/code/community/DibsFlex/DibsFlex/Block/Form.php +38 -0
- app/code/community/DibsFlex/DibsFlex/Block/Redirect.php +39 -0
- app/code/community/DibsFlex/DibsFlex/Helper/Data.php +35 -0
- app/code/community/DibsFlex/DibsFlex/Model/DibsFlex.php +140 -0
- app/code/community/DibsFlex/DibsFlex/Model/Mysql4/Setup.php +37 -0
- app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Color.php +37 -0
- app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Decorator.php +37 -0
- app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Dibslogos.php +62 -0
- app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Dibspaytypes.php +58 -0
- app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Dibsyesno.php +34 -0
- app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Lang.php +44 -0
- app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Orderstatusafter.php +56 -0
- app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Orderstatusbefore.php +57 -0
- app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/PBBdistribution.php +32 -0
- app/code/community/DibsFlex/DibsFlex/Model/dibsflex_api/dibsflex_api.php +1014 -0
- app/code/community/DibsFlex/DibsFlex/Model/dibsflex_api/dibsflex_helpers.php +176 -0
- app/code/community/DibsFlex/DibsFlex/Model/dibsflex_api/dibsflex_helpers_cms.php +73 -0
- app/code/community/DibsFlex/DibsFlex/controllers/DibsFlexController.php +171 -0
- app/code/community/DibsFlex/DibsFlex/etc/config.xml +140 -0
- app/code/community/DibsFlex/DibsFlex/etc/system.xml +249 -0
- app/code/community/DibsFlex/DibsFlex/sql/dibsflex_setup/mysql4-install-3.0.1.php +74 -0
- app/code/community/DibsFlex/DibsFlex/sql/dibsflex_setup/mysql4-upgrade-3.0.0-3.0.1.php +72 -0
- app/code/community/DibsFlex/Sales/Block/Order/Info.php +149 -0
- app/code/community/DibsFlex/Sales/Block/Order/Print.php +109 -0
- app/code/community/DibsFlex/Sales/etc/config.xml +35 -0
- app/design/frontend/base/default/template/DibsFlex/DibsFlex/redirect.phtml +54 -0
- app/design/frontend/default/default/template/DibsFlex/DibsFlex/form.phtml +54 -0
- app/etc/modules/DibsFlex_Adminhtml.xml +32 -0
- app/etc/modules/DibsFlex_DibsFlex.xml +32 -0
- app/etc/modules/DibsFlex_Sales.xml +32 -0
- app/locale/da_DK/Mage_DibsFlex.csv +22 -0
- app/locale/en_US/Mage_DibsFlex.csv +22 -0
- app/locale/nb_NO/Mage_DibsFlex.csv +22 -0
- app/locale/nn_NO/Mage_DibsFlex.csv +22 -0
- app/locale/sv_SE/Mage_DibsFlex.csv +22 -0
- package.xml +57 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/aktia.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/amex.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/bax.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/dibs.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/din.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/dk.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/dnb.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/edk.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/elec.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/elv.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/ew.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/ffk.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/fsb.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/git.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/ing.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/jcb.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/jcbsecure.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/loading.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/mc.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/mcsecure.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/moca.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/mtro.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/oko.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/pbb.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/pbbtest.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/pci.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/seb.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/shb.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/solo.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/val.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/visa.gif +0 -0
- skin/adminhtml/base/default/images/DibsFlex/DibsFlex/visasecure.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/aktia.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/amex.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/bax.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/dibs.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/din.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/dk.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/dnb.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/edk.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/elec.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/elv.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/ew.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/ffk.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/fsb.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/git.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/ing.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/jcb.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/jcbsecure.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/loading.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/mc.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/mcsecure.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/moca.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/mtro.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/oko.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/pbb.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/pbbtest.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/pci.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/seb.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/shb.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/solo.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/val.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/visa.gif +0 -0
- skin/frontend/base/default/images/DibsFlex/DibsFlex/visasecure.gif +0 -0
app/code/community/DibsFlex/Adminhtml/Block/Sales/Order/View/Tab/Info.php
ADDED
@@ -0,0 +1,154 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Order information tab
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
|
35 |
+
class DibsFlex_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 |
+
|
48 |
+
$oPaymentObj = $oOrder->getPayment()->getMethodInstance();
|
49 |
+
$sPaymentClass = get_class($oPaymentObj);
|
50 |
+
if(strpos($sPaymentClass, "DibsFlex") !== FALSE) {
|
51 |
+
$oOrderInfo = $oPaymentObj->dibsflex_helper_getOrderObj($oOrder);
|
52 |
+
$sButtons = $oPaymentObj->dibsflex_api_cgibuttons($oOrderInfo->order_id);
|
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 * from ".$sTablePrefix."dibs_orderdata where orderid = " . $this->getOrder()->getIncrementId());
|
59 |
+
|
60 |
+
if (count($row) > 0) {
|
61 |
+
if ($row['status'] == '1') {
|
62 |
+
// Payment has been made to this order
|
63 |
+
$res .= "<br><br>" . "<table border='0' width='100%'>";
|
64 |
+
$res .= "<tr><td colspan='2'><b>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_7') . "</b></td></tr>";
|
65 |
+
|
66 |
+
if ($row['transact'] != '0') {
|
67 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_8') . "</td>";
|
68 |
+
$res .= "<td>" . $row['transact'] . "</td></tr>";
|
69 |
+
}
|
70 |
+
|
71 |
+
if ($row['amount'] != '0') {
|
72 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_9') . "</td>";
|
73 |
+
$res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . " " . number_format(((int)$row['amount']) / 100, 2, ',', ' ') . "</td></tr>";
|
74 |
+
}
|
75 |
+
|
76 |
+
if ($row['currency'] != '0') {
|
77 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_10') . "</td>";
|
78 |
+
$res .= "<td>" . $row['currency'] . "</td></tr>";
|
79 |
+
}
|
80 |
+
|
81 |
+
if ($row['fee'] != '0') {
|
82 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_11') . "</td>";
|
83 |
+
$res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . " " . number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
|
84 |
+
}
|
85 |
+
|
86 |
+
if ($row['paytype'] != '0') {
|
87 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_12') . "</td>";
|
88 |
+
$res .= "<td>" . $this->printLogo($row['paytype']) . "</td></tr>";
|
89 |
+
}
|
90 |
+
|
91 |
+
if ($row['cardnomask'] != '0' && $row['cardprefix'] == '0') {
|
92 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_13') . "</td>";
|
93 |
+
$res .= "<td>............" . trim($row['cardnomask'],'X') . "</td></tr>";
|
94 |
+
}
|
95 |
+
|
96 |
+
if ($row['cardprefix'] != '0' && $row['cardnomask'] == '0') {
|
97 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_13') . "</td>";
|
98 |
+
$res .= "<td>" . $row['cardprefix'] . "..........</td></tr>";
|
99 |
+
}
|
100 |
+
|
101 |
+
if ($row['cardprefix'] != '0' && $row['cardnomask'] != '0') {
|
102 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_13') . "</td>";
|
103 |
+
if(substr($row['cardnomask'], 0, 6) === $row['cardprefix']) {
|
104 |
+
$res .= "<td>" . str_replace("X", ".", $row['cardnomask']) . "</td></tr>";
|
105 |
+
}
|
106 |
+
else $res .= "<td>" . $row['cardprefix'] . '......' . trim($row['cardnomask'],'X') . "</td></tr>";
|
107 |
+
}
|
108 |
+
|
109 |
+
if ($row['cardexpdate'] != '0') {
|
110 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_14') . "</td>";
|
111 |
+
$res .= "<td>" . substr($row['cardexpdate'],2,2) . " / " . substr($row['cardexpdate'],0,2) . "</td></tr>";
|
112 |
+
}
|
113 |
+
|
114 |
+
if ($row['cardcountry'] != '0') {
|
115 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_15') . "</td>";
|
116 |
+
$res .= "<td>" . $row['cardcountry'] . "</td></tr>";
|
117 |
+
}
|
118 |
+
|
119 |
+
if ($row['acquirer'] != '0') {
|
120 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_16') . "</td>";
|
121 |
+
$res .= "<td>" . $row['acquirer'] . "</td></tr>";
|
122 |
+
}
|
123 |
+
|
124 |
+
if ($row['enrolled'] != '0') {
|
125 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_17') . "</td>";
|
126 |
+
$res .= "<td>" . $row['enrolled'] . "</td></tr>";
|
127 |
+
}
|
128 |
+
|
129 |
+
$res .= '<tr><td colspan="2">' . $sButtons . '</td></tr>';
|
130 |
+
|
131 |
+
$res .= "</table><br>";
|
132 |
+
$res .= "<a href='https://payment.architrade.com/admin/' target='_blank'>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_18') . "</a>";
|
133 |
+
$res .= "<br><br>";
|
134 |
+
}
|
135 |
+
else {
|
136 |
+
$res .= "<br>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_19') . "<br>";
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
return $res;
|
141 |
+
}
|
142 |
+
|
143 |
+
public function printLogo($paytype) {
|
144 |
+
if(preg_match("/[a-z\(\)]+/is", $this->PaymentPart($paytype))) {
|
145 |
+
$res = '<img src="' . $this->getSkinUrl('images/DibsFlex/DibsFlex/' .
|
146 |
+
preg_replace("/\(\)_/s", "", strtolower($this->PaymentPart($paytype))) . '.gif') .
|
147 |
+
'" border="0" />';
|
148 |
+
}
|
149 |
+
else $res = '<img src="' . $this->getSkinUrl('images/DibsFlex/DibsFlex/dibs.gif') .
|
150 |
+
'" border="0" />';
|
151 |
+
|
152 |
+
return $res;
|
153 |
+
}
|
154 |
+
}
|
app/code/community/DibsFlex/Adminhtml/etc/config.xml
ADDED
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
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 DibsFlex_DibsFlex
|
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 |
+
<config>
|
25 |
+
<global>
|
26 |
+
<blocks>
|
27 |
+
<adminhtml>
|
28 |
+
<rewrite>
|
29 |
+
<sales_order_view_tab_info>DibsFlex_Adminhtml_Block_Sales_Order_View_Tab_Info</sales_order_view_tab_info>
|
30 |
+
</rewrite>
|
31 |
+
</adminhtml>
|
32 |
+
</blocks>
|
33 |
+
</global>
|
34 |
+
</config>
|
app/code/community/DibsFlex/DibsFlex/Block/Failure.php
ADDED
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
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 |
+
/**
|
29 |
+
* Payment Block
|
30 |
+
**/
|
31 |
+
|
32 |
+
class DibsFlex_DibsFlex_Block_Failure extends Mage_Core_Block_Template {
|
33 |
+
|
34 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Block/Form.php
ADDED
@@ -0,0 +1,38 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
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 Dibs A/S, (c) 2010.
|
26 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
27 |
+
*/
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Payment Block
|
31 |
+
**/
|
32 |
+
|
33 |
+
class DibsFlex_DibsFlex_Block_Form extends Mage_Payment_Block_Form {
|
34 |
+
protected function _construct() {
|
35 |
+
$this->setTemplate('DibsFlex/DibsFlex/form.phtml');
|
36 |
+
parent::_construct();
|
37 |
+
}
|
38 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Block/Redirect.php
ADDED
@@ -0,0 +1,39 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
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 Dibs A/S, (c) 2010.
|
26 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
27 |
+
*/
|
28 |
+
|
29 |
+
class DibsFlex_DibsFlex_Block_Redirect extends Mage_Core_Block_Template {
|
30 |
+
/**
|
31 |
+
* Constructor. Set template.
|
32 |
+
*/
|
33 |
+
|
34 |
+
protected function _construct() {
|
35 |
+
parent::_construct();
|
36 |
+
$this->setTemplate('DibsFlex/DibsFlex/redirect.phtml');
|
37 |
+
}
|
38 |
+
|
39 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Helper/Data.php
ADDED
@@ -0,0 +1,35 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
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) 2010.
|
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 DibsFlex_DibsFlex_Helper_Data extends Mage_Payment_Helper_Data {
|
34 |
+
|
35 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/DibsFlex.php
ADDED
@@ -0,0 +1,140 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Dibs A/S
|
4 |
+
* Dibs Payment Extension
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Payments & Gateways Extensions
|
17 |
+
* @package DibsFlex_DibsFlex
|
18 |
+
* @author Dibs A/S
|
19 |
+
* @copyright Copyright (c) 2010 Dibs A/S. (http://www.dibs.dk/)
|
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__) . '/dibsflex_api/dibsflex_helpers_cms.php';
|
27 |
+
require_once dirname(__FILE__) . '/dibsflex_api/dibsflex_helpers.php';
|
28 |
+
require_once dirname(__FILE__) . '/dibsflex_api/dibsflex_api.php';
|
29 |
+
|
30 |
+
class DibsFlex_DibsFlex_Model_DibsFlex extends dibsflex_api {
|
31 |
+
|
32 |
+
protected $_code = 'DibsFlex';
|
33 |
+
protected $_formBlockType = 'DibsFlex_DibsFlex_block_form';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get Dibs session namespace
|
37 |
+
*
|
38 |
+
* @return DibsFlex_DibsFlex_Model_Session
|
39 |
+
*/
|
40 |
+
public function getSession() {
|
41 |
+
return Mage::getSingleton('DibsFlex/session');
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get checkout session namespace
|
46 |
+
*
|
47 |
+
* @return Mage_Checkout_Model_Session
|
48 |
+
*/
|
49 |
+
public function getCheckout() {
|
50 |
+
return Mage::getSingleton('checkout/session');
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get current quote
|
55 |
+
*
|
56 |
+
* @return Mage_Sales_Model_Quote
|
57 |
+
*/
|
58 |
+
public function getQuote() {
|
59 |
+
return $this->getCheckout()->getQuote();
|
60 |
+
}
|
61 |
+
|
62 |
+
/*
|
63 |
+
* Validate the currency code is avaialable to use for dibs or not
|
64 |
+
*/
|
65 |
+
public function validate() {
|
66 |
+
parent::validate();
|
67 |
+
$currency_code = $this->getQuote()->getBaseCurrencyCode();
|
68 |
+
if (!array_key_exists($currency_code, $this->dibsflex_api_getCurrencyArray())) {
|
69 |
+
Mage::throwException(Mage::helper('DibsFlex')->__('Selected currency code (' .
|
70 |
+
$currency_code.') is not compatabile with Dibs'));
|
71 |
+
}
|
72 |
+
return $this;
|
73 |
+
}
|
74 |
+
|
75 |
+
public function getCheckoutFormFields() {
|
76 |
+
$order = Mage::getModel('sales/order');
|
77 |
+
$order->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
|
78 |
+
|
79 |
+
$aFields = $this->dibsflex_api_requestModel($order);
|
80 |
+
|
81 |
+
return $aFields;
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Using internal pages for input payment data
|
87 |
+
*
|
88 |
+
* @return bool
|
89 |
+
*/
|
90 |
+
public function canUseInternal() {
|
91 |
+
return false;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Using for multiple shipping address
|
96 |
+
*
|
97 |
+
* @return bool
|
98 |
+
*/
|
99 |
+
public function canUseForMultishipping() {
|
100 |
+
return false;
|
101 |
+
}
|
102 |
+
|
103 |
+
public function getOrderPlaceRedirectUrl() {
|
104 |
+
return Mage::getUrl('DibsFlex/DibsFlex/redirect');
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Calculates if any of the trusted logos are to be shown - in that case return true
|
109 |
+
*/
|
110 |
+
public function showTrustedList() {
|
111 |
+
$logoArray = explode(',', $this->getConfigData('dibsflexlogos'));
|
112 |
+
foreach($logoArray as $item) {
|
113 |
+
if ($item == 'DIBS' || $item == 'VISA_SECURE' || $item == 'MC_SECURE' ||
|
114 |
+
$item == 'JCB_SECURE' || $item == 'PCI') {
|
115 |
+
|
116 |
+
return true;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
return false;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Calculates if any of the card logos are to be shown - in that case return true
|
124 |
+
*/
|
125 |
+
public function showCardsList() {
|
126 |
+
$logoArray = explode(',', $this->getConfigData('dibsflexlogos'));
|
127 |
+
foreach($logoArray as $item) {
|
128 |
+
if ($item == 'AMEX' || $item == 'BAX' || $item == 'DIN' || $item == 'DK' ||
|
129 |
+
$item == 'FFK' || $item == 'JCB' || $item == 'MC' || $item == 'MTRO' ||
|
130 |
+
$item == 'MOCA' || $item == 'VISA' || $item == 'ELEC' || $item == 'AKTIA' ||
|
131 |
+
$item == 'DNB' || $item == 'EDK' || $item == 'ELV' || $item == 'EW' ||
|
132 |
+
$item == 'FSB' || $item == 'GIT' || $item == 'ING' || $item == 'SEB' ||
|
133 |
+
$item == 'SHB' || $item == 'SOLO' || $item == 'VAL') {
|
134 |
+
|
135 |
+
return true;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
return false;
|
139 |
+
}
|
140 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/Mysql4/Setup.php
ADDED
@@ -0,0 +1,37 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup {
|
25 |
+
function __construct() {
|
26 |
+
/**
|
27 |
+
* delete cache.cfg from Magento Connect directory after/during module install
|
28 |
+
* to fix bug with module invisible in module list
|
29 |
+
*/
|
30 |
+
$sMageRoot = Mage::getBaseDir();
|
31 |
+
if(strpos($sMageRoot, '/') !== FALSE) $sDS = '/';
|
32 |
+
else $sDS = '\\';
|
33 |
+
$sCacheCfgFile = $sMageRoot . $sDS . 'downloader'. $sDS . 'cache.cfg';
|
34 |
+
unlink($sCacheCfgFile);
|
35 |
+
}
|
36 |
+
}
|
37 |
+
?>
|
app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Color.php
ADDED
@@ -0,0 +1,37 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_System_Config_Source_Color
|
25 |
+
{
|
26 |
+
public function toOptionArray()
|
27 |
+
{
|
28 |
+
return array(
|
29 |
+
array('value'=>'blank', 'label'=>Mage::helper('adminhtml')->__('_none_')),
|
30 |
+
array('value'=>'sand', 'label'=>Mage::helper('adminhtml')->__('sand')),
|
31 |
+
array('value'=>'grey', 'label'=>Mage::helper('adminhtml')->__('grey')),
|
32 |
+
array('value'=>'blue', 'label'=>Mage::helper('adminhtml')->__('blue')),
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Decorator.php
ADDED
@@ -0,0 +1,37 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_System_Config_Source_Decorator
|
25 |
+
{
|
26 |
+
public function toOptionArray()
|
27 |
+
{
|
28 |
+
return array(
|
29 |
+
array('value'=>'default', 'label'=>Mage::helper('adminhtml')->__('default')),
|
30 |
+
array('value'=>'basal', 'label'=>Mage::helper('adminhtml')->__('basal')),
|
31 |
+
array('value'=>'rich', 'label'=>Mage::helper('adminhtml')->__('rich')),
|
32 |
+
array('value'=>'own', 'label'=>Mage::helper('adminhtml')->__('Own decorator')),
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Dibslogos.php
ADDED
@@ -0,0 +1,62 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_System_Config_Source_Dibslogos
|
25 |
+
{
|
26 |
+
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
return array(
|
30 |
+
array('value'=>'DIBS', 'label'=>Mage::helper('adminhtml')->__('DIBS Standard Logo')),
|
31 |
+
array('value'=>'PBB', 'label'=>Mage::helper('adminhtml')->__('DIBS PayByBill Logo')),
|
32 |
+
array('value'=>'VISA_SECURE', 'label'=>Mage::helper('adminhtml')->__('Verified by VISA')),
|
33 |
+
array('value'=>'MC_SECURE', 'label'=>Mage::helper('adminhtml')->__('MasterCard SecureCode')),
|
34 |
+
array('value'=>'JCB_SECURE', 'label'=>Mage::helper('adminhtml')->__('JCB J/Secure')),
|
35 |
+
array('value'=>'PCI', 'label'=>Mage::helper('adminhtml')->__('PCI')),
|
36 |
+
array('value'=>'MC', 'label'=>Mage::helper('adminhtml')->__('MasterCard')),
|
37 |
+
array('value'=>'MTRO', 'label'=>Mage::helper('adminhtml')->__('Maestro')),
|
38 |
+
array('value'=>'VISA', 'label'=>Mage::helper('adminhtml')->__('Visa')),
|
39 |
+
array('value'=>'ELEC', 'label'=>Mage::helper('adminhtml')->__('Visa Electron')),
|
40 |
+
array('value'=>'DIN', 'label'=>Mage::helper('adminhtml')->__('Diners Club')),
|
41 |
+
array('value'=>'AMEX', 'label'=>Mage::helper('adminhtml')->__('American Express')),
|
42 |
+
array('value'=>'DK', 'label'=>Mage::helper('adminhtml')->__('Dankort')),
|
43 |
+
array('value'=>'EDK', 'label'=>Mage::helper('adminhtml')->__('eDankort')),
|
44 |
+
array('value'=>'SEB', 'label'=>Mage::helper('adminhtml')->__('SEB Direktbetalning')),
|
45 |
+
array('value'=>'SHB', 'label'=>Mage::helper('adminhtml')->__('SHB Direktbetalning')),
|
46 |
+
array('value'=>'FSB', 'label'=>Mage::helper('adminhtml')->__('Swedbank Direktbetalning')),
|
47 |
+
array('value'=>'SOLO', 'label'=>Mage::helper('adminhtml')->__('Nordea Solo-E betalning')),
|
48 |
+
array('value'=>'DNB', 'label'=>Mage::helper('adminhtml')->__('Danske Netbetaling (Danske Bank)')),
|
49 |
+
array('value'=>'MOCA', 'label'=>Mage::helper('adminhtml')->__('Mobilcash')),
|
50 |
+
array('value'=>'BAX', 'label'=>Mage::helper('adminhtml')->__('BankAxess')),
|
51 |
+
array('value'=>'FFK', 'label'=>Mage::helper('adminhtml')->__('Forbrugsforeningen Card')),
|
52 |
+
array('value'=>'JCB', 'label'=>Mage::helper('adminhtml')->__('JCB (Japan Credit Bureau)')),
|
53 |
+
array('value'=>'AKTIA', 'label'=>Mage::helper('adminhtml')->__('Aktia Web Payment')),
|
54 |
+
array('value'=>'ELV', 'label'=>Mage::helper('adminhtml')->__('Bank Einzug (eOLV)')),
|
55 |
+
array('value'=>'EW', 'label'=>Mage::helper('adminhtml')->__('eWire')),
|
56 |
+
array('value'=>'GIT', 'label'=>Mage::helper('adminhtml')->__('Getitcard')),
|
57 |
+
array('value'=>'VAL', 'label'=>Mage::helper('adminhtml')->__('Valus')),
|
58 |
+
array('value'=>'ING', 'label'=>Mage::helper('adminhtml')->__('ING iDeal Payment'))
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Dibspaytypes.php
ADDED
@@ -0,0 +1,58 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_System_Config_Source_Dibspaytypes
|
25 |
+
{
|
26 |
+
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
return array(
|
30 |
+
array('value'=>'DIBS', 'label'=>Mage::helper('adminhtml')->__('DIBS Contracted Paytypes')),
|
31 |
+
array('value'=>'PBB', 'label'=>Mage::helper('adminhtml')->__('DIBS PayByBill')),
|
32 |
+
array('value'=>'MC', 'label'=>Mage::helper('adminhtml')->__('MasterCard')),
|
33 |
+
array('value'=>'MTRO', 'label'=>Mage::helper('adminhtml')->__('Maestro')),
|
34 |
+
array('value'=>'VISA', 'label'=>Mage::helper('adminhtml')->__('Visa')),
|
35 |
+
array('value'=>'ELEC', 'label'=>Mage::helper('adminhtml')->__('Visa Electron')),
|
36 |
+
array('value'=>'DIN', 'label'=>Mage::helper('adminhtml')->__('Diners Club')),
|
37 |
+
array('value'=>'AMEX', 'label'=>Mage::helper('adminhtml')->__('American Express')),
|
38 |
+
array('value'=>'DK', 'label'=>Mage::helper('adminhtml')->__('Dankort')),
|
39 |
+
array('value'=>'EDK', 'label'=>Mage::helper('adminhtml')->__('eDankort')),
|
40 |
+
array('value'=>'SEB', 'label'=>Mage::helper('adminhtml')->__('SEB Direktbetalning')),
|
41 |
+
array('value'=>'SHB', 'label'=>Mage::helper('adminhtml')->__('SHB Direktbetalning')),
|
42 |
+
array('value'=>'FSB', 'label'=>Mage::helper('adminhtml')->__('Swedbank Direktbetalning')),
|
43 |
+
array('value'=>'SOLO', 'label'=>Mage::helper('adminhtml')->__('Nordea Solo-E betalning')),
|
44 |
+
array('value'=>'DNB', 'label'=>Mage::helper('adminhtml')->__('Danske Netbetaling (Danske Bank)')),
|
45 |
+
array('value'=>'MOCA', 'label'=>Mage::helper('adminhtml')->__('Mobilcash')),
|
46 |
+
array('value'=>'BAX', 'label'=>Mage::helper('adminhtml')->__('BankAxess')),
|
47 |
+
array('value'=>'FFK', 'label'=>Mage::helper('adminhtml')->__('Forbrugsforeningen Card')),
|
48 |
+
array('value'=>'JCB', 'label'=>Mage::helper('adminhtml')->__('JCB (Japan Credit Bureau)')),
|
49 |
+
array('value'=>'AKTIA', 'label'=>Mage::helper('adminhtml')->__('Aktia Web Payment')),
|
50 |
+
array('value'=>'ELV', 'label'=>Mage::helper('adminhtml')->__('Bank Einzug (eOLV)')),
|
51 |
+
array('value'=>'EW', 'label'=>Mage::helper('adminhtml')->__('eWire')),
|
52 |
+
array('value'=>'GIT', 'label'=>Mage::helper('adminhtml')->__('Getitcard')),
|
53 |
+
array('value'=>'VAL', 'label'=>Mage::helper('adminhtml')->__('Valus')),
|
54 |
+
array('value'=>'ING', 'label'=>Mage::helper('adminhtml')->__('ING iDeal Payment'))
|
55 |
+
);
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Dibsyesno.php
ADDED
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_System_Config_Source_Dibsyesno
|
25 |
+
{
|
26 |
+
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
return array(
|
30 |
+
array('value'=>'yes', 'label'=>Mage::helper('adminhtml')->__('Yes')),
|
31 |
+
array('value'=>'no', 'label'=>Mage::helper('adminhtml')->__('No')),
|
32 |
+
);
|
33 |
+
}
|
34 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Lang.php
ADDED
@@ -0,0 +1,44 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_System_Config_Source_Lang {
|
25 |
+
public function toOptionArray() {
|
26 |
+
return array(
|
27 |
+
//array('value'=>'auto', 'label'=>Mage::helper('adminhtml')->__('Auto')),
|
28 |
+
array('value'=>'da', 'label'=>Mage::helper('adminhtml')->__('Danish')),
|
29 |
+
array('value'=>'nl', 'label'=>Mage::helper('adminhtml')->__('Dutch')),
|
30 |
+
array('value'=>'en', 'label'=>Mage::helper('adminhtml')->__('English')),
|
31 |
+
array('value'=>'fo', 'label'=>Mage::helper('adminhtml')->__('Faroese')),
|
32 |
+
array('value'=>'fi', 'label'=>Mage::helper('adminhtml')->__('Finnish')),
|
33 |
+
array('value'=>'fr', 'label'=>Mage::helper('adminhtml')->__('French')),
|
34 |
+
array('value'=>'de', 'label'=>Mage::helper('adminhtml')->__('German')),
|
35 |
+
array('value'=>'it', 'label'=>Mage::helper('adminhtml')->__('Italian')),
|
36 |
+
array('value'=>'no', 'label'=>Mage::helper('adminhtml')->__('Norwegian')),
|
37 |
+
array('value'=>'pl', 'label'=>Mage::helper('adminhtml')->__('Polish')),
|
38 |
+
array('value'=>'es', 'label'=>Mage::helper('adminhtml')->__('Spanish')),
|
39 |
+
array('value'=>'sv', 'label'=>Mage::helper('adminhtml')->__('Swedish')),
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Orderstatusafter.php
ADDED
@@ -0,0 +1,56 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_System_Config_Source_Orderstatusafter {
|
25 |
+
// set null to enable all possible
|
26 |
+
protected $_stateStatuses = array(
|
27 |
+
// Mage_Sales_Model_Order::STATE_NEW,
|
28 |
+
// Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,
|
29 |
+
Mage_Sales_Model_Order::STATE_PROCESSING,
|
30 |
+
// Mage_Sales_Model_Order::STATE_COMPLETE,
|
31 |
+
// Mage_Sales_Model_Order::STATE_CLOSED,
|
32 |
+
// Mage_Sales_Model_Order::STATE_CANCELED,
|
33 |
+
Mage_Sales_Model_Order::STATE_HOLDED,
|
34 |
+
);
|
35 |
+
|
36 |
+
public function toOptionArray() {
|
37 |
+
if ($this->_stateStatuses) {
|
38 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStateStatuses($this->_stateStatuses);
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
42 |
+
}
|
43 |
+
$options = array();
|
44 |
+
$options[] = array(
|
45 |
+
'value' => '',
|
46 |
+
'label' => Mage::helper('adminhtml')->__('-- Please Select --')
|
47 |
+
);
|
48 |
+
foreach ($statuses as $code=>$label) {
|
49 |
+
$options[] = array(
|
50 |
+
'value' => $code,
|
51 |
+
'label' => $label
|
52 |
+
);
|
53 |
+
}
|
54 |
+
return $options;
|
55 |
+
}
|
56 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/Orderstatusbefore.php
ADDED
@@ -0,0 +1,57 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_System_Config_Source_Orderstatusbefore {
|
25 |
+
// set null to enable all possible
|
26 |
+
protected $_stateStatuses = array(
|
27 |
+
Mage_Sales_Model_Order::STATE_NEW,
|
28 |
+
// Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,
|
29 |
+
Mage_Sales_Model_Order::STATE_PROCESSING,
|
30 |
+
// Mage_Sales_Model_Order::STATE_COMPLETE,
|
31 |
+
// Mage_Sales_Model_Order::STATE_CLOSED,
|
32 |
+
// Mage_Sales_Model_Order::STATE_CANCELED,
|
33 |
+
// Mage_Sales_Model_Order::STATE_HOLDED,
|
34 |
+
);
|
35 |
+
|
36 |
+
public function toOptionArray()
|
37 |
+
{
|
38 |
+
if ($this->_stateStatuses) {
|
39 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStateStatuses($this->_stateStatuses);
|
40 |
+
}
|
41 |
+
else {
|
42 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
43 |
+
}
|
44 |
+
$options = array();
|
45 |
+
$options[] = array(
|
46 |
+
'value' => '',
|
47 |
+
'label' => Mage::helper('adminhtml')->__('-- Please Select --')
|
48 |
+
);
|
49 |
+
foreach ($statuses as $code=>$label) {
|
50 |
+
$options[] = array(
|
51 |
+
'value' => $code,
|
52 |
+
'label' => $label
|
53 |
+
);
|
54 |
+
}
|
55 |
+
return $options;
|
56 |
+
}
|
57 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/System/Config/Source/PBBdistribution.php
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
class DibsFlex_DibsFlex_Model_System_Config_Source_PBBdistribution {
|
25 |
+
public function toOptionArray() {
|
26 |
+
return array(
|
27 |
+
array('value'=>'empty', 'label'=>Mage::helper('adminhtml')->__('-')),
|
28 |
+
array('value'=>'paper', 'label'=>Mage::helper('adminhtml')->__('paper')),
|
29 |
+
array('value'=>'email', 'label'=>Mage::helper('adminhtml')->__('email')),
|
30 |
+
);
|
31 |
+
}
|
32 |
+
}
|
app/code/community/DibsFlex/DibsFlex/Model/dibsflex_api/dibsflex_api.php
ADDED
@@ -0,0 +1,1014 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
class dibsflex_api extends dibsflex_helpers {
|
3 |
+
/** START OF DIBS API AREA **/
|
4 |
+
/** |---MODEL **/
|
5 |
+
/**
|
6 |
+
* Collects API parameters to send in dependence of checkout type
|
7 |
+
*
|
8 |
+
* @param object $oOrderInfo
|
9 |
+
* @return array
|
10 |
+
*/
|
11 |
+
function dibsflex_api_requestModel($mOrderInfo) {
|
12 |
+
$oOrderInfo = $this->dibsflex_api_orderObject($mOrderInfo);
|
13 |
+
$this->dibsflex_api_processDB($oOrderInfo->order->order_id);
|
14 |
+
|
15 |
+
$aData = array();
|
16 |
+
|
17 |
+
$this->dibsflex_api_applyCommon($aData, $oOrderInfo);
|
18 |
+
|
19 |
+
$this->dibsflex_api_applyFWInvoice($aData, $oOrderInfo);
|
20 |
+
$this->dibsflex_api_applyFlexWin($aData);
|
21 |
+
if(method_exists($this, 'dibsflex_helper_additionalPostData')) {
|
22 |
+
$aAdditional = $this->dibsflex_helper_additionalPostData($mOrderInfo);
|
23 |
+
if(count($aAdditional) > 0) {
|
24 |
+
foreach($aAdditional as $sKey => $sVal) $aData[$sKey] = $sVal;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
array_walk($aData, create_function('&$val', '$val = trim($val);'));
|
28 |
+
$sMD5 = $this->dibsflex_api_calcMD5($aData);
|
29 |
+
if($sMD5 != "") $aData['md5key'] = $sMD5;
|
30 |
+
|
31 |
+
return $aData;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Calls dibsflex_api_checkTable() method and
|
36 |
+
* adds orderID to dibs_orderdata table if needed
|
37 |
+
*/
|
38 |
+
function dibsflex_api_processDB($iOrderId) {
|
39 |
+
$this->dibsflex_api_checkTable();
|
40 |
+
$mOrderExists = $this->dibsflex_helper_dbquery_read("SELECT COUNT(`orderid`)
|
41 |
+
AS order_exists FROM `" .
|
42 |
+
$this->dibsflex_helper_getdbprefix() .
|
43 |
+
"dibs_orderdata` where `orderid` = '" .
|
44 |
+
$iOrderId .
|
45 |
+
"' LIMIT 1;");
|
46 |
+
|
47 |
+
if($this->dibsflex_helper_dbquery_read_single($mOrderExists, 'order_exists') <= 0) {
|
48 |
+
$this->dibsflex_helper_dbquery_write("INSERT INTO `" .
|
49 |
+
$this->dibsflex_helper_getdbprefix() .
|
50 |
+
"dibs_orderdata`(`orderid`) VALUES('" .
|
51 |
+
$this->dibsflex_api_sqlEncode($iOrderId)."')");
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Create dibs_orderdata table if not exists
|
57 |
+
*/
|
58 |
+
function dibsflex_api_checkTable() {
|
59 |
+
$this->dibsflex_helper_dbquery_write("CREATE TABLE IF NOT EXISTS `" .
|
60 |
+
$this->dibsflex_helper_getdbprefix() . "dibs_orderdata` (
|
61 |
+
`orderid` VARCHAR(45) NOT NULL DEFAULT '',
|
62 |
+
`transact` VARCHAR(50) NOT NULL DEFAULT '',
|
63 |
+
`status` INTEGER UNSIGNED NOT NULL DEFAULT 0
|
64 |
+
COMMENT '0 = unpaid, 1 = paid',
|
65 |
+
`amount` VARCHAR(45) NOT NULL DEFAULT '',
|
66 |
+
`currency` VARCHAR(45) NOT NULL DEFAULT '',
|
67 |
+
`paytype` VARCHAR(45) NOT NULL DEFAULT '',
|
68 |
+
`PBB_customerId` VARCHAR(45) NOT NULL DEFAULT '',
|
69 |
+
`PBB_deliveryAddress` VARCHAR(45) NOT NULL DEFAULT '',
|
70 |
+
`PBB_deliveryCountryCode` VARCHAR(45) NOT NULL DEFAULT '',
|
71 |
+
`PBB_deliveryPostalCode` VARCHAR(45) NOT NULL DEFAULT '',
|
72 |
+
`PBB_deliveryPostalPlace` VARCHAR(45) NOT NULL DEFAULT '',
|
73 |
+
`PBB_firstName` VARCHAR(45) NOT NULL DEFAULT '',
|
74 |
+
`PBB_lastName` VARCHAR(45) NOT NULL DEFAULT '',
|
75 |
+
`cardnomask` VARCHAR(45) NOT NULL DEFAULT '',
|
76 |
+
`cardprefix` VARCHAR(45) NOT NULL DEFAULT '',
|
77 |
+
`cardexpdate` VARCHAR(45) NOT NULL DEFAULT '',
|
78 |
+
`cardcountry` VARCHAR(45) NOT NULL DEFAULT '',
|
79 |
+
`acquirer` VARCHAR(45) NOT NULL DEFAULT '',
|
80 |
+
`enrolled` VARCHAR(45) NOT NULL DEFAULT '',
|
81 |
+
`fee` VARCHAR(45) NOT NULL DEFAULT '',
|
82 |
+
`test` VARCHAR(45) NOT NULL DEFAULT '',
|
83 |
+
`uniqueoid` VARCHAR(45) NOT NULL DEFAULT '',
|
84 |
+
`approvalcode` VARCHAR(45) NOT NULL DEFAULT '',
|
85 |
+
`voucher` VARCHAR(45) NOT NULL DEFAULT '',
|
86 |
+
`amountoriginal` VARCHAR(45) NOT NULL DEFAULT '',
|
87 |
+
`voucheramount` VARCHAR(45) NOT NULL DEFAULT '',
|
88 |
+
`voucherpaymentid` VARCHAR(45) NOT NULL DEFAULT '',
|
89 |
+
`voucherentry` VARCHAR(45) NOT NULL DEFAULT '',
|
90 |
+
`voucherrest` VARCHAR(45) NOT NULL DEFAULT '',
|
91 |
+
`ordercancellation` INTEGER UNSIGNED NOT NULL DEFAULT 0
|
92 |
+
COMMENT '0 = NotPerformed, 1 = Performed',
|
93 |
+
`successaction` INTEGER UNSIGNED NOT NULL DEFAULT 0
|
94 |
+
COMMENT '0 = NotPerformed, 1 = Performed',
|
95 |
+
`callback` INTEGER UNSIGNED NOT NULL DEFAULT 0
|
96 |
+
COMMENT '0 = NotPerformed, 1 = Performed'
|
97 |
+
);"
|
98 |
+
);
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Collects common API parameters to send
|
103 |
+
*
|
104 |
+
* @param array $aData
|
105 |
+
* @param object $oOrderInfo
|
106 |
+
*/
|
107 |
+
function dibsflex_api_applyCommon(&$aData, $oOrderInfo) {
|
108 |
+
$aData['orderid'] = $oOrderInfo->order->order_id;
|
109 |
+
$aData['merchant'] = $this->dibsflex_helper_getconfig('mid');
|
110 |
+
$aData['amount'] = $oOrderInfo->order->total;
|
111 |
+
$aData['currency'] = $oOrderInfo->order->currency;
|
112 |
+
$aData['callbackurl'] = $this->dibsflex_helper_getReturnURLs("callback");
|
113 |
+
$aData['callbackfix'] = $this->dibsflex_helper_getReturnURLs("callbackfix");
|
114 |
+
|
115 |
+
$sAccount = $this->dibsflex_helper_getconfig('account');
|
116 |
+
if((string)$sAccount != "") {
|
117 |
+
$aData['account'] = $sAccount;
|
118 |
+
}
|
119 |
+
|
120 |
+
$sPaytype = $this->dibsflex_helper_getconfig('paytype');
|
121 |
+
if((string)$sPaytype != '') {
|
122 |
+
$aData['paytype'] = $this->dibsflex_api_getPaytype($sPaytype);
|
123 |
+
}
|
124 |
+
|
125 |
+
$sDistributionType = $this->dibsflex_helper_getconfig('distr');
|
126 |
+
if((string)$sDistributionType != 'empty') {
|
127 |
+
$aData['distributionType'] = $sDistributionType;
|
128 |
+
if ($sDistributionType == 'email'){
|
129 |
+
$aData['email'] = $oOrderInfo->customer->billing->email;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Collects FlexWin Invoice API parameters to send
|
136 |
+
*
|
137 |
+
* @param array $aData
|
138 |
+
* @param object $oOrderInfo
|
139 |
+
*/
|
140 |
+
function dibsflex_api_applyFWInvoice(&$aData, $oOrderInfo) {
|
141 |
+
|
142 |
+
$aData ['delivery01.Billing'] = '<b>Billing Address</b>';
|
143 |
+
$aData ['delivery02.Firstname'] = $oOrderInfo->customer->billing->firstname;
|
144 |
+
$aData ['delivery03.Lastname'] = $oOrderInfo->customer->billing->lastname;
|
145 |
+
$aData ['delivery04.Street'] = $oOrderInfo->customer->billing->street;
|
146 |
+
$aData ['delivery05.Postcode'] = $oOrderInfo->customer->billing->postcode;
|
147 |
+
$aData ['delivery06.City'] = $oOrderInfo->customer->billing->city;
|
148 |
+
$aData ['delivery07.Region'] = $oOrderInfo->customer->billing->region;
|
149 |
+
$aData ['delivery08.Country'] = $oOrderInfo->customer->billing->country;
|
150 |
+
$aData ['delivery09.Telephone'] = $oOrderInfo->customer->billing->phone;
|
151 |
+
$aData ['delivery10.E-mail'] = $oOrderInfo->customer->billing->email;
|
152 |
+
|
153 |
+
$aData ['delivery11.Delivery'] = '<b>Shipping Address</b>';
|
154 |
+
$aData ['delivery12.Firstname'] = $oOrderInfo->customer->delivery->firstname;
|
155 |
+
$aData ['delivery13.Lastname'] = $oOrderInfo->customer->delivery->lastname;
|
156 |
+
$aData ['delivery14.Street'] = $oOrderInfo->customer->delivery->street;
|
157 |
+
$aData ['delivery15.Postcode'] = $oOrderInfo->customer->delivery->postcode;
|
158 |
+
$aData ['delivery16.City'] = $oOrderInfo->customer->delivery->city;
|
159 |
+
$aData ['delivery17.Region'] = $oOrderInfo->customer->delivery->region;
|
160 |
+
$aData ['delivery18.Country'] = $oOrderInfo->customer->delivery->country;
|
161 |
+
$aData ['delivery19.Telephone'] = $oOrderInfo->customer->delivery->phone;
|
162 |
+
|
163 |
+
if ($oOrderInfo->items) {
|
164 |
+
$aData ['ordline0-1'] = 'ItemID ';
|
165 |
+
$aData ['ordline0-2'] = 'ItemDescription ';
|
166 |
+
$aData ['ordline0-3'] = 'SKU ';
|
167 |
+
$aData ['ordline0-4'] = 'Price ';
|
168 |
+
$aData ['ordline0-5'] = 'Tax ';
|
169 |
+
$aData ['ordline0-6'] = 'Quantity ';
|
170 |
+
$aData ['ordline0-7'] = 'TotalPrice ';
|
171 |
+
|
172 |
+
$i = 1;
|
173 |
+
foreach($oOrderInfo->items as $oItem) {
|
174 |
+
$aData ['ordline'.$i.'-1'] = $oItem->item_id;
|
175 |
+
$aData ['ordline'.$i.'-2'] = $this->dibsflex_api_utf8Fix($oItem->name);
|
176 |
+
$aData ['ordline'.$i.'-3'] = $this->dibsflex_api_utf8Fix($oItem->sku);
|
177 |
+
$aData ['ordline'.$i.'-4'] = round($oItem->price / 100, 2);
|
178 |
+
$aData ['ordline'.$i.'-5'] = round(($oItem->qty / 1000) *
|
179 |
+
($oItem->price / 100) *
|
180 |
+
($oItem->tax_rate / 10000), 2);
|
181 |
+
$aData ['ordline'.$i.'-6'] = round($oItem->qty / 1000);
|
182 |
+
$aData ['ordline'.$i.'-7'] = round(($oItem->price / 100) *
|
183 |
+
($oItem->qty / 1000) *
|
184 |
+
($oItem->tax_rate / 10000 + 1), 2);
|
185 |
+
|
186 |
+
$i++;
|
187 |
+
}
|
188 |
+
|
189 |
+
$aData ['priceinfo1.Shippingmethod'] = $oOrderInfo->shipping->method;
|
190 |
+
$aData ['priceinfo2.Shippingcost'] = round($oOrderInfo->shipping->rate / 100, 2);
|
191 |
+
}
|
192 |
+
|
193 |
+
$aData['structuredOrderInformation'] = $this->dibsflex_api_getInvoiceXML($oOrderInfo);
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Collects FlexWin API parameters to send
|
198 |
+
*
|
199 |
+
* @param array $aData
|
200 |
+
*/
|
201 |
+
function dibsflex_api_applyFlexWin(&$aData) {
|
202 |
+
$aData['accepturl'] = $this->dibsflex_helper_getReturnURLs('success');
|
203 |
+
$aData['cancelurl'] = $this->dibsflex_helper_getReturnURLs('cancel');
|
204 |
+
$aData['lang'] = $this->dibsflex_helper_getconfig('lang');
|
205 |
+
$aData['sysmod'] = $this->dibsflex_helper_modVersion();
|
206 |
+
$sSkiplastpage = $this->dibsflex_helper_getconfig('skiplast');
|
207 |
+
$aData['doNotShowLastPage'] = "true"; /* For PBB at Gothia */
|
208 |
+
if((string)$sSkiplastpage == 'yes') {
|
209 |
+
$aData['skiplastpage'] = 1;
|
210 |
+
}
|
211 |
+
|
212 |
+
$HTTP_COOKIE = getenv('HTTP_COOKIE');
|
213 |
+
if((string)$HTTP_COOKIE != '') {
|
214 |
+
$aData['HTTP_COOKIE'] = $this->dibsflex_api_fixCookie($HTTP_COOKIE);
|
215 |
+
}
|
216 |
+
|
217 |
+
$sDecorator = $this->dibsflex_helper_getconfig('decor');
|
218 |
+
if((string)$sDecorator != 'default') {
|
219 |
+
$aData['decorator'] = $sDecorator;
|
220 |
+
}
|
221 |
+
|
222 |
+
$sColor = $this->dibsflex_helper_getconfig('color');
|
223 |
+
if((string)$sColor != 'blank') {
|
224 |
+
$aData['color'] = $sColor;
|
225 |
+
}
|
226 |
+
|
227 |
+
$sFee = $this->dibsflex_helper_getconfig('fee');
|
228 |
+
if((string)$sFee == 'yes') {
|
229 |
+
$aData['calcfee'] = 1;
|
230 |
+
}
|
231 |
+
|
232 |
+
$sTest = $this->dibsflex_helper_getconfig('testmode');
|
233 |
+
if((string)$sTest == 'yes') {
|
234 |
+
$aData['test'] = "yes";
|
235 |
+
}
|
236 |
+
|
237 |
+
$sCapturenow = $this->dibsflex_helper_getconfig('capt');
|
238 |
+
if((string)$sCapturenow == 'yes') {
|
239 |
+
$aData['capturenow'] = 1;
|
240 |
+
}
|
241 |
+
|
242 |
+
$sUid = $this->dibsflex_helper_getconfig('uniq');
|
243 |
+
if((string)$sUid == 'yes') {
|
244 |
+
$aFields['uniqueoid'] = 1;
|
245 |
+
}
|
246 |
+
|
247 |
+
$sVoucher = $this->dibsflex_helper_getconfig('voucher');
|
248 |
+
if((string)$sVoucher == 'yes') {
|
249 |
+
$aData['voucher'] = 'yes';
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Gets gateway URL depending to checkout method
|
255 |
+
*
|
256 |
+
* @return string
|
257 |
+
*/
|
258 |
+
function dibsflex_api_getFormAction() {
|
259 |
+
return 'https://payment.architrade.com/paymentweb/start.action';
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Generates cart XML-representation for Klarna, PBB, etc.
|
264 |
+
*
|
265 |
+
* @param int $iOrderId
|
266 |
+
* @param int $iTotal
|
267 |
+
* @param array $aItems
|
268 |
+
* @param array $aShippingInfo
|
269 |
+
* @return string
|
270 |
+
*/
|
271 |
+
function dibsflex_api_getInvoiceXML($oOrderInfo) {
|
272 |
+
$sVerifiedOrderSum = $oOrderInfo->order->total;
|
273 |
+
$Delta1 = 0;
|
274 |
+
$Delta2 = 0;
|
275 |
+
$Delta3 = 0;
|
276 |
+
$Delta4 = 0;
|
277 |
+
|
278 |
+
$doc = new DomDocument("1.0","UTF-8");
|
279 |
+
$doc->preserveWhiteSpace = true;
|
280 |
+
$doc->formatOutput = true;
|
281 |
+
|
282 |
+
$root = $doc->createElement("orderInformation");
|
283 |
+
$root = $doc->appendChild($root);
|
284 |
+
|
285 |
+
$occ = $doc->createElement("yourRef");
|
286 |
+
$occ = $root->appendChild($occ);
|
287 |
+
|
288 |
+
$value = $doc->createTextNode($oOrderInfo->order->order_id);
|
289 |
+
$value = $occ->appendChild($value);
|
290 |
+
|
291 |
+
$i = 1;
|
292 |
+
foreach($oOrderInfo->items as $oItem) {
|
293 |
+
if(isset($oItem->price) && !empty($oItem->price) && $oItem->price != 0) {
|
294 |
+
$occ = $doc->createElement("orderItem");
|
295 |
+
$occ = $root->appendChild($occ);
|
296 |
+
|
297 |
+
if(!empty($oItem->name)) {
|
298 |
+
$sTmpName = $this->dibsflex_api_utf8Fix($oItem->name);
|
299 |
+
}
|
300 |
+
elseif(!empty($oItem->sku)) {
|
301 |
+
$sTmpName = $this->dibsflex_api_utf8Fix($oItem->sku);
|
302 |
+
}
|
303 |
+
else $sTmpName = $oItem->item_id;
|
304 |
+
|
305 |
+
$aAttributs = array('itemID' => $oItem->item_id,
|
306 |
+
'itemDescription' => $sTmpName,
|
307 |
+
'comments' => 'SKU: ' . $oItem->sku,
|
308 |
+
'orderRowNumber' => $i,
|
309 |
+
'quantity' => $oItem->qty / 1000,
|
310 |
+
'price' => $oItem->price,
|
311 |
+
'unitCode' => 'pcs',
|
312 |
+
'VATPercent' => $oItem->tax_rate);
|
313 |
+
|
314 |
+
foreach($aAttributs as $key => $val) {
|
315 |
+
$itemAttr = $doc->createAttribute($key);
|
316 |
+
$occ->appendChild($itemAttr);
|
317 |
+
$itemVal = $doc->createTextNode($val);
|
318 |
+
$itemAttr->appendChild($itemVal);
|
319 |
+
}
|
320 |
+
|
321 |
+
$Delta1 = ($oItem->qty / 1000) * $oItem->price;
|
322 |
+
$sVerifiedOrderSum = $sVerifiedOrderSum - $Delta1;
|
323 |
+
|
324 |
+
$fSingleTax = round($oItem->price * $oItem->tax_rate / 10000);
|
325 |
+
$Delta2 = intval(round($fSingleTax * $oItem->qty / 1000));
|
326 |
+
$sVerifiedOrderSum = $sVerifiedOrderSum - $Delta2;
|
327 |
+
|
328 |
+
unset($sTmpName, $fSingleTax);
|
329 |
+
|
330 |
+
$i++;
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
334 |
+
if(isset($oOrderInfo->shipping->rate) && !empty($oOrderInfo->shipping->rate) &&
|
335 |
+
$oOrderInfo->shipping->rate != 0) {
|
336 |
+
|
337 |
+
$occ = $doc->createElement("orderItem");
|
338 |
+
$occ = $root->appendChild($occ);
|
339 |
+
|
340 |
+
if(!empty($oOrderInfo->shipping->method)) {
|
341 |
+
$sTmpShippingName = $this->dibsflex_api_utf8Fix($oOrderInfo->shipping->method);
|
342 |
+
}
|
343 |
+
else $sTmpShippingName = "Shipping rate";
|
344 |
+
|
345 |
+
$aAttributs = array('itemID' => 'ShippingCost',
|
346 |
+
'itemDescription' => $sTmpShippingName,
|
347 |
+
'orderRowNumber' => $i,
|
348 |
+
'quantity' => 1,
|
349 |
+
'price' => $oOrderInfo->shipping->rate,
|
350 |
+
'unitCode' => 'pcs',
|
351 |
+
'VATPercent' => $oOrderInfo->shipping->tax);
|
352 |
+
|
353 |
+
foreach($aAttributs as $key => $val) {
|
354 |
+
$itemAttr = $doc->createAttribute($key);
|
355 |
+
$occ->appendChild($itemAttr);
|
356 |
+
$itemVal = $doc->createTextNode($val);
|
357 |
+
$itemAttr->appendChild($itemVal);
|
358 |
+
}
|
359 |
+
|
360 |
+
unset($sTmpShippingName);
|
361 |
+
|
362 |
+
$Delta3 = $oOrderInfo->shipping->rate;
|
363 |
+
$sVerifiedOrderSum = $sVerifiedOrderSum - $Delta3;
|
364 |
+
|
365 |
+
$Delta4 = intval(round(($oOrderInfo->shipping->tax / 10000) * $oOrderInfo->shipping->rate));
|
366 |
+
$sVerifiedOrderSum = $sVerifiedOrderSum - $Delta4;
|
367 |
+
$i++;
|
368 |
+
}
|
369 |
+
|
370 |
+
$sResult = $doc->saveXML();
|
371 |
+
return htmlspecialchars($sResult, ENT_COMPAT, "UTF-8");
|
372 |
+
}
|
373 |
+
|
374 |
+
/**
|
375 |
+
* Calculates MD5 for FlexWin API
|
376 |
+
*
|
377 |
+
* @param array $aData
|
378 |
+
* @return string
|
379 |
+
*/
|
380 |
+
function dibsflex_api_calcMD5($aData, $bResponse = FALSE) {
|
381 |
+
$sMD5key = "";
|
382 |
+
$sMD5key1 = trim($this->dibsflex_helper_getconfig('md51'), " ,\t,\r,\n");
|
383 |
+
$sMD5key2 = trim($this->dibsflex_helper_getconfig('md52'), " ,\t,\r,\n");
|
384 |
+
if ($sMD5key1 != '' && $sMD5key2 != '') {
|
385 |
+
if($bResponse === TRUE) {
|
386 |
+
if(isset($aData['fee'])) $iAmount = $aData['amount'] + $aData['fee'];
|
387 |
+
else $iAmount = $aData['amount'];
|
388 |
+
$sMD5key = md5($sMD5key2.md5($sMD5key1 .
|
389 |
+
'transact=' . $aData['transact'] .
|
390 |
+
'&amount=' . $iAmount .
|
391 |
+
'¤cy=' . $aData['currency']));
|
392 |
+
}
|
393 |
+
else {
|
394 |
+
$sMD5key = md5($sMD5key2 . md5($sMD5key1 .
|
395 |
+
'merchant=' . $aData['merchant'] .
|
396 |
+
'&orderid=' . $aData['orderid'] .
|
397 |
+
'¤cy=' . $aData['currency'] .
|
398 |
+
'&amount=' . $aData['amount']));
|
399 |
+
}
|
400 |
+
}
|
401 |
+
return $sMD5key;
|
402 |
+
}
|
403 |
+
|
404 |
+
/**
|
405 |
+
* Fixes cookie
|
406 |
+
*
|
407 |
+
* @param string $sCookie
|
408 |
+
* @return string
|
409 |
+
*/
|
410 |
+
function dibsflex_api_fixCookie($sCookie) {
|
411 |
+
if(strpos($sCookie,"%") !== FALSE) $sCookie = urldecode($sCookie);
|
412 |
+
$aCookie = explode("; ", $sCookie);
|
413 |
+
unset($sCookie);
|
414 |
+
for($i=0; $i<count($aCookie); $i++) {
|
415 |
+
if(preg_match("/^[^\s;=]+=[^;=]+$/is", $aCookie[$i])) {
|
416 |
+
$aNewCookies[] = $aCookie[$i];
|
417 |
+
}
|
418 |
+
}
|
419 |
+
$sNewCookies = implode("; ", $aNewCookies);
|
420 |
+
unset($aNewCookies, $aCookie);
|
421 |
+
return $sNewCookies;
|
422 |
+
}
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Returns integer representation of amont. Saves two signs that are
|
426 |
+
* after floating point in float number by multiplication by 100.
|
427 |
+
* E.g.: converts to cents in money context.
|
428 |
+
* Workarround of float to int casting.
|
429 |
+
*
|
430 |
+
* @param float $fNum
|
431 |
+
* @return int
|
432 |
+
*/
|
433 |
+
function dibsflex_api_float2intSmartRounding($fNum, $iPrec = 2) {
|
434 |
+
return empty($fNum) ? (int)0 : (int)(string)(round($fNum, $iPrec) * pow(10, $iPrec));
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Fixes UTF-8 special symbols if encoding of CMS is not UTF-8.
|
439 |
+
* Main using is for wided latin alphabets.
|
440 |
+
*
|
441 |
+
* @param string $sValue
|
442 |
+
* @return string
|
443 |
+
*/
|
444 |
+
function dibsflex_api_utf8Fix($sValue) {
|
445 |
+
$sCurEnc = mb_detect_encoding($sValue) ;
|
446 |
+
if($sCurEnc == "UTF-8" && mb_check_encoding($sValue, "UTF-8")) {
|
447 |
+
return $sValue;
|
448 |
+
}
|
449 |
+
else return utf8_encode($sValue);
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Returns formated paytype parameter
|
454 |
+
*
|
455 |
+
* @param string $sPaytype
|
456 |
+
* @return string
|
457 |
+
*/
|
458 |
+
function dibsflex_api_getPaytype($sPaytype) {
|
459 |
+
$sNPaytype = "";
|
460 |
+
$iTest = $this->dibsflex_helper_getconfig('testmode');
|
461 |
+
$selectedpaytypes = explode(',',$sPaytype);
|
462 |
+
foreach ($selectedpaytypes as $selectedpaytype){
|
463 |
+
if (($iTest == 'yes') && (strtolower($selectedpaytype) == 'pbb')){
|
464 |
+
$sNPaytype .= ',pbbtest';
|
465 |
+
}
|
466 |
+
else $sNPaytype .= ",".$selectedpaytype;
|
467 |
+
}
|
468 |
+
$sNPaytype = trim($sNPaytype, ",");
|
469 |
+
|
470 |
+
return $sNPaytype;
|
471 |
+
}
|
472 |
+
|
473 |
+
/**
|
474 |
+
* Returns array of currency codes association
|
475 |
+
*
|
476 |
+
* @return array
|
477 |
+
*/
|
478 |
+
function dibsflex_api_getCurrencyArray() {
|
479 |
+
$aCurrency = array ('ADP' => '020','AED' => 784,'AFA' => '004','ALL' => '008',
|
480 |
+
'AMD' => '051','ANG' => 532,'AOA' => 973,'ARS' => '032',
|
481 |
+
'AUD' => '036','AWG' => 533,'AZM' => '031','BAM' => 977,
|
482 |
+
'BBD' => '052','BDT' => '050','BGL' => 100,'BGN' => 975,
|
483 |
+
'BHD' => '048','BIF' => 108,'BMD' => '060','BND' => '096',
|
484 |
+
'BOB' => '068','BOV' => 984,'BRL' => 986,'BSD' => '044',
|
485 |
+
'BTN' => '064','BWP' => '072','BYR' => 974,'BZD' => '084',
|
486 |
+
'CAD' => 124,'CDF' => 976,'CHF' => 756,'CLF' => 990,
|
487 |
+
'CLP' => 152,'CNY' => 156,'COP' => 170,'CRC' => 188,
|
488 |
+
'CUP' => 192,'CVE' => 132,'CYP' => 196,'CZK' => 203,
|
489 |
+
'DJF' => 262,'DKK' => 208,'DOP' => 214,'DZD' => '012',
|
490 |
+
'ECS' => 218,'ECV' => 983,'EEK' => 233,'EGP' => 818,
|
491 |
+
'ERN' => 232,'ETB' => 230,'EUR' => 978,'FJD' => 242,
|
492 |
+
'FKP' => 238,'GBP' => 826,'GEL' => 981,'GHC' => 288,
|
493 |
+
'GIP' => 292,'GMD' => 270,'GNF' => 324,'GTQ' => 320,
|
494 |
+
'GWP' => 624,'GYD' => 328,'HKD' => 344,'HNL' => 340,
|
495 |
+
'HRK' => 191,'HTG' => 332,'HUF' => 348,'IDR' => 360,
|
496 |
+
'ILS' => 376,'INR' => 356,'IQD' => 368,'IRR' => 364,
|
497 |
+
'ISK' => 352,'JMD' => 388,'JOD' => 400,'JPY' => 392,
|
498 |
+
'KES' => 404,'KGS' => 417,'KHR' => 116,'KMF' => 174,
|
499 |
+
'KPW' => 408,'KRW' => 410,'KWD' => 414,'KYD' => 136,
|
500 |
+
'KZT' => 398,'LAK' => 418,'LBP' => 422,'LKR' => 144,
|
501 |
+
'LRD' => 430,'LSL' => 426,'LTL' => 440,'LVL' => 428,
|
502 |
+
'LYD' => 434,'MAD' => 504,'MDL' => 498,'MGF' => 450,
|
503 |
+
'MKD' => 807,'MMK' => 104,'MNT' => 496,'MOP' => 446,
|
504 |
+
'MRO' => 478,'MTL' => 470,'MUR' => 480,'MVR' => 462,
|
505 |
+
'MWK' => 454,'MXN' => 484,'MXV' => 979,'MYR' => 458,
|
506 |
+
'MZM' => 508,'NAD' => 516,'NGN' => 566,'NIO' => 558,
|
507 |
+
'NOK' => 578,'NPR' => 524,'NZD' => 554,'OMR' => 512,
|
508 |
+
'PAB' => 590,'PEN' => 604,'PGK' => 598,'PHP' => 608,
|
509 |
+
'PKR' => 586,'PLN' => 985,'PYG' => 600,'QAR' => 634,
|
510 |
+
'ROL' => 642,'RUB' => 643,'RUR' => 810,'RWF' => 646,
|
511 |
+
'SAR' => 682,'SBD' => '090','SCR' => 690,'SDD' => 736,
|
512 |
+
'SEK' => 752,'SGD' => 702,'SHP' => 654,'SIT' => 705,
|
513 |
+
'SKK' => 703,'SLL' => 694,'SOS' => 706,'SRG' => 740,
|
514 |
+
'STD' => 678,'SVC' => 222,'SYP' => 760,'SZL' => 748,
|
515 |
+
'THB' => 764,'TJS' => 972,'TMM' => 795,'TND' => 788,
|
516 |
+
'TOP' => 776,'TPE' => 626,'TRL' => 792,'TRY' => 949,
|
517 |
+
'TTD' => 780,'TWD' => 901,'TZS' => 834,'UAH' => 980,
|
518 |
+
'UGX' => 800,'USD' => 840,'UYU' => 858,'UZS' => 860,
|
519 |
+
'VEB' => 862,'VND' => 704,'VUV' => 548,'XAF' => 950,
|
520 |
+
'XCD' => 951,'XOF' => 952,'XPF' => 953,'YER' => 886,
|
521 |
+
'YUM' => 891,'ZAR' => 710,'ZMK' => 894,'ZWD' => 716,
|
522 |
+
);
|
523 |
+
|
524 |
+
return $aCurrency;
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Returns code from currency array. Use $bFlip === TRUE if opposite ISO code needed.
|
529 |
+
*
|
530 |
+
* @param string $sCode
|
531 |
+
* @param bool $bFlip
|
532 |
+
* @return string
|
533 |
+
*/
|
534 |
+
function dibsflex_api_getCurrencyValue($sCode, $bFlip = FALSE) {
|
535 |
+
$aCurrency = $this->dibsflex_api_getCurrencyArray();
|
536 |
+
if($bFlip === TRUE) $aCurrency = array_flip($aCurrency);
|
537 |
+
return (string)$aCurrency[$sCode];
|
538 |
+
}
|
539 |
+
|
540 |
+
/** |---CONTROLLER **/
|
541 |
+
|
542 |
+
/**
|
543 |
+
* Generates associative array for updating DB data on callback.
|
544 |
+
*
|
545 |
+
* @return array
|
546 |
+
*/
|
547 |
+
function dibsflex_api_DBarray(){
|
548 |
+
$aDBFieldsList = array('orderid','amount','currency','test','acquirer',
|
549 |
+
'transact','uniqueoid','paytype','cardnomask','cardcountry',
|
550 |
+
'approvalcode','fee','voucher','amountoriginal','voucheramount',
|
551 |
+
'voucherentry','voucherpaymentid','voucherrest','enrolled',
|
552 |
+
'cardprefix','cardexpdate');
|
553 |
+
|
554 |
+
$aRetFieldsList = $this->dibsflex_api_DBarray_FlexWin();
|
555 |
+
|
556 |
+
return array_combine($aDBFieldsList, $aRetFieldsList);
|
557 |
+
}
|
558 |
+
|
559 |
+
/**
|
560 |
+
* Returned parameters names for FlexWin
|
561 |
+
*
|
562 |
+
* @return array
|
563 |
+
*/
|
564 |
+
function dibsflex_api_DBarray_FlexWin() {
|
565 |
+
return array('orderid','amount','currency','test','acquirer','transact',
|
566 |
+
'uniqueoid','paytype','cardnomask','cardcountry','approvalcode',
|
567 |
+
'fee','voucher','amount_original','voucher_amount','voucher_entry',
|
568 |
+
'voucher_payment_id','voucher_rest','enrolled','cardprefix',
|
569 |
+
'cardexpdate');
|
570 |
+
}
|
571 |
+
|
572 |
+
/**
|
573 |
+
* Checks required fields returned from gateway on success and callback.
|
574 |
+
*
|
575 |
+
* @param type $oOrder
|
576 |
+
* @return type
|
577 |
+
*/
|
578 |
+
function dibsflex_api_checkMainFields($oOrder) {
|
579 |
+
|
580 |
+
if (isset($_POST['orderid'])) {
|
581 |
+
$oOrder = $this->dibsflex_helper_getOrderObj($oOrder, TRUE);
|
582 |
+
if(!$oOrder->order_id) return 11;
|
583 |
+
}
|
584 |
+
else return 12;
|
585 |
+
|
586 |
+
if (isset($_POST['voucher_amount']) && $_POST['voucher_amount'] > 0) {
|
587 |
+
if(isset($_POST['amount']) && $_POST['amount'] > 0) {
|
588 |
+
$iAmount = $_POST['amount_original'];
|
589 |
+
}
|
590 |
+
else $iAmount = $_POST['voucher_amount'];
|
591 |
+
}
|
592 |
+
else $iAmount = $_POST['amount'];
|
593 |
+
|
594 |
+
if (isset($_POST['fee'])) {
|
595 |
+
$iFeeAmount = $iAmount - $_POST['fee'];
|
596 |
+
}
|
597 |
+
|
598 |
+
if (isset($_POST['amount'])) {
|
599 |
+
if ((abs((int)$iAmount - $oOrder->total) >= 0.01) &&
|
600 |
+
(abs((int)$iFeeAmount - $oOrder->total) >= 0.01)) return 21;
|
601 |
+
}
|
602 |
+
else return 22;
|
603 |
+
|
604 |
+
if (isset($_POST['currency'])) {
|
605 |
+
if ((int)$oOrder->currency != (int)$_POST['currency']) return 31;
|
606 |
+
}
|
607 |
+
else return 32;
|
608 |
+
|
609 |
+
if ($this->dibsflex_helper_getconfig('md51') != "" &&
|
610 |
+
$this->dibsflex_helper_getconfig('md52') != "") {
|
611 |
+
if ($this->dibsflex_api_checkMD5($_POST) !== TRUE) return 41;
|
612 |
+
}
|
613 |
+
|
614 |
+
return FALSE;
|
615 |
+
}
|
616 |
+
|
617 |
+
/**
|
618 |
+
* Compare calculated MD5 with MD5 from response
|
619 |
+
*
|
620 |
+
* @param array $aReq
|
621 |
+
* @return bool
|
622 |
+
*/
|
623 |
+
function dibsflex_api_checkMD5($aReq) {
|
624 |
+
$sReqMD5 = $aReq['authkey'];
|
625 |
+
unset($aReq['authkey']);
|
626 |
+
$sMD5 = $this->dibsflex_api_calcMD5($aReq, TRUE);
|
627 |
+
if($sReqMD5 == $sMD5) return TRUE;
|
628 |
+
else return FALSE;
|
629 |
+
}
|
630 |
+
|
631 |
+
/**
|
632 |
+
* Collects invoice response information.
|
633 |
+
*
|
634 |
+
* @param array $aFields
|
635 |
+
*/
|
636 |
+
function dibsflex_api_callbackPBB(&$aFields) {
|
637 |
+
$aFields['PBB_customerId'] = isset($_POST['customerId']) ? $_POST['customerId'] : "-";
|
638 |
+
$aFields['PBB_deliveryAddress'] = isset($_POST['deliveryAddress']) ? iconv("ISO-8859-1","UTF-8",$_POST['deliveryAddress']) : "-";
|
639 |
+
$aFields['PBB_deliveryCountryCode'] = isset($_POST['deliveryCountryCode']) ? iconv("ISO-8859-1","UTF-8",$_POST['deliveryCountryCode']) : "-";
|
640 |
+
$aFields['PBB_deliveryPostalCode'] = isset($_POST['deliveryPostalCode']) ? iconv("ISO-8859-1","UTF-8",$_POST['deliveryPostalCode']) : "-";
|
641 |
+
$aFields['PBB_deliveryPostalPlace'] = isset($_POST['deliveryPostalPlace']) ? iconv("ISO-8859-1","UTF-8",$_POST['deliveryPostalPlace']) : "-";
|
642 |
+
$aFields['PBB_firstName'] = isset($_POST['firstName']) ? iconv("ISO-8859-1","UTF-8",$_POST['firstName']) : "-";
|
643 |
+
$aFields['PBB_lastName'] = isset($_POST['lastName']) ? iconv("ISO-8859-1","UTF-8",$_POST['lastName']) : "";
|
644 |
+
}
|
645 |
+
|
646 |
+
/**
|
647 |
+
* Generates error messages if check failed.
|
648 |
+
*
|
649 |
+
* @param int $iErrCode
|
650 |
+
* @return string
|
651 |
+
*/
|
652 |
+
function dibsflex_api_errCodeToMessage($iErrCode) {
|
653 |
+
$sToShopLink = $this->dibsflex_helper_getReturnURLs('cart');
|
654 |
+
$sErrBegin = "<h1>" . $this->dibsflex_helper_getlang('text_err_fatal') . "</h1>";
|
655 |
+
$sErrEnd = "<br><br> <button type=\"button\" onclick=window.location.replace('" .
|
656 |
+
$sToShopLink . "')>" . $this->dibsflex_helper_getlang('text_return_toshop') .
|
657 |
+
"</button>";
|
658 |
+
|
659 |
+
$sErrMessage = $this->dibsflex_helper_getlang('text_err_' . $iErrCode);
|
660 |
+
if($sErrMessage == "") {
|
661 |
+
$sErrMessage = $this->dibsflex_helper_getlang('text_err_def');
|
662 |
+
}
|
663 |
+
|
664 |
+
return $sErrBegin . $sErrMessage . $sErrEnd;
|
665 |
+
}
|
666 |
+
|
667 |
+
/**
|
668 |
+
* Calls helpers to create unified order object.
|
669 |
+
*
|
670 |
+
* @param mixed $mOrderInfo
|
671 |
+
* @return object
|
672 |
+
*/
|
673 |
+
function dibsflex_api_orderObject($mOrderInfo) {
|
674 |
+
return (object)array(
|
675 |
+
'order' => $this->dibsflex_helper_getOrderObj($mOrderInfo),
|
676 |
+
'items' => $this->dibsflex_helper_getItemsObj($mOrderInfo),
|
677 |
+
'shipping' => $this->dibsflex_helper_getShippingObj($mOrderInfo),
|
678 |
+
'customer' => $this->dibsflex_helper_getAddressObj($mOrderInfo)
|
679 |
+
);
|
680 |
+
}
|
681 |
+
|
682 |
+
/**
|
683 |
+
* Encodes string for safe sql transaction.
|
684 |
+
*
|
685 |
+
* @param string $sValue
|
686 |
+
* @return string
|
687 |
+
*/
|
688 |
+
function dibsflex_api_sqlEncode($sValue) {
|
689 |
+
return addslashes(str_replace("`","'",$sValue));
|
690 |
+
}
|
691 |
+
|
692 |
+
/**
|
693 |
+
* Performs "oncallback" operations.
|
694 |
+
*
|
695 |
+
* @param object $oOrder
|
696 |
+
*/
|
697 |
+
function dibsflex_api_callback($oOrder) {
|
698 |
+
$mErr = $this->dibsflex_api_checkMainFields($oOrder);
|
699 |
+
if($mErr !== FALSE) exit((string)$mErr);
|
700 |
+
|
701 |
+
$mStatus = $this->dibsflex_helper_dbquery_read("SELECT `status` FROM `" .
|
702 |
+
$this->dibsflex_helper_getdbprefix() .
|
703 |
+
"dibs_orderdata` WHERE `orderid` = '" .
|
704 |
+
$this->dibsflex_api_sqlEncode($_POST['orderid']) .
|
705 |
+
"' LIMIT 1;");
|
706 |
+
if ($this->dibsflex_helper_dbquery_read_single($mStatus, 'status') == 0) {
|
707 |
+
|
708 |
+
$aFieldsList = $this->dibsflex_api_DBarray();
|
709 |
+
$aFields = array();
|
710 |
+
foreach($aFieldsList as $key => $val) {
|
711 |
+
if(isset($_POST[$val])) {
|
712 |
+
$aFields[$key] = $_POST[$val];
|
713 |
+
}
|
714 |
+
else $_POST[$key] = 0;
|
715 |
+
}
|
716 |
+
|
717 |
+
$this->dibsflex_api_callbackPBB($aFields);
|
718 |
+
|
719 |
+
$aFields['callback'] = '1';
|
720 |
+
$aFields['status'] = '1';
|
721 |
+
|
722 |
+
$this->dibsflex_helper_afterCallback($oOrder);
|
723 |
+
|
724 |
+
$sUpdate = '';
|
725 |
+
foreach ($aFields as $sCell => $sValue) {
|
726 |
+
$sUpdate .= '`' . $sCell.'`=' . "'" . $this->dibsflex_api_sqlEncode($sValue) . "',";
|
727 |
+
}
|
728 |
+
$sUpdate = rtrim($sUpdate, ",");
|
729 |
+
$this->dibsflex_helper_dbquery_write("UPDATE `" .
|
730 |
+
$this->dibsflex_helper_getdbprefix() .
|
731 |
+
"dibs_orderdata` SET " . $sUpdate .
|
732 |
+
" WHERE `orderid`=" .
|
733 |
+
$aFields['orderid']." LIMIT 1;");
|
734 |
+
}
|
735 |
+
else exit();
|
736 |
+
}
|
737 |
+
|
738 |
+
/** START OF CGI API **/
|
739 |
+
|
740 |
+
/**
|
741 |
+
* Returns form with CGI API controls.
|
742 |
+
*
|
743 |
+
* @param string $sOrderId
|
744 |
+
* @return string
|
745 |
+
*/
|
746 |
+
function dibsflex_api_cgibuttons($sOrderId) {
|
747 |
+
$sOutput = "";
|
748 |
+
$sApiLogin = $this->dibsflex_helper_getconfig("apiuser");
|
749 |
+
$sApiPass = $this->dibsflex_helper_getconfig("apipass");
|
750 |
+
if(!empty($sApiLogin) && !empty($sApiPass)) {
|
751 |
+
$sTransac = $this->dibsflex_api_getDibsOrder($sOrderId);
|
752 |
+
if($sTransac != "") {
|
753 |
+
$sState = $this->dibsflex_api_payinfo($sTransac, $sApiLogin,
|
754 |
+
$sApiPass);
|
755 |
+
}
|
756 |
+
else $sState = "Empty transaction ID.";
|
757 |
+
|
758 |
+
if (strpos($sState, "&") !== FALSE && strpos($sState, "=") !== FALSE) {
|
759 |
+
$oState = $this->dibsflex_api_getAsObj($sState);
|
760 |
+
if(isset($oState->status)) {
|
761 |
+
$mStatus = $this->dibsflex_api_getStatusById($oState->status);
|
762 |
+
}
|
763 |
+
|
764 |
+
$sOutput = '<table style="font-size: inherit; vertical-align: inherit; color: inherit; ' .
|
765 |
+
'border-collapse: collapse; border: none; padding: 0px; margin: 0px;">';
|
766 |
+
if($mStatus !== FALSE) {
|
767 |
+
$sOutput .= '<tr><td style="padding: 5px 5px 5px 0px;">Status:</td><td style="padding: 5px;">' .
|
768 |
+
$mStatus . '</td></tr>';
|
769 |
+
}
|
770 |
+
|
771 |
+
switch ($oState->status) {
|
772 |
+
case 2:
|
773 |
+
$sActions = '<input class="'.$this->dibsflex_helper_cgiButtonsClass() .
|
774 |
+
'" type="submit" name="cgicancel" value="Cancel" />
|
775 |
+
<input class="'.$this->dibsflex_helper_cgiButtonsClass() .
|
776 |
+
'" type="submit" name="cgicapture" value="Capture" />';
|
777 |
+
break;
|
778 |
+
case 5:
|
779 |
+
$sActions = '<input class="'.$this->dibsflex_helper_cgiButtonsClass() .
|
780 |
+
'" type="submit" name="cgirefund" value="Refund" />';
|
781 |
+
break;
|
782 |
+
}
|
783 |
+
|
784 |
+
if($oState->status == 2 || $oState->status == 5) {
|
785 |
+
$sOutput .= '<tr><td style="vertical-align: top; padding: 5px 5px 5px 0px;">
|
786 |
+
Actions:</td><td style="padding: 5px;">
|
787 |
+
<form id="dibsflex_cgiform" action="' .
|
788 |
+
$this->dibsflex_helper_getReturnURLs('cgi') .
|
789 |
+
'" method="POST">
|
790 |
+
<input type="hidden" name="transact" value="' . $sTransac . '" />
|
791 |
+
<input type="hidden" name="currency" value="' . $oState->currency . '" />
|
792 |
+
<input type="hidden" name="amount" value="' . $oState->amount . '" />
|
793 |
+
<input type="hidden" name="orderid" value="' . $oState->orderid . '" />
|
794 |
+
<input type="hidden" name="dibsflexreturn" value="' .
|
795 |
+
$this->dibsflex_api_getFullURL() . '" />
|
796 |
+
'.$sActions.'</form></td></tr>';
|
797 |
+
}
|
798 |
+
|
799 |
+
$sOutput .= '</table>';
|
800 |
+
}
|
801 |
+
elseif (strlen(trim($sState, " ,\n,\r,\t")) <= 100) {
|
802 |
+
$sOutput = "Error: " . $sState;
|
803 |
+
}
|
804 |
+
elseif (strpos($sState, "Login problems?") !== FALSE) {
|
805 |
+
$sOutput = "Error: Invalid API credentials. Set correct and try again in 30 minutes.";
|
806 |
+
}
|
807 |
+
}
|
808 |
+
else $sOutput = "Error: Empty API credentials. Set correct and try again in 30 minutes.";
|
809 |
+
|
810 |
+
return $sOutput;
|
811 |
+
}
|
812 |
+
|
813 |
+
/**
|
814 |
+
* Generate URL to redirect user back after API query performed.
|
815 |
+
*
|
816 |
+
* @return string
|
817 |
+
*/
|
818 |
+
function dibsflex_api_getFullURL() {
|
819 |
+
$sPageURL = 'http';
|
820 |
+
|
821 |
+
if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {
|
822 |
+
$sPageURL .= "s";
|
823 |
+
}
|
824 |
+
|
825 |
+
$sPageURL .= "://";
|
826 |
+
if ($_SERVER["SERVER_PORT"] != "80") {
|
827 |
+
$sPageURL .= $_SERVER["SERVER_NAME"] . ":" .
|
828 |
+
$_SERVER["SERVER_PORT"] .
|
829 |
+
$_SERVER["REQUEST_URI"];
|
830 |
+
}
|
831 |
+
else {
|
832 |
+
$sPageURL .= $_SERVER["SERVER_NAME"] .
|
833 |
+
$_SERVER["REQUEST_URI"];
|
834 |
+
}
|
835 |
+
|
836 |
+
return $sPageURL;
|
837 |
+
}
|
838 |
+
|
839 |
+
/**
|
840 |
+
* Performs requested API query and redirects user back.
|
841 |
+
*/
|
842 |
+
function dibsflex_api_cgiapi() {
|
843 |
+
$sApiLogin = $this->dibsflex_helper_getconfig("apiuser");
|
844 |
+
$sApiPass = $this->dibsflex_helper_getconfig("apipass");
|
845 |
+
|
846 |
+
if(!empty($sApiLogin) && !empty($sApiPass)) {
|
847 |
+
if(isset($_POST['cgicancel'])) {
|
848 |
+
$sAPI = 'cancel';
|
849 |
+
$sApiLink = 'https://' . $sApiLogin . ':' . $sApiPass .
|
850 |
+
'@payment.architrade.com/cgi-adm/cancel.cgi';
|
851 |
+
}
|
852 |
+
elseif(isset($_POST['cgicapture'])){
|
853 |
+
$sAPI = 'capture';
|
854 |
+
$sApiLink = 'https://payment.architrade.com/cgi-bin/capture.cgi';
|
855 |
+
}
|
856 |
+
elseif(isset($_POST['cgirefund'])) {
|
857 |
+
$sAPI = 'refund';
|
858 |
+
$sApiLink = 'https://' . $sApiLogin . ':' . $sApiPass .
|
859 |
+
'@payment.architrade.com/cgi-adm/refund.cgi';
|
860 |
+
}
|
861 |
+
else $this->dibsflex_helper_redirect($_POST['dibsflexreturn']);
|
862 |
+
|
863 |
+
$aParams = array(
|
864 |
+
'orderid' => $_POST['orderid'],
|
865 |
+
'merchant' => $this->dibsflex_helper_getconfig("mid"),
|
866 |
+
'transact' => $_POST['transact'],
|
867 |
+
'textreply' => 'yes',
|
868 |
+
'currency' => $_POST['currency'],
|
869 |
+
'amount' => $_POST['amount']
|
870 |
+
);
|
871 |
+
|
872 |
+
$sMD5 = $this->dibsflex_api_cgiCalcMD5($aParams, $sAPI);
|
873 |
+
if($sMD5 != "") $aParams['md5key'] = $sMD5;
|
874 |
+
|
875 |
+
$sRes = $this->dibsflex_api_postcgi($sApiLink, $aParams);
|
876 |
+
$this->dibsflex_helper_redirect($_POST['dibsflexreturn']);
|
877 |
+
}
|
878 |
+
else $this->dibsflex_helper_redirect($_POST['dibsflexreturn']);
|
879 |
+
}
|
880 |
+
|
881 |
+
/**
|
882 |
+
* Generate object from server status response.
|
883 |
+
*
|
884 |
+
* @param string $sGet
|
885 |
+
* @return object
|
886 |
+
*/
|
887 |
+
function dibsflex_api_getAsObj($sGet) {
|
888 |
+
$aResult = array();
|
889 |
+
$aGet = explode("&", $sGet);
|
890 |
+
for($i=0; $i<count($aGet); $i++) {
|
891 |
+
$aTmp = explode("=", $aGet[$i]);
|
892 |
+
if(isset($aTmp[0]) && isset($aTmp[1])) {
|
893 |
+
$aResult[$aTmp[0]] = $aTmp[1];
|
894 |
+
}
|
895 |
+
|
896 |
+
unset($aTmp);
|
897 |
+
}
|
898 |
+
return (object)$aResult;
|
899 |
+
}
|
900 |
+
|
901 |
+
/**
|
902 |
+
* Performs API request to detect current status of transaction.
|
903 |
+
*
|
904 |
+
* @param string $sTransac
|
905 |
+
* @param string $sApiLogin
|
906 |
+
* @param string $sApiPass
|
907 |
+
* @return string
|
908 |
+
*/
|
909 |
+
function dibsflex_api_payinfo($sTransac, $sApiLogin, $sApiPass) {
|
910 |
+
$sResult = $this->dibsflex_api_postcgi("https://" . $sApiLogin . ":" .
|
911 |
+
$sApiPass . "@payment.architrade.com/cgi-adm/payinfo.cgi",
|
912 |
+
array('transact' => $sTransac));
|
913 |
+
return $sResult;
|
914 |
+
}
|
915 |
+
|
916 |
+
/**
|
917 |
+
* Calculate MD5 checksum for each type of API requests.
|
918 |
+
*
|
919 |
+
* @param array $aData
|
920 |
+
* @param string $sAPI
|
921 |
+
* @return string
|
922 |
+
*/
|
923 |
+
function dibsflex_api_cgiCalcMD5($aData, $sAPI) {
|
924 |
+
$sMD5key = "";
|
925 |
+
$sMD5key1 = trim($this->dibsflex_helper_getconfig('md51'), " ,\t,\r,\n");
|
926 |
+
$sMD5key2 = trim($this->dibsflex_helper_getconfig('md52'), " ,\t,\r,\n");
|
927 |
+
if ($sMD5key1 != '' && $sMD5key2 != '') {
|
928 |
+
switch ($sAPI) {
|
929 |
+
case 'cancel':
|
930 |
+
$sMD5key = md5($sMD5key2.md5($sMD5key1 .
|
931 |
+
'merchant=' . $aData['merchant'] .
|
932 |
+
'&orderid=' . $aData['orderid'] .
|
933 |
+
'&transact=' . $aData['transact']));
|
934 |
+
break;
|
935 |
+
case 'capture':
|
936 |
+
case 'refund':
|
937 |
+
$sMD5key = md5($sMD5key2.md5($sMD5key1 .
|
938 |
+
'merchant=' . $aData['merchant'] .
|
939 |
+
'&orderid=' . $aData['orderid'] .
|
940 |
+
'&transact=' . $aData['transact'] .
|
941 |
+
'&amount=' . $aData['amount']));
|
942 |
+
break;
|
943 |
+
}
|
944 |
+
}
|
945 |
+
|
946 |
+
return $sMD5key;
|
947 |
+
}
|
948 |
+
|
949 |
+
|
950 |
+
/**
|
951 |
+
* Process all API queries with cURL lib.
|
952 |
+
*
|
953 |
+
* @param string $sURL
|
954 |
+
* @param array $aParams
|
955 |
+
* @return string
|
956 |
+
*/
|
957 |
+
function dibsflex_api_postcgi($sURL, $aParams) {
|
958 |
+
$sResult = "";
|
959 |
+
$ch = curl_init($sURL);
|
960 |
+
if($ch) {
|
961 |
+
curl_setopt($ch, CURLOPT_POST, TRUE);
|
962 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $aParams);
|
963 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
964 |
+
curl_setopt($ch, CURLOPT_HEADER, FALSE);
|
965 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
966 |
+
$sResult = curl_exec($ch);
|
967 |
+
curl_close($ch);
|
968 |
+
}
|
969 |
+
|
970 |
+
return $sResult;
|
971 |
+
}
|
972 |
+
|
973 |
+
/**
|
974 |
+
* Returns transaction number from DB by order ID.
|
975 |
+
*
|
976 |
+
* @param string $sOrderId
|
977 |
+
* @return string
|
978 |
+
*/
|
979 |
+
function dibsflex_api_getDibsOrder($sOrderId) {
|
980 |
+
$mResult = $this->dibsflex_helper_dbquery_read("SELECT `transact` AS transact FROM " .
|
981 |
+
$this->dibsflex_helper_getdbprefix() . "dibs_orderdata
|
982 |
+
WHERE orderid=".$sOrderId." AND `status`=1 LIMIT 1");
|
983 |
+
|
984 |
+
$sRes = $this->dibsflex_helper_dbquery_read_single($mResult, 'transact');
|
985 |
+
return $sRes;
|
986 |
+
}
|
987 |
+
|
988 |
+
/**
|
989 |
+
* Returns title of status by its ID or FALSE if not found.
|
990 |
+
*
|
991 |
+
* @param string $sId
|
992 |
+
* @return mixed
|
993 |
+
*/
|
994 |
+
function dibsflex_api_getStatusById($sId) {
|
995 |
+
$aStates = array(
|
996 |
+
'0' => 'Authorization shipped',
|
997 |
+
'1' => 'Authorization denied',
|
998 |
+
'2' => 'New (auth approved)',
|
999 |
+
'3' => 'Capture shipped',
|
1000 |
+
'4' => 'Capture rejected',
|
1001 |
+
'5' => 'Captured',
|
1002 |
+
'6' => 'Canceled',
|
1003 |
+
'9' => 'Refund shipped',
|
1004 |
+
'10' => 'Refund rejected',
|
1005 |
+
'11' => 'Refund approved'
|
1006 |
+
);
|
1007 |
+
|
1008 |
+
if(isset($aStates[$sId])) return $aStates[$sId];
|
1009 |
+
else return FALSE;
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
/** EOF CGI API **/
|
1013 |
+
}
|
1014 |
+
?>
|
app/code/community/DibsFlex/DibsFlex/Model/dibsflex_api/dibsflex_helpers.php
ADDED
@@ -0,0 +1,176 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
interface dibsflex_helpers_iface {
|
3 |
+
function dibsflex_helper_dbquery_write($sQuery);
|
4 |
+
function dibsflex_helper_dbquery_read($sQuery);
|
5 |
+
function dibsflex_helper_dbquery_read_single($mResult, $sName);
|
6 |
+
function dibsflex_helper_cmsurl($sLink);
|
7 |
+
function dibsflex_helper_getconfig($sVar);
|
8 |
+
function dibsflex_helper_getdbprefix();
|
9 |
+
function dibsflex_helper_getReturnURLs($sURL);
|
10 |
+
function dibsflex_helper_getOrderObj($mOrderInfo, $bResponse = FALSE);
|
11 |
+
function dibsflex_helper_getAddressObj($mOrderInfo);
|
12 |
+
function dibsflex_helper_getShippingObj($mOrderInfo);
|
13 |
+
function dibsflex_helper_getItemsObj($mOrderInfo);
|
14 |
+
function dibsflex_helper_redirect($sURL);
|
15 |
+
function dibsflex_helper_afterCallback($oOrder);
|
16 |
+
function dibsflex_helper_getlang($sKey);
|
17 |
+
function dibsflex_helper_cgiButtonsClass();
|
18 |
+
function dibsflex_helper_modVersion();
|
19 |
+
}
|
20 |
+
|
21 |
+
class dibsflex_helpers extends dibsflex_helpers_cms implements dibsflex_helpers_iface {
|
22 |
+
|
23 |
+
/** START OF DIBS HELPERS AREA **/
|
24 |
+
|
25 |
+
function dibsflex_helper_dbquery_write($sQuery) {
|
26 |
+
$oWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
|
27 |
+
return $oWrite->query($sQuery);
|
28 |
+
}
|
29 |
+
|
30 |
+
function dibsflex_helper_dbquery_read($sQuery) {
|
31 |
+
$oRead = Mage::getSingleton('core/resource')->getConnection('core_read');
|
32 |
+
return $oRead->fetchRow($sQuery);
|
33 |
+
}
|
34 |
+
|
35 |
+
function dibsflex_helper_dbquery_read_single($mResult, $sName) {
|
36 |
+
if(isset($mResult[$sName])) return $mResult[$sName];
|
37 |
+
else return null;
|
38 |
+
}
|
39 |
+
|
40 |
+
function dibsflex_helper_cmsurl($sLink) {
|
41 |
+
return Mage::getUrl($sLink);
|
42 |
+
}
|
43 |
+
|
44 |
+
function dibsflex_helper_getconfig($sVar, $sPrefix = 'DIBSFLEX_') {
|
45 |
+
return $this->getConfigData($sPrefix . $sVar);
|
46 |
+
}
|
47 |
+
|
48 |
+
function dibsflex_helper_getdbprefix() {
|
49 |
+
return Mage::getConfig()->getTablePrefix();
|
50 |
+
}
|
51 |
+
|
52 |
+
function dibsflex_helper_getReturnURLs($sURL) {
|
53 |
+
|
54 |
+
switch ($sURL) {
|
55 |
+
case 'success':
|
56 |
+
return $this->dibsflex_helper_cmsurl("DibsFlex/DibsFlex/success");
|
57 |
+
break;
|
58 |
+
case 'callback':
|
59 |
+
return $this->dibsflex_helper_cmsurl("DibsFlex/DibsFlex/callback");
|
60 |
+
break;
|
61 |
+
case 'callbackfix':
|
62 |
+
return $this->dibsflex_helper_cmsurl("DibsFlex/DibsFlex/callback");
|
63 |
+
break;
|
64 |
+
case 'cgi':
|
65 |
+
return $this->dibsflex_helper_cmsurl('DibsFlex/DibsFlex/cgiapi');
|
66 |
+
break;
|
67 |
+
case 'cancel':
|
68 |
+
return $this->dibsflex_helper_cmsurl("DibsFlex/DibsFlex/cancel");
|
69 |
+
break;
|
70 |
+
default:
|
71 |
+
return $this->dibsflex_helper_cmsurl('customer/account/index');
|
72 |
+
break;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
function dibsflex_helper_getOrderObj($mOrderInfo, $bResponse = FALSE) {
|
77 |
+
if($bResponse === TRUE) {
|
78 |
+
$mOrderInfo->loadByIncrementId((int)$_POST['orderid']);
|
79 |
+
}
|
80 |
+
|
81 |
+
return (object)array(
|
82 |
+
'order_id' => $mOrderInfo->getRealOrderId(),
|
83 |
+
'total' => $this->dibsflex_api_float2intSmartRounding($mOrderInfo->getTotalDue()),
|
84 |
+
'currency' => $this->dibsflex_api_getCurrencyValue(
|
85 |
+
$mOrderInfo->getOrderCurrency()->getCode()
|
86 |
+
)
|
87 |
+
);
|
88 |
+
}
|
89 |
+
|
90 |
+
function dibsflex_helper_getAddressObj($mOrderInfo) {
|
91 |
+
$aShipping = $mOrderInfo->getShippingAddress();
|
92 |
+
$aBilling = $mOrderInfo->getBillingAddress();
|
93 |
+
|
94 |
+
return (object)array(
|
95 |
+
'billing' => (object)array(
|
96 |
+
'firstname' => $aBilling['firstname'],
|
97 |
+
'lastname' => $aBilling['lastname'],
|
98 |
+
'street' => $aBilling['street'],
|
99 |
+
'postcode' => $aBilling['postcode'],
|
100 |
+
'city' => $aBilling['city'],
|
101 |
+
'region' => $aBilling['region'],
|
102 |
+
'country' => $aBilling['country_id'],
|
103 |
+
'phone' => $aBilling['telephone'],
|
104 |
+
'email' => $mOrderInfo['customer_email']
|
105 |
+
),
|
106 |
+
'delivery' => (object)array(
|
107 |
+
'firstname' => $aShipping['firstname'],
|
108 |
+
'lastname' => $aShipping['lastname'],
|
109 |
+
'street' => $aShipping['street'],
|
110 |
+
'postcode' => $aShipping['postcode'],
|
111 |
+
'city' => $aShipping['city'],
|
112 |
+
'region' => $aShipping['region'],
|
113 |
+
'country' => $aShipping['country_id'],
|
114 |
+
'phone' => $aShipping['telephone'],
|
115 |
+
'email' => $mOrderInfo['customer_email']
|
116 |
+
)
|
117 |
+
);
|
118 |
+
}
|
119 |
+
|
120 |
+
function dibsflex_helper_getShippingObj($mOrderInfo) {
|
121 |
+
return (object)array(
|
122 |
+
'method' => $mOrderInfo['shipping_description'],
|
123 |
+
'rate' => $this->dibsflex_api_float2intSmartRounding($mOrderInfo['shipping_amount']),
|
124 |
+
'tax' => $this->dibsflex_api_float2intSmartRounding($this->cms_get_shippingTaxPercent($mOrderInfo))
|
125 |
+
);
|
126 |
+
}
|
127 |
+
|
128 |
+
function dibsflex_helper_getItemsObj($mOrderInfo) {
|
129 |
+
foreach($mOrderInfo->getAllItems() as $oItem) {
|
130 |
+
$oItems[] = (object)array(
|
131 |
+
'item_id' => $oItem->getProductId(),
|
132 |
+
'name' => $oItem->getName(),
|
133 |
+
'sku' => $oItem->getSku(),
|
134 |
+
'price' => $this->dibsflex_api_float2intSmartRounding($oItem->getPrice()),
|
135 |
+
'qty' => $this->dibsflex_api_float2intSmartRounding($oItem->getQtyOrdered(), 3),
|
136 |
+
'tax_name' => '',
|
137 |
+
'tax_rate' => $this->dibsflex_api_float2intSmartRounding($oItem->getTaxPercent())
|
138 |
+
);
|
139 |
+
}
|
140 |
+
return $oItems;
|
141 |
+
}
|
142 |
+
|
143 |
+
function dibsflex_helper_redirect($sURL) {
|
144 |
+
Mage::app()->getFrontController()->getResponse()->setRedirect($sURL);
|
145 |
+
}
|
146 |
+
|
147 |
+
function dibsflex_helper_afterCallback($oOrder) {
|
148 |
+
$session = Mage::getSingleton('checkout/session');
|
149 |
+
$session->setQuoteId($session->getDibsFlexStandardQuoteId(true));
|
150 |
+
|
151 |
+
if (((int)$this->dibsflex_helper_getconfig('sendmailorderconfirmation', '')) == 1) {
|
152 |
+
$oOrder->sendNewOrderEmail();
|
153 |
+
}
|
154 |
+
|
155 |
+
$this->removeFromStock();
|
156 |
+
$this->setOrderStatusAfterPayment();
|
157 |
+
$session->setQuoteId($session->getDibsFlexStandardQuoteId(true));
|
158 |
+
}
|
159 |
+
|
160 |
+
function dibsflex_helper_getlang($sKey) {
|
161 |
+
$aLang = $this->mage_getTextArray();
|
162 |
+
return $aLang[$sKey];
|
163 |
+
}
|
164 |
+
|
165 |
+
function dibsflex_helper_cgiButtonsClass() {
|
166 |
+
return 'form-button';
|
167 |
+
}
|
168 |
+
|
169 |
+
function dibsflex_helper_modVersion() {
|
170 |
+
return 'mgn1_3.0.1';
|
171 |
+
}
|
172 |
+
|
173 |
+
|
174 |
+
/** END OF DIBS HELPERS AREA **/
|
175 |
+
}
|
176 |
+
?>
|
app/code/community/DibsFlex/DibsFlex/Model/dibsflex_api/dibsflex_helpers_cms.php
ADDED
@@ -0,0 +1,73 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
class dibsflex_helpers_cms extends Mage_Payment_Model_Method_Abstract {
|
3 |
+
protected $_code = 'DibsFlex';
|
4 |
+
|
5 |
+
function cms_get_shippingTaxPercent($oOrder) {
|
6 |
+
if($oOrder['shipping_tax_amount'] == 0 || $oOrder['shipping_amount'] == 0) return 0;
|
7 |
+
else {
|
8 |
+
return ($oOrder['shipping_tax_amount'] * 100) / $oOrder['shipping_amount'];
|
9 |
+
}
|
10 |
+
}
|
11 |
+
|
12 |
+
function mage_getTextArray() {
|
13 |
+
$aText = array(
|
14 |
+
'text_err_fatal' => 'A fatal error has occured!',
|
15 |
+
'text_return_toshop' => 'Return to shop',
|
16 |
+
'text_err_11' => 'Unknown orderid was returned from DIBS payment gateway!',
|
17 |
+
'text_err_12' => 'No orderid was returned from DIBS payment gateway!',
|
18 |
+
'text_err_21' => 'The amount received from DIBS payment gateway
|
19 |
+
differs from original order amount!',
|
20 |
+
'text_err_22' => 'No amount was returned from DIBS payment gateway!',
|
21 |
+
'text_err_31' => 'The currency type received from DIBS payment gateway
|
22 |
+
differs from original order currency type!',
|
23 |
+
'text_err_32' => 'No currency type was returned from DIBS payment
|
24 |
+
gateway!',
|
25 |
+
'text_err_41' => 'The fingerprint key does not match!',
|
26 |
+
'text_err_def' => 'Unknown error appeared. Please contact to shop
|
27 |
+
administration to check transaction.'
|
28 |
+
);
|
29 |
+
|
30 |
+
return $aText;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function setOrderStatusAfterPayment(){
|
34 |
+
$order = Mage::getModel('sales/order');
|
35 |
+
$order->loadByIncrementId($_REQUEST['orderid']);
|
36 |
+
$order->setState($this->getConfigData('order_status_after_payment'),
|
37 |
+
true,
|
38 |
+
Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_22'));
|
39 |
+
// $order->addStatusToHistory($this->oDibsModel->getConfigData('order_status_after_payment'),
|
40 |
+
// $this->__('DIBSFLEX_LABEL_22'));
|
41 |
+
$order->save();
|
42 |
+
}
|
43 |
+
|
44 |
+
// Remove from stock (if used)
|
45 |
+
public function removeFromStock() {
|
46 |
+
// Load the session object
|
47 |
+
$session = Mage::getSingleton('checkout/session');
|
48 |
+
$session->setDibsFlexStandardQuoteId($session->getQuoteId());
|
49 |
+
|
50 |
+
// Load the order object
|
51 |
+
$order = Mage::getModel('sales/order');
|
52 |
+
$order->loadByIncrementId($_REQUEST['orderid']);
|
53 |
+
|
54 |
+
// remove items from stock
|
55 |
+
// http://www.magentocommerce.com/wiki/groups/132/protx_form_-_subtracting_stock_on_successful_payment
|
56 |
+
if (((int)$this->getConfigData('handlestock')) == 1) {
|
57 |
+
$items = $order->getAllItems(); // Get all items from the order
|
58 |
+
if ($items) {
|
59 |
+
foreach($items as $item) {
|
60 |
+
$quantity = $item->getQtyOrdered(); // get Qty ordered
|
61 |
+
$product_id = $item->getProductId(); // get it's ID
|
62 |
+
// Load the stock for this product
|
63 |
+
$stock = Mage::getModel('cataloginventory/stock_item')
|
64 |
+
->loadByProduct($product_id);
|
65 |
+
$stock->setQty($stock->getQty()-$quantity); // Set to new Qty
|
66 |
+
$stock->save(); // Save
|
67 |
+
continue;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
?>
|
app/code/community/DibsFlex/DibsFlex/controllers/DibsFlexController.php
ADDED
@@ -0,0 +1,171 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Dibs A/S
|
4 |
+
* Dibs Payment Extension
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Payments & Gateways Extensions
|
17 |
+
* @package DibsFlex_DibsFlex
|
18 |
+
* @author Dibs A/S
|
19 |
+
* @copyright Copyright (c) 2010 Dibs A/S. (http://www.dibs.dk/)
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Payment Controller
|
25 |
+
**/
|
26 |
+
|
27 |
+
class DibsFlex_DibsFlex_DibsFlexController extends Mage_Core_Controller_Front_Action {
|
28 |
+
protected $_order;
|
29 |
+
private $oDibsModel;
|
30 |
+
|
31 |
+
function _construct() {
|
32 |
+
$this->oDibsModel= Mage::getModel('dibsflex/DibsFlex');
|
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->setDibsFlexStandardQuoteId($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 |
+
public function redirectAction(){
|
80 |
+
// Load the session object
|
81 |
+
$session = Mage::getSingleton('checkout/session');
|
82 |
+
$session->setDibsFlexQuoteId($session->getQuoteId());
|
83 |
+
|
84 |
+
// Create the POST to DIBS (Inside Magento Checkout)
|
85 |
+
$this->loadLayout();
|
86 |
+
$this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('dibsflex/redirect'));
|
87 |
+
$this->renderLayout();
|
88 |
+
|
89 |
+
// Create the POST to DIBS (In Separate "Blank" Window)
|
90 |
+
// $this->getResponse()->setBody($this->getLayout()->createBlock('DibsFlex/redirect')->toHtml());
|
91 |
+
|
92 |
+
// Save order comment
|
93 |
+
$order = Mage::getModel('sales/order');
|
94 |
+
$order->loadByIncrementId($session->getLastRealOrderId());
|
95 |
+
$order->addStatusToHistory($order->getStatus(),$this->__('DIBSFLEX_LABEL_3'));
|
96 |
+
$order->save();
|
97 |
+
|
98 |
+
// Add items back on stock (if used)
|
99 |
+
$this->addToStock();
|
100 |
+
}
|
101 |
+
|
102 |
+
public function getOrder (){
|
103 |
+
if ($this->_order == null) {
|
104 |
+
$session = Mage::getSingleton('checkout/session');
|
105 |
+
$this->_order = Mage::getModel('sales/order');
|
106 |
+
$this->_order->loadByIncrementId($session->getLastRealOrderId());
|
107 |
+
}
|
108 |
+
return $this->_order;
|
109 |
+
}
|
110 |
+
|
111 |
+
public function successAction() {
|
112 |
+
$session = Mage::getSingleton('checkout/session');
|
113 |
+
$session->setQuoteId($session->getDibsFlexStandardQuoteId(true));
|
114 |
+
$order = Mage::getModel('sales/order');
|
115 |
+
$fields = array();
|
116 |
+
|
117 |
+
$mErr = $this->oDibsModel->dibsflex_api_checkMainFields($order, TRUE);
|
118 |
+
if($mErr === FALSE) {
|
119 |
+
$fields['successaction'] = '1';
|
120 |
+
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
121 |
+
$write->update($this->oDibsModel->dibsflex_helper_getdbprefix() .
|
122 |
+
'dibs_orderdata', $fields,'orderid='.$order->getRealOrderId());
|
123 |
+
|
124 |
+
$this->oDibsModel->dibsflex_helper_redirect(
|
125 |
+
$this->oDibsModel->dibsflex_helper_cmsurl('checkout/onepage/success'));
|
126 |
+
}
|
127 |
+
else {
|
128 |
+
echo $this->oDibsModel->dibsflex_api_errCodeToMessage($mErr);
|
129 |
+
exit();
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
public function callbackAction() {
|
134 |
+
$order = Mage::getModel('sales/order');
|
135 |
+
$this->oDibsModel->dibsflex_api_callback($order);
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* When a customer cancel payment from dibs.
|
140 |
+
*/
|
141 |
+
public function cancelAction() {
|
142 |
+
$session = Mage::getSingleton('checkout/session');
|
143 |
+
$session->setQuoteId($session->getDibsFlexStandardQuoteId(true));
|
144 |
+
$fields = array();
|
145 |
+
|
146 |
+
// Save order comment
|
147 |
+
$order = Mage::getModel('sales/order');
|
148 |
+
|
149 |
+
if (isset($_REQUEST['orderid'])) {
|
150 |
+
$order->loadByIncrementId((int)$_REQUEST['orderid']);
|
151 |
+
$order->registerCancellation($this->__('DIBSFLEX_LABEL_20'));
|
152 |
+
$order->save();
|
153 |
+
|
154 |
+
// Add items back on stock (if used)
|
155 |
+
$this->oDibsModel->removeFromStock();
|
156 |
+
|
157 |
+
// Mark in DIBS specific DB table that order cancellation has been performed
|
158 |
+
$fields['ordercancellation'] = '1';
|
159 |
+
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
160 |
+
$write->update($this->oDibsModel->dibsflex_helper_getdbprefix() .
|
161 |
+
'dibs_orderdata', $fields,'orderid='.$order->getRealOrderId());
|
162 |
+
}
|
163 |
+
// Give back cart to customer for new attempt to buy
|
164 |
+
$this->oDibsModel->dibsflex_helper_redirect(
|
165 |
+
$this->oDibsModel->dibsflex_helper_cmsurl('checkout/cart'));
|
166 |
+
}
|
167 |
+
|
168 |
+
function cgiapiAction() {
|
169 |
+
$this->oDibsModel->dibsflex_api_cgiapi();
|
170 |
+
}
|
171 |
+
}
|
app/code/community/DibsFlex/DibsFlex/etc/config.xml
ADDED
@@ -0,0 +1,140 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
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 DibsFlex_DibsFlex
|
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 |
+
<config>
|
25 |
+
<modules>
|
26 |
+
<DibsFlex_DibsFlex>
|
27 |
+
<version>3.0.1</version>
|
28 |
+
<depends>
|
29 |
+
<Mage_Paygate />
|
30 |
+
</depends>
|
31 |
+
</DibsFlex_DibsFlex>
|
32 |
+
</modules>
|
33 |
+
<global>
|
34 |
+
<blocks>
|
35 |
+
<dibsflex>
|
36 |
+
<class>DibsFlex_DibsFlex_Block</class>
|
37 |
+
</dibsflex>
|
38 |
+
</blocks>
|
39 |
+
<models>
|
40 |
+
<dibsflex>
|
41 |
+
<class>DibsFlex_DibsFlex_Model</class>
|
42 |
+
<resourceModel>dibsflex_mysql4</resourceModel>
|
43 |
+
</dibsflex>
|
44 |
+
<dibsflex_mysql4>
|
45 |
+
<class>DibsFlex_DibsFlex_Model_Mysql4</class>
|
46 |
+
<entities>
|
47 |
+
<api_debug>
|
48 |
+
<table>dibsflex_api_debug</table>
|
49 |
+
</api_debug>
|
50 |
+
</entities>
|
51 |
+
</dibsflex_mysql4>
|
52 |
+
</models>
|
53 |
+
<helpers>
|
54 |
+
<dibsflex>
|
55 |
+
<class>DibsFlex_DibsFlex_Helper</class>
|
56 |
+
</dibsflex>
|
57 |
+
</helpers>
|
58 |
+
<resources>
|
59 |
+
<dibsflex_setup>
|
60 |
+
<setup>
|
61 |
+
<module>DibsFlex_DibsFlex</module>
|
62 |
+
</setup>
|
63 |
+
<connection>
|
64 |
+
<use>core_setup</use>
|
65 |
+
</connection>
|
66 |
+
</dibsflex_setup>
|
67 |
+
<dibsflex_write>
|
68 |
+
<connection>
|
69 |
+
<use>core_write</use>
|
70 |
+
</connection>
|
71 |
+
</dibsflex_write>
|
72 |
+
<dibsflex_read>
|
73 |
+
<connection>
|
74 |
+
<use>core_read</use>
|
75 |
+
</connection>
|
76 |
+
</dibsflex_read>
|
77 |
+
</resources>
|
78 |
+
</global>
|
79 |
+
<frontend>
|
80 |
+
<routers>
|
81 |
+
<DibsFlex>
|
82 |
+
<use>standard</use>
|
83 |
+
<args>
|
84 |
+
<module>DibsFlex_DibsFlex</module>
|
85 |
+
<frontName>DibsFlex</frontName>
|
86 |
+
</args>
|
87 |
+
</DibsFlex>
|
88 |
+
</routers>
|
89 |
+
</frontend>
|
90 |
+
<frontend>
|
91 |
+
<translate>
|
92 |
+
<modules>
|
93 |
+
<Mage_DibsFlex>
|
94 |
+
<files>
|
95 |
+
<default>Mage_DibsFlex.csv</default>
|
96 |
+
</files>
|
97 |
+
</Mage_DibsFlex>
|
98 |
+
</modules>
|
99 |
+
</translate>
|
100 |
+
</frontend>
|
101 |
+
<adminhtml>
|
102 |
+
<translate>
|
103 |
+
<modules>
|
104 |
+
<Mage_DibsFlex>
|
105 |
+
<files>
|
106 |
+
<default>Mage_DibsFlex.csv</default>
|
107 |
+
</files>
|
108 |
+
</Mage_DibsFlex>
|
109 |
+
</modules>
|
110 |
+
</translate>
|
111 |
+
</adminhtml>
|
112 |
+
<default>
|
113 |
+
<payment>
|
114 |
+
<DibsFlex>
|
115 |
+
<active>0</active>
|
116 |
+
<url_failure>checkout/cart</url_failure>
|
117 |
+
<url_accept>checkout/success</url_accept>
|
118 |
+
<url_callback>checkout/cart</url_callback>
|
119 |
+
<model>dibsflex/DibsFlex</model>
|
120 |
+
<order_status>2</order_status>
|
121 |
+
<order_status_after_payment>2</order_status_after_payment>
|
122 |
+
<DIBSFLEX_testmode>yes</DIBSFLEX_testmode>
|
123 |
+
<title>DIBS FlexWin | Secure Payment Services</title>
|
124 |
+
<DIBSFLEX_capt>no</DIBSFLEX_capt>
|
125 |
+
<DIBSFLEX_uniq>no</DIBSFLEX_uniq>
|
126 |
+
<DIBSFLEX_voucher>no</DIBSFLEX_voucher>
|
127 |
+
<DIBSFLEX_fee>no</DIBSFLEX_fee>
|
128 |
+
<DIBSFLEX_paytype>VISA,MC</DIBSFLEX_paytype>
|
129 |
+
<DIBSFLEX_skiplast>no</DIBSFLEX_skiplast>
|
130 |
+
<DIBSFLEX_decor>default</DIBSFLEX_decor>
|
131 |
+
<DIBSFLEX_color>blank</DIBSFLEX_color>
|
132 |
+
<DIBSFLEX_lang>en</DIBSFLEX_lang>
|
133 |
+
<sendmailorderconfirmation>1</sendmailorderconfirmation>
|
134 |
+
<dibsflexlogos>DIBS</dibsflexlogos>
|
135 |
+
<handlestock>1</handlestock>
|
136 |
+
<DIBSFLEX_distr>empty</DIBSFLEX_distr>
|
137 |
+
</DibsFlex>
|
138 |
+
</payment>
|
139 |
+
</default>
|
140 |
+
</config>
|
app/code/community/DibsFlex/DibsFlex/etc/system.xml
ADDED
@@ -0,0 +1,249 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
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 DibsFlex_DibsFlex
|
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 |
+
<config>
|
25 |
+
<sections>
|
26 |
+
<payment translate="label" module="payment">
|
27 |
+
<groups>
|
28 |
+
<DibsFlex translate="label">
|
29 |
+
<label>DIBS FlexWin Module</label>
|
30 |
+
<frontend_type>text</frontend_type>
|
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>0</show_in_store>
|
35 |
+
<fields>
|
36 |
+
<active translate="label">
|
37 |
+
<label>Enabled</label>
|
38 |
+
<frontend_type>select</frontend_type>
|
39 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
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>0</show_in_store>
|
44 |
+
</active>
|
45 |
+
<title translate="label">
|
46 |
+
<label>Title (Payment method name displayed for customers. Ex: DibsGW) </label>
|
47 |
+
<frontend_type>text</frontend_type>
|
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>0</show_in_store>
|
52 |
+
</title>
|
53 |
+
<order_status translate="label">
|
54 |
+
<label>Order status (Before the payment is made)</label>
|
55 |
+
<frontend_type>select</frontend_type>
|
56 |
+
<source_model>dibsflex/System_Config_Source_Orderstatusbefore</source_model>
|
57 |
+
<sort_order>3</sort_order>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>1</show_in_website>
|
60 |
+
<show_in_store>0</show_in_store>
|
61 |
+
</order_status>
|
62 |
+
<order_status_after_payment translate="label">
|
63 |
+
<label>New order status (When the payment is made)</label>
|
64 |
+
<frontend_type>select</frontend_type>
|
65 |
+
<source_model>dibsflex/System_Config_Source_Orderstatusafter</source_model>
|
66 |
+
<sort_order>4</sort_order>
|
67 |
+
<show_in_default>1</show_in_default>
|
68 |
+
<show_in_website>1</show_in_website>
|
69 |
+
<show_in_store>0</show_in_store>
|
70 |
+
</order_status_after_payment>
|
71 |
+
<DIBSFLEX_mid translate="label">
|
72 |
+
<label>DIBS Merchant ID</label>
|
73 |
+
<frontend_type>text</frontend_type>
|
74 |
+
<sort_order>5</sort_order>
|
75 |
+
<show_in_default>1</show_in_default>
|
76 |
+
<show_in_website>1</show_in_website>
|
77 |
+
<show_in_store>1</show_in_store>
|
78 |
+
</DIBSFLEX_mid>
|
79 |
+
<DIBSFLEX_apiuser translate="label">
|
80 |
+
<label>DIBS API login</label>
|
81 |
+
<frontend_type>text</frontend_type>
|
82 |
+
<sort_order>6</sort_order>
|
83 |
+
<show_in_default>1</show_in_default>
|
84 |
+
<show_in_website>1</show_in_website>
|
85 |
+
<show_in_store>1</show_in_store>
|
86 |
+
</DIBSFLEX_apiuser>
|
87 |
+
<DIBSFLEX_apipass translate="label">
|
88 |
+
<label>DIBS API password</label>
|
89 |
+
<frontend_type>text</frontend_type>
|
90 |
+
<sort_order>7</sort_order>
|
91 |
+
<show_in_default>1</show_in_default>
|
92 |
+
<show_in_website>1</show_in_website>
|
93 |
+
<show_in_store>1</show_in_store>
|
94 |
+
</DIBSFLEX_apipass>
|
95 |
+
<DIBSFLEX_testmode translate="label">
|
96 |
+
<label>Test mode</label>
|
97 |
+
<frontend_type>select</frontend_type>
|
98 |
+
<source_model>dibsflex/System_Config_Source_Dibsyesno</source_model>
|
99 |
+
<sort_order>8</sort_order>
|
100 |
+
<show_in_default>1</show_in_default>
|
101 |
+
<show_in_website>1</show_in_website>
|
102 |
+
<show_in_store>1</show_in_store>
|
103 |
+
</DIBSFLEX_testmode>
|
104 |
+
<DIBSFLEX_uniq translate="label">
|
105 |
+
<label>Unique order id</label>
|
106 |
+
<frontend_type>select</frontend_type>
|
107 |
+
<source_model>dibsflex/System_Config_Source_Dibsyesno</source_model>
|
108 |
+
<sort_order>9</sort_order>
|
109 |
+
<show_in_default>1</show_in_default>
|
110 |
+
<show_in_website>1</show_in_website>
|
111 |
+
<show_in_store>0</show_in_store>
|
112 |
+
</DIBSFLEX_uniq>
|
113 |
+
<DIBSFLEX_paytype translate="label">
|
114 |
+
<label>Paytype</label>
|
115 |
+
<frontend_type>text</frontend_type>
|
116 |
+
<sort_order>10</sort_order>
|
117 |
+
<show_in_default>1</show_in_default>
|
118 |
+
<show_in_website>1</show_in_website>
|
119 |
+
<show_in_store>0</show_in_store>
|
120 |
+
</DIBSFLEX_paytype>
|
121 |
+
<DIBSFLEX_lang translate="label">
|
122 |
+
<label>Language</label>
|
123 |
+
<frontend_type>select</frontend_type>
|
124 |
+
<source_model>dibsflex/system_config_source_lang</source_model>
|
125 |
+
<sort_order>11</sort_order>
|
126 |
+
<show_in_default>2</show_in_default>
|
127 |
+
<show_in_website>2</show_in_website>
|
128 |
+
<show_in_store>0</show_in_store>
|
129 |
+
</DIBSFLEX_lang>
|
130 |
+
<sendmailorderconfirmation translate="label">
|
131 |
+
<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>
|
132 |
+
<frontend_type>select</frontend_type>
|
133 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
134 |
+
<sort_order>12</sort_order>
|
135 |
+
<show_in_default>1</show_in_default>
|
136 |
+
<show_in_website>1</show_in_website>
|
137 |
+
<show_in_store>0</show_in_store>
|
138 |
+
</sendmailorderconfirmation>
|
139 |
+
<dibsflexlogos translate="label">
|
140 |
+
<label>Which logos to show</label>
|
141 |
+
<frontend_type>multiselect</frontend_type>
|
142 |
+
<source_model>dibsflex/system_config_source_dibslogos</source_model>
|
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>0</show_in_store>
|
147 |
+
</dibsflexlogos>
|
148 |
+
<handlestock translate="label">
|
149 |
+
<label>Handle stock. The quantity purchased in stock will at first be decremented as the payment is made.</label>
|
150 |
+
<frontend_type>select</frontend_type>
|
151 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
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>0</show_in_store>
|
156 |
+
</handlestock>
|
157 |
+
<DIBSFLEX_fee translate="label">
|
158 |
+
<label>Add fee</label>
|
159 |
+
<frontend_type>select</frontend_type>
|
160 |
+
<source_model>dibsflex/System_Config_Source_Dibsyesno</source_model>
|
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>0</show_in_store>
|
165 |
+
</DIBSFLEX_fee>
|
166 |
+
<DIBSFLEX_voucher translate="label">
|
167 |
+
<label>Voucher Usage</label>
|
168 |
+
<frontend_type>select</frontend_type>
|
169 |
+
<source_model>dibsflex/System_Config_Source_Dibsyesno</source_model>
|
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>0</show_in_store>
|
174 |
+
</DIBSFLEX_voucher>
|
175 |
+
<DIBSFLEX_capt translate="label">
|
176 |
+
<label>Capture Now</label>
|
177 |
+
<frontend_type>select</frontend_type>
|
178 |
+
<source_model>dibsflex/System_Config_Source_Dibsyesno</source_model>
|
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>0</show_in_store>
|
183 |
+
</DIBSFLEX_capt>
|
184 |
+
<DIBSFLEX_account translate="label">
|
185 |
+
<label>Account</label>
|
186 |
+
<frontend_type>text</frontend_type>
|
187 |
+
<sort_order>18</sort_order>
|
188 |
+
<show_in_default>1</show_in_default>
|
189 |
+
<show_in_website>1</show_in_website>
|
190 |
+
<show_in_store>0</show_in_store>
|
191 |
+
</DIBSFLEX_account>
|
192 |
+
<DIBSFLEX_md51 translate="label">
|
193 |
+
<label>MD5 Key1</label>
|
194 |
+
<frontend_type>text</frontend_type>
|
195 |
+
<sort_order>19</sort_order>
|
196 |
+
<show_in_default>1</show_in_default>
|
197 |
+
<show_in_website>1</show_in_website>
|
198 |
+
<show_in_store>0</show_in_store>
|
199 |
+
</DIBSFLEX_md51>
|
200 |
+
<DIBSFLEX_md52 translate="label">
|
201 |
+
<label>MD5 Key2</label>
|
202 |
+
<frontend_type>text</frontend_type>
|
203 |
+
<sort_order>20</sort_order>
|
204 |
+
<show_in_default>1</show_in_default>
|
205 |
+
<show_in_website>1</show_in_website>
|
206 |
+
<show_in_store>0</show_in_store>
|
207 |
+
</DIBSFLEX_md52>
|
208 |
+
<DIBSFLEX_skiplast translate="label">
|
209 |
+
<label>Skip last page</label>
|
210 |
+
<frontend_type>select</frontend_type>
|
211 |
+
<source_model>dibsflex/System_Config_Source_Dibsyesno</source_model>
|
212 |
+
<sort_order>21</sort_order>
|
213 |
+
<show_in_default>2</show_in_default>
|
214 |
+
<show_in_website>2</show_in_website>
|
215 |
+
<show_in_store>0</show_in_store>
|
216 |
+
</DIBSFLEX_skiplast>
|
217 |
+
<DIBSFLEX_decor translate="label">
|
218 |
+
<label>FlexWin Decorator</label>
|
219 |
+
<frontend_type>select</frontend_type>
|
220 |
+
<source_model>dibsflex/system_config_source_decorator</source_model>
|
221 |
+
<sort_order>22</sort_order>
|
222 |
+
<show_in_default>2</show_in_default>
|
223 |
+
<show_in_website>2</show_in_website>
|
224 |
+
<show_in_store>0</show_in_store>
|
225 |
+
</DIBSFLEX_decor>
|
226 |
+
<DIBSFLEX_color translate="label">
|
227 |
+
<label>FlexWin Color</label>
|
228 |
+
<frontend_type>select</frontend_type>
|
229 |
+
<source_model>dibsflex/system_config_source_color</source_model>
|
230 |
+
<sort_order>23</sort_order>
|
231 |
+
<show_in_default>2</show_in_default>
|
232 |
+
<show_in_website>2</show_in_website>
|
233 |
+
<show_in_store>0</show_in_store>
|
234 |
+
</DIBSFLEX_color>
|
235 |
+
<DIBSFLEX_distr translate="label">
|
236 |
+
<label>Distribution method (Only relevant for PayByBill payment method).</label>
|
237 |
+
<frontend_type>select</frontend_type>
|
238 |
+
<source_model>dibsflex/system_config_source_PBBdistribution</source_model>
|
239 |
+
<sort_order>24</sort_order>
|
240 |
+
<show_in_default>1</show_in_default>
|
241 |
+
<show_in_website>1</show_in_website>
|
242 |
+
<show_in_store>0</show_in_store>
|
243 |
+
</DIBSFLEX_distr>
|
244 |
+
</fields>
|
245 |
+
</DibsFlex>
|
246 |
+
</groups>
|
247 |
+
</payment>
|
248 |
+
</sections>
|
249 |
+
</config>
|
app/code/community/DibsFlex/DibsFlex/sql/dibsflex_setup/mysql4-install-3.0.1.php
ADDED
@@ -0,0 +1,74 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
/**
|
25 |
+
* Payment Model
|
26 |
+
**/
|
27 |
+
|
28 |
+
$installer = $this;
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
|
32 |
+
$tableName_CoreResource = Mage::getSingleton('core/resource')->getTableName('core_resource');
|
33 |
+
$tableName_SalesFlatOrderPayment = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
|
34 |
+
$sTablePrefix = Mage::getConfig()->getTablePrefix();
|
35 |
+
$installer->run("
|
36 |
+
delete from ".$tableName_CoreResource." where code = 'dibsflex_setup';
|
37 |
+
CREATE TABLE if not exists `".$sTablePrefix."dibs_orderdata` (
|
38 |
+
`orderid` VARCHAR(45) NOT NULL,
|
39 |
+
`transact` VARCHAR(50) NOT NULL,
|
40 |
+
`status` INTEGER UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = unpaid, 1 = paid',
|
41 |
+
`amount` VARCHAR(45) NOT NULL,
|
42 |
+
`currency` VARCHAR(45) NOT NULL,
|
43 |
+
`paytype` VARCHAR(45) NOT NULL,
|
44 |
+
`PBB_customerId` VARCHAR(45) NOT NULL,
|
45 |
+
`PBB_deliveryAddress` VARCHAR(45) NOT NULL,
|
46 |
+
`PBB_deliveryCountryCode` VARCHAR(45) NOT NULL,
|
47 |
+
`PBB_deliveryPostalCode` VARCHAR(45) NOT NULL,
|
48 |
+
`PBB_deliveryPostalPlace` VARCHAR(45) NOT NULL,
|
49 |
+
`PBB_firstName` VARCHAR(45) NOT NULL,
|
50 |
+
`PBB_lastName` VARCHAR(45) NOT NULL,
|
51 |
+
`cardnomask` VARCHAR(45) NOT NULL,
|
52 |
+
`cardprefix` VARCHAR(45) NOT NULL,
|
53 |
+
`cardexpdate` VARCHAR(45) NOT NULL,
|
54 |
+
`cardcountry` VARCHAR(45) NOT NULL,
|
55 |
+
`acquirer` VARCHAR(45) NOT NULL,
|
56 |
+
`enrolled` VARCHAR(45) NOT NULL,
|
57 |
+
`fee` VARCHAR(45) NOT NULL,
|
58 |
+
`test` VARCHAR(45) NOT NULL,
|
59 |
+
`uniqueoid` VARCHAR(45) NOT NULL,
|
60 |
+
`approvalcode` VARCHAR(45) NOT NULL,
|
61 |
+
`voucher` VARCHAR(45) NOT NULL,
|
62 |
+
`amountoriginal` VARCHAR(45) NOT NULL,
|
63 |
+
`voucheramount` VARCHAR(45) NOT NULL,
|
64 |
+
`voucherpaymentid` VARCHAR(45) NOT NULL,
|
65 |
+
`voucherentry` VARCHAR(45) NOT NULL,
|
66 |
+
`voucherrest` VARCHAR(45) NOT NULL,
|
67 |
+
`ordercancellation` INTEGER UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = NotPerformed, 1 = Performed',
|
68 |
+
`successaction` INTEGER UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = NotPerformed, 1 = Performed',
|
69 |
+
`callback` INTEGER UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = NotPerformed, 1 = Performed'
|
70 |
+
);
|
71 |
+
UPDATE ".$tableName_SalesFlatOrderPayment." SET method='DibsFlex' WHERE method='dibs_standard';
|
72 |
+
");
|
73 |
+
|
74 |
+
$installer->endSetup();
|
app/code/community/DibsFlex/DibsFlex/sql/dibsflex_setup/mysql4-upgrade-3.0.0-3.0.1.php
ADDED
@@ -0,0 +1,72 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlex
|
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 |
+
/**
|
25 |
+
* Payment Model
|
26 |
+
**/
|
27 |
+
|
28 |
+
$installer = $this;
|
29 |
+
|
30 |
+
$installer->startSetup();
|
31 |
+
$tableName_CoreResource = Mage::getSingleton('core/resource')->getTableName('core_resource');
|
32 |
+
$tableName_SalesFlatOrderPayment = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_payment');
|
33 |
+
$sTablePrefix = Mage::getConfig()->getTablePrefix();
|
34 |
+
$installer->run("
|
35 |
+
delete from ".$tableName_CoreResource." where code = 'dibsflex_setup';
|
36 |
+
CREATE TABLE if not exists `".$sTablePrefix."dibs_orderdata` (
|
37 |
+
`orderid` VARCHAR(45) NOT NULL,
|
38 |
+
`transact` VARCHAR(50) NOT NULL,
|
39 |
+
`status` INTEGER UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = unpaid, 1 = paid',
|
40 |
+
`amount` VARCHAR(45) NOT NULL,
|
41 |
+
`currency` VARCHAR(45) NOT NULL,
|
42 |
+
`paytype` VARCHAR(45) NOT NULL,
|
43 |
+
`PBB_customerId` VARCHAR(45) NOT NULL,
|
44 |
+
`PBB_deliveryAddress` VARCHAR(45) NOT NULL,
|
45 |
+
`PBB_deliveryCountryCode` VARCHAR(45) NOT NULL,
|
46 |
+
`PBB_deliveryPostalCode` VARCHAR(45) NOT NULL,
|
47 |
+
`PBB_deliveryPostalPlace` VARCHAR(45) NOT NULL,
|
48 |
+
`PBB_firstName` VARCHAR(45) NOT NULL,
|
49 |
+
`PBB_lastName` VARCHAR(45) NOT NULL,
|
50 |
+
`cardnomask` VARCHAR(45) NOT NULL,
|
51 |
+
`cardprefix` VARCHAR(45) NOT NULL,
|
52 |
+
`cardexpdate` VARCHAR(45) NOT NULL,
|
53 |
+
`cardcountry` VARCHAR(45) NOT NULL,
|
54 |
+
`acquirer` VARCHAR(45) NOT NULL,
|
55 |
+
`enrolled` VARCHAR(45) NOT NULL,
|
56 |
+
`fee` VARCHAR(45) NOT NULL,
|
57 |
+
`test` VARCHAR(45) NOT NULL,
|
58 |
+
`uniqueoid` VARCHAR(45) NOT NULL,
|
59 |
+
`approvalcode` VARCHAR(45) NOT NULL,
|
60 |
+
`voucher` VARCHAR(45) NOT NULL,
|
61 |
+
`amountoriginal` VARCHAR(45) NOT NULL,
|
62 |
+
`voucheramount` VARCHAR(45) NOT NULL,
|
63 |
+
`voucherpaymentid` VARCHAR(45) NOT NULL,
|
64 |
+
`voucherentry` VARCHAR(45) NOT NULL,
|
65 |
+
`voucherrest` VARCHAR(45) NOT NULL,
|
66 |
+
`ordercancellation` INTEGER UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = NotPerformed, 1 = Performed',
|
67 |
+
`successaction` INTEGER UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = NotPerformed, 1 = Performed',
|
68 |
+
`callback` INTEGER UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = NotPerformed, 1 = Performed'
|
69 |
+
);
|
70 |
+
UPDATE ".$tableName_SalesFlatOrderPayment." SET method='DibsFlex' WHERE method='dibs_standard';
|
71 |
+
");
|
72 |
+
$installer->endSetup();
|
app/code/community/DibsFlex/Sales/Block/Order/Info.php
ADDED
@@ -0,0 +1,149 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
23 |
+
* Modifications copyrighted by Dibs A/S, (c) 2010.
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Invoice view comments form
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Sale
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class DibsFlex_Sales_Block_Order_Info extends Mage_Sales_Block_Order_Info
|
35 |
+
{
|
36 |
+
protected $_links = array();
|
37 |
+
|
38 |
+
protected function _construct() {
|
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 |
+
if ($headBlock = $this->getLayout()->getBlock('head')) {
|
50 |
+
$headBlock->setTitle($this->__('Order # %s', $this->getOrder()->getRealOrderId()));
|
51 |
+
}
|
52 |
+
$this->setChild(
|
53 |
+
'payment_info',
|
54 |
+
$this->helper('payment')->getInfoBlock($this->getOrder()->getPayment())
|
55 |
+
);
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getPaymentInfoHtml() {
|
59 |
+
|
60 |
+
$res = $this->getChildHtml('payment_info');
|
61 |
+
$standard = Mage::getModel('dibsflex/DibsFlex');
|
62 |
+
|
63 |
+
// Read info directly from the database
|
64 |
+
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
65 |
+
$sTablePrefix = Mage::getConfig()->getTablePrefix();
|
66 |
+
$row = $read->fetchRow("select * from ".$sTablePrefix."dibs_orderdata where orderid = " . $this->getOrder()->getIncrementId());
|
67 |
+
|
68 |
+
if (count($row) > 0) {
|
69 |
+
if ($row['status'] == '1') {
|
70 |
+
$res .= "<table border='0' width='100%'>";
|
71 |
+
if ($row['transact'] != '0') {
|
72 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_8') . "</td>";
|
73 |
+
$res .= "<td>" . $row['transact'] . "</td></tr>";
|
74 |
+
}
|
75 |
+
if ($row['paytype'] != '0') {
|
76 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_12') . "</td>";
|
77 |
+
$res .= "<td>" . $this->printLogo($row['paytype']) . "</td></tr>";
|
78 |
+
}
|
79 |
+
if ($row['fee'] != '0') {
|
80 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_11') . "</td>";
|
81 |
+
$res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . " " . number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
|
82 |
+
}
|
83 |
+
$res .= "</table><br>";
|
84 |
+
|
85 |
+
}
|
86 |
+
else {
|
87 |
+
$res .= "<br>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_19') . "<br>";
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
return $res;
|
92 |
+
}
|
93 |
+
|
94 |
+
public function printLogo($paytype) {
|
95 |
+
if(preg_match("/[a-z\(\)]+/is", $this->PaymentPart($paytype))) {
|
96 |
+
$res = '<img src="' . $this->getSkinUrl('images/DibsFlex/DibsFlex/' .
|
97 |
+
preg_replace("/\(\)_/s", "", strtolower($this->PaymentPart($paytype))) . '.gif') .
|
98 |
+
'" border="0" />';
|
99 |
+
}
|
100 |
+
else $res = '<img src="' . $this->getSkinUrl('images/DibsFlex/DibsFlex/dibs.gif') .
|
101 |
+
'" border="0" />';
|
102 |
+
|
103 |
+
return $res;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Retrieve current order model instance
|
108 |
+
*
|
109 |
+
* @return Mage_Sales_Model_Order
|
110 |
+
*/
|
111 |
+
public function getOrder() {
|
112 |
+
return Mage::registry('current_order');
|
113 |
+
}
|
114 |
+
|
115 |
+
public function addLink($name, $path, $label) {
|
116 |
+
$this->_links[$name] = new Varien_Object(array(
|
117 |
+
'name' => $name,
|
118 |
+
'label' => $label,
|
119 |
+
'url' => empty($path) ? '' : Mage::getUrl($path, array('order_id' => $this->getOrder()->getId()))
|
120 |
+
));
|
121 |
+
return $this;
|
122 |
+
}
|
123 |
+
|
124 |
+
public function getLinks() {
|
125 |
+
$this->checkLinks();
|
126 |
+
return $this->_links;
|
127 |
+
}
|
128 |
+
|
129 |
+
private function checkLinks() {
|
130 |
+
$order = $this->getOrder();
|
131 |
+
if (!$order->hasInvoices()) {
|
132 |
+
unset($this->_links['invoice']);
|
133 |
+
}
|
134 |
+
if (!$order->hasShipments()) {
|
135 |
+
unset($this->_links['shipment']);
|
136 |
+
}
|
137 |
+
if (!$order->hasCreditmemos()) {
|
138 |
+
unset($this->_links['creditmemo']);
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
public function getReorderUrl($order) {
|
143 |
+
return $this->getUrl('sales/order/reorder', array('order_id' => $order->getId()));
|
144 |
+
}
|
145 |
+
|
146 |
+
public function getPrintUrl($order) {
|
147 |
+
return $this->getUrl('sales/order/print', array('order_id' => $order->getId()));
|
148 |
+
}
|
149 |
+
}
|
app/code/community/DibsFlex/Sales/Block/Order/Print.php
ADDED
@@ -0,0 +1,109 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Sales
|
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 |
+
/**
|
29 |
+
* Order information for print
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Sales
|
33 |
+
*/
|
34 |
+
|
35 |
+
class DibsFlex_Sales_Block_Order_Print extends Mage_Sales_Block_Order_Print {
|
36 |
+
|
37 |
+
protected function _prepareLayout() {
|
38 |
+
if ($headBlock = $this->getLayout()->getBlock('head')) {
|
39 |
+
$headBlock->setTitle($this->__('Print Order # %s',
|
40 |
+
$this->getOrder()->getRealOrderId()));
|
41 |
+
}
|
42 |
+
|
43 |
+
$this->setChild(
|
44 |
+
'payment_info',
|
45 |
+
$this->helper('payment')->getInfoBlock($this->getOrder()->getPayment())
|
46 |
+
);
|
47 |
+
}
|
48 |
+
|
49 |
+
public function getPaymentInfoHtml() {
|
50 |
+
|
51 |
+
$res = $this->getChildHtml('payment_info');
|
52 |
+
$standard = Mage::getModel('dibsflex/DibsFlex');
|
53 |
+
|
54 |
+
// Read info directly from the database
|
55 |
+
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
56 |
+
$sTablePrefix = Mage::getConfig()->getTablePrefix();
|
57 |
+
$row = $read->fetchRow("select * from ".$sTablePrefix."dibs_orderdata where orderid = " . $this->getOrder()->getIncrementId());
|
58 |
+
if (count($row) > 0){
|
59 |
+
if ($row['status'] == '1') {
|
60 |
+
$res .= "<table border='0' width='100%'>";
|
61 |
+
if ($row['transact'] != '0') {
|
62 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_8') . "</td>";
|
63 |
+
$res .= "<td>" . $row['transact'] . "</td></tr>";
|
64 |
+
}
|
65 |
+
if ($row['paytype'] != '0') {
|
66 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_12') . "</td>";
|
67 |
+
$res .= "<td>" . $this->printLogo($row['paytype']) . "</td></tr>";
|
68 |
+
}
|
69 |
+
if ($row['fee'] != '0') {
|
70 |
+
$res .= "<tr><td>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_11') . "</td>";
|
71 |
+
$res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . " " . number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
|
72 |
+
}
|
73 |
+
$res .= "</table><br>";
|
74 |
+
|
75 |
+
}
|
76 |
+
else {
|
77 |
+
$res .= "<br>" . Mage::helper('dibsflex')->__('DIBSFLEX_LABEL_19') . "<br>";
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
return $res;
|
82 |
+
}
|
83 |
+
|
84 |
+
public function printLogo($paytype) {
|
85 |
+
if(preg_match("/[a-z\(\)]+/is", $paytype)) {
|
86 |
+
$res = '<img src="' . $this->getSkinUrl('images/DibsFlex/DibsFlex/' .
|
87 |
+
preg_replace("/\(\)_/s", "", strtolower($paytype)) . '.gif') .
|
88 |
+
'" border="0" />';
|
89 |
+
}
|
90 |
+
else $res = '<img src="' . $this->getSkinUrl('images/DibsFlex/DibsFlex/dibs.gif') .
|
91 |
+
'" border="0" />';
|
92 |
+
|
93 |
+
return $res;
|
94 |
+
}
|
95 |
+
|
96 |
+
public function getOrder()
|
97 |
+
{
|
98 |
+
return Mage::registry('current_order');
|
99 |
+
}
|
100 |
+
|
101 |
+
protected function _prepareItem(Mage_Core_Block_Abstract $renderer)
|
102 |
+
{
|
103 |
+
$renderer->setPrintStatus(true);
|
104 |
+
|
105 |
+
return parent::_prepareItem($renderer);
|
106 |
+
}
|
107 |
+
|
108 |
+
}
|
109 |
+
|
app/code/community/DibsFlex/Sales/etc/config.xml
ADDED
@@ -0,0 +1,35 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
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 DibsFlex_DibsFlex
|
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 |
+
<config>
|
25 |
+
<global>
|
26 |
+
<blocks>
|
27 |
+
<sales>
|
28 |
+
<rewrite>
|
29 |
+
<order_info>DibsFlex_Sales_Block_Order_Info</order_info>
|
30 |
+
<order_print>DibsFlex_Sales_Block_Order_Print</order_print>
|
31 |
+
</rewrite>
|
32 |
+
</sales>
|
33 |
+
</blocks>
|
34 |
+
</global>
|
35 |
+
</config>
|
app/design/frontend/base/default/template/DibsFlex/DibsFlex/redirect.phtml
ADDED
@@ -0,0 +1,54 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlexModule
|
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('dibsflex/DibsFlex');
|
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->dibsflex_api_getFormAction()
|
38 |
+
?>">
|
39 |
+
<? foreach ($aDibsparmeter as $field=>$value) {?>
|
40 |
+
<input type="hidden" name="<? echo $field ?>" value="<? echo $value ?>" />
|
41 |
+
<?}?>
|
42 |
+
</form>
|
43 |
+
<?
|
44 |
+
// Save the order into the dibs_orderdata table
|
45 |
+
//=================================================
|
46 |
+
$oPaymate->dibsflex_api_processDB($aDibsparmeter['orderid']);
|
47 |
+
?>
|
48 |
+
|
49 |
+
<script type="text/javascript">
|
50 |
+
setTimeout("document.getElementById('payment').submit();",1000);
|
51 |
+
</script>
|
52 |
+
|
53 |
+
</body>
|
54 |
+
</html>
|
app/design/frontend/default/default/template/DibsFlex/DibsFlex/form.phtml
ADDED
@@ -0,0 +1,54 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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 DibsFlex_DibsFlexModule
|
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 |
+
$paymate = Mage::getModel('dibsflex/DibsFlex');
|
25 |
+
$_code=$this->getMethodCode();
|
26 |
+
$sHTML = '<fieldset class="form-list">
|
27 |
+
<ul id="payment_form_'.$_code. '" style="display:none">
|
28 |
+
<li>' . $this->__('DIBSFLEX_LABEL_1') . '';
|
29 |
+
if ($paymate->showTrustedList()) {
|
30 |
+
$sHTML .= '<br /><br />';
|
31 |
+
$logoArray = explode(',', $paymate->getConfigData('dibsflexlogos'));
|
32 |
+
foreach($logoArray as $item) {
|
33 |
+
if(strpos($item, 'SECURE') !== FALSE || $item == 'DIBS' || $item == 'PCI') {
|
34 |
+
$sHTML .= '<img src="' . $this->getSkinUrl('images/DibsFlex/DibsFlex/' .
|
35 |
+
preg_replace("/\(\)_/s", "", strtolower($item)) . '.gif') .
|
36 |
+
'" border="0" /> ';
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
if ($paymate->showCardsList()) {
|
42 |
+
$sHTML .= '<br /><br />' . $this->__('DIBSFLEX_LABEL_2') . '<br />';
|
43 |
+
$logoArray = explode(',', $paymate->getConfigData('dibsflexlogos'));
|
44 |
+
foreach($logoArray as $item) {
|
45 |
+
if(strpos($item, 'SECURE') === FALSE && $item != 'DIBS' && $item != 'PCI') {
|
46 |
+
$sHTML .= '<img src="' . $this->getSkinUrl('images/DibsFlex/DibsFlex/' .
|
47 |
+
preg_replace("/\(\)_/s", "", strtolower($item)) . '.gif') .
|
48 |
+
'" border="0" /> ';
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
$sHTML .= '</li></ul></fieldset>';
|
54 |
+
?>
|
app/etc/modules/DibsFlex_Adminhtml.xml
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
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 DibsFlex_DibsFlex
|
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 |
+
|
25 |
+
<config>
|
26 |
+
<modules>
|
27 |
+
<DibsFlex_Adminhtml>
|
28 |
+
<active>true</active>
|
29 |
+
<codePool>community</codePool>
|
30 |
+
</DibsFlex_Adminhtml>
|
31 |
+
</modules>
|
32 |
+
</config>
|
app/etc/modules/DibsFlex_DibsFlex.xml
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
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 DibsFlex_DibsFlex
|
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 |
+
|
25 |
+
<config>
|
26 |
+
<modules>
|
27 |
+
<DibsFlex_DibsFlex>
|
28 |
+
<active>true</active>
|
29 |
+
<codePool>community</codePool>
|
30 |
+
</DibsFlex_DibsFlex>
|
31 |
+
</modules>
|
32 |
+
</config>
|
app/etc/modules/DibsFlex_Sales.xml
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
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 DibsFlex_DibsFlex
|
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 |
+
|
25 |
+
<config>
|
26 |
+
<modules>
|
27 |
+
<DibsFlex_Sales>
|
28 |
+
<active>true</active>
|
29 |
+
<codePool>community</codePool>
|
30 |
+
</DibsFlex_Sales>
|
31 |
+
</modules>
|
32 |
+
</config>
|
app/locale/da_DK/Mage_DibsFlex.csv
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"DIBSFLEX_LABEL_1","Du har valgt at betale online for din bestilling. Når du har lagt din ordre vil du blive overført til DIBS betalings system. Her skal du gennemføre din betaling. Når ordren er gennemført vil du automatisk blive ført tilbage til vores butik."
|
2 |
+
"DIBSFLEX_LABEL_2","Du kan betale med disse betalingsformer:"
|
3 |
+
"DIBSFLEX_LABEL_3","Ordren er nu afgivet og betalingen vidrebehandles i DIBS betalings system (www.dibs.dk)"
|
4 |
+
"DIBSFLEX_LABEL_4","Ordre nummer"
|
5 |
+
"DIBSFLEX_LABEL_5","Beløb"
|
6 |
+
"DIBSFLEX_LABEL_6","Du bliver nu viderestillet til betalingssystemet"
|
7 |
+
"DIBSFLEX_LABEL_7","DIBS betalings information"
|
8 |
+
"DIBSFLEX_LABEL_8","Transaction ID:"
|
9 |
+
"DIBSFLEX_LABEL_9","Beløb:"
|
10 |
+
"DIBSFLEX_LABEL_10","Valuta kode:"
|
11 |
+
"DIBSFLEX_LABEL_11","Gebyr:"
|
12 |
+
"DIBSFLEX_LABEL_12","Betalingstype:"
|
13 |
+
"DIBSFLEX_LABEL_13","Kort nummer:"
|
14 |
+
"DIBSFLEX_LABEL_14","Udløb:"
|
15 |
+
"DIBSFLEX_LABEL_15","Land:"
|
16 |
+
"DIBSFLEX_LABEL_16","Indløser:"
|
17 |
+
"DIBSFLEX_LABEL_17","3-D Secure:"
|
18 |
+
"DIBSFLEX_LABEL_18","Gå til DIBS administrationen og gennemfør betalingen"
|
19 |
+
"DIBSFLEX_LABEL_19","Ingen betaling er registreret på denne ordre"
|
20 |
+
"DIBSFLEX_LABEL_20","Kortholder har annulleret betalingsforløbet"
|
21 |
+
"DIBSFLEX_LABEL_21","'Callback' modtaget fra DIBS Payment Services (www.dibs.dk)"
|
22 |
+
"DIBSFLEX_LABEL_22","Kortholder returneret til butikken fra DIBS Payment Services (www.dibs.dk)"
|
app/locale/en_US/Mage_DibsFlex.csv
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"DIBSFLEX_LABEL_1","You have chosen to pay for the order online. Once you've completed your order, you will be transferred to the DIBS payment system. Here you need to process your payment. Once payment is completed, you will automatically be returned to our shop."
|
2 |
+
"DIBSFLEX_LABEL_2","You can pay with the following payment cards:"
|
3 |
+
"DIBSFLEX_LABEL_3","The order is now placed and payment must now be made in DIBS Payment Solution (www.dibspayment.com)"
|
4 |
+
"DIBSFLEX_LABEL_4","Order number"
|
5 |
+
"DIBSFLEX_LABEL_5","Amount"
|
6 |
+
"DIBSFLEX_LABEL_6","Your are now being redirected to the payment gateway"
|
7 |
+
"DIBSFLEX_LABEL_7","DIBS Payment Information"
|
8 |
+
"DIBSFLEX_LABEL_8","Transaction ID:"
|
9 |
+
"DIBSFLEX_LABEL_9","Amount:"
|
10 |
+
"DIBSFLEX_LABEL_10","Currency Code:"
|
11 |
+
"DIBSFLEX_LABEL_11","Fee:"
|
12 |
+
"DIBSFLEX_LABEL_12","Pay type:"
|
13 |
+
"DIBSFLEX_LABEL_13","Card number:"
|
14 |
+
"DIBSFLEX_LABEL_14","Expire:"
|
15 |
+
"DIBSFLEX_LABEL_15","Country:"
|
16 |
+
"DIBSFLEX_LABEL_16","Acquirer:"
|
17 |
+
"DIBSFLEX_LABEL_17","3-D Secure:"
|
18 |
+
"DIBSFLEX_LABEL_18","Go to DIBS administration and process the payment"
|
19 |
+
"DIBSFLEX_LABEL_19","There is not registered any payment for this order yet!"
|
20 |
+
"DIBSFLEX_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
|
21 |
+
"DIBSFLEX_LABEL_21","'Callback' received from DIBS Payment Services (www.dibspayment.com)"
|
22 |
+
"DIBSFLEX_LABEL_22","Customer successfully returned back to store from DIBS Payment Services (www.dibspayment.com)"
|
app/locale/nb_NO/Mage_DibsFlex.csv
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"DIBSFLEX_LABEL_1","Du har valgt å betale ordren online. Når du har fullført din ordre, vil du bli videresendt til DIBS betalingsleverandør. Her må du fullføre din betaling. Når betaligen er fullført, vil du bli sendt tilbake til vår butikk."
|
2 |
+
"DIBSFLEX_LABEL_2","Du kan betale med følgende kort:"
|
3 |
+
"DIBSFLEX_LABEL_3","Ordren er plassert, og betalingen prosesseres av DIBS Payment Services (www.dibs.no)"
|
4 |
+
"DIBSFLEX_LABEL_4","Ordrenummer"
|
5 |
+
"DIBSFLEX_LABEL_5","Beløp"
|
6 |
+
"DIBSFLEX_LABEL_6","Du blir nå videresendt til betalingsleverandøren"
|
7 |
+
"DIBSFLEX_LABEL_7","DIBS Betalingsinformasjon"
|
8 |
+
"DIBSFLEX_LABEL_8","Transaksjonsnummer:"
|
9 |
+
"DIBSFLEX_LABEL_9","Beløp:"
|
10 |
+
"DIBSFLEX_LABEL_10","Valutakode:"
|
11 |
+
"DIBSFLEX_LABEL_11","Gebyr:"
|
12 |
+
"DIBSFLEX_LABEL_12","Betalingstype:"
|
13 |
+
"DIBSFLEX_LABEL_13","Kortnummer:"
|
14 |
+
"DIBSFLEX_LABEL_14","Utløpsdato:"
|
15 |
+
"DIBSFLEX_LABEL_15","Land:"
|
16 |
+
"DIBSFLEX_LABEL_16","Innløser:"
|
17 |
+
"DIBSFLEX_LABEL_17","3-D Secure:"
|
18 |
+
"DIBSFLEX_LABEL_18","Gå til DIBS Administrasjonen og prosesser betalingen"
|
19 |
+
"DIBSFLEX_LABEL_19","Det er ikke registrert noen betaling for denne ordren enda!"
|
20 |
+
"DIBSFLEX_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
|
21 |
+
"DIBSFLEX_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
|
22 |
+
"DIBSFLEX_LABEL_22","Kunden har returnert vellykket tilbake til butikk fra DIBS Payment Services (www.dibs.no)"
|
app/locale/nn_NO/Mage_DibsFlex.csv
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"DIBSFLEX_LABEL_1","Du har valgt å betale ordren online. Når du har fullført din ordre, vil du bli videresendt til DIBS betalingsleverandør. Her må du fullføre din betaling. Når betaligen er fullført, vil du bli sendt tilbake til vår butikk."
|
2 |
+
"DIBSFLEX_LABEL_2","Du kan betale med følgende kort:"
|
3 |
+
"DIBSFLEX_LABEL_3","Ordren er plassert, og betalingen prosesseres av DIBS Payment Services (www.dibs.no)"
|
4 |
+
"DIBSFLEX_LABEL_4","Ordrenummer"
|
5 |
+
"DIBSFLEX_LABEL_5","Beløp"
|
6 |
+
"DIBSFLEX_LABEL_6","Du blir nå videresendt til betalingsleverandøren"
|
7 |
+
"DIBSFLEX_LABEL_7","DIBS Betalingsinformasjon"
|
8 |
+
"DIBSFLEX_LABEL_8","Transaksjonsnummer:"
|
9 |
+
"DIBSFLEX_LABEL_9","Beløp:"
|
10 |
+
"DIBSFLEX_LABEL_10","Valutakode:"
|
11 |
+
"DIBSFLEX_LABEL_11","Gebyr:"
|
12 |
+
"DIBSFLEX_LABEL_12","Betalingstype:"
|
13 |
+
"DIBSFLEX_LABEL_13","Kortnummer:"
|
14 |
+
"DIBSFLEX_LABEL_14","Utløpsdato:"
|
15 |
+
"DIBSFLEX_LABEL_15","Land:"
|
16 |
+
"DIBSFLEX_LABEL_16","Innløser:"
|
17 |
+
"DIBSFLEX_LABEL_17","3-D Secure:"
|
18 |
+
"DIBSFLEX_LABEL_18","Gå til DIBS Administrasjonen og prosesser betalingen"
|
19 |
+
"DIBSFLEX_LABEL_19","Det er ikke registrert noen betaling for denne ordren enda!"
|
20 |
+
"DIBSFLEX_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
|
21 |
+
"DIBSFLEX_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
|
22 |
+
"DIBSFLEX_LABEL_22","Kunden har returnert vellykket tilbake til butikk fra DIBS Payment Services (www.dibs.no)"
|
app/locale/sv_SE/Mage_DibsFlex.csv
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
"DIBSFLEX_LABEL_1","Du har valt att betala för ordern via internet. När din order är avslutad kommer du bli skickad till DIBS betalningssystem. Där kommer du att behöva behandla din betalning. När betalningen är genomförd kommer du automatiskt att skickad tillbaka till vår butik."
|
2 |
+
"DIBSFLEX_LABEL_2","Du kan betala med följande betal/kreditkort:"
|
3 |
+
"DIBSFLEX_LABEL_3","Ordern har blivit mottagen och betalningen bearbetas av DIBS betalningssystem (www.dibs.se)"
|
4 |
+
"DIBSFLEX_LABEL_4","Ordernummer"
|
5 |
+
"DIBSFLEX_LABEL_5","Belopp"
|
6 |
+
"DIBSFLEX_LABEL_6","Du kommer nu att skickas till betalningssystemet"
|
7 |
+
"DIBSFLEX_LABEL_7","DIBS Betalningsinformation"
|
8 |
+
"DIBSFLEX_LABEL_8","TransaktionsID:"
|
9 |
+
"DIBSFLEX_LABEL_9","Belopp:"
|
10 |
+
"DIBSFLEX_LABEL_10","Valutakod:"
|
11 |
+
"DIBSFLEX_LABEL_11","Avgift:"
|
12 |
+
"DIBSFLEX_LABEL_12","Betalsätt:"
|
13 |
+
"DIBSFLEX_LABEL_13","Kortnummer:"
|
14 |
+
"DIBSFLEX_LABEL_14","Utgångsdatum:"
|
15 |
+
"DIBSFLEX_LABEL_15","Land:"
|
16 |
+
"DIBSFLEX_LABEL_16","Inlösare:"
|
17 |
+
"DIBSFLEX_LABEL_17","3-D Secure:"
|
18 |
+
"DIBSFLEX_LABEL_18","Gå till DIBS administrationsgränssnitt och behandla betalningen"
|
19 |
+
"DIBSFLEX_LABEL_19","Det finns ingen registrerad betalning för denna order ännu"
|
20 |
+
"DIBSFLEX_LABEL_20","Kunden har avbrutit betalningsprocessen - DIBS Payment Services (www.dibs.se)"
|
21 |
+
"DIBSFLEX_LABEL_21","'Callback' mottagen från DIBS Payment Services (www.dibs.se)"
|
22 |
+
"DIBSFLEX_LABEL_22","Kunden har kommit tillbaka till butiken från DIBS Payment Services (www.dibs.se)"
|
package.xml
ADDED
@@ -0,0 +1,57 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>dibsftest</name>
|
4 |
+
<version>3.0.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.</summary>
|
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.
|
13 |
+

|
14 |
+
Security and credibility are important keywords to companies handling payment transactions. Hence, DIBS has achieved VISA/MasterCard PCI certification and devotes its efforts to constantly enhancing its security solutions.
|
15 |
+

|
16 |
+
Card types accepted by the DIBS payment gateway:
|
17 |
+
- Dankort
|
18 |
+
- VISA/Dankort
|
19 |
+
- VISA
|
20 |
+
- VISA Electron
|
21 |
+
- MasterCard
|
22 |
+
- Maestro
|
23 |
+
- JCB
|
24 |
+
- Diners
|
25 |
+
- American Express
|
26 |
+
- Forbrugsforeningen
|
27 |
+
- eWire
|
28 |
+
- VISA 3D Secure
|
29 |
+
- MaserCard 3D secure
|
30 |
+
- JCB 3D secure
|
31 |
+
- Danske Bank e-betaling
|
32 |
+
- Nordea e-betaling
|
33 |
+

|
34 |
+
A complete list can be found at http://www.dibspayment.com/</description>
|
35 |
+
<notes>3.0.1
|
36 |
+
- Fixed a lot of bugs in calculations for invoice paytype. 
|
37 |
+
- Fixed bugs with spical unicode symbols. E.g.: specific letters in Scandinavian alphabets. 
|
38 |
+
- Magento 1.6 compatibility. 
|
39 |
+

|
40 |
+
3.0.0
|
41 |
+
- Separate modules for new and old integration method (FlexWin and Payment Windows). 
|
42 |
+
- New module code logic. 
|
43 |
+
- Total code refactoring. 
|
44 |
+
- Old Payment Window pay type removed. 
|
45 |
+
- Vouchers support added. 
|
46 |
+
- CGI API support added. 
|
47 |
+
- Now module use mysql table prefix if it used by Magento installation. 
|
48 |
+
- Fixed bug with module installation crash because of prefix in names of Magento mysql tables. 
|
49 |
+
- Fixed bug with empty list of modules in Magento Connect Manager. 
|
50 |
+
- Fixed inner versions mishmash in module.</notes>
|
51 |
+
<authors><author><name>DIBS A/S</name><user>DIBS</user><email>info@dibs.dk</email></author></authors>
|
52 |
+
<date>2012-03-09</date>
|
53 |
+
<time>08:15:36</time>
|
54 |
+
<contents><target name="magecommunity"><dir name="DibsFlex"><dir name="Adminhtml"><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Info.php" hash="8700af7e72561f96a3782a2fc1e4aa61"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="14a8b9ade86a1774722f7cbeb43bdb17"/></dir></dir><dir name="DibsFlex"><dir name="Block"><file name="Failure.php" hash="14d87b59a171bcbb5551d38adef9feae"/><file name="Form.php" hash="3bcb5aa0a1abedbb2d14f81770d56e1e"/><file name="Redirect.php" hash="4245eed417eff35cc39847c5953b7af5"/></dir><dir name="Helper"><file name="Data.php" hash="df60a4703421012a5f4c5e6aa86fd221"/></dir><dir name="Model"><file name="DibsFlex.php" hash="c6d9000a352c194ae0d0eac7d49410ac"/><dir name="Mysql4"><file name="Setup.php" hash="fd0de4b5ec538c0a099ccd6ba658f6ee"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Color.php" hash="931e99d88411ef80f82ff4964b5db45d"/><file name="Decorator.php" hash="d5e1ee933f5f2950494762393ca459c9"/><file name="Dibslogos.php" hash="a560a80638158bc8e363f31bb4bcc8b6"/><file name="Dibspaytypes.php" hash="13bf76834ae32c6d2d819f8846a43282"/><file name="Dibsyesno.php" hash="4995d75002935c531f2e58a155cc0297"/><file name="Lang.php" hash="dcbfa74ec7d122270bbd415e8052f351"/><file name="Orderstatusafter.php" hash="208b6008085fe837854d16553470f753"/><file name="Orderstatusbefore.php" hash="ee246da2769090bf7487c4786d23a2d4"/><file name="PBBdistribution.php" hash="a1cfeea90f3bf2a40bed19bf8370d322"/></dir></dir></dir><dir name="dibsflex_api"><file name="dibsflex_api.php" hash="7dbe6146402ec8626934d0731c018f41"/><file name="dibsflex_helpers.php" hash="8bbee79f5db3898c8179fb56822a0ec3"/><file name="dibsflex_helpers_cms.php" hash="87f0cd4de124518f0e777d26715f20ff"/></dir></dir><dir name="controllers"><file name="DibsFlexController.php" hash="5c30bd82b8a500331d60eead72a66c23"/></dir><dir name="etc"><file name="config.xml" hash="08bae232ce0434ac28d6014ff4a5a57d"/><file name="system.xml" hash="9ac7804d263dafc5981d66959da1f8a1"/></dir><dir name="sql"><dir name="dibsflex_setup"><file name="mysql4-install-3.0.1.php" hash="499118baa019f6c8822e8186410cc252"/><file name="mysql4-upgrade-3.0.0-3.0.1.php" hash="b4ee5d169c2ea53b5f642347848d6afc"/></dir></dir></dir><dir name="Sales"><dir name="Block"><dir name="Order"><file name="Info.php" hash="970afb4dcb8c8c7345df6f8744596968"/><file name="Print.php" hash="487aebd8ea8a6d573cf09533e4116ea3"/></dir></dir><dir name="etc"><file name="config.xml" hash="a69d8aeed4dfc99f8eebb2ed7ea0889a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DibsFlex_DibsFlex.xml" hash="410a9a4add7cd234c778bc4b37ee0f7d"/><file name="DibsFlex_Sales.xml" hash="ad569cc67871afd324553dfca39a3501"/><file name="DibsFlex_Adminhtml.xml" hash="b0d75190e49e9a3740657d9b7a27241e"/></dir></target><target name="magelocale"><dir name="da_DK"><file name="Mage_DibsFlex.csv" hash="1292221a8017fb25ad2ff91564dae470"/></dir><dir name="en_US"><file name="Mage_DibsFlex.csv" hash="fd098d5176257137a887fa9832f83d29"/></dir><dir name="nb_NO"><file name="Mage_DibsFlex.csv" hash="d1d8dcc87a011d87e246b0709f40af31"/></dir><dir name="nn_NO"><file name="Mage_DibsFlex.csv" hash="d1d8dcc87a011d87e246b0709f40af31"/></dir><dir name="sv_SE"><file name="Mage_DibsFlex.csv" hash="862c1ca183111d585e4574d770181a99"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="DibsFlex"><dir name="DibsFlex"><file name="form.phtml" hash="54f793892ad524431f1d6375228589aa"/></dir></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="DibsFlex"><dir name="DibsFlex"><file name="redirect.phtml" hash="1203bf342a48521f6527a1f5fccaa5da"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="images"><dir name="DibsFlex"><dir name="DibsFlex"><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="DibsFlex"><dir name="DibsFlex"><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>
|
55 |
+
<compatible/>
|
56 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
57 |
+
</package>
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/aktia.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/amex.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/bax.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/dibs.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/din.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/dk.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/dnb.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/edk.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/elec.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/elv.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/ew.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/ffk.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/fsb.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/git.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/ing.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/jcb.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/jcbsecure.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/loading.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/mc.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/mcsecure.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/moca.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/mtro.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/oko.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/pbb.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/pbbtest.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/pci.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/seb.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/shb.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/solo.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/val.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/visa.gif
ADDED
Binary file
|
skin/adminhtml/base/default/images/DibsFlex/DibsFlex/visasecure.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/aktia.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/amex.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/bax.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/dibs.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/din.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/dk.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/dnb.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/edk.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/elec.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/elv.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/ew.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/ffk.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/fsb.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/git.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/ing.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/jcb.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/jcbsecure.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/loading.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/mc.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/mcsecure.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/moca.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/mtro.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/oko.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/pbb.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/pbbtest.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/pci.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/seb.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/shb.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/solo.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/val.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/visa.gif
ADDED
Binary file
|
skin/frontend/base/default/images/DibsFlex/DibsFlex/visasecure.gif
ADDED
Binary file
|