Dibspw - Version 4.2.3

Version Notes

4.2.3
- Added capture, refund, cancel online
- small bugfixing
- cart is not empty on cancel
4.2.2
- Fixed problem with wrong rounding
4.2.1
- Removed language that not support
- Fixed problem with mobile numbers with dash
4.2.0
- added fee amount to order
4.1.9
- bugfixing release
4.1.8
- added support of Bundle Products
4.1.7
- utf encoding fixed
4.1.6
- Fixed bug with double quoted items names
- Fixed bug with HMAC code
- Added compatibility with compilation mode
- Added instruction for resolving problem with MAC code error

4.1.5
-Development


4.1.4
- Added Magento coupons support
- Fixed possible rounding issues
- Removed Mobile Payment Window, now DIBS Payment Window can automatically scale to different screen sizes.

4.1.3
- Removed protected Magento statuses from module configuration page (Closed, Completed)
- Fixed possible problems running extension on Windows-hosted Magento
- Page after cancel operation changed to orders list (instead of empty cart)

4.1.2&
- Confirmed compatibility with Magento 1.7.*
- Improved stability by using more low-level Magento API integration;
- Improved compatibility with DIBS invoice payments
- Added option to limit payment method usage by countries
- Added Transaction ID to order confirmation mail

4.1.1
- Fixed error on redirect with expired session&

- Improved compatibility with DIBS FlexWin Magento extension
- Fixed order statuses bug&
- Fixed account parameter bugs
- Fixed layout
- Fixed crash on dibspw_results table remove
- Fixed logo appearance bugs
- Fixed bug with message appearance in inappropriate places
- Added Sort Order option
- A lot of other fixes and improvements

4.1.0
- New module for DIBS Payment Window and Mobile Payment Window integration methods

Download this release

Release Info

Developer DIBS A/S
Extension Dibspw
Version 4.2.3
Comparing to
See all releases


Code changes from version 4.2.2 to 4.2.3

Files changed (50) hide show
  1. app/code/community/Dibspw/Dibspw/Block/Info.php +7 -2
  2. app/code/community/Dibspw/Dibspw/Model/Dibspw.php +110 -2
  3. app/code/community/Dibspw/Dibspw/Model/Sales/Order/Fee.php +1 -1
  4. app/code/community/Dibspw/Dibspw/Model/Sales/Order/Total/Creditmemo/Fee.php +2 -2
  5. app/code/community/Dibspw/Dibspw/Model/Sales/Order/Total/Invoice/Fee.php +3 -3
  6. app/code/community/Dibspw/Dibspw/Model/Sales/Order/Total/Order/Fee.php +1 -1
  7. app/code/community/Dibspw/Dibspw/Model/Sales/Quote/Address/Total/Fee.php +5 -0
  8. app/code/community/Dibspw/Dibspw/Model/Service/Quote.php +11 -0
  9. app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_api.php +152 -67
  10. app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_helpers.php +1 -1
  11. app/code/community/Dibspw/Dibspw/controllers/DibspwController.php +11 -3
  12. app/code/community/Dibspw/Dibspw/etc/config.xml +24 -5
  13. app/code/community/Dibspw/Dibspw/sql/dibspw_setup/{mysql4-install-4.2.2.php → mysql4-install-4.2.3.php} +0 -0
  14. app/locale/en_US/Mage_Dibspw.csv +2 -2
  15. app/locale/nb_NO/Mage_Dibspw.csv +2 -2
  16. app/locale/nn_NO/Mage_Dibspw.csv +1 -1
  17. app/locale/sv_SE/Mage_Dibspw.csv +2 -2
  18. package.xml +9 -5
  19. skin/frontend/base/default/images/Dibspw/Dibspw/aktia.gif +0 -0
  20. skin/frontend/base/default/images/Dibspw/Dibspw/amex.gif +0 -0
  21. skin/frontend/base/default/images/Dibspw/Dibspw/bax.gif +0 -0
  22. skin/frontend/base/default/images/Dibspw/Dibspw/dibs.gif +0 -0
  23. skin/frontend/base/default/images/Dibspw/Dibspw/din.gif +0 -0
  24. skin/frontend/base/default/images/Dibspw/Dibspw/dk.gif +0 -0
  25. skin/frontend/base/default/images/Dibspw/Dibspw/dnb.gif +0 -0
  26. skin/frontend/base/default/images/Dibspw/Dibspw/edk.gif +0 -0
  27. skin/frontend/base/default/images/Dibspw/Dibspw/elec.gif +0 -0
  28. skin/frontend/base/default/images/Dibspw/Dibspw/elv.gif +0 -0
  29. skin/frontend/base/default/images/Dibspw/Dibspw/ew.gif +0 -0
  30. skin/frontend/base/default/images/Dibspw/Dibspw/ffk.gif +0 -0
  31. skin/frontend/base/default/images/Dibspw/Dibspw/fsb.gif +0 -0
  32. skin/frontend/base/default/images/Dibspw/Dibspw/git.gif +0 -0
  33. skin/frontend/base/default/images/Dibspw/Dibspw/ing.gif +0 -0
  34. skin/frontend/base/default/images/Dibspw/Dibspw/jcb.gif +0 -0
  35. skin/frontend/base/default/images/Dibspw/Dibspw/jcbsecure.gif +0 -0
  36. skin/frontend/base/default/images/Dibspw/Dibspw/loading.gif +0 -0
  37. skin/frontend/base/default/images/Dibspw/Dibspw/mc.gif +0 -0
  38. skin/frontend/base/default/images/Dibspw/Dibspw/mcsecure.gif +0 -0
  39. skin/frontend/base/default/images/Dibspw/Dibspw/moca.gif +0 -0
  40. skin/frontend/base/default/images/Dibspw/Dibspw/mtro.gif +0 -0
  41. skin/frontend/base/default/images/Dibspw/Dibspw/oko.gif +0 -0
  42. skin/frontend/base/default/images/Dibspw/Dibspw/pbb.gif +0 -0
  43. skin/frontend/base/default/images/Dibspw/Dibspw/pbbtest.gif +0 -0
  44. skin/frontend/base/default/images/Dibspw/Dibspw/pci.gif +0 -0
  45. skin/frontend/base/default/images/Dibspw/Dibspw/seb.gif +0 -0
  46. skin/frontend/base/default/images/Dibspw/Dibspw/shb.gif +0 -0
  47. skin/frontend/base/default/images/Dibspw/Dibspw/solo.gif +0 -0
  48. skin/frontend/base/default/images/Dibspw/Dibspw/val.gif +0 -0
  49. skin/frontend/base/default/images/Dibspw/Dibspw/visa.gif +0 -0
  50. skin/frontend/base/default/images/Dibspw/Dibspw/visasecure.gif +0 -0
app/code/community/Dibspw/Dibspw/Block/Info.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- /**
3
  * Magento
4
  *
5
  * NOTICE OF LICENSE
@@ -26,6 +26,11 @@
26
  */
27
 
28
  class Dibspw_Dibspw_Block_Info extends Mage_Payment_Block_Info {
 
 
 
 
 
29
 
30
  /**
31
  * Render the value as an array
@@ -46,7 +51,7 @@ class Dibspw_Dibspw_Block_Info extends Mage_Payment_Block_Info {
46
  $this->getMethod()->cms_dibs_getAdminOrderInfo() :
47
  $this->getMethod()->cms_dibs_getOrderInfo();
48
  foreach($aData as $sKey => $sVal) $oDataObj->setData($sKey, $sVal);
49
-
50
  return $oDataObj;
51
  }
 
52
  }
1
  <?php
2
+ /**
3
  * Magento
4
  *
5
  * NOTICE OF LICENSE
26
  */
27
 
28
  class Dibspw_Dibspw_Block_Info extends Mage_Payment_Block_Info {
29
+
30
+ public function __construct() {
31
+ parent::__construct();
32
+ }
33
+
34
 
35
  /**
36
  * Render the value as an array
51
  $this->getMethod()->cms_dibs_getAdminOrderInfo() :
52
  $this->getMethod()->cms_dibs_getOrderInfo();
53
  foreach($aData as $sKey => $sVal) $oDataObj->setData($sKey, $sVal);
 
54
  return $oDataObj;
55
  }
56
+
57
  }
app/code/community/Dibspw/Dibspw/Model/Dibspw.php CHANGED
@@ -23,7 +23,22 @@
23
  require_once Mage::getBaseDir('code').'/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_api.php';
24
 
25
  class Dibspw_Dibspw_Model_Dibspw extends dibs_pw_api {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
 
27
  /*
28
  * Validate the currency code is avaialable to use for dibs or not
29
  */
@@ -31,7 +46,7 @@ class Dibspw_Dibspw_Model_Dibspw extends dibs_pw_api {
31
  parent::validate();
32
  $sCurrencyCode = Mage::getSingleton('checkout/session')->getQuote()->getBaseCurrencyCode();
33
  if (!array_key_exists($sCurrencyCode, dibs_pw_api::api_dibs_get_currencyArray())) {
34
- Mage::throwException(Mage::helper('dibspw')->__('Selected currency code (' .
35
  $sCurrencyCode . ') is not compatabile with Dibs'));
36
  }
37
  return $this;
@@ -47,7 +62,100 @@ class Dibspw_Dibspw_Model_Dibspw extends dibs_pw_api {
47
 
48
  public function getOrderPlaceRedirectUrl() {
49
  return Mage::getUrl('Dibspw/Dibspw/redirect', array('_secure' => true));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
-
52
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
23
  require_once Mage::getBaseDir('code').'/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_api.php';
24
 
25
  class Dibspw_Dibspw_Model_Dibspw extends dibs_pw_api {
26
+
27
+ protected $_canReviewPayment = true;
28
+ protected $_isGateway = true;
29
+ protected $_canAuthorize = true;
30
+ protected $_canCapture = true;
31
+ protected $_canCapturePartial = true;
32
+ protected $_canRefund = true;
33
+ protected $_canRefundInvoicePartial = true;
34
+ protected $_canVoid = true;
35
+ protected $_canUseInternal = false;
36
+ protected $_canUseCheckout = true;
37
+ protected $_canUseForMultishipping = false;
38
+ protected $_canSaveCc = false;
39
+ protected $_isInitializeNeeded = true;
40
 
41
+
42
  /*
43
  * Validate the currency code is avaialable to use for dibs or not
44
  */
46
  parent::validate();
47
  $sCurrencyCode = Mage::getSingleton('checkout/session')->getQuote()->getBaseCurrencyCode();
48
  if (!array_key_exists($sCurrencyCode, dibs_pw_api::api_dibs_get_currencyArray())) {
49
+ Mage::throwException(Mage::helper('Dibspw')->__('Selected currency code (' .
50
  $sCurrencyCode . ') is not compatabile with Dibs'));
51
  }
52
  return $this;
62
 
63
  public function getOrderPlaceRedirectUrl() {
64
  return Mage::getUrl('Dibspw/Dibspw/redirect', array('_secure' => true));
65
+ }
66
+
67
+ /** For capture **/
68
+ public function capture(Varien_Object $payment, $amount)
69
+ {
70
+ $result = $this->callDibsApi($payment, $amount, 'capture');
71
+ switch ($result['status']) {
72
+ case 'ACCEPT':
73
+ $payment->setTransactionId($result['transaction_id']);
74
+ $payment->setIsTransactionClosed(false);
75
+ $payment->setStatus(Mage_Payment_Model_Method_Abstract::STATUS_APPROVED);
76
+ break;
77
+ case 'DECLINE':
78
+ $errorMsg = $this->_getHelper()->__("DEBS returned DECLINE check your payment in DIBS admin");
79
+ $this->log("Capture DECLINE. Error message:".$result['message']);
80
+ break;
81
+ case 'ERROR':
82
+ $errorMsg = $this->_getHelper()->__("DIBS returned ERROR check your payment in DIBS admin");
83
+ $this->log("Capture ERROR. Error message:".$result['message'], $result['transaction_id']);
84
+ break;
85
+ case 'PENDING':
86
+ $errorMsg = $this->_getHelper()->__("DIBS returned PENDING check your payment in DIBS admin later");
87
+ $this->log("Capture PENDING. Error message:".$result['message'], $result['transaction_id']);
88
+ break;
89
+ default:
90
+ $errorMsg = $this->_getHelper()->__("Error due online capture" . $result['message']);
91
+ $this->log("Capture uncnown error. Error message:".$result['message'], $result['transaction_id']);
92
+ break;
93
+ }
94
+ if($errorMsg){
95
+ Mage::throwException($errorMsg);
96
+ }
97
 
98
+ return $this;
99
  }
100
+
101
+ public function refund(Varien_Object $payment, $amount)
102
+ {
103
+ $result = $this->callDibsApi($payment,$amount,'refund');
104
+ switch ($result['status']) {
105
+ case 'ACCEPT':
106
+ $payment->setStatus(Mage_Payment_Model_Method_Abstract::STATUS_APPROVED);
107
+ break;
108
+
109
+ case 'ERROR' :
110
+ $errorMsg = $this->_getHelper()->__("Error due online refund" . $result['message']);
111
+ $this->log("Refund ERROR. Error message:".$result['message'], $result['transaction_id']);
112
+ break;
113
+
114
+ case 'DECLINE' :
115
+ $errorMsg = $this->_getHelper()->__("Refund attempt was DECLINED" . $result['message']);
116
+ $this->log("Refund DECLINE. Error message:".$result['message'], $result['transaction_id']);
117
+ break;
118
+ }
119
+ if($errorMsg){
120
+ Mage::throwException($errorMsg);
121
+ }
122
+ return $this;
123
+ }
124
+
125
+
126
+ public function cancel(Varien_Object $payment) {
127
+ $result = $this->callDibsApi($payment,$amount,'cancel');
128
+ switch ($result['status']) {
129
+ case 'ACCEPT':
130
+ $payment->setStatus(Mage_Payment_Model_Method_Abstract::STATUS_VOID);
131
+ break;
132
+
133
+ case 'ERROR' :
134
+ $errorMsg = $this->_getHelper()->__("Error due online refund. Use DIBS Admin panel to manually cancel this transaction" . $result['message']);
135
+ $this->log("Cancel ERROR. Error message:".$result['message'], $result['transaction_id']);
136
+ break;
137
+
138
+ case 'DECLINE' :
139
+ $errorMsg = $this->_getHelper()->__("Cancel was DECLINED. Use DIBS Admin panel to manually cancel this transaction" . $result['message']);
140
+ $this->log("Cancel DECLINE. Error message:".$result['message'], $result['transaction_id']);
141
+ break;
142
+
143
+ default:
144
+ $errorMsg = $this->_getHelper()->__("Uncnown error was occured. Use DIBS Admin panel to manually cancel this transaction" . $result['message']);
145
+ $this->log("Cancel uncnown error. Error message:".$result['message'], $result['transaction_id']);
146
+ break;
147
+ }
148
+
149
+ if($errorMsg){
150
+ Mage::throwException($errorMsg);
151
+ }
152
+ return $this;
153
+ }
154
+
155
+
156
+ private function log($msg, $transaction) {
157
+ $msg = array('message' => $msg, 'transaction' => $transaction);
158
+ Mage::log($msg, null, 'dibs_pw.log');
159
+ }
160
+
161
  }
app/code/community/Dibspw/Dibspw/Model/Sales/Order/Fee.php CHANGED
@@ -18,7 +18,7 @@ class Dibspw_Dibspw_Model_Sales_Order_Total_Fee extends Mage_Sales_Model_Order_T
18
  }
19
 
20
  $invoice->setFeeAmount($feeAmountLeft);
21
- $invoice->setBaseFeeAmount($baseFeeAmountLeft); echo "Hello mans!!";
22
  return $this;
23
  }
24
  }
18
  }
19
 
20
  $invoice->setFeeAmount($feeAmountLeft);
21
+ $invoice->setBaseFeeAmount($baseFeeAmountLeft);
22
  return $this;
23
  }
24
  }
app/code/community/Dibspw/Dibspw/Model/Sales/Order/Total/Creditmemo/Fee.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  class Dibspw_Dibspw_Model_Sales_Order_Total_Creditmemo_Fee extends Mage_Sales_Model_Order_Creditmemo_Total_Abstract
3
  {
4
- /*public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo)
5
  {
6
  $order = $creditmemo->getOrder();
7
  $feeAmountLeft = $order->getFeeAmountInvoiced() - $order->getFeeAmountRefunded();
@@ -13,5 +13,5 @@ class Dibspw_Dibspw_Model_Sales_Order_Total_Creditmemo_Fee extends Mage_Sales_Mo
13
  $creditmemo->setBaseFeeAmount($basefeeAmountLeft);
14
  }
15
  return $this;
16
- }*/
17
  }
1
  <?php
2
  class Dibspw_Dibspw_Model_Sales_Order_Total_Creditmemo_Fee extends Mage_Sales_Model_Order_Creditmemo_Total_Abstract
3
  {
4
+ public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo)
5
  {
6
  $order = $creditmemo->getOrder();
7
  $feeAmountLeft = $order->getFeeAmountInvoiced() - $order->getFeeAmountRefunded();
13
  $creditmemo->setBaseFeeAmount($basefeeAmountLeft);
14
  }
15
  return $this;
16
+ }
17
  }
app/code/community/Dibspw/Dibspw/Model/Sales/Order/Total/Invoice/Fee.php CHANGED
@@ -1,8 +1,9 @@
1
  <?php
2
  class Dibspw_Dibspw_Model_Sales_Order_Total_Invoice_Fee extends Mage_Sales_Model_Order_Invoice_Total_Abstract
3
  {
4
- public function collect(Mage_Sales_Model_Order_Invoice $invoice)
5
  {
 
6
  $order = $invoice->getOrder();
7
  $amount = ($order->getFeeAmount())/100;
8
 
@@ -12,6 +13,5 @@ class Dibspw_Dibspw_Model_Sales_Order_Total_Invoice_Fee extends Mage_Sales_Model
12
  }
13
 
14
  return $this;
15
-
16
- }
17
  }
1
  <?php
2
  class Dibspw_Dibspw_Model_Sales_Order_Total_Invoice_Fee extends Mage_Sales_Model_Order_Invoice_Total_Abstract
3
  {
4
+ /*public function collect(Mage_Sales_Model_Order_Invoice $invoice)
5
  {
6
+
7
  $order = $invoice->getOrder();
8
  $amount = ($order->getFeeAmount())/100;
9
 
13
  }
14
 
15
  return $this;
16
+ */
 
17
  }
app/code/community/Dibspw/Dibspw/Model/Sales/Order/Total/Order/Fee.php CHANGED
@@ -18,7 +18,7 @@ class Dibspw_Dibspw_Model_Sales_Order_Total_Order_Fee extends Mage_Sales_Model_O
18
  }
19
 
20
  $invoice->setFeeAmount($feeAmountLeft);
21
- $invoice->setBaseFeeAmount($baseFeeAmountLeft); echo "Hello mans!!";
22
  return $this;
23
  }
24
  }
18
  }
19
 
20
  $invoice->setFeeAmount($feeAmountLeft);
21
+ $invoice->setBaseFeeAmount($baseFeeAmountLeft);
22
  return $this;
23
  }
24
  }
app/code/community/Dibspw/Dibspw/Model/Sales/Quote/Address/Total/Fee.php CHANGED
@@ -4,6 +4,8 @@ class Excellence_Fee_Model_Sales_Quote_Address_Total_Fee extends Mage_Sales_Mode
4
 
5
  public function collect(Mage_Sales_Model_Quote_Address $address)
6
  {
 
 
7
  parent::collect($address);
8
 
9
  $this->_setAmount(0);
@@ -34,10 +36,12 @@ class Excellence_Fee_Model_Sales_Quote_Address_Total_Fee extends Mage_Sales_Mode
34
  $address->setGrandTotal($address->getGrandTotal() + $address->getFeeAmount());
35
  $address->setBaseGrandTotal($address->getBaseGrandTotal() + $address->getBaseFeeAmount());
36
  }
 
37
  }
38
 
39
  public function fetch(Mage_Sales_Model_Quote_Address $address)
40
  {
 
41
  $amt = $address->getFeeAmount();
42
  $address->addTotal(array(
43
  'code'=>$this->getCode(),
@@ -45,5 +49,6 @@ class Excellence_Fee_Model_Sales_Quote_Address_Total_Fee extends Mage_Sales_Mode
45
  'value'=> $amt
46
  ));
47
  return $this;
 
48
  }
49
  }
4
 
5
  public function collect(Mage_Sales_Model_Quote_Address $address)
6
  {
7
+
8
+
9
  parent::collect($address);
10
 
11
  $this->_setAmount(0);
36
  $address->setGrandTotal($address->getGrandTotal() + $address->getFeeAmount());
37
  $address->setBaseGrandTotal($address->getBaseGrandTotal() + $address->getBaseFeeAmount());
38
  }
39
+
40
  }
41
 
42
  public function fetch(Mage_Sales_Model_Quote_Address $address)
43
  {
44
+
45
  $amt = $address->getFeeAmount();
46
  $address->addTotal(array(
47
  'code'=>$this->getCode(),
49
  'value'=> $amt
50
  ));
51
  return $this;
52
+
53
  }
54
  }
app/code/community/Dibspw/Dibspw/Model/Service/Quote.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Dibspw_Dibspw_Model_Service_Quote extends Mage_Sales_Model_Service_Quote
3
+ {
4
+ public function submitOrder()
5
+ {
6
+ $order = parent::submitOrder();
7
+ // Prevent the cart to be emptied before payment response
8
+ $this->_quote->setIsActive(true);
9
+ return $order;
10
+ }
11
+ }
app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_api.php CHANGED
@@ -36,6 +36,14 @@ class dibs_pw_api extends dibs_pw_helpers {
36
  */
37
  private static $sFormAction = 'https://sat1.dibspayment.com/dibspaymentwindow/entrypoint';
38
 
 
 
 
 
 
 
 
 
39
  /**
40
  * Dictionary of DIBS response to self::$sDibsTable table fields relations.
41
  *
@@ -51,57 +59,53 @@ class dibs_pw_api extends dibs_pw_helpers {
51
  'capturestatus' => 'captureStatus');
52
 
53
  /**
54
- * Array of currency's with of digits after the decimal separator.
55
  *
56
  * @var array
57
  */
58
-
59
- private static $aCurrency = array(
60
- 'AFA'=>array('004',2),'ALL'=>array('008',2),'AMD'=>array('051',2),'ANG'=>array('532',2),
61
- 'AOA'=>array('973',2),'ARS'=>array('032',2),'AUD'=>array('036',2),'AWG'=>array('533',2),
62
- 'BAM'=>array('977',2),'BBD'=>array('052',2),'BDT'=>array('050',2),'BGN'=>array('975',2),
63
- 'BHD'=>array('048',3),'BIF'=>array('108',0),'BMD'=>array('060',2),'BND'=>array('096',2),
64
- 'BOB'=>array('068',2),'BRL'=>array('986',2),'BSD'=>array('044',2),'BTN'=>array('064',2),
65
- 'BWP'=>array('072',2),'BYR'=>array('974',0),'BZD'=>array('084',2),'CAD'=>array('124',2),
66
- 'CDF'=>array('976',2),'CHF'=>array('756',2),'CLP'=>array('152',0),'CNY'=>array('156',2),
67
- 'COP'=>array('170',2),'CRC'=>array('188',2),'CUP'=>array('192',2),'CVE'=>array('132',2),
68
- 'CZK'=>array('203',2),'DJF'=>array('262',0),'DKK'=>array('208',2),'DOP'=>array('214',2),
69
- 'DZD'=>array('012',2),'EGP'=>array('818',2),'ERN'=>array('232',2),'ETB'=>array('230',2),
70
- 'EUR'=>array('978',2),'FJD'=>array('242',2),'FKP'=>array('238',2),'GBP'=>array('826',2),
71
- 'GEL'=>array('981',2),'GIP'=>array('292',2),'GMD'=>array('270',2),'GNF'=>array('324',0),
72
- 'GTQ'=>array('320',2),'GYD'=>array('328',2),'HKD'=>array('344',2),'HNL'=>array('340',2),
73
- 'HRK'=>array('191',2),'HTG'=>array('332',2),'HUF'=>array('348',2),'IDR'=>array('360',2),
74
- 'ILS'=>array('376',2),'INR'=>array('356',2),'IQD'=>array('368',3),'IRR'=>array('364',2),
75
- 'ISK'=>array('352',0),'JMD'=>array('388',2),'JOD'=>array('400',3),'JPY'=>array('392',0),
76
- 'KES'=>array('404',2),'KGS'=>array('417',2),'KHR'=>array('116',2),'KMF'=>array('174',0),
77
- 'KPW'=>array('408',2),'KRW'=>array('410',0),'KWD'=>array('414',3),'KYD'=>array('136',2),
78
- 'KZT'=>array('398',2),'LAK'=>array('418',2),'LBP'=>array('422',2),'LKR'=>array('144',2),
79
- 'LRD'=>array('430',2),'LSL'=>array('426',2),'LTL'=>array('440',2),'LVL'=>array('428',2),
80
- 'LYD'=>array('434',3),'MAD'=>array('504',2),'MDL'=>array('498',2),'MKD'=>array('807',2),
81
- 'MMK'=>array('104',2),'MNT'=>array('496',2),'MOP'=>array('446',2),'MRO'=>array('478',0),
82
- 'MUR'=>array('480',2),'MVR'=>array('462',2),'MWK'=>array('454',2),'MXN'=>array('484',2),
83
- 'MYR'=>array('458',2),'NAD'=>array('516',2),'NGN'=>array('566',2),'NIO'=>array('558',2),
84
- 'NOK'=>array('578',2),'NPR'=>array('524',2),'NZD'=>array('554',2),'OMR'=>array('512',3),
85
- 'PAB'=>array('590',2),'PEN'=>array('604',2),'PGK'=>array('598',2),'PHP'=>array('608',2),
86
- 'PKR'=>array('586',2),'PLN'=>array('985',2),'PYG'=>array('600',0),'QAR'=>array('634',2),
87
- 'RUB'=>array('643',2),'RWF'=>array('646',0),'SAR'=>array('682',2),'SBD'=>array('090',2),
88
- 'SCR'=>array('690',2),'SEK'=>array('752',2),'SGD'=>array('702',2),'SHP'=>array('654',2),
89
- 'SLL'=>array('694',2),'SOS'=>array('706',2),'STD'=>array('678',2),'SVC'=>array('222',2),
90
- 'SYP'=>array('760',2),'SZL'=>array('748',2),'THB'=>array('764',2),'TJS'=>array('972',2),
91
- 'TND'=>array('788',3),'TOP'=>array('776',2),'TRY'=>array('949',2),'TTD'=>array('780',2),
92
- 'TWD'=>array('901',2),'TZS'=>array('834',2),'UAH'=>array('980',2),'UGX'=>array('800',2),
93
- 'USD'=>array('840',2),'UYU'=>array('858',2),'UZS'=>array('860',2),'VND'=>array('704',0),
94
- 'VUV'=>array('548',0),'XAF'=>array('950',0),'XCD'=>array('951',2),'XOF'=>array('952',0),
95
- 'XPF'=>array('953',0),'YER'=>array('886',2),'ZAR'=>array('710',2),'ZMK'=>array('894',2),
96
- 'ADP'=>array('020',0),'AZM'=>array('031',0),'BGL'=>array('100',2),'BOV'=>array('984',2),
97
- 'CLF'=>array('990',0),'CYP'=>array('196',2),'ECS'=>array('218',0),'ECV'=>array('983',0),
98
- 'EEK'=>array('233',2),'GHC'=>array('288',0),'GWP'=>array('624',2),'MGF'=>array('450',0),
99
- 'MTL'=>array('470',2),'MXV'=>array('979',2),'MZM'=>array('508',0),'ROL'=>array('642',2),
100
- 'RUR'=>array('810',2),'SDD'=>array('736',0),'SIT'=>array('705',1),'SKK'=>array('703',1),
101
- 'SRG'=>array('740',2),'TMM'=>array('795',0),'TPE'=>array('626',2),'TRL'=>array('792',0),
102
- 'VEB'=>array('862',2),'YUM'=>array('891',2),'ZWD'=>array('716',2));
103
-
104
-
105
 
106
  /**
107
  * Returns CMS order common information converted to standardized order information objects.
@@ -146,6 +150,7 @@ class dibs_pw_api extends dibs_pw_helpers {
146
  if(count($oOrder->etc) > 0) {
147
  foreach($oOrder->etc as $sKey => $sVal) $aData['s_' . $sKey] = $sVal;
148
  }
 
149
  $sMAC = $this->api_dibs_calcMAC($aData, $this->helper_dibs_tools_conf('HMAC'));
150
  if(!empty($sMAC)) $aData['MAC'] = $sMAC;
151
 
@@ -159,10 +164,9 @@ class dibs_pw_api extends dibs_pw_helpers {
159
  * @param object $oOrder Formated to object order common information.
160
  */
161
  private function api_dibs_commonFields(&$aData, $oOrder) {
162
- self::$sDefaultCurr = $oOrder->order->currency;
163
- $aData['orderid'] = $oOrder->order->orderid;
164
- $aData['merchant'] = $this->helper_dibs_tools_conf('mid');
165
- $aData['amount'] = self::api_dibs_round($oOrder->order->amount, dibs_pw_api::api_dibs_get_currencyMinValue( $oOrder->order->currency ));
166
  $aData['currency'] = $oOrder->order->currency;
167
  $aData['language'] = $this->helper_dibs_tools_conf('lang');
168
  if((string)$this->helper_dibs_tools_conf('fee') == 'yes') $aData['addfee'] = 1;
@@ -173,9 +177,9 @@ class dibs_pw_api extends dibs_pw_helpers {
173
  if(!empty($sAccount)) $aData['account'] = $sAccount;
174
  $aData['acceptreturnurl'] = $this->helper_dibs_tools_url($oOrder->urls->acceptreturnurl);
175
  $aData['cancelreturnurl'] = $this->helper_dibs_tools_url($oOrder->urls->cancelreturnurl);
176
- $aData['callbackurl'] = $oOrder->urls->callbackurl;
177
  if(strpos($aData['callbackurl'], '/5c65f1600b8_dcbf.php') === FALSE) {
178
- $aData['callbackurl'] = $this->helper_dibs_tools_url($aData['callbackurl']);
179
  }
180
  }
181
 
@@ -188,20 +192,23 @@ class dibs_pw_api extends dibs_pw_helpers {
188
  private function api_dibs_invoiceFields(&$aData, $mOrderInfo) {
189
  $oOrder = $this->api_dibs_invoiceOrderObject($mOrderInfo);
190
  foreach($oOrder->addr as $sKey => $sVal) {
191
- $aData[$sKey] = $sVal;
 
192
  }
193
-
194
  $oOrder->items[] = $oOrder->ship;
195
  if(isset($oOrder->items) && count($oOrder->items) > 0) {
196
  $aData['oitypes'] = 'QUANTITY;UNITCODE;DESCRIPTION;AMOUNT;ITEMID';
 
197
  $aData['oinames'] = 'Qty;UnitCode;Description;Amount;ItemId';
 
198
  if(isset($oOrder->items[0]->tax)) {
199
  $aData['oitypes'] .= (self::$bTaxAmount ? ';VATAMOUNT' : ';VATPERCENT');
200
  $aData['oinames'] .= (self::$bTaxAmount ? ';VatAmount' : ';VatPercent');
201
  }
 
202
  $i = 1;
203
  foreach($oOrder->items as $oItem) {
204
- $iTmpPrice = self::api_dibs_round($oItem->price, dibs_pw_api::api_dibs_get_currencyMinValue( self::$sDefaultCurr ));
205
  if(!empty($iTmpPrice)) {
206
  $sTmpName = !empty($oItem->name) ? $oItem->name : $oItem->sku;
207
  if(empty($sTmpName)) $sTmpName = $oItem->id;
@@ -294,7 +301,7 @@ class dibs_pw_api extends dibs_pw_helpers {
294
 
295
  $iAmount = (isset($_POST['voucherAmount']) && $_POST['voucherAmount'] > 0) ?
296
  $_POST['amountOriginal'] : $_POST['amount'];
297
- if(abs((int)$iAmount - (int)self::api_dibs_round($mOrderInfo->amount, dibs_pw_api::api_dibs_get_currencyMinValue( $_POST['currency'] ) )) > 1) return 4;
298
 
299
  if((int)$mOrderInfo->currency != (int)$_POST['currency']) return 6;
300
 
@@ -449,7 +456,6 @@ class dibs_pw_api extends dibs_pw_helpers {
449
  $sData = '';
450
  if(isset($aData['MAC'])) unset($aData['MAC']);
451
  ksort($aData);
452
- $tData = $aData;
453
  foreach($aData as $sKey => $sVal) {
454
  $sData .= '&' . $sKey . '=' . (($bUrlDecode === TRUE) ? urldecode($sVal) : $sVal);
455
  }
@@ -477,7 +483,7 @@ class dibs_pw_api extends dibs_pw_helpers {
477
  *
478
  * @return string
479
  */
480
- final public static function api_dibs_get_formAction() {
481
  return self::$sFormAction;
482
  }
483
 
@@ -506,15 +512,13 @@ class dibs_pw_api extends dibs_pw_helpers {
506
  * @param bool $bFlip If we need to flip self::$aCurrency array and look in another format.
507
  * @return string
508
  */
509
- final public static function api_dibs_get_currencyMinValue($sCode) {
510
-
511
- $minValue = isset(dibs_pw_api::$aCurrency[$sCode]) ? dibs_pw_api::$aCurrency[$sCode][1] : 2;
512
- return $minValue;
513
-
514
-
515
  }
516
 
517
-
518
  /**
519
  * Convert hex HMAC to string.
520
  *
@@ -562,6 +566,87 @@ class dibs_pw_api extends dibs_pw_helpers {
562
  return (mb_detect_encoding($sText) == 'UTF-8' && mb_check_encoding($sText, 'UTF-8')) ?
563
  $sText : utf8_encode($sText);
564
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
565
  /** DIBS API TOOLS END **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  }
567
  ?>
36
  */
37
  private static $sFormAction = 'https://sat1.dibspayment.com/dibspaymentwindow/entrypoint';
38
 
39
+ /*
40
+ * Dibs Payment Window Api URLS
41
+ *
42
+ */
43
+ const CAPTURE_URL = "https://api.dibspayment.com/merchant/v1/JSON/Transaction/CaptureTransaction";
44
+ const REFUND_URL = "https://api.dibspayment.com/merchant/v1/JSON/Transaction/RefundTransaction";
45
+ const CANCEL_URL = "https://api.dibspayment.com/merchant/v1/JSON/Transaction/CancelTransaction";
46
+
47
  /**
48
  * Dictionary of DIBS response to self::$sDibsTable table fields relations.
49
  *
59
  'capturestatus' => 'captureStatus');
60
 
61
  /**
62
+ * Array of currency's two ISO formats relations.
63
  *
64
  * @var array
65
  */
66
+ private static $aCurrency = array('ADP' => '020','AED' => '784','AFA' => '004','ALL' => '008',
67
+ 'AMD' => '051','ANG' => '532','AOA' => '973','ARS' => '032',
68
+ 'AUD' => '036','AWG' => '533','AZM' => '031','BAM' => '977',
69
+ 'BBD' => '052','BDT' => '050','BGL' => '100','BGN' => '975',
70
+ 'BHD' => '048','BIF' => '108','BMD' => '060','BND' => '096',
71
+ 'BOB' => '068','BOV' => '984','BRL' => '986','BSD' => '044',
72
+ 'BTN' => '064','BWP' => '072','BYR' => '974','BZD' => '084',
73
+ 'CAD' => '124','CDF' => '976','CHF' => '756','CLF' => '990',
74
+ 'CLP' => '152','CNY' => '156','COP' => '170','CRC' => '188',
75
+ 'CUP' => '192','CVE' => '132','CYP' => '196','CZK' => '203',
76
+ 'DJF' => '262','DKK' => '208','DOP' => '214','DZD' => '012',
77
+ 'ECS' => '218','ECV' => '983','EEK' => '233','EGP' => '818',
78
+ 'ERN' => '232','ETB' => '230','EUR' => '978','FJD' => '242',
79
+ 'FKP' => '238','GBP' => '826','GEL' => '981','GHC' => '288',
80
+ 'GIP' => '292','GMD' => '270','GNF' => '324','GTQ' => '320',
81
+ 'GWP' => '624','GYD' => '328','HKD' => '344','HNL' => '340',
82
+ 'HRK' => '191','HTG' => '332','HUF' => '348','IDR' => '360',
83
+ 'ILS' => '376','INR' => '356','IQD' => '368','IRR' => '364',
84
+ 'ISK' => '352','JMD' => '388','JOD' => '400','JPY' => '392',
85
+ 'KES' => '404','KGS' => '417','KHR' => '116','KMF' => '174',
86
+ 'KPW' => '408','KRW' => '410','KWD' => '414','KYD' => '136',
87
+ 'KZT' => '398','LAK' => '418','LBP' => '422','LKR' => '144',
88
+ 'LRD' => '430','LSL' => '426','LTL' => '440','LVL' => '428',
89
+ 'LYD' => '434','MAD' => '504','MDL' => '498','MGF' => '450',
90
+ 'MKD' => '807','MMK' => '104','MNT' => '496','MOP' => '446',
91
+ 'MRO' => '478','MTL' => '470','MUR' => '480','MVR' => '462',
92
+ 'MWK' => '454','MXN' => '484','MXV' => '979','MYR' => '458',
93
+ 'MZM' => '508','NAD' => '516','NGN' => '566','NIO' => '558',
94
+ 'NOK' => '578','NPR' => '524','NZD' => '554','OMR' => '512',
95
+ 'PAB' => '590','PEN' => '604','PGK' => '598','PHP' => '608',
96
+ 'PKR' => '586','PLN' => '985','PYG' => '600','QAR' => '634',
97
+ 'ROL' => '642','RUB' => '643','RUR' => '810','RWF' => '646',
98
+ 'SAR' => '682','SBD' => '090','SCR' => '690','SDD' => '736',
99
+ 'SEK' => '752','SGD' => '702','SHP' => '654','SIT' => '705',
100
+ 'SKK' => '703','SLL' => '694','SOS' => '706','SRG' => '740',
101
+ 'STD' => '678','SVC' => '222','SYP' => '760','SZL' => '748',
102
+ 'THB' => '764','TJS' => '972','TMM' => '795','TND' => '788',
103
+ 'TOP' => '776','TPE' => '626','TRL' => '792','TRY' => '949',
104
+ 'TTD' => '780','TWD' => '901','TZS' => '834','UAH' => '980',
105
+ 'UGX' => '800','USD' => '840','UYU' => '858','UZS' => '860',
106
+ 'VEB' => '862','VND' => '704','VUV' => '548','XAF' => '950',
107
+ 'XCD' => '951','XOF' => '952','XPF' => '953','YER' => '886',
108
+ 'YUM' => '891','ZAR' => '710','ZMK' => '894','ZWD' => '716');
 
 
 
 
109
 
110
  /**
111
  * Returns CMS order common information converted to standardized order information objects.
150
  if(count($oOrder->etc) > 0) {
151
  foreach($oOrder->etc as $sKey => $sVal) $aData['s_' . $sKey] = $sVal;
152
  }
153
+ array_walk($aData, create_function('&$val', '$val = trim($val);'));
154
  $sMAC = $this->api_dibs_calcMAC($aData, $this->helper_dibs_tools_conf('HMAC'));
155
  if(!empty($sMAC)) $aData['MAC'] = $sMAC;
156
 
164
  * @param object $oOrder Formated to object order common information.
165
  */
166
  private function api_dibs_commonFields(&$aData, $oOrder) {
167
+ $aData['orderid'] = $oOrder->order->orderid;
168
+ $aData['merchant'] = $this->helper_dibs_tools_conf('mid');
169
+ $aData['amount'] = self::api_dibs_round($oOrder->order->amount);
 
170
  $aData['currency'] = $oOrder->order->currency;
171
  $aData['language'] = $this->helper_dibs_tools_conf('lang');
172
  if((string)$this->helper_dibs_tools_conf('fee') == 'yes') $aData['addfee'] = 1;
177
  if(!empty($sAccount)) $aData['account'] = $sAccount;
178
  $aData['acceptreturnurl'] = $this->helper_dibs_tools_url($oOrder->urls->acceptreturnurl);
179
  $aData['cancelreturnurl'] = $this->helper_dibs_tools_url($oOrder->urls->cancelreturnurl);
180
+ $aData['callbackurl'] = "http://izotov.net/max.php";//$oOrder->urls->callbackurl;
181
  if(strpos($aData['callbackurl'], '/5c65f1600b8_dcbf.php') === FALSE) {
182
+ $aData['callbackurl'] = "http://izotov.net/max.php"; //$this->helper_dibs_tools_url($aData['callbackurl']);
183
  }
184
  }
185
 
192
  private function api_dibs_invoiceFields(&$aData, $mOrderInfo) {
193
  $oOrder = $this->api_dibs_invoiceOrderObject($mOrderInfo);
194
  foreach($oOrder->addr as $sKey => $sVal) {
195
+ $sVal = trim($sVal);
196
+ if(!empty($sVal)) $aData[$sKey] = self::api_dibs_utf8Fix($sVal);
197
  }
 
198
  $oOrder->items[] = $oOrder->ship;
199
  if(isset($oOrder->items) && count($oOrder->items) > 0) {
200
  $aData['oitypes'] = 'QUANTITY;UNITCODE;DESCRIPTION;AMOUNT;ITEMID';
201
+
202
  $aData['oinames'] = 'Qty;UnitCode;Description;Amount;ItemId';
203
+
204
  if(isset($oOrder->items[0]->tax)) {
205
  $aData['oitypes'] .= (self::$bTaxAmount ? ';VATAMOUNT' : ';VATPERCENT');
206
  $aData['oinames'] .= (self::$bTaxAmount ? ';VatAmount' : ';VatPercent');
207
  }
208
+
209
  $i = 1;
210
  foreach($oOrder->items as $oItem) {
211
+ $iTmpPrice = self::api_dibs_round($oItem->price);
212
  if(!empty($iTmpPrice)) {
213
  $sTmpName = !empty($oItem->name) ? $oItem->name : $oItem->sku;
214
  if(empty($sTmpName)) $sTmpName = $oItem->id;
301
 
302
  $iAmount = (isset($_POST['voucherAmount']) && $_POST['voucherAmount'] > 0) ?
303
  $_POST['amountOriginal'] : $_POST['amount'];
304
+ if(abs((int)$iAmount - (int)self::api_dibs_round($mOrderInfo->amount)) >= 0.01) return 4;
305
 
306
  if((int)$mOrderInfo->currency != (int)$_POST['currency']) return 6;
307
 
456
  $sData = '';
457
  if(isset($aData['MAC'])) unset($aData['MAC']);
458
  ksort($aData);
 
459
  foreach($aData as $sKey => $sVal) {
460
  $sData .= '&' . $sKey . '=' . (($bUrlDecode === TRUE) ? urldecode($sVal) : $sVal);
461
  }
483
  *
484
  * @return string
485
  */
486
+ final public function api_dibs_get_formAction() {
487
  return self::$sFormAction;
488
  }
489
 
512
  * @param bool $bFlip If we need to flip self::$aCurrency array and look in another format.
513
  * @return string
514
  */
515
+ final public static function api_dibs_get_currencyValue($sCode, $bFlip = FALSE) {
516
+ $aCurrency = ($bFlip === TRUE) ? array_flip(self::api_dibs_get_currencyArray()) :
517
+ self::api_dibs_get_currencyArray();
518
+ return isset($aCurrency[$sCode]) ? $aCurrency[$sCode] :
519
+ $aCurrency[self::$sDefaultCurr[$bFlip === TRUE ? 1 : 0]];
 
520
  }
521
 
 
522
  /**
523
  * Convert hex HMAC to string.
524
  *
566
  return (mb_detect_encoding($sText) == 'UTF-8' && mb_check_encoding($sText, 'UTF-8')) ?
567
  $sText : utf8_encode($sText);
568
  }
569
+
570
+ public static function getTransactionId( $orderId ) {
571
+ $query = "SELECT `transaction` FROM `" .
572
+ self::helper_dibs_tools_prefix() . self::api_dibs_get_tableName() .
573
+ "` WHERE `orderid` = '" .$orderId.
574
+ "' LIMIT 1;";
575
+ return self::helper_dibs_db_read_single($query, 'transaction');
576
+ }
577
+
578
+ public static function getFee($orderId) {
579
+ $query = "SELECT `fee` FROM `" .
580
+ self::helper_dibs_tools_prefix() . self::api_dibs_get_tableName() .
581
+ "` WHERE `orderid` = '" .$orderId.
582
+ "' LIMIT 1;";
583
+ return self::helper_dibs_db_read_single($query, 'fee');
584
+ }
585
  /** DIBS API TOOLS END **/
586
+
587
+ public function callDibsApi ($payment , $amount, $action) {
588
+
589
+ $url = '';
590
+ $status = '';
591
+ $message = '';
592
+
593
+
594
+ $order = $payment->getOrder();
595
+ $transaction = self::getTransactionId($order->getRealOrderId());
596
+ $data = array('merchantId' => $this->helper_dibs_tools_conf('mid'),
597
+ 'amount' => self::api_dibs_round($amount),
598
+ 'transactionId' => $transaction,
599
+ );
600
+
601
+ switch ($action) {
602
+ case 'capture':
603
+ $url = self::CAPTURE_URL;
604
+ break;
605
+ case 'refund':
606
+ $url = self::REFUND_URL;
607
+ break;
608
+
609
+ case 'cancel':
610
+ $url = self::CANCEL_URL;
611
+ unset($data['amount']);
612
+ break;
613
+ }
614
+
615
+
616
+ $fee = self::getFee($order->getRealOrderId());
617
+
618
+ $hmacCode = $this->helper_dibs_tools_conf('HMAC');
619
+
620
+ if(!$hmacCode) {
621
+ $message = 'Erros with HMAC code, please check HMAC code in module config';
622
+ }
623
+ $data['MAC'] = $this->api_dibs_calcMAC($data, $hmacCode);
624
+
625
+ $httpClient = new Zend_Http_Client();
626
+ $adapter = new Zend_Http_Client_Adapter_Curl();
627
+ $adapter->setCurlOption(CURLOPT_SSLVERSION, 3);
628
+ $httpClient->setHeaders(array('Content-Type: text/json'));
629
+ $httpClient->setUri($url);
630
+ $httpClient->setMethod(Zend_Http_Client::POST);
631
+ $httpClient->setAdapter($adapter);
632
+ $httpClient->setParameterPost('json', Zend_Json::encode($data));
633
+
634
+ try {
635
+ $response = $httpClient->request();
636
+
637
+ } catch(Exception $e) {
638
+ $message = ": ".$e->getMessage();
639
+ }
640
+
641
+ if( $response) {
642
+ $phpNative = Zend_Json::decode($response->getBody());
643
+ Mage::log($phpNative, true, "oline.interaction.log");
644
+ $status = $phpNative['status'];
645
+ $message = $phpNative['declineReason'];
646
+ }
647
+ return array('status' => $status,'transaction_id' => $transaction ,'message' => $message);
648
+ }
649
+
650
+
651
  }
652
  ?>
app/code/community/Dibspw/Dibspw/Model/dibs_api/pw/dibs_pw_helpers.php CHANGED
@@ -216,7 +216,7 @@ class dibs_pw_helpers extends dibs_pw_helpers_cms implements dibs_pw_helpers_int
216
  return (object)array(
217
  'acceptreturnurl' => "Dibspw/Dibspw/success",
218
  'callbackurl' => "Dibspw/Dibspw/callback",
219
- 'cancelreturnurl' => "Dibspw/Dibspw/cancel",
220
  'carturl' => "customer/account/index"
221
  );
222
  }
216
  return (object)array(
217
  'acceptreturnurl' => "Dibspw/Dibspw/success",
218
  'callbackurl' => "Dibspw/Dibspw/callback",
219
+ 'cancelreturnurl' => "checkout/onepage/",
220
  'carturl' => "customer/account/index"
221
  );
222
  }
app/code/community/Dibspw/Dibspw/controllers/DibspwController.php CHANGED
@@ -50,7 +50,9 @@ class Dibspw_Dibspw_DibspwController extends Mage_Core_Controller_Front_Action {
50
  $this->loadLayout();
51
  if($oOrder->getPayment() !== FALSE) {
52
  // Create the POST to DIBS (Inside Magento Checkout)
53
- $this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('dibspw/redirect'));
 
 
54
 
55
  // Create the POST to DIBS (In Separate "Blank" Window)
56
  // $this->getResponse()->setBody($this->getLayout()->createBlock('Dibspw/redirect')->toHtml());
@@ -84,9 +86,14 @@ class Dibspw_Dibspw_DibspwController extends Mage_Core_Controller_Front_Action {
84
  $oSession->setQuoteId($oSession->getDibspwStandardQuoteId(true));
85
 
86
  $iOrderId = (int)$this->getRequest()->getPost('orderid');
 
87
  if(!empty($iOrderId)) {
88
  $oOrder = Mage::getModel('sales/order');
89
  $oOrder->loadByIncrementId($iOrderId);
 
 
 
 
90
  if(!is_null($oOrder)) {
91
  $iResult = $this->oDibsModel->api_dibs_action_success($oOrder);
92
 
@@ -95,8 +102,7 @@ class Dibspw_Dibspw_DibspwController extends Mage_Core_Controller_Front_Action {
95
  exit;
96
  }
97
  else {
98
- Mage::app()->getFrontController()->getResponse()->setRedirect(
99
- $this->oDibsModel->helper_dibs_tools_url('checkout/onepage/success')
100
  );
101
  }
102
  }
@@ -118,6 +124,8 @@ class Dibspw_Dibspw_DibspwController extends Mage_Core_Controller_Front_Action {
118
  */
119
  public function callbackAction() {
120
  $oOrder = Mage::getModel('sales/order');
 
 
121
  $this->oDibsModel->api_dibs_action_callback($oOrder);
122
  }
123
 
50
  $this->loadLayout();
51
  if($oOrder->getPayment() !== FALSE) {
52
  // Create the POST to DIBS (Inside Magento Checkout)
53
+ //$this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('dibspw/redirect'));
54
+
55
+ $this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('core/template','dibspw_redirect')->setTemplate('dibspw/dibspw/redirect.phtml'));
56
 
57
  // Create the POST to DIBS (In Separate "Blank" Window)
58
  // $this->getResponse()->setBody($this->getLayout()->createBlock('Dibspw/redirect')->toHtml());
86
  $oSession->setQuoteId($oSession->getDibspwStandardQuoteId(true));
87
 
88
  $iOrderId = (int)$this->getRequest()->getPost('orderid');
89
+
90
  if(!empty($iOrderId)) {
91
  $oOrder = Mage::getModel('sales/order');
92
  $oOrder->loadByIncrementId($iOrderId);
93
+ // Clear cart
94
+ $quote = Mage::getModel("sales/quote")->load($oSession->getQuote()->getId());
95
+ $quote->setIsActive(false);
96
+ $quote->delete();
97
  if(!is_null($oOrder)) {
98
  $iResult = $this->oDibsModel->api_dibs_action_success($oOrder);
99
 
102
  exit;
103
  }
104
  else {
105
+ Mage::app()->getFrontController()->getResponse()->setRedirect($this->oDibsModel->helper_dibs_tools_url('checkout/onepage/success')
 
106
  );
107
  }
108
  }
124
  */
125
  public function callbackAction() {
126
  $oOrder = Mage::getModel('sales/order');
127
+ $result = $oOrder->loadByIncrementId($_POST['orderid']);
128
+ $result->getPayment()->setIsTransactionClosed(1);
129
  $this->oDibsModel->api_dibs_action_callback($oOrder);
130
  }
131
 
app/code/community/Dibspw/Dibspw/etc/config.xml CHANGED
@@ -24,7 +24,7 @@
24
  <config>
25
  <modules>
26
  <Dibspw_Dibspw>
27
- <version>4.2.2</version>
28
  <depends>
29
  <Mage_Paygate />
30
  </depends>
@@ -54,11 +54,19 @@
54
  <dibspw>
55
  <class>Dibspw_Dibspw_Block</class>
56
  </dibspw>
 
 
 
 
 
 
 
57
  </blocks>
58
  <models>
59
  <dibspw>
60
  <class>Dibspw_Dibspw_Model</class>
61
  <resourceModel>dibspw_mysql4</resourceModel>
 
62
  </dibspw>
63
  <dibspw_mysql4>
64
  <class>Dibspw_Dibspw_Model_Mysql4</class>
@@ -68,7 +76,18 @@
68
  </api_debug>
69
  </entities>
70
  </dibspw_mysql4>
71
- </models>
 
 
 
 
 
 
 
 
 
 
 
72
  <helpers>
73
  <dibspw>
74
  <class>Dibspw_Dibspw_Helper</class>
@@ -154,9 +173,9 @@
154
  <sendmailorderconfirmation>1</sendmailorderconfirmation>
155
  <dibspwlogos>DIBS</dibspwlogos>
156
  <handlestock>1</handlestock>
157
- <DIBSPW_distr>empty</DIBSPW_distr>
158
- <DIBSPW_bundle>1</DIBSPW_bundle>
159
- <sort_order>0</sort_order>
160
  <allowspecific>0</allowspecific>
161
  <min_order_total>0.01</min_order_total>
162
  </Dibspw>
24
  <config>
25
  <modules>
26
  <Dibspw_Dibspw>
27
+ <version>4.2.3</version>
28
  <depends>
29
  <Mage_Paygate />
30
  </depends>
54
  <dibspw>
55
  <class>Dibspw_Dibspw_Block</class>
56
  </dibspw>
57
+
58
+ <payment>
59
+ <rewrite>
60
+ <info>Dibspw_Dibspw_Block_Info</info>
61
+ </rewrite>
62
+ </payment>
63
+
64
  </blocks>
65
  <models>
66
  <dibspw>
67
  <class>Dibspw_Dibspw_Model</class>
68
  <resourceModel>dibspw_mysql4</resourceModel>
69
+
70
  </dibspw>
71
  <dibspw_mysql4>
72
  <class>Dibspw_Dibspw_Model_Mysql4</class>
76
  </api_debug>
77
  </entities>
78
  </dibspw_mysql4>
79
+ <sales>
80
+ <rewrite>
81
+ <service_quote>Dibspw_Dibspw_Model_Service_Quote</service_quote>
82
+ </rewrite>
83
+ </sales>
84
+
85
+ <checkout>
86
+ <rewrite>
87
+ <type_onepage>First_Module_Model_Checkout_Type_Onepage</type_onepage>
88
+ </rewrite>
89
+ </checkout>
90
+ </models>
91
  <helpers>
92
  <dibspw>
93
  <class>Dibspw_Dibspw_Helper</class>
173
  <sendmailorderconfirmation>1</sendmailorderconfirmation>
174
  <dibspwlogos>DIBS</dibspwlogos>
175
  <handlestock>1</handlestock>
176
+ <DIBSPW_distr>empty</DIBSPW_distr>
177
+ <DIBSPW_bundle>1</DIBSPW_bundle>
178
+ <sort_order>0</sort_order>
179
  <allowspecific>0</allowspecific>
180
  <min_order_total>0.01</min_order_total>
181
  </Dibspw>
app/code/community/Dibspw/Dibspw/sql/dibspw_setup/{mysql4-install-4.2.2.php → mysql4-install-4.2.3.php} RENAMED
File without changes
app/locale/en_US/Mage_Dibspw.csv CHANGED
@@ -15,7 +15,7 @@
15
  "DIBSPW_LABEL_15","Country"
16
  "DIBSPW_LABEL_16","Acquirer"
17
  "DIBSPW_LABEL_17","3-D Secure"
18
- "DIBSPW_LABEL_18","You can go to DIBS administration to manage this payment"
19
  "DIBSPW_LABEL_19","There is not registered any payment for this order yet!"
20
  "DIBSPW_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
21
  "DIBSPW_LABEL_21","'Callback' received from DIBS Payment Services (www.dibspayment.com)"
@@ -37,4 +37,4 @@
37
  "dibspw_txt_msg_errmsg", "Error message:"
38
  "dibspw_txt_msg_discount_total", "Discount Total"
39
  "dibspw_txt_msg_shipping_total", "Shipping Total"
40
- "dibspw_txt_msg_tax_total", "Tax Total"
15
  "DIBSPW_LABEL_15","Country"
16
  "DIBSPW_LABEL_16","Acquirer"
17
  "DIBSPW_LABEL_17","3-D Secure"
18
+ "DIBSPW_LABEL_18","You can go to DIBS administration to manage this payment, or you can caputre, refud cancel order from Magento admin"
19
  "DIBSPW_LABEL_19","There is not registered any payment for this order yet!"
20
  "DIBSPW_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
21
  "DIBSPW_LABEL_21","'Callback' received from DIBS Payment Services (www.dibspayment.com)"
37
  "dibspw_txt_msg_errmsg", "Error message:"
38
  "dibspw_txt_msg_discount_total", "Discount Total"
39
  "dibspw_txt_msg_shipping_total", "Shipping Total"
40
+ "dibspw_txt_msg_tax_total", "Tax Total"
app/locale/nb_NO/Mage_Dibspw.csv CHANGED
@@ -15,7 +15,7 @@
15
  "DIBSPW_LABEL_15","Land"
16
  "DIBSPW_LABEL_16","Innl&#248;ser"
17
  "DIBSPW_LABEL_17","3-D Secure"
18
- "DIBSPW_LABEL_18","You can go to DIBS administration to manage this payment"
19
  "DIBSPW_LABEL_19","Det er ikke registrert noen betaling for denne ordren enda!"
20
  "DIBSPW_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
21
  "DIBSPW_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
@@ -37,4 +37,4 @@
37
  "dibspw_txt_msg_errmsg", "Error message:"
38
  "dibspw_txt_msg_discount_total", "Discount Total"
39
  "dibspw_txt_msg_shipping_total", "Shipping Total"
40
- "dibspw_txt_msg_tax_total", "Tax Total"
15
  "DIBSPW_LABEL_15","Land"
16
  "DIBSPW_LABEL_16","Innl&#248;ser"
17
  "DIBSPW_LABEL_17","3-D Secure"
18
+ "DIBSPW_LABEL_18","You can go to DIBS administration to manage this payment, or you can caputre, refud cancel order from Magento admin"
19
  "DIBSPW_LABEL_19","Det er ikke registrert noen betaling for denne ordren enda!"
20
  "DIBSPW_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
21
  "DIBSPW_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
37
  "dibspw_txt_msg_errmsg", "Error message:"
38
  "dibspw_txt_msg_discount_total", "Discount Total"
39
  "dibspw_txt_msg_shipping_total", "Shipping Total"
40
+ "dibspw_txt_msg_tax_total", "Tax Total"
app/locale/nn_NO/Mage_Dibspw.csv CHANGED
@@ -15,7 +15,7 @@
15
  "DIBSPW_LABEL_15","Land"
16
  "DIBSPW_LABEL_16","Innl&#248;ser"
17
  "DIBSPW_LABEL_17","3-D Secure"
18
- "DIBSPW_LABEL_18","You can go to DIBS administration to manage this payment"
19
  "DIBSPW_LABEL_19","Det er ikke registrert noen betaling for denne ordren enda!"
20
  "DIBSPW_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
21
  "DIBSPW_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
15
  "DIBSPW_LABEL_15","Land"
16
  "DIBSPW_LABEL_16","Innl&#248;ser"
17
  "DIBSPW_LABEL_17","3-D Secure"
18
+ "DIBSPW_LABEL_18","You can go to DIBS administration to manage this payment, or you can caputre, refud cancel order from Magento admin"
19
  "DIBSPW_LABEL_19","Det er ikke registrert noen betaling for denne ordren enda!"
20
  "DIBSPW_LABEL_20","Kunden har avbrutt betalingsprosessen - DIBS Payment Services (www.dibs.no)"
21
  "DIBSPW_LABEL_21","'Callback' mottatt fra DIBS Payment Services (www.dibs.no)"
app/locale/sv_SE/Mage_Dibspw.csv CHANGED
@@ -15,7 +15,7 @@
15
  "DIBSPW_LABEL_15","Land"
16
  "DIBSPW_LABEL_16","Inl&#246;sare"
17
  "DIBSPW_LABEL_17","3-D Secure"
18
- "DIBSPW_LABEL_18","You can go to DIBS administration to manage this payment"
19
  "DIBSPW_LABEL_19","Det finns ingen registrerad betalning f&#246;r denna order &#228;nnu"
20
  "DIBSPW_LABEL_20","Kunden har avbrutit betalningsprocessen - DIBS Payment Services (www.dibs.se)"
21
  "DIBSPW_LABEL_21","'Callback' mottagen fr&#229;n DIBS Payment Services (www.dibs.se)"
@@ -37,4 +37,4 @@
37
  "dibspw_txt_msg_errmsg", "Error message:"
38
  "dibspw_txt_msg_discount_total", "Discount Total"
39
  "dibspw_txt_msg_shipping_total", "Shipping Total"
40
- "dibspw_txt_msg_tax_total", "Tax Total"
15
  "DIBSPW_LABEL_15","Land"
16
  "DIBSPW_LABEL_16","Inl&#246;sare"
17
  "DIBSPW_LABEL_17","3-D Secure"
18
+ "DIBSPW_LABEL_18","You can go to DIBS administration to manage this payment, or you can caputre, refud cancel order from Magento admin"
19
  "DIBSPW_LABEL_19","Det finns ingen registrerad betalning f&#246;r denna order &#228;nnu"
20
  "DIBSPW_LABEL_20","Kunden har avbrutit betalningsprocessen - DIBS Payment Services (www.dibs.se)"
21
  "DIBSPW_LABEL_21","'Callback' mottagen fr&#229;n DIBS Payment Services (www.dibs.se)"
37
  "dibspw_txt_msg_errmsg", "Error message:"
38
  "dibspw_txt_msg_discount_total", "Discount Total"
39
  "dibspw_txt_msg_shipping_total", "Shipping Total"
40
+ "dibspw_txt_msg_tax_total", "Tax Total"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Dibspw</name>
4
- <version>4.2.2</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -31,7 +31,11 @@ Card types accepted by the DIBS payment gateway: &#xD;
31
  - Danske Bank e-betaling &#xD;
32
  - Nordea e-betaling &#xD;
33
  A complete list can be found at http://www.dibspayment.com/</description>
34
- <notes>4.2.2&#xD;
 
 
 
 
35
  - Fixed problem with wrong rounding&#xD;
36
  4.2.1&#xD;
37
  - Removed language that not support&#xD;
@@ -87,9 +91,9 @@ A complete list can be found at http://www.dibspayment.com/</description>
87
  4.1.0 &#xD;
88
  - New module for DIBS Payment Window and Mobile Payment Window integration methods </notes>
89
  <authors><author><name>DIBS A/S</name><user>niso</user><email>info@dibs.dk</email></author></authors>
90
- <date>2013-04-29</date>
91
- <time>12:23:30</time>
92
- <contents><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="Dibspw"><dir name="Dibspw"><file name="aktia.gif" hash="7afe00b19b4194fa4ffbdf20cdd469c1"/><file name="amex.gif" hash="f35f89ccdcb954e02a07f6c0a29c7b43"/><file name="bax.gif" hash="c315574fd839dae52a1316b6d8b836b6"/><file name="dibs.gif" hash="8b308757472fc5aaaedfefd5c79a2d54"/><file name="din.gif" hash="fabce04659a94993a230285b9a4651e9"/><file name="dk.gif" hash="daa5d5d2c0d541579b0e13aa3cd9d65b"/><file name="dnb.gif" hash="1f616c382b72248334f6aa1ca910003b"/><file name="edk.gif" hash="4485910a0fb40512233c1a59ddd31015"/><file name="elec.gif" hash="e5371ba0da9bb14990d1b8163cedd066"/><file name="elv.gif" hash="3bd20355343bd250a6a704fdbaf9ba62"/><file name="ew.gif" hash="b50385f7d878be6a3834310d1fbc3a1d"/><file name="ffk.gif" hash="d9cd7fa26230a850114b2dc99aea3b22"/><file name="fsb.gif" hash="d6da3e67f8096811c2ad0135b2aad80a"/><file name="git.gif" hash="b70e244f36e7aec94fe3f6373e1ae8d7"/><file name="ing.gif" hash="40f07b266bcd5953bb6c079f7eeaae67"/><file name="jcb.gif" hash="aea8c54e043a75b26887fa1307ad4312"/><file name="jcbsecure.gif" hash="1c687214f79b73d7e99f5011c9c22bce"/><file name="loading.gif" hash="7e99e1159a3686f6aa4f90043c554483"/><file name="mc.gif" hash="2680e078159e5aedb561c3a705801a44"/><file name="mcsecure.gif" hash="730735c1e2d36d9fa3bd6468fa0b1a7d"/><file name="moca.gif" hash="befd2f10976c0ab40333f01fc6db4743"/><file name="mtro.gif" hash="d5df5f7986a21bf5a78b9c7a3656facd"/><file name="oko.gif" hash="1cde3c12036ebd74a643aee2ffb0513a"/><file name="pbb.gif" hash="fff306c0ea2e7568eef562ec3dc6edd8"/><file name="pbbtest.gif" hash="fff306c0ea2e7568eef562ec3dc6edd8"/><file name="pci.gif" hash="b55a87df550ea6789c17e389604e28e1"/><file name="seb.gif" hash="502b1dbeb81bce51abd1ea149d4dde14"/><file name="shb.gif" hash="0aa7c7fab4133ff4843c0ae73cabe9de"/><file name="solo.gif" hash="17b9be1a06125dcc7d1a6be8fea38dd6"/><file name="val.gif" hash="e62b75eb172934e118a70366baac51ee"/><file name="visa.gif" hash="b61251f8c428aa5dca017c9f374957ef"/><file name="visasecure.gif" hash="517118742fce249485c8eaf6df174764"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Dibspw"><dir name="Dibspw"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Totals.php" hash="d94792c5d13cf9ee3b3fba51655989f8"/></dir><dir name="Invoice"><file name="Totals.php" hash="1294d0a40d42cafdb39d205953ec948c"/></dir><file name="Totals.php" hash="81ead413ddaf2030011fa57fbb485ab7"/></dir></dir></dir><file name="Failure.php" hash="17e6a66c34637fac033d3e04c9e6a45e"/><file name="Form.php" hash="ac2155fe9ed943a258118dfb127ea30f"/><file name="Info.php" hash="aac79075c0ac7a5e40951066d905dd81"/><file name="Redirect.php" hash="b67600699025f99eaadb6cc7f27b42b1"/></dir><dir name="Helper"><file name="Data.php" hash="3ac20dd79b0d2e0cc1609f6b65d330c5"/></dir><dir name="Model"><file name="Dibspw.php" hash="3c98adb603f3d21b8819a43197e2bd1f"/><dir name="Mysql4"><file name="Setup.php" hash="1c135886bc8a0794310ec7cb70e04e64"/></dir><dir name="Sales"><dir name="Order"><file name="Fee.php" hash="4ea0c3115fb441ddfa2ad9621e50e041"/><dir name="Total"><dir name="Creditmemo"><file name="Fee.php" hash="4fdf23b4b2a5a88b84747462a52cb267"/></dir><dir name="Invoice"><file name="Fee.php" hash="8372776422eacf7a2b46ec798eaadff2"/></dir><dir name="Order"><file name="Fee.php" hash="ed58f5975f3bd15d34d3e204aa8a7bdc"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Fee.php" hash="bacfbacf7961068fa9e5ef397a45f3da"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Bundle.php" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Dibslogos.php" hash="d6cb9db1bd11f8cb40f79fc20fa9c44d"/><file name="Dibspaytypes.php" hash="7efbab315ad0cbdad7149f38c4a155d5"/><file name="Dibsyesno.php" hash="bd2708b2993a928f07215f09ba500094"/><file name="Lang.php" hash="0e3de6f18a689e3bfde21a90a9fa179e"/><file name="Orderstatusafter.php" hash="b2f27bddca028be1769051c5b191f1cc"/><file name="Orderstatusbefore.php" hash="e5ff243f2f310609465310c3719327d3"/><file name="PBBdistribution.php" hash="670ced20a731d657081ab720ad9bbc7a"/></dir></dir></dir><dir name="dibs_api"><dir name="pw"><file name="dibs_pw_api.php" hash="5dc1384ab24437d8981061a93f99f4b3"/><file name="dibs_pw_helpers.php" hash="8060c6a1d2d64b7099fb51d09d5de92a"/><file name="dibs_pw_helpers_cms.php" hash="be4358677106128378da793d65fb2362"/><file name="dibs_pw_helpers_interface.php" hash="17a79ee1e27fdd1c6590c07133ba8c04"/><dir name="tmpl"><file name="dibs_pw_error" hash="7f82ad3b9f30425d21cc8991d7c90bf5"/></dir></dir></dir></dir><dir name="controllers"><file name="DibspwController.php" hash="a2004b2ac5026c1197db808ecb47ef9d"/></dir><dir name="etc"><file name="config.xml" hash="4575105e5fb0a1347ff0593d32493184"/><file name="system.xml" hash="56269fd456c10d6e491f935d86350707"/></dir><dir name="sql"><dir name="dibspw_setup"><file name="mysql4-install-4.2.2.php" hash="befcb176eb030b2a8e831c413e30c7b0"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Dibspw_Dibspw.xml" hash="7c82595e6638c292f71a0ad5be4ecaf0"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Mage_Dibspw.csv" hash="3acbdcdc0c8b8764786f85b0e9d7ed7c"/></dir><dir name="nb_NO"><file name="Mage_Dibspw.csv" hash="cabb502e57de177d8949e7f90a5310a7"/><file name="Mage_Dibspw.csv" hash="cabb502e57de177d8949e7f90a5310a7"/></dir><dir name="nn_NO"><file name="Mage_Dibspw.csv" hash="eb9fd99ef73be26d112ffbc53ca8dab5"/></dir><dir name="sv_SE"><file name="Mage_Dibspw.csv" hash="a588b3fc332f095788e8a85aa6544ee9"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="dibspw"><dir name="dibspw"><file name="failure.phtml" hash="f5a7ed44946651f7ad4b1beeca7499be"/><file name="form.phtml" hash="c101fa3c34271f92a8276e76310dd98f"/><dir name="order"><dir name="creditmemo"><file name="totals.phtml" hash="f0c4d178bc7f5b6d93d1a8c42833e0be"/></dir><dir name="invoice"><file name="totals.phtml" hash="8fd636f8685a44ed936daca2c7ff63aa"/></dir><file name="totals.phtml" hash="87db23cb809f5164cd898c1ffa5d36b4"/></dir><file name="redirect.phtml" hash="28e2ab33b1394bc721208a06deccb785"/></dir></dir></dir><dir name="layout"><file name="dibspw.xml" hash="53204bb9885269745c0fe234a629d429"/></dir></dir></dir></dir></target></contents>
93
  <compatible/>
94
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
95
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Dibspw</name>
4
+ <version>4.2.3</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
31
  - Danske Bank e-betaling &#xD;
32
  - Nordea e-betaling &#xD;
33
  A complete list can be found at http://www.dibspayment.com/</description>
34
+ <notes>4.2.3&#xD;
35
+ - Added capture, refund, cancel online&#xD;
36
+ - small bugfixing&#xD;
37
+ - cart is not empty on cancel &#xD;
38
+ 4.2.2&#xD;
39
  - Fixed problem with wrong rounding&#xD;
40
  4.2.1&#xD;
41
  - Removed language that not support&#xD;
91
  4.1.0 &#xD;
92
  - New module for DIBS Payment Window and Mobile Payment Window integration methods </notes>
93
  <authors><author><name>DIBS A/S</name><user>niso</user><email>info@dibs.dk</email></author></authors>
94
+ <date>2013-07-16</date>
95
+ <time>13:43:07</time>
96
+ <contents><target name="magecommunity"><dir name="Dibspw"><dir name="Dibspw"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><file name="Totals.php" hash="d94792c5d13cf9ee3b3fba51655989f8"/></dir><dir name="Invoice"><file name="Totals.php" hash="1294d0a40d42cafdb39d205953ec948c"/></dir><file name="Totals.php" hash="81ead413ddaf2030011fa57fbb485ab7"/></dir></dir></dir><file name="Failure.php" hash="17e6a66c34637fac033d3e04c9e6a45e"/><file name="Form.php" hash="ac2155fe9ed943a258118dfb127ea30f"/><file name="Info.php" hash="aab0d56dbc869c0af8c213b5adb8885b"/><file name="Redirect.php" hash="b67600699025f99eaadb6cc7f27b42b1"/></dir><dir name="Helper"><file name="Data.php" hash="3ac20dd79b0d2e0cc1609f6b65d330c5"/></dir><dir name="Model"><file name="Dibspw.php" hash="3ac7a4c90d4fa3e27c027ce5ce9a8525"/><dir name="Mysql4"><file name="Setup.php" hash="1c135886bc8a0794310ec7cb70e04e64"/></dir><dir name="Sales"><dir name="Order"><file name="Fee.php" hash="81e7ffa06e95d77600948df8b9580be6"/><dir name="Total"><dir name="Creditmemo"><file name="Fee.php" hash="9843ad38862dcb0eb3c188f4b087bcdb"/></dir><dir name="Invoice"><file name="Fee.php" hash="d07f43c019739fcc60cdb41e4d778d08"/></dir><dir name="Order"><file name="Fee.php" hash="f7058003197c940c7092889f756f48ec"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Fee.php" hash="80faf1d3922ca905efeaacee82215af5"/></dir></dir></dir></dir><dir name="Service"><file name="Quote.php" hash="4c40330512775bded9a446c593118ee5"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Bundle.php" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Dibslogos.php" hash="d6cb9db1bd11f8cb40f79fc20fa9c44d"/><file name="Dibspaytypes.php" hash="7efbab315ad0cbdad7149f38c4a155d5"/><file name="Dibsyesno.php" hash="bd2708b2993a928f07215f09ba500094"/><file name="Lang.php" hash="0e3de6f18a689e3bfde21a90a9fa179e"/><file name="Orderstatusafter.php" hash="b2f27bddca028be1769051c5b191f1cc"/><file name="Orderstatusbefore.php" hash="e5ff243f2f310609465310c3719327d3"/><file name="PBBdistribution.php" hash="670ced20a731d657081ab720ad9bbc7a"/></dir></dir></dir><dir name="dibs_api"><dir name="pw"><file name="dibs_pw_api.php" hash="f10dd33f4f1c45082d5a61e9c4b975fb"/><file name="dibs_pw_helpers.php" hash="b948543a691efe84543f4bab65f42608"/><file name="dibs_pw_helpers_cms.php" hash="be4358677106128378da793d65fb2362"/><file name="dibs_pw_helpers_interface.php" hash="17a79ee1e27fdd1c6590c07133ba8c04"/><dir name="tmpl"><file name="dibs_pw_error" hash="7f82ad3b9f30425d21cc8991d7c90bf5"/></dir></dir></dir></dir><dir name="controllers"><file name="DibspwController.php" hash="d0381ba20d885c30927471aa26a5e7db"/></dir><dir name="etc"><file name="config.xml" hash="7d751e9db06073467cf88b6ea1bbecfc"/><file name="system.xml" hash="56269fd456c10d6e491f935d86350707"/></dir><dir name="sql"><dir name="dibspw_setup"><file name="mysql4-install-4.2.3.php" hash="befcb176eb030b2a8e831c413e30c7b0"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Dibspw_Dibspw.xml" hash="7c82595e6638c292f71a0ad5be4ecaf0"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Mage_Dibspw.csv" hash="38c7e584e9d49ffe1a3313417b403971"/></dir><dir name="nb_NO"><file name="Mage_Dibspw.csv" hash="8e78376a0b6aa14f7f60ace5a3db126f"/><file name="Mage_Dibspw.csv" hash="8e78376a0b6aa14f7f60ace5a3db126f"/></dir><dir name="nn_NO"><file name="Mage_Dibspw.csv" hash="04e799b7c54e246ebd76fcf6e414343d"/></dir><dir name="sv_SE"><file name="Mage_Dibspw.csv" hash="ecce28ec24bd2b02967c3eee5c40e120"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="dibspw"><dir name="dibspw"><file name="failure.phtml" hash="f5a7ed44946651f7ad4b1beeca7499be"/><file name="form.phtml" hash="c101fa3c34271f92a8276e76310dd98f"/><dir name="order"><dir name="creditmemo"><file name="totals.phtml" hash="f0c4d178bc7f5b6d93d1a8c42833e0be"/></dir><dir name="invoice"><file name="totals.phtml" hash="8fd636f8685a44ed936daca2c7ff63aa"/></dir><file name="totals.phtml" hash="87db23cb809f5164cd898c1ffa5d36b4"/></dir><file name="redirect.phtml" hash="28e2ab33b1394bc721208a06deccb785"/></dir></dir></dir><dir name="layout"><file name="dibspw.xml" hash="53204bb9885269745c0fe234a629d429"/></dir></dir></dir></dir></target></contents>
97
  <compatible/>
98
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
99
  </package>
skin/frontend/base/default/images/Dibspw/Dibspw/aktia.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/amex.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/bax.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/dibs.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/din.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/dk.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/dnb.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/edk.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/elec.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/elv.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/ew.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/ffk.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/fsb.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/git.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/ing.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/jcb.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/jcbsecure.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/loading.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/mc.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/mcsecure.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/moca.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/mtro.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/oko.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/pbb.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/pbbtest.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/pci.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/seb.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/shb.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/solo.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/val.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/visa.gif DELETED
Binary file
skin/frontend/base/default/images/Dibspw/Dibspw/visasecure.gif DELETED
Binary file