mPAY24 - Version 1.4.3

Version Notes

Bug fixing and upgardes:

1. Orders which have status 'REDIRECTED' can be canceled/voided.

2. An eps problem was solved

3. There are specified IPs which are allowed for the confirmation requests. In case the request is coming not from one of these IPs a TRANSACTIONSTATUS request is executed.

Download this release

Release Info

Developer Magento Core Team
Extension mPAY24
Version 1.4.3
Comparing to
See all releases


Code changes from version 1.4.2 to 1.4.3

Files changed (28) hide show
  1. app/code/community/Mpay24/Mpay24/Block/Adminhtml/System/Config/Fieldset/Fieldset.php +22 -8
  2. app/code/community/Mpay24/Mpay24/Model/Api/MDXI.xsd +1 -0
  3. app/code/community/Mpay24/Mpay24/Model/Api/MPay24Api.php +7 -7
  4. app/code/community/Mpay24/Mpay24/Model/Api/MPay24MagentoShop.php +624 -439
  5. app/code/community/Mpay24/Mpay24/Model/Selectpayment.php +19 -13
  6. app/code/community/Mpay24/Mpay24/Model/Source/AllowedIPs.php +29 -0
  7. app/code/community/Mpay24/Mpay24/controllers/IndexController.php +3 -3
  8. app/code/community/Mpay24/Mpay24/controllers/PaymentController.php +445 -432
  9. app/code/community/Mpay24/Mpay24/etc/config.xml +2 -1
  10. app/code/community/Mpay24/Mpay24/etc/system.xml +745 -670
  11. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-install-1.4.2.php → mysql4-install-1.4.3.php} +0 -0
  12. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-0.6.2-1.4.2.php → mysql4-upgrade-0.6.2-1.4.3.php} +0 -0
  13. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.0.0-1.4.2.php → mysql4-upgrade-1.0.0-1.4.3.php} +0 -0
  14. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.0.4-1.4.2.php → mysql4-upgrade-1.0.4-1.4.3.php} +0 -0
  15. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.0.6-1.4.2.php → mysql4-upgrade-1.0.6-1.4.3.php} +0 -0
  16. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.0.7-1.4.2.php → mysql4-upgrade-1.0.7-1.4.3.php} +0 -0
  17. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.1.1-1.4.2.php → mysql4-upgrade-1.1.1-1.4.3.php} +0 -0
  18. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.1.7-1.4.2.php → mysql4-upgrade-1.1.7-1.4.3.php} +0 -0
  19. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.1.8-1.4.2.php → mysql4-upgrade-1.1.8-1.4.3.php} +0 -0
  20. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.1.9-1.4.2.php → mysql4-upgrade-1.1.9-1.4.3.php} +0 -0
  21. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.2.0-1.4.2.php → mysql4-upgrade-1.2.0-1.4.3.php} +0 -0
  22. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.2.1-1.4.2.php → mysql4-upgrade-1.2.1-1.4.3.php} +0 -0
  23. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.2.2-1.4.2.php → mysql4-upgrade-1.2.2-1.4.3.php} +0 -0
  24. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.3.0-1.4.2.php → mysql4-upgrade-1.3.0-1.4.3.php} +0 -0
  25. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.4.0-1.4.2.php → mysql4-upgrade-1.4.0-1.4.3.php} +0 -0
  26. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.4.1-1.4.2.php → mysql4-upgrade-1.4.1-1.4.3.php} +0 -0
  27. app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-upgrade-1.4.2-1.4.3.php +38 -0
  28. package.xml +8 -25
app/code/community/Mpay24/Mpay24/Block/Adminhtml/System/Config/Fieldset/Fieldset.php CHANGED
@@ -72,38 +72,52 @@ document.getElementById('mpay24_mpay24as_title').setAttribute('class', document.
72
  var mpay24ProxyHost = document.getElementById('mpay24_mpay24as_proxy_host');
73
 
74
  merchantID.onchange = function() {
 
75
  document.getElementById('mpay24_mpay24').style.display = 'none';
76
  merchantID.parentElement.childNodes[2].innerHTML = merchantID.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
 
77
  }
78
 
79
  mpay24Active.onchange = function() {
 
80
  document.getElementById('mpay24_mpay24').style.display = 'none';
81
- mpay24Active.parentElement.childNodes[2].innerHTML = merchantID.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
 
82
  }
83
 
84
  mpay24System.onchange = function() {
 
85
  document.getElementById('mpay24_mpay24').style.display = 'none';
86
- mpay24System.parentElement.childNodes[2].innerHTML = merchantID.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
 
87
  }
88
 
89
  mpay24SOAPPass.onchange = function() {
 
90
  document.getElementById('mpay24_mpay24').style.display = 'none';
91
- mpay24SOAPPass.parentElement.childNodes[2].innerHTML = merchantID.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
 
92
  }
93
 
94
  mpay24UseProxy.onchange = function() {
 
95
  document.getElementById('mpay24_mpay24').style.display = 'none';
96
- mpay24UseProxy.parentElement.childNodes[2].innerHTML = merchantID.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
 
97
  }
98
 
99
  mpay24ProxyPort.onchange = function() {
 
100
  document.getElementById('mpay24_mpay24').style.display = 'none';
101
- mpay24ProxyPort.parentElement.childNodes[2].innerHTML = merchantID.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
 
102
  }
103
 
104
  mpay24ProxyHost.onchange = function() {
 
105
  document.getElementById('mpay24_mpay24').style.display = 'none';
106
- mpay24ProxyHost.parentElement.childNodes[2].innerHTML = merchantID.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
 
107
  }
108
  }
109
  </script>
@@ -149,8 +163,8 @@ document.getElementById('mpay24_mpay24as_title').setAttribute('class', document.
149
  * @return string
150
  */
151
  protected function _getFieldsetCss() {
152
- $configCss = (string)$this->getGroup()->fieldset_css;
153
- return 'config collapseable'.($configCss ? ' ' . $configCss : '');
154
  }
155
 
156
  /**
72
  var mpay24ProxyHost = document.getElementById('mpay24_mpay24as_proxy_host');
73
 
74
  merchantID.onchange = function() {
75
+ if(merchantID.parentElement.childNodes[2].innerHTML.indexOf('$comment') == -1) {
76
  document.getElementById('mpay24_mpay24').style.display = 'none';
77
  merchantID.parentElement.childNodes[2].innerHTML = merchantID.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
78
+ }
79
  }
80
 
81
  mpay24Active.onchange = function() {
82
+ if(mpay24Active.parentElement.childNodes[2].innerHTML.indexOf('$comment') == -1) {
83
  document.getElementById('mpay24_mpay24').style.display = 'none';
84
+ mpay24Active.parentElement.childNodes[2].innerHTML = mpay24Active.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
85
+ }
86
  }
87
 
88
  mpay24System.onchange = function() {
89
+ if(mpay24System.parentElement.childNodes[2].innerHTML.indexOf('$comment') == -1) {
90
  document.getElementById('mpay24_mpay24').style.display = 'none';
91
+ mpay24System.parentElement.childNodes[2].innerHTML = mpay24System.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
92
+ }
93
  }
94
 
95
  mpay24SOAPPass.onchange = function() {
96
+ if(mpay24SOAPPass.parentElement.childNodes[2].innerHTML.indexOf('$comment') == -1) {
97
  document.getElementById('mpay24_mpay24').style.display = 'none';
98
+ mpay24SOAPPass.parentElement.childNodes[2].innerHTML = mpay24SOAPPass.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
99
+ }
100
  }
101
 
102
  mpay24UseProxy.onchange = function() {
103
+ if(mpay24UseProxy.parentElement.childNodes[2].innerHTML.indexOf('$comment') == -1) {
104
  document.getElementById('mpay24_mpay24').style.display = 'none';
105
+ mpay24UseProxy.parentElement.childNodes[2].innerHTML = mpay24UseProxy.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
106
+ }
107
  }
108
 
109
  mpay24ProxyPort.onchange = function() {
110
+ if(mpay24ProxyPort.parentElement.childNodes[2].innerHTML.indexOf('$comment') == -1) {
111
  document.getElementById('mpay24_mpay24').style.display = 'none';
112
+ mpay24ProxyPort.parentElement.childNodes[2].innerHTML = mpay24ProxyPort.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
113
+ }
114
  }
115
 
116
  mpay24ProxyHost.onchange = function() {
117
+ if(mpay24ProxyHost.parentElement.childNodes[2].innerHTML.indexOf('$comment') == -1) {
118
  document.getElementById('mpay24_mpay24').style.display = 'none';
119
+ mpay24ProxyHost.parentElement.childNodes[2].innerHTML = mpay24ProxyHost.parentElement.childNodes[2].innerHTML + '<br/><span style=\'color: red;\'>$comment</span>';
120
+ }
121
  }
122
  }
123
  </script>
163
  * @return string
164
  */
165
  protected function _getFieldsetCss() {
166
+ // $configCss = (string)$this->getGroup()->fieldset_css;
167
+ // return 'config collapseable'.($configCss ? ' ' . $configCss : '');
168
  }
169
 
170
  /**
app/code/community/Mpay24/Mpay24/Model/Api/MDXI.xsd CHANGED
@@ -144,6 +144,7 @@
144
  <xs:enumeration value="MPASS"/>
145
  <xs:enumeration value="INVOICE"/>
146
  <xs:enumeration value="HP"/>
 
147
  </xs:restriction>
148
  </xs:simpleType>
149
  </xs:attribute>
144
  <xs:enumeration value="MPASS"/>
145
  <xs:enumeration value="INVOICE"/>
146
  <xs:enumeration value="HP"/>
147
+ <xs:enumeration value="SAFETYPAY"/>
148
  </xs:restriction>
149
  </xs:simpleType>
150
  </xs:attribute>
app/code/community/Mpay24/Mpay24/Model/Api/MPay24Api.php CHANGED
@@ -134,17 +134,17 @@
134
  }
135
 
136
  public function dieWithMsg($msg) {
137
- if($this->test)
138
  die($msg);
139
- else
140
- die(LIVE_ERROR_MSG);
141
  }
142
 
143
  public function printMsg($msg) {
144
- if($this->test)
145
  print($msg);
146
- else
147
- print(LIVE_ERROR_MSG);
148
  }
149
 
150
  public function permissionError() {
@@ -951,4 +951,4 @@
951
  return $this->generalResponse;
952
  }
953
  }
954
- ?>
134
  }
135
 
136
  public function dieWithMsg($msg) {
137
+ // if($this->test)
138
  die($msg);
139
+ // else
140
+ // die(LIVE_ERROR_MSG);
141
  }
142
 
143
  public function printMsg($msg) {
144
+ //if($this->test)
145
  print($msg);
146
+ //else
147
+ // print(LIVE_ERROR_MSG);
148
  }
149
 
150
  public function permissionError() {
951
  return $this->generalResponse;
952
  }
953
  }
954
+ ?>
app/code/community/Mpay24/Mpay24/Model/Api/MPay24MagentoShop.php CHANGED
@@ -8,531 +8,716 @@
8
 
9
  include_once("MPay24Shop.php");
10
 
11
- class MPay24MagentoShop extends MPay24Shop {
12
 
13
- const PAYMENT_TYPE_AUTH = 'authorize';
14
- const PAYMENT_TYPE_SALE = 'authorize_capture';
15
 
16
- const SUCCESS_URL = 'mpay24/payment/success';
17
- const GUEST_SUCCESS_URL = 'mpay24/payment/guestsuccess';
18
- const ERROR_URL = 'mpay24/payment/error';
19
- const CONFIRMATION_URL = 'mpay24/payment/confirmation';
20
 
21
- const CANCEL_URL = 'mpay24/payment/cancel';
22
 
23
- const MAGENTO_VERSION = "Magento 1.4.2 ";
24
 
25
- var $tid;
26
- var $price;
27
- var $order;
28
- var $ps;
29
- var $type;
30
- var $brand;
31
 
32
- public static function getAllowedAuth() {
33
- return array("CC", "CB", "MAESTRO", "PAYPAL", "ELV", "PB", "MPASS", "INVOICE", "HP", "SAFETYPAY");
34
- }
35
 
36
- function updateTransaction($tid, $args, $shippingConfirmed) {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
- function getTransaction($tid) {
39
- $transaction = new Transaction($tid);
40
- $order = Mage::getSingleton('sales/order');
41
- $order->loadByIncrementId($tid);
42
- $transaction->PRICE = number_format(floatval($order->getPayment()->getAmountAuthorized()), 2, '.', '');
43
- $transaction->CURRENCY = $order->getBaseCurrencyCode();
44
- $transaction->MPAYTID = $order->getPayment()->getAdditionalInformation('mpay_tid');
45
- return $transaction;
46
- }
47
 
48
- function createProfileOrder($tid) {}
49
- function createExpressCheckoutOrder($tid) {}
50
- function createFinishExpressCheckoutOrder($tid, $s, $a, $c) {}
51
 
52
- function write_log($operation, $info_to_log) {
53
- $fh = fopen("app/code/community/Mpay24/Mpay24/Model/Api/logs/mPAY24log.log", 'a+') or die("can't open file");
54
- $MessageDate = date("Y-m-d H:i:s");
55
- $Message= $MessageDate." ".$_SERVER['SERVER_NAME']." mPAY24 : ";
56
- $result = $Message."$operation : $info_to_log\n";
57
- fwrite($fh, $result);
58
- fclose($fh);
59
- }
60
 
61
- function createSecret($tid, $amount, $currency, $timeStamp) {}
62
- function getSecret($tid) {}
63
 
64
- function createTransaction() {
65
- $transaction = new Transaction($this->tid);
66
- $transaction->PRICE = $this->price;
67
- return $transaction;
68
- }
69
 
70
- function createMDXI($transaction) {
71
- $mdxi = new ORDER();
72
 
73
- $mdxi->Order->setStyle(Mage::getStoreConfig('mpay24/mpay24sporder/style'));
74
- $mdxi->Order->setLogoStyle(Mage::getStoreConfig('mpay24/mpay24sporder/logostyle'));
75
- $mdxi->Order->setPageHeaderStyle(Mage::getStoreConfig('mpay24/mpay24sporder/pageheaderstyle'));
76
- $mdxi->Order->setPageCaptionStyle(Mage::getStoreConfig('mpay24/mpay24sporder/pagecaptionstyle'));
77
- $mdxi->Order->setPageStyle(Mage::getStoreConfig('mpay24/mpay24sporder/pagestyle'));
78
- $mdxi->Order->setInputFieldsStyle(Mage::getStoreConfig('mpay24/mpay24sporder/inputfieldsstyle'));
79
- $mdxi->Order->setDropDownListsStyle(Mage::getStoreConfig('mpay24/mpay24sporder/dropdownlistsstyle'));
80
- $mdxi->Order->setButtonsStyle(Mage::getStoreConfig('mpay24/mpay24sporder/buttonsstyle'));
81
- $mdxi->Order->setErrorsStyle(Mage::getStoreConfig('mpay24/mpay24sporder/errorsstyle'));
82
- $mdxi->Order->setSuccessTitleStyle(Mage::getStoreConfig('mpay24/mpay24sporder/successtitlestyle'));
83
- $mdxi->Order->setErrorTitleStyle(Mage::getStoreConfig('mpay24/mpay24sporder/errortitlestyle'));
84
- $mdxi->Order->setFooterStyle(Mage::getStoreConfig('mpay24/mpay24sporder/footerstyle'));
85
 
86
- $this->order->getPayment()->setAdditionalInformation('user_field', MPay24MagentoShop::MAGENTO_VERSION.$transaction->TID.'_'.date('Y-m-d'))->save();
87
- $mdxi->Order->UserField = MPay24MagentoShop::MAGENTO_VERSION.$transaction->TID.'_'.date('Y-m-d');
88
- $mdxi->Order->Tid = $transaction->TID;
89
 
90
- $lang = explode('_', Mage::getStoreConfig('general/locale/code'));
91
- $mdxi->Order->TemplateSet->setLanguage(strtoupper($lang[0]));
92
 
93
- if($this->ps) {
94
- $mdxi->Order->PaymentTypes->setEnable('true');
95
- $mdxi->Order->PaymentTypes->Payment(1)->setType($this->type);
96
- if($this->type != $this->brand)
97
- $mdxi->Order->PaymentTypes->Payment(1)->setBrand($this->brand);
98
- } else {
99
- $brandsAndTypes = explode(", ", Mage::getStoreConfig('mpay24/mpay24/active_payment_types'));
100
- $brands = array();
101
- foreach($brandsAndTypes as $brandAndType)
102
- $brands[substr($brandAndType, 0, strpos($brandAndType, "=>"))] = substr($brandAndType, strpos($brandAndType, "=>")+2);
 
 
 
103
 
104
- $firstPS = Mage::getStoreConfig('mpay24/mpay24/ps_1');
105
- $allPS = true;
106
 
107
- for($i=2; $i<=Mage::getStoreConfig('mpay24/mpay24/payments_count'); $i++) {
108
- if($firstPS != Mage::getStoreConfig('mpay24/mpay24/ps_'.$i)) {
109
- $allPS = false;
110
- break;
111
- }
112
- }
113
 
114
- if(!$allPS && Mage::getStoreConfig('mpay24/mpay24/payments_active') != 'false') {
115
- $mdxi->Order->PaymentTypes->setEnable('true');
116
 
117
- $brands = $this->getActiveMethods();
118
- $c = 1;
119
- foreach($brands as $brand => $type) {
120
- $mdxi->Order->PaymentTypes->Payment($c)->setType($type);
121
- if($type != $brand)
122
- $mdxi->Order->PaymentTypes->Payment($c)->setBrand($brand);
123
- $c++;
124
- }
125
- }
126
- // else {
127
- // if(Mage::getStoreConfig('mpay24/mpay24/payments_active') == 'false') {
128
- // if($firstPS == 1) {
129
- // $mdxi->Order->PaymentTypes->setEnable('true');
130
- // }
131
- // } else {
132
- // if($firstPS == 0) {
133
- // $mdxi->Order->PaymentTypes->setEnable('true');
134
- // }
135
- // }
136
- // }
137
- }
138
 
139
- $conf = explode(',',Mage::getStoreConfig('mpay24/mpay24spsc/sc_row'));
140
 
141
- $mdxi->Order->ShoppingCart->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_style'));
142
- $mdxi->Order->ShoppingCart->setHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_header'));
143
- $mdxi->Order->ShoppingCart->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_headerstyle'));
144
- $mdxi->Order->ShoppingCart->setCaptionStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_captionstyle'));
145
 
146
- if(in_array('Number',$conf)){
147
- $mdxi->Order->ShoppingCart->setNumberHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberheader'));
148
- $mdxi->Order->ShoppingCart->setNumberStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberstyle'));
149
- }
150
- if(in_array('ProductNr',$conf)){
151
- $mdxi->Order->ShoppingCart->setProductNrHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrheader'));
152
- $mdxi->Order->ShoppingCart->setProductNrStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrstyle'));
153
- }
154
- if(in_array('Description',$conf)){
155
- $mdxi->Order->ShoppingCart->setDescriptionHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionheader'));
156
- $mdxi->Order->ShoppingCart->setDescriptionStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionstyle'));
157
- }
158
- if(in_array('Package',$conf)){
159
- $mdxi->Order->ShoppingCart->setPackageHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_packageheader'));
160
- $mdxi->Order->ShoppingCart->setPackageStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_packagestyle'));
161
- }
162
- if(in_array('Quantity',$conf)){
163
- $mdxi->Order->ShoppingCart->setQuantityHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantityheader'));
164
- $mdxi->Order->ShoppingCart->setQuantityStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantitystyle'));
165
- }
166
- if(in_array('ItemPrice',$conf)){
167
- $mdxi->Order->ShoppingCart->setItemPriceHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempriceheader'));
168
- $mdxi->Order->ShoppingCart->setItemPriceStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempricestyle'));
169
- }
170
- if(in_array('Price',$conf)){
171
- $mdxi->Order->ShoppingCart->setPriceHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_priceheader'));
172
- $mdxi->Order->ShoppingCart->setPriceStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_pricestyle'));
173
- }
174
 
175
- $mdxi->Order->ShoppingCart->Description(Mage::getStoreConfig('mpay24/mpay24spsc/description'));
176
 
177
- $style1 = Mage::getStoreConfig('mpay24/mpay24spsc/item_style1');
178
- $style2 = Mage::getStoreConfig('mpay24/mpay24spsc/item_style2');
179
- $ret = "";
180
- $linecount = 0;
181
 
182
- foreach($this->order->getAllItems() as $_item){
183
- if(Mage::getStoreConfig('mpay24/mpay24/show_free_products') == 1 ||
184
- (Mage::getStoreConfig('mpay24/mpay24/show_free_products') == 0 && number_format(($_item->getData('price')*1),2,'.','') != '0.00')) {
185
- $linecount++;
186
- $style = ($linecount % 2== 1) ? $style1 : $style2;
 
187
 
188
- if(in_array('Number',$conf)) {
189
- $mdxi->Order->ShoppingCart->Item($linecount)->Number = $linecount;
190
- $mdxi->Order->ShoppingCart->Item($linecount)->Number->setStyle($style);
191
- }
192
- if(in_array('ProductNr',$conf)) {
193
- $mdxi->Order->ShoppingCart->Item($linecount)->ProductNr = $this->xmlentities($_item->getData('sku'));
194
- $mdxi->Order->ShoppingCart->Item($linecount)->ProductNr->setStyle($style);
195
- }
196
- if(in_array('Description',$conf)) {
197
- $mdxi->Order->ShoppingCart->Item($linecount)->Description = $this->xmlentities($_item->getData('name'));
198
- $mdxi->Order->ShoppingCart->Item($linecount)->Description->setStyle($style);
199
- }
200
- if(in_array('Package',$conf)) {
201
- $mdxi->Order->ShoppingCart->Item($linecount)->Package = "";
202
- $mdxi->Order->ShoppingCart->Item($linecount)->Package->setStyle($style);
203
- }
204
- if(in_array('Quantity',$conf)) {
205
- $mdxi->Order->ShoppingCart->Item($linecount)->Quantity = (int)$_item->getQtyOrdered();
206
- $mdxi->Order->ShoppingCart->Item($linecount)->Quantity->setStyle($style);
207
- }
208
 
209
- if(Mage::getStoreConfig('tax/cart_display/price') == 2 || Mage::getStoreConfig('tax/cart_display/price') == 3) {
210
- if(in_array('ItemPrice',$conf)) {
211
- $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice = number_format($_item->getPriceInclTax()*1,2,'.','');
212
- $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice->setStyle($style);
213
- $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice->setTax(number_format($_item->getTaxAmount(),2,'.',''));
214
- }
215
- } else {
216
- if(in_array('ItemPrice',$conf)) {
217
- $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice = number_format(($_item->getData('price')*1),2,'.','');
218
- $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice->setStyle($style);
219
- }
220
- }
221
- }
222
- }
223
 
224
- $mdxi->Order->ShoppingCart->SubTotal->setHeader(Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_header'));
225
- $mdxi->Order->ShoppingCart->SubTotal->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_headerstyle'));
226
- $mdxi->Order->ShoppingCart->SubTotal->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_style'));
227
 
228
- if(Mage::getStoreConfig('tax/cart_display/subtotal') == 2 || Mage::getStoreConfig('tax/cart_display/subtotal') == 3)
229
- $mdxi->Order->ShoppingCart->SubTotal = number_format($this->order->getSubtotalInclTax(),2,'.','');
230
- else
231
- $mdxi->Order->ShoppingCart->SubTotal = number_format($this->order->getData('subtotal'),2,'.','');
232
 
233
- if(number_format($this->order->getData('discount_amount'),2,'.','') !== '0.00'){
234
- $mdxi->Order->ShoppingCart->Discount->setHeader($this->order->getData('discount_description'));
235
- $mdxi->Order->ShoppingCart->Discount->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/discount_headerstyle'));
236
- $mdxi->Order->ShoppingCart->Discount->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/discount_style'));
237
- $mdxi->Order->ShoppingCart->Discount = number_format($this->order->getData('discount_amount'), 2, '.', '');
238
- }
239
 
240
- if(number_format($this->order->getData('shipping_amount'),2,'.','') !== '0.00'){
241
- $mdxi->Order->ShoppingCart->ShippingCosts->setHeader($this->order->getData('shipping_description'));
242
- $mdxi->Order->ShoppingCart->ShippingCosts->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_headerstyle'));
243
- $mdxi->Order->ShoppingCart->ShippingCosts->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_style'));
244
 
245
- if(Mage::getStoreConfig('tax/cart_display/shipping') == 2 || Mage::getStoreConfig('tax/cart_display/shipping') == 3)
246
- $mdxi->Order->ShoppingCart->ShippingCosts = number_format($this->order->getShippingInclTax(), 2, '.', '');
247
- else
248
- $mdxi->Order->ShoppingCart->ShippingCosts = number_format($this->order->getData('shipping_amount'), 2, '.', '');
249
- }
250
 
251
- if(number_format($this->order->getData('tax_amount'),2,'.','') !== '0.00'){
252
- $array = $this->order->getFullTaxInfo();
253
- $taxInfo = array();
254
- foreach($array as $a){
255
- $taxArray = $a;
256
-
257
- foreach(array_keys($taxArray) as $taxKey){
258
- $taxInfo[$taxKey] = $taxArray[$taxKey];
259
- }
260
 
261
- if(Mage::getStoreConfig('tax/cart_display/shipping') == 2 || Mage::getStoreConfig('tax/cart_display/shipping') == 3) {
262
- if(substr(Mage::getStoreConfig('general/locale/code'), 0, 2) == 'de')
263
- $inklText = "inkl. ";
264
- else
265
- $inklText = "incl. ";
266
- } else {
267
- $inklText = "";
268
- }
269
 
270
- $mdxi->Order->ShoppingCart->Tax->setHeader($inklText . $taxArray['id']);
271
- $mdxi->Order->ShoppingCart->Tax->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/tax_headerstyle'));
272
- $mdxi->Order->ShoppingCart->Tax->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/tax_style'));
273
- $mdxi->Order->ShoppingCart->Tax->setPercent(number_format($taxArray['rates'][0]['percent'],0,'.',''));
 
 
 
 
 
 
 
 
274
 
275
- $mdxi->Order->ShoppingCart->Tax = number_format($taxArray['amount'],2,'.','');
276
- }
277
- }
278
 
279
- $billingCountry = "";
280
- $billingCountryCode = "";
281
- $shippingCountry = "";
282
- $shippingCountryCode = "";
283
 
284
- foreach(Mage::app()->getLocale()->getOptionCountries() as $c)
285
- if ($c['value'] == $this->order->getBillingAddress()->getCountry()) {
286
  $billingCountry = $c['label'];
287
  $billingCountryCode = $c['value'];
288
  break;
289
  }
290
 
291
- if($this->order->getShippingAddress())
292
- foreach(Mage::app()->getLocale()->getOptionCountries() as $c){
293
- if ($c['value'] == $this->order->getShippingAddress()->getCountry()) {
294
- $shippingCountry = $c['label'];
295
- $shippingCountryCode = $c['value'];
296
- break;
297
- }
298
- }
299
 
300
- $mdxi->Order->Price = $transaction->PRICE;
301
- $mdxi->Order->Price->setHeader(Mage::getStoreConfig('mpay24/mpay24spsc/price_header'));
302
- $mdxi->Order->Price->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/price_headerstyle'));
303
- $mdxi->Order->Price->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/price_style'));
304
 
305
- $mdxi->Order->Currency = $this->xmlentities($this->order->getBaseCurrencyCode());
306
 
307
- $mdxi->Order->BillingAddr->setMode(Mage::getStoreConfig('mpay24/mpay24/billingAddressMode'));
308
 
309
- if($this->order->getShippingAddress() && $this->xmlentities($this->order->getShippingAddress()->getFirstname()) === '')
310
- $billingName = $this->xmlentities($this->order->getBillingAddress()->getLastname());
311
- elseif($this->xmlentities($this->order->getBillingAddress()->getLastname()) === '')
312
- $billingName = $this->xmlentities($this->order->getBillingAddress()->getFirstname());
313
- else
314
- $billingName = $this->xmlentities($this->order->getBillingAddress()->getFirstname()).' '.$this->xmlentities($this->order->getBillingAddress()->getLastname());
315
 
316
- $mdxi->Order->BillingAddr->Name = substr($billingName,0,50);
317
 
318
- $billingAdress = $this->xmlentities($this->order->getBillingAddress()->getStreetFull());
319
 
320
- $billingStreet = $this->splitAdress($billingAdress);
321
 
322
- if(isset($billingStreet[0]) && is_array($billingStreet[0])) {
323
- $mdxi->Order->BillingAddr->Street = $billingStreet[0]['Street'];
324
- $mdxi->Order->BillingAddr->Street2 = $billingStreet[1]['Street2'];
325
- } else {
326
- $mdxi->Order->BillingAddr->Street = $billingStreet['Street'];
327
- if(isset($billingStreet['Street2']))
328
- $mdxi->Order->BillingAddr->Street2 = $billingStreet['Street2'];
329
- }
330
- $mdxi->Order->BillingAddr->Zip = substr($this->xmlentities($this->order->getBillingAddress()->getPostcode()),0,50);
331
- $mdxi->Order->BillingAddr->City = substr($this->xmlentities($this->order->getBillingAddress()->getCity()),0,50);
332
- $mdxi->Order->BillingAddr->Country->setCode($this->xmlentities($billingCountryCode));
333
- $mdxi->Order->BillingAddr->Email = substr($this->xmlentities($this->order->getBillingAddress()->getEmail()),0,50);
 
 
334
 
335
- if($this->order->getShippingAddress()){
336
- $mdxi->Order->ShippingAddr->setMode("ReadOnly");
337
 
338
- if($this->xmlentities($this->order->getShippingAddress()->getFirstname()) === '')
339
- $shippingName = $this->xmlentities($this->order->getShippingAddress()->getLastname());
340
- elseif($this->xmlentities($this->order->getShippingAddress()->getLastname()) === '')
341
- $shippingName = $this->xmlentities($this->order->getShippingAddress()->getFirstname());
342
- else
343
- $shippingName = $this->xmlentities($this->order->getShippingAddress()->getFirstname()).' '.$this->xmlentities($this->order->getShippingAddress()->getLastname());
344
 
345
- $mdxi->Order->ShippingAddr->Name = substr($shippingName,0,50);
346
 
347
- $shippingAdress = $this->xmlentities($this->order->getShippingAddress()->getStreetFull());
348
 
349
- $shippingStreet = $this->splitAdress($shippingAdress);
350
 
351
- if(isset($shippingStreet[0]) && is_array($shippingStreet[0])) {
352
- $mdxi->Order->ShippingAddr->Street = $shippingStreet[0]['Street'];
353
- $mdxi->Order->ShippingAddr->Street2 = $shippingStreet[1]['Street2'];
354
- } else {
355
- $mdxi->Order->ShippingAddr->Street = $shippingStreet['Street'];
356
- if(isset($shippingStreet['Street2']))
357
- $mdxi->Order->ShippingAddr->Street2 = $shippingStreet['Street2'];
358
- }
359
- $mdxi->Order->ShippingAddr->Zip = substr($this->xmlentities($this->order->getShippingAddress()->getPostcode()),0,50);
360
- $mdxi->Order->ShippingAddr->City = substr($this->xmlentities($this->order->getShippingAddress()->getCity()),0,50);
361
- $mdxi->Order->ShippingAddr->Country->setCode($this->xmlentities($shippingCountryCode));
362
- $mdxi->Order->ShippingAddr->Email = substr($this->xmlentities($this->order->getShippingAddress()->getEmail()),0,50);
363
- }
 
 
364
 
365
- if(Mage::helper('customer')->isLoggedIn())
366
- $mdxi->Order->URL->Success = Mage::getUrl(MPay24MagentoShop::SUCCESS_URL,array('_secure' => true, '_query' => "TID=" . substr($this->order->getIncrementId(),0,32) ));
367
- else
368
- $mdxi->Order->URL->Success = Mage::getUrl(MPay24MagentoShop::GUEST_SUCCESS_URL,array('_secure' => true, '_query' => "tid=" . substr($this->order->getIncrementId(),0,32) ));
369
 
370
- $mdxi->Order->URL->Error = Mage::getUrl(MPay24MagentoShop::ERROR_URL,array('_secure' => true, '_query' => "TID=" . substr($this->order->getIncrementId(),0,32) ));
371
- $mdxi->Order->URL->Confirmation = Mage::getUrl(MPay24MagentoShop::CONFIRMATION_URL,array('_secure' => true));
372
- $mdxi->Order->URL->Cancel = Mage::getUrl(MPay24MagentoShop::CANCEL_URL,array('_secure' => true, '_query' => "TID=" . substr($this->order->getIncrementId(),0,32) ));
373
 
374
- if(Mage::getStoreConfig('mpay24/mpay24as/debug') == 1) {
375
- $myFile = "app/code/community/Mpay24/Mpay24/Model/Api/xmls/".$transaction->TID.".xml";
376
- $fh = fopen($myFile, 'w') or die("can't open file");
377
- fwrite($fh, $mdxi->toXML());
378
- fclose($fh);
379
- }
380
 
381
- return $mdxi;
382
- }
383
 
384
- function setVariables($order, $ps, $type, $brand) {
385
- $this->tid = $order->getIncrementId();
386
- $this->order = $order;
387
- $this->price = number_format($order->getData('grand_total'),2,'.','');
388
- $this->ps = $ps;
389
- $this->type = $type;
390
- $this->brand = $brand;
391
- }
 
 
 
392
 
393
- private function xmlentities($string){
394
- static $trans;
395
- if (!isset($trans)) {
396
- $trans = get_html_translation_table(HTML_SPECIALCHARS);
397
- foreach ($trans as $key => $value)
398
- $trans[$key] = '&#'.ord($key).';';
399
 
400
- // dont translate the '&' in case it is part of &xxx;
401
- $trans[chr(38)] = '&';
402
- }
403
 
404
- //after the initial translation, _do_ map standalone '&' into '&#38;'
405
- return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&#38;" , strtr($string, $trans));
406
- }
407
 
408
- private function splitAdress($adress, $str2=null){
409
- $posNewLine = strpos($adress, "\n");
410
- $strArray = array();
411
- if($posNewLine === false) {
412
- if(strlen($adress) <= 50){
413
- if($str2 !== true) {
414
- $strArray['Street'] = $adress;
415
- } else {
416
- $strArray['Street2'] = $adress;
417
- }
418
- } else {
419
- $street1before = substr($adress, 0, 50);
420
- $posLastInterval1 = strrpos($street1before, " ");
421
 
422
- $street1 = substr($street1before, 0, $posLastInterval1);
423
 
424
- $street2before = substr(substr($street1before, $posLastInterval1).substr($adress, 50), 1, 50);
425
- $posLastInterval2 = strrpos($street2before, " ");
426
- $street2 = substr($street2before, 0, $posLastInterval2);
427
 
428
- if($str2 === null){
429
- $strArray['Street'] = $street1;
430
- $strArray['Street2'] = $street2;
431
- } elseif($str2 === false) {
432
- if($posLastInterval1){
433
  $strArray['Street'] = $street1;
434
- } else {
435
  $strArray['Street'] = $street1before;
436
- }
437
- } else {
438
- if($posLastInterval1) {
439
- $strArray['Street2'] = $street1;
440
- } else {
441
- $strArray['Street2'] = $street1before;
442
- }
443
- }
444
  }
445
- } else {
446
- $array = explode("\n", $adress);
447
- $adress1 = $array[0];
448
- array_push($strArray, $this->splitAdress($adress1, false));
449
 
450
- $adress2 = $array[1];
451
- array_push($strArray, $this->splitAdress($adress2, true));
452
- }
453
- return $strArray;
454
- }
455
 
456
- public static function getMPay24Api() {
457
- if(Mage::getStoreConfig('mpay24/mpay24as/system') == 1)
458
- $test = TRUE;
459
- else
460
- $test = FALSE;
461
 
462
- if(Mage::getStoreConfig('mpay24/mpay24as/debug') == 1)
463
- $debug = TRUE;
464
- else
465
- $debug = FALSE;
466
 
467
- if(Mage::getStoreConfig('mpay24/mpay24as/use_proxy') == 1) {
468
- $proxy_host = Mage::getStoreConfig('mpay24/mpay24as/proxy_host');
469
- $proxy_port = Mage::getStoreConfig('mpay24/mpay24as/proxy_port');
470
- } else {
471
- $proxy_host = null;
472
- $proxy_port = null;
473
- }
474
 
475
- $mPay24MagentoShop = new MPay24MagentoShop(Mage::getStoreConfig('mpay24/mpay24as/merchantid'), Mage::getStoreConfig('mpay24/mpay24as/soap_pass'), $test, $proxy_host, $proxy_port, $debug);
476
- return $mPay24MagentoShop;
477
- }
478
 
479
- /**
480
- * @abstract Get the payment systems for the merchant from the core_config_data and explode it into an array
481
- * @return Array $method
482
- */
483
- public function getActiveMethods() {
484
- $methods = array();
485
- $brandsAndDescriptions = explode(", ", Mage::getStoreConfig('mpay24/mpay24/active_payment_types'));
486
 
487
- $firstPS = Mage::getStoreConfig('mpay24/mpay24/ps_1');
488
- $allPS = true;
489
 
490
- for($i=2; $i<=Mage::getStoreConfig('mpay24/mpay24/payments_count'); $i++) {
491
- if($firstPS != Mage::getStoreConfig('mpay24/mpay24/ps_'.$i)) {
492
- $allPS = false;
493
- break;
494
- }
495
- }
496
 
497
- if($allPS) {
498
- if(Mage::getStoreConfig('mpay24/mpay24/payments_active') == 'false') {
499
- if($firstPS == 1) {
500
- Mage::getConfig()->saveConfig("payment/mpay24/active", 0);
501
- Mage::getConfig()->reinit();
502
- Mage::app()->reinitStores();
503
- }
504
- } else {
505
- if($firstPS == 0) {
506
- Mage::getConfig()->saveConfig("payment/mpay24/active", 0);
507
- Mage::getConfig()->reinit();
508
- Mage::app()->reinitStores();
509
- }
510
- }
511
 
512
- foreach($brandsAndDescriptions as $brandAndDescr) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
513
  $brand = substr($brandAndDescr, 0, strpos($brandAndDescr, "=>"));
514
  $description = substr($brandAndDescr, strpos($brandAndDescr, "=>")+2);
515
  $methods[$brand] = $description;
516
- }
 
 
 
517
 
518
- } else {
519
- if(Mage::getStoreConfig('mpay24/mpay24/payments_active') == 'false')
520
- $check = 0;
521
- else
522
- $check = 1;
523
-
524
- $i=1;
525
- foreach($brandsAndDescriptions as $brandAndDescr) {
526
- if(Mage::getStoreConfig('mpay24/mpay24/ps_'.$i) == $check) {
527
- $brand = substr($brandAndDescr, 0, strpos($brandAndDescr, "=>"));
528
- $description = substr($brandAndDescr, strpos($brandAndDescr, "=>")+2);
529
- $methods[$brand] = $description;
530
- }
531
- $i++;
532
- }
533
- }
534
-
535
- return $methods;
536
- }
537
- }
538
  ?>
8
 
9
  include_once("MPay24Shop.php");
10
 
11
+ class MPay24MagentoShop extends MPay24Shop {
12
 
13
+ const PAYMENT_TYPE_AUTH = 'authorize';
14
+ const PAYMENT_TYPE_SALE = 'authorize_capture';
15
 
16
+ const SUCCESS_URL = 'mpay24/payment/success';
17
+ const GUEST_SUCCESS_URL = 'mpay24/payment/guestsuccess';
18
+ const ERROR_URL = 'mpay24/payment/error';
19
+ const CONFIRMATION_URL = 'mpay24/payment/confirmation';
20
 
21
+ const CANCEL_URL = 'mpay24/payment/cancel';
22
 
23
+ const MAGENTO_VERSION = "Magento 1.4.3 ";
24
 
25
+ var $tid;
26
+ var $price;
27
+ var $order;
28
+ var $ps;
29
+ var $type;
30
+ var $brand;
31
 
32
+ public static function getAllowedAuth() {
33
+ return array("CB", "MAESTRO", "PAYPAL", "ELV", "PB", "MPASS", "INVOICE", "HP", "SAFETYPAY");
34
+ }
35
 
36
+ private function getOrder($tid=null) {
37
+ $order = Mage::getSingleton('sales/order');
38
+
39
+ if($tid == null)
40
+ return $order->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
41
+ else
42
+ return $order->loadByIncrementId($tid);
43
+ }
44
+
45
+ function updateTransaction($tid, $args, $shippingConfirmed) {}
46
+
47
+ function updateStatusToCancel($tid) {
48
+ $order = $this->getOrder($tid);
49
+ Mage::log('updateStatusToCancel called for order '.$order->getData('increment_id'));
50
+ $confirmationCalled = "Payment ";
51
+
52
+ $status = "";
53
+
54
+ $incrementId = $order->getData('increment_id');
55
+ $tid = $order->getId();
56
+
57
+ if($order->getPayment()) {
58
+ $mPay24MagentoShop = $this->getMPay24Api();
59
+ $mPAY24Result = $mPay24MagentoShop->updateTransactionStatus($incrementId);
60
+
61
+ if($mPAY24Result->getGeneralResponse()->getStatus() != 'OK' || $mPAY24Result->getParam('APPR_CODE') == '')
62
+ $apprCode = 'N/A';
63
+ else
64
+ $apprCode = $mPAY24Result->getParam('APPR_CODE');
65
+
66
+ switch ($mPAY24Result->getGeneralResponse()->getStatus()) {
67
+ case "OK":
68
+ if($order->getPayment()->getAdditionalInformation('user_field') == $mPAY24Result->getParam('USER_FIELD')) {
69
+ $updateResult = "The transaction status was succesfully updated!";
70
+
71
+ $order->getPayment()->setAdditionalData($mPAY24Result->getParam("P_TYPE"))->save();
72
+ $order->getPayment()->setCcType($mPAY24Result->getParam('BRAND'))->save();
73
+ $order->getPayment()->setAdditionalInformation('status', true)->save();
74
+ $updateResult .= "\n\nActual status: " . $mPAY24Result->getParam('STATUS ');
75
+ $updateResult .= "\nAmount: " . number_format($mPAY24Result->getParam('PRICE')/100, 2, '.', '') . " " . $mPAY24Result->getParam('CURRENCY');
76
+ $updateResult .= "\nMPAYTID: " . $mPAY24Result->getParam('MPAYTID');
77
+ $updateResult .= "\nAppr_code: " . $apprCode;
78
+
79
+ $status = $mPAY24Result->getParam('TSTATUS');
80
+
81
+ switch($status) {
82
+ case 'RESERVED':
83
+ if($order->getId()) {
84
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
85
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
86
+ $order->getPayment()->setAmountAuthorized($mPAY24Result->getParam('PRICE')/100)->save();
87
+ $order->getPayment()->setAdditionalInformation('error', false)->save();
88
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("RESERVED") . ' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]');
89
+ $order->sendNewOrderEmail();
90
+
91
+ if($order->getInvoiceCollection()->count() == 0)
92
+ if(Mage::getStoreConfig('payment/mpay24/paid_payment_action') == MPay24MagentoShop::PAYMENT_TYPE_SALE) {
93
+ $order->getPayment()->setAdditionalInformation('mpay24AutoClearing', true)->save();
94
+ $this->_createInvoice($order, true);
95
+ } else
96
+ $this->_createInvoice($order);
97
+ }
98
+
99
+ $order->save();
100
+ break;
101
+ case 'BILLED':
102
+ if($order->getInvoiceCollection()->count() == 0) {
103
+ if(in_array($mPAY24Result->getParam('P_TYPE'), MPay24MagentoShop::getAllowedAuth())) {
104
+ $onlineCapture = false;
105
+ $mif = true;
106
+ } else {
107
+ $onlineCapture = true;
108
+ $mif = false;
109
+ }
110
+
111
+ $order->getPayment()->setAmountCharged($mPAY24Result->getParam('PRICE')/100)->save();
112
+ $order->getPayment()->setAdditionalInformation('error', false)->save();
113
+ $order->sendOrderUpdateEmail();
114
+
115
+ if($confirmation) {
116
+ $order->getPayment()->setAdditionalInformation('mpay24AutoClearing', false)->save();
117
+ $this->_createInvoice($order, true, true, $onlineCapture);
118
+ } else
119
+ $this->_createInvoice($order, true, $mif, $onlineCapture);
120
+
121
+ $order->save();
122
+ }
123
+
124
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
125
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
126
+
127
+ if($order->getIsNotVirtual())
128
+ $s = Mage::getStoreConfig('payment/mpay24/paid_order_status');
129
+ else
130
+ $s = Mage_Sales_Model_Order::STATE_COMPLETE;
131
+
132
+ $order->addStatusToHistory($s, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("BILLED") .' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]', true)->save();
133
+ $order->save();
134
+ break;
135
+ case 'CREDITED':
136
+ if ($order->getTotalOnlineRefunded() == 0.00) {
137
+ $creditmemo = Mage::getModel('sales/service_order', $order)
138
+ ->prepareCreditmemo()
139
+ ->setPaymentRefundDisallowed(true)
140
+ ->setAutomaticallyCreated(true)
141
+ ->register();
142
+
143
+ $creditmemo->addComment(Mage::helper('mpay24')->__("Credit memo has been created automatically through of MI/F crediting!"));
144
+ $creditmemo->save();
145
+
146
+ $order->getPayment()->refund($creditmemo)->save();
147
+
148
+ $order->sendOrderUpdateEmail();
149
+ }
150
+
151
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
152
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
153
+
154
+ $this->_addChildTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND,
155
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
156
+
157
+ $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_COMPLETE, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("CREDITED") . ' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]')->save();
158
+ $order->save();
159
+
160
+ break;
161
+ case 'SUSPENDED':
162
+ if($order->getId()) {
163
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
164
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
165
+ $order->getPayment()->setAdditionalInformation('error', false)->save();
166
+ $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("SUSPENDED") . ' [ '.$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]');
167
+ }
168
+
169
+ $order->save();
170
+ break;
171
+ case 'REVERSED':
172
+ if($order->getState() != Mage_Sales_Model_Order::STATE_CANCELED)
173
+ foreach ($order->getInvoiceCollection() as $orderInvoice) {
174
+ $order->getPayment()->setAdditionalInformation('MIFReverse', true)->save();
175
+ $order->getPayment()->void($orderInvoice)->save();
176
+ }
177
+
178
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
179
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
180
+
181
+ $order->sendOrderUpdateEmail();
182
+ $order->addStatusToHistory($order->getState(), Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("REVERSED") .' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]', true)->save();
183
+ $order->save();
184
+ break;
185
+ case 'ERROR':
186
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
187
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
188
+ $order->getPayment()->setAdditionalInformation('error', true)->save();
189
+
190
+ if($order->canCancel() && $order->getState() != Mage_Sales_Model_Order::STATE_CANCELED &&
191
+ $order->getData('status') != Mage_Sales_Model_Order::STATE_CANCELED)
192
+ $order->cancel($order->getPayment())->save();
193
+
194
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("ERROR") . " " . $order->getPayment()->getAdditionalInformation('error_text'));
195
+ $order->save();
196
+
197
+ break;
198
+ default:
199
+ break;
200
+ }
201
+ }
202
+ else
203
+ $status = "SUSPENDED";
204
+
205
+ break;
206
+ case "ERROR":
207
+ if($mPAY24Result->getReturnCode() == 'NOT_FOUND' && $order->getPayment()->getAdditionalInformation('cancelButton'))
208
+ $updateResult = 'The order was canceled by the customer';
209
+ else
210
+ $updateResult = Mage::helper('mpay24')->__("The transaction was not found!");
211
+
212
+ if($order->canCancel() && $order->getState() != Mage_Sales_Model_Order::STATE_CANCELED &&
213
+ $order->getData('status') != Mage_Sales_Model_Order::STATE_CANCELED)
214
+ $order->cancel($order->getPayment())->save();
215
+
216
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__($updateResult), true)->save();
217
+ $order->getPayment()->setAdditionalInformation('status', true)->save();
218
+ $order->getPayment()->setAdditionalInformation('mpay_tid', 'N/A')->save();
219
+ $order->getPayment()->setAdditionalInformation('appr_code', 'N/A')->save();
220
+
221
+ break;
222
+ default:
223
+ break;
224
+ }
225
+ }
226
+ return $status;
227
+ }
228
 
229
+ function getTransaction($tid) {
230
+ $transaction = new Transaction($tid);
231
+ $order = Mage::getSingleton('sales/order');
232
+ $order->loadByIncrementId($tid);
233
+ $transaction->PRICE = number_format(floatval($order->getPayment()->getAmountAuthorized()), 2, '.', '');
234
+ $transaction->CURRENCY = $order->getBaseCurrencyCode();
235
+ $transaction->MPAYTID = $order->getPayment()->getAdditionalInformation('mpay_tid');
236
+ return $transaction;
237
+ }
238
 
239
+ function createProfileOrder($tid) {}
240
+ function createExpressCheckoutOrder($tid) {}
241
+ function createFinishExpressCheckoutOrder($tid, $s, $a, $c) {}
242
 
243
+ function write_log($operation, $info_to_log) {
244
+ $fh = fopen("app/code/community/Mpay24/Mpay24/Model/Api/logs/mPAY24log.log", 'a+') or die("can't open file");
245
+ $MessageDate = date("Y-m-d H:i:s");
246
+ $Message= $MessageDate." ".$_SERVER['SERVER_NAME']." mPAY24 : ";
247
+ $result = $Message."$operation : $info_to_log\n";
248
+ fwrite($fh, $result);
249
+ fclose($fh);
250
+ }
251
 
252
+ function createSecret($tid, $amount, $currency, $timeStamp) {}
253
+ function getSecret($tid) {}
254
 
255
+ function createTransaction() {
256
+ $transaction = new Transaction($this->tid);
257
+ $transaction->PRICE = $this->price;
258
+ return $transaction;
259
+ }
260
 
261
+ function createMDXI($transaction) {
262
+ $mdxi = new ORDER();
263
 
264
+ $mdxi->Order->setStyle(Mage::getStoreConfig('mpay24/mpay24sporder/style'));
265
+ $mdxi->Order->setLogoStyle(Mage::getStoreConfig('mpay24/mpay24sporder/logostyle'));
266
+ $mdxi->Order->setPageHeaderStyle(Mage::getStoreConfig('mpay24/mpay24sporder/pageheaderstyle'));
267
+ $mdxi->Order->setPageCaptionStyle(Mage::getStoreConfig('mpay24/mpay24sporder/pagecaptionstyle'));
268
+ $mdxi->Order->setPageStyle(Mage::getStoreConfig('mpay24/mpay24sporder/pagestyle'));
269
+ $mdxi->Order->setInputFieldsStyle(Mage::getStoreConfig('mpay24/mpay24sporder/inputfieldsstyle'));
270
+ $mdxi->Order->setDropDownListsStyle(Mage::getStoreConfig('mpay24/mpay24sporder/dropdownlistsstyle'));
271
+ $mdxi->Order->setButtonsStyle(Mage::getStoreConfig('mpay24/mpay24sporder/buttonsstyle'));
272
+ $mdxi->Order->setErrorsStyle(Mage::getStoreConfig('mpay24/mpay24sporder/errorsstyle'));
273
+ $mdxi->Order->setSuccessTitleStyle(Mage::getStoreConfig('mpay24/mpay24sporder/successtitlestyle'));
274
+ $mdxi->Order->setErrorTitleStyle(Mage::getStoreConfig('mpay24/mpay24sporder/errortitlestyle'));
275
+ $mdxi->Order->setFooterStyle(Mage::getStoreConfig('mpay24/mpay24sporder/footerstyle'));
276
 
277
+ $this->order->getPayment()->setAdditionalInformation('user_field', MPay24MagentoShop::MAGENTO_VERSION.$transaction->TID.'_'.date('Y-m-d'))->save();
278
+ $mdxi->Order->UserField = MPay24MagentoShop::MAGENTO_VERSION.$transaction->TID.'_'.date('Y-m-d');
279
+ $mdxi->Order->Tid = $transaction->TID;
280
 
281
+ $lang = explode('_', Mage::getStoreConfig('general/locale/code'));
282
+ $mdxi->Order->TemplateSet->setLanguage(strtoupper($lang[0]));
283
 
284
+ if($this->ps) {
285
+ $mdxi->Order->PaymentTypes->setEnable('true');
286
+
287
+ $mdxi->Order->PaymentTypes->Payment(1)->setType($this->type);
288
+
289
+ if($this->type != $this->brand)
290
+ $mdxi->Order->PaymentTypes->Payment(1)->setBrand($this->brand);
291
+ } else {
292
+ $brandsAndTypes = explode(", ", Mage::getStoreConfig('mpay24/mpay24/active_payment_types'));
293
+ $brands = array();
294
+
295
+ foreach($brandsAndTypes as $brandAndType)
296
+ $brands[substr($brandAndType, 0, strpos($brandAndType, "=>"))] = substr($brandAndType, strpos($brandAndType, "=>")+2);
297
 
298
+ $firstPS = Mage::getStoreConfig('mpay24/mpay24/ps_1');
299
+ $allPS = true;
300
 
301
+ for($i=2; $i<=Mage::getStoreConfig('mpay24/mpay24/payments_count'); $i++)
302
+ if($firstPS != Mage::getStoreConfig('mpay24/mpay24/ps_'.$i)) {
303
+ $allPS = false;
304
+ break;
305
+ }
 
306
 
307
+ if(!$allPS && Mage::getStoreConfig('mpay24/mpay24/payments_active') != 'false') {
308
+ $mdxi->Order->PaymentTypes->setEnable('true');
309
 
310
+ $brands = $this->getActiveMethods();
311
+ $c = 1;
312
+
313
+ foreach($brands as $brand => $type) {
314
+ $mdxi->Order->PaymentTypes->Payment($c)->setType($type);
315
+
316
+ if($type != $brand)
317
+ $mdxi->Order->PaymentTypes->Payment($c)->setBrand($brand);
318
+
319
+ $c++;
320
+ }
321
+ }
322
+ }
 
 
 
 
 
 
 
 
323
 
324
+ $conf = explode(',',Mage::getStoreConfig('mpay24/mpay24spsc/sc_row'));
325
 
326
+ $mdxi->Order->ShoppingCart->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_style'));
327
+ $mdxi->Order->ShoppingCart->setHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_header'));
328
+ $mdxi->Order->ShoppingCart->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_headerstyle'));
329
+ $mdxi->Order->ShoppingCart->setCaptionStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_captionstyle'));
330
 
331
+ if(in_array('Number',$conf)) {
332
+ $mdxi->Order->ShoppingCart->setNumberHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberheader'));
333
+ $mdxi->Order->ShoppingCart->setNumberStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_numberstyle'));
334
+ }
335
+ if(in_array('ProductNr',$conf)) {
336
+ $mdxi->Order->ShoppingCart->setProductNrHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrheader'));
337
+ $mdxi->Order->ShoppingCart->setProductNrStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_productnrstyle'));
338
+ }
339
+ if(in_array('Description',$conf)) {
340
+ $mdxi->Order->ShoppingCart->setDescriptionHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionheader'));
341
+ $mdxi->Order->ShoppingCart->setDescriptionStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_descriptionstyle'));
342
+ }
343
+ if(in_array('Package',$conf)) {
344
+ $mdxi->Order->ShoppingCart->setPackageHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_packageheader'));
345
+ $mdxi->Order->ShoppingCart->setPackageStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_packagestyle'));
346
+ }
347
+ if(in_array('Quantity',$conf)) {
348
+ $mdxi->Order->ShoppingCart->setQuantityHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantityheader'));
349
+ $mdxi->Order->ShoppingCart->setQuantityStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_quantitystyle'));
350
+ }
351
+ if(in_array('ItemPrice',$conf)) {
352
+ $mdxi->Order->ShoppingCart->setItemPriceHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempriceheader'));
353
+ $mdxi->Order->ShoppingCart->setItemPriceStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_itempricestyle'));
354
+ }
355
+ if(in_array('Price',$conf)) {
356
+ $mdxi->Order->ShoppingCart->setPriceHeader(Mage::getStoreConfig('mpay24/mpay24spsc/sc_priceheader'));
357
+ $mdxi->Order->ShoppingCart->setPriceStyle(Mage::getStoreConfig('mpay24/mpay24spsc/sc_pricestyle'));
358
+ }
359
 
360
+ $mdxi->Order->ShoppingCart->Description(Mage::getStoreConfig('mpay24/mpay24spsc/description'));
361
 
362
+ $style1 = Mage::getStoreConfig('mpay24/mpay24spsc/item_style1');
363
+ $style2 = Mage::getStoreConfig('mpay24/mpay24spsc/item_style2');
364
+ $ret = "";
365
+ $linecount = 0;
366
 
367
+ foreach($this->order->getAllItems() as $_item) {
368
+ if(Mage::getStoreConfig('mpay24/mpay24/show_free_products') == 1 ||
369
+ (Mage::getStoreConfig('mpay24/mpay24/show_free_products') == 0 && number_format(($_item->getData('price')*1),2,'.','') != '0.00')) {
370
+
371
+ $linecount++;
372
+ $style = ($linecount % 2== 1) ? $style1 : $style2;
373
 
374
+ if(in_array('Number',$conf)) {
375
+ $mdxi->Order->ShoppingCart->Item($linecount)->Number = $linecount;
376
+ $mdxi->Order->ShoppingCart->Item($linecount)->Number->setStyle($style);
377
+ }
378
+ if(in_array('ProductNr',$conf)) {
379
+ $mdxi->Order->ShoppingCart->Item($linecount)->ProductNr = $this->xmlentities($_item->getData('sku'));
380
+ $mdxi->Order->ShoppingCart->Item($linecount)->ProductNr->setStyle($style);
381
+ }
382
+ if(in_array('Description',$conf)) {
383
+ $mdxi->Order->ShoppingCart->Item($linecount)->Description = $this->xmlentities($_item->getData('name'));
384
+ $mdxi->Order->ShoppingCart->Item($linecount)->Description->setStyle($style);
385
+ }
386
+ if(in_array('Package',$conf)) {
387
+ $mdxi->Order->ShoppingCart->Item($linecount)->Package = "";
388
+ $mdxi->Order->ShoppingCart->Item($linecount)->Package->setStyle($style);
389
+ }
390
+ if(in_array('Quantity',$conf)) {
391
+ $mdxi->Order->ShoppingCart->Item($linecount)->Quantity = (int)$_item->getQtyOrdered();
392
+ $mdxi->Order->ShoppingCart->Item($linecount)->Quantity->setStyle($style);
393
+ }
394
 
395
+ if(Mage::getStoreConfig('tax/cart_display/price') == 2 || Mage::getStoreConfig('tax/cart_display/price') == 3) {
396
+ if(in_array('ItemPrice',$conf)) {
397
+ $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice = number_format($_item->getPriceInclTax()*1,2,'.','');
398
+ $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice->setStyle($style);
399
+ $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice->setTax(number_format($_item->getTaxAmount(),2,'.',''));
400
+ }
401
+ } else {
402
+ if(in_array('ItemPrice',$conf)) {
403
+ $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice = number_format(($_item->getData('price')*1),2,'.','');
404
+ $mdxi->Order->ShoppingCart->Item($linecount)->ItemPrice->setStyle($style);
405
+ }
406
+ }
407
+ }
408
+ }
409
 
410
+ $mdxi->Order->ShoppingCart->SubTotal->setHeader(Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_header'));
411
+ $mdxi->Order->ShoppingCart->SubTotal->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_headerstyle'));
412
+ $mdxi->Order->ShoppingCart->SubTotal->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/subtotal_style'));
413
 
414
+ if(Mage::getStoreConfig('tax/cart_display/subtotal') == 2 || Mage::getStoreConfig('tax/cart_display/subtotal') == 3)
415
+ $mdxi->Order->ShoppingCart->SubTotal = number_format($this->order->getSubtotalInclTax(),2,'.','');
416
+ else
417
+ $mdxi->Order->ShoppingCart->SubTotal = number_format($this->order->getData('subtotal'),2,'.','');
418
 
419
+ if(number_format($this->order->getData('discount_amount'),2,'.','') !== '0.00') {
420
+ $mdxi->Order->ShoppingCart->Discount->setHeader($this->order->getData('discount_description'));
421
+ $mdxi->Order->ShoppingCart->Discount->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/discount_headerstyle'));
422
+ $mdxi->Order->ShoppingCart->Discount->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/discount_style'));
423
+ $mdxi->Order->ShoppingCart->Discount = number_format($this->order->getData('discount_amount'), 2, '.', '');
424
+ }
425
 
426
+ if(number_format($this->order->getData('shipping_amount'),2,'.','') !== '0.00') {
427
+ $mdxi->Order->ShoppingCart->ShippingCosts->setHeader($this->order->getData('shipping_description'));
428
+ $mdxi->Order->ShoppingCart->ShippingCosts->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_headerstyle'));
429
+ $mdxi->Order->ShoppingCart->ShippingCosts->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/shipping_costs_style'));
430
 
431
+ if(Mage::getStoreConfig('tax/cart_display/shipping') == 2 || Mage::getStoreConfig('tax/cart_display/shipping') == 3)
432
+ $mdxi->Order->ShoppingCart->ShippingCosts = number_format($this->order->getShippingInclTax(), 2, '.', '');
433
+ else
434
+ $mdxi->Order->ShoppingCart->ShippingCosts = number_format($this->order->getData('shipping_amount'), 2, '.', '');
435
+ }
436
 
437
+ if(number_format($this->order->getData('tax_amount'),2,'.','') !== '0.00') {
438
+ $array = $this->order->getFullTaxInfo();
439
+ $taxInfo = array();
440
+
441
+ foreach($array as $a){
442
+ $taxArray = $a;
 
 
 
443
 
444
+ foreach(array_keys($taxArray) as $taxKey)
445
+ $taxInfo[$taxKey] = $taxArray[$taxKey];
 
 
 
 
 
 
446
 
447
+ if(Mage::getStoreConfig('tax/cart_display/shipping') == 2 || Mage::getStoreConfig('tax/cart_display/shipping') == 3) {
448
+ if(substr(Mage::getStoreConfig('general/locale/code'), 0, 2) == 'de')
449
+ $inklText = "inkl. ";
450
+ else
451
+ $inklText = "incl. ";
452
+ } else
453
+ $inklText = "";
454
+
455
+ $mdxi->Order->ShoppingCart->Tax->setHeader($inklText . $taxArray['id']);
456
+ $mdxi->Order->ShoppingCart->Tax->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/tax_headerstyle'));
457
+ $mdxi->Order->ShoppingCart->Tax->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/tax_style'));
458
+ $mdxi->Order->ShoppingCart->Tax->setPercent(number_format($taxArray['rates'][0]['percent'],0,'.',''));
459
 
460
+ $mdxi->Order->ShoppingCart->Tax = number_format($taxArray['amount'],2,'.','');
461
+ }
462
+ }
463
 
464
+ $billingCountry = "";
465
+ $billingCountryCode = "";
466
+ $shippingCountry = "";
467
+ $shippingCountryCode = "";
468
 
469
+ foreach(Mage::app()->getLocale()->getOptionCountries() as $c)
470
+ if ($c['value'] == $this->order->getBillingAddress()->getCountry()) {
471
  $billingCountry = $c['label'];
472
  $billingCountryCode = $c['value'];
473
  break;
474
  }
475
 
476
+ if($this->order->getShippingAddress())
477
+ foreach(Mage::app()->getLocale()->getOptionCountries() as $c)
478
+ if ($c['value'] == $this->order->getShippingAddress()->getCountry()) {
479
+ $shippingCountry = $c['label'];
480
+ $shippingCountryCode = $c['value'];
481
+ break;
482
+ }
 
483
 
484
+ $mdxi->Order->Price = $transaction->PRICE;
485
+ $mdxi->Order->Price->setHeader(Mage::getStoreConfig('mpay24/mpay24spsc/price_header'));
486
+ $mdxi->Order->Price->setHeaderStyle(Mage::getStoreConfig('mpay24/mpay24spsc/price_headerstyle'));
487
+ $mdxi->Order->Price->setStyle(Mage::getStoreConfig('mpay24/mpay24spsc/price_style'));
488
 
489
+ $mdxi->Order->Currency = $this->xmlentities($this->order->getBaseCurrencyCode());
490
 
491
+ $mdxi->Order->BillingAddr->setMode(Mage::getStoreConfig('mpay24/mpay24/billingAddressMode'));
492
 
493
+ if($this->order->getShippingAddress() && $this->xmlentities($this->order->getShippingAddress()->getFirstname()) === '')
494
+ $billingName = $this->xmlentities($this->order->getBillingAddress()->getLastname());
495
+ elseif($this->xmlentities($this->order->getBillingAddress()->getLastname()) === '')
496
+ $billingName = $this->xmlentities($this->order->getBillingAddress()->getFirstname());
497
+ else
498
+ $billingName = $this->xmlentities($this->order->getBillingAddress()->getFirstname()).' '.$this->xmlentities($this->order->getBillingAddress()->getLastname());
499
 
500
+ $mdxi->Order->BillingAddr->Name = substr($billingName,0,50);
501
 
502
+ $billingAdress = $this->xmlentities($this->order->getBillingAddress()->getStreetFull());
503
 
504
+ $billingStreet = $this->splitAdress($billingAdress);
505
 
506
+ if(isset($billingStreet[0]) && is_array($billingStreet[0])) {
507
+ $mdxi->Order->BillingAddr->Street = $billingStreet[0]['Street'];
508
+ $mdxi->Order->BillingAddr->Street2 = $billingStreet[1]['Street2'];
509
+ } else {
510
+ $mdxi->Order->BillingAddr->Street = $billingStreet['Street'];
511
+
512
+ if(isset($billingStreet['Street2']))
513
+ $mdxi->Order->BillingAddr->Street2 = $billingStreet['Street2'];
514
+ }
515
+
516
+ $mdxi->Order->BillingAddr->Zip = substr($this->xmlentities($this->order->getBillingAddress()->getPostcode()),0,50);
517
+ $mdxi->Order->BillingAddr->City = substr($this->xmlentities($this->order->getBillingAddress()->getCity()),0,50);
518
+ $mdxi->Order->BillingAddr->Country->setCode($this->xmlentities($billingCountryCode));
519
+ $mdxi->Order->BillingAddr->Email = substr($this->xmlentities($this->order->getBillingAddress()->getEmail()),0,50);
520
 
521
+ if($this->order->getShippingAddress()) {
522
+ $mdxi->Order->ShippingAddr->setMode("ReadOnly");
523
 
524
+ if($this->xmlentities($this->order->getShippingAddress()->getFirstname()) === '')
525
+ $shippingName = $this->xmlentities($this->order->getShippingAddress()->getLastname());
526
+ elseif($this->xmlentities($this->order->getShippingAddress()->getLastname()) === '')
527
+ $shippingName = $this->xmlentities($this->order->getShippingAddress()->getFirstname());
528
+ else
529
+ $shippingName = $this->xmlentities($this->order->getShippingAddress()->getFirstname()).' '.$this->xmlentities($this->order->getShippingAddress()->getLastname());
530
 
531
+ $mdxi->Order->ShippingAddr->Name = substr($shippingName,0,50);
532
 
533
+ $shippingAdress = $this->xmlentities($this->order->getShippingAddress()->getStreetFull());
534
 
535
+ $shippingStreet = $this->splitAdress($shippingAdress);
536
 
537
+ if(isset($shippingStreet[0]) && is_array($shippingStreet[0])) {
538
+ $mdxi->Order->ShippingAddr->Street = $shippingStreet[0]['Street'];
539
+ $mdxi->Order->ShippingAddr->Street2 = $shippingStreet[1]['Street2'];
540
+ } else {
541
+ $mdxi->Order->ShippingAddr->Street = $shippingStreet['Street'];
542
+
543
+ if(isset($shippingStreet['Street2']))
544
+ $mdxi->Order->ShippingAddr->Street2 = $shippingStreet['Street2'];
545
+ }
546
+
547
+ $mdxi->Order->ShippingAddr->Zip = substr($this->xmlentities($this->order->getShippingAddress()->getPostcode()),0,50);
548
+ $mdxi->Order->ShippingAddr->City = substr($this->xmlentities($this->order->getShippingAddress()->getCity()),0,50);
549
+ $mdxi->Order->ShippingAddr->Country->setCode($this->xmlentities($shippingCountryCode));
550
+ $mdxi->Order->ShippingAddr->Email = substr($this->xmlentities($this->order->getShippingAddress()->getEmail()),0,50);
551
+ }
552
 
553
+ if(Mage::helper('customer')->isLoggedIn())
554
+ $mdxi->Order->URL->Success = Mage::getUrl(MPay24MagentoShop::SUCCESS_URL,array('_secure' => true, '_query' => "TID=" . substr($this->order->getIncrementId(),0,32) ));
555
+ else
556
+ $mdxi->Order->URL->Success = Mage::getUrl(MPay24MagentoShop::GUEST_SUCCESS_URL,array('_secure' => true, '_query' => "tid=" . substr($this->order->getIncrementId(),0,32) ));
557
 
558
+ $mdxi->Order->URL->Error = Mage::getUrl(MPay24MagentoShop::ERROR_URL,array('_secure' => true, '_query' => "TID=" . substr($this->order->getIncrementId(),0,32) ));
559
+ $mdxi->Order->URL->Confirmation = Mage::getUrl(MPay24MagentoShop::CONFIRMATION_URL,array('_secure' => true));
560
+ $mdxi->Order->URL->Cancel = Mage::getUrl(MPay24MagentoShop::CANCEL_URL,array('_secure' => true, '_query' => "TID=" . substr($this->order->getIncrementId(),0,32) ));
561
 
562
+ if(Mage::getStoreConfig('mpay24/mpay24as/debug') == 1) {
563
+ $myFile = "app/code/community/Mpay24/Mpay24/Model/Api/xmls/".$transaction->TID.".xml";
564
+ $fh = fopen($myFile, 'w') or die("can't open file");
565
+ fwrite($fh, $mdxi->toXML());
566
+ fclose($fh);
567
+ }
568
 
569
+ return $mdxi;
570
+ }
571
 
572
+ function setVariables($order, $ps, $type, $brand) {
573
+ $this->tid = $order->getIncrementId();
574
+ $this->order = $order;
575
+ $this->price = number_format($order->getData('grand_total'),2,'.','');
576
+ $this->ps = $ps;
577
+ $this->type = $type;
578
+ $this->brand = $brand;
579
+ }
580
+
581
+ private function xmlentities($string) {
582
+ static $trans;
583
 
584
+ if (!isset($trans)) {
585
+ $trans = get_html_translation_table(HTML_SPECIALCHARS);
586
+
587
+ foreach ($trans as $key => $value)
588
+ $trans[$key] = '&#'.ord($key).';';
 
589
 
590
+ // dont translate the '&' in case it is part of &xxx;
591
+ $trans[chr(38)] = '&';
592
+ }
593
 
594
+ //after the initial translation, _do_ map standalone '&' into '&#38;'
595
+ return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&#38;" , strtr($string, $trans));
596
+ }
597
 
598
+ private function splitAdress($adress, $str2=null) {
599
+ $posNewLine = strpos($adress, "\n");
600
+ $strArray = array();
601
+
602
+ if($posNewLine === false) {
603
+ if(strlen($adress) <= 50)
604
+ if($str2 !== true)
605
+ $strArray['Street'] = $adress;
606
+ else
607
+ $strArray['Street2'] = $adress;
608
+ else {
609
+ $street1before = substr($adress, 0, 50);
610
+ $posLastInterval1 = strrpos($street1before, " ");
611
 
612
+ $street1 = substr($street1before, 0, $posLastInterval1);
613
 
614
+ $street2before = substr(substr($street1before, $posLastInterval1).substr($adress, 50), 1, 50);
615
+ $posLastInterval2 = strrpos($street2before, " ");
616
+ $street2 = substr($street2before, 0, $posLastInterval2);
617
 
618
+ if($str2 === null) {
619
+ $strArray['Street'] = $street1;
620
+ $strArray['Street2'] = $street2;
621
+ } elseif($str2 === false)
622
+ if($posLastInterval1)
623
  $strArray['Street'] = $street1;
624
+ else
625
  $strArray['Street'] = $street1before;
626
+ else
627
+ if($posLastInterval1)
628
+ $strArray['Street2'] = $street1;
629
+ else
630
+ $strArray['Street2'] = $street1before;
 
 
 
631
  }
632
+ } else {
633
+ $array = explode("\n", $adress);
634
+ $adress1 = $array[0];
635
+ array_push($strArray, $this->splitAdress($adress1, false));
636
 
637
+ $adress2 = $array[1];
638
+ array_push($strArray, $this->splitAdress($adress2, true));
639
+ }
640
+ return $strArray;
641
+ }
642
 
643
+ public static function getMPay24Api() {
644
+ if(Mage::getStoreConfig('mpay24/mpay24as/system') == 1)
645
+ $test = TRUE;
646
+ else
647
+ $test = FALSE;
648
 
649
+ if(Mage::getStoreConfig('mpay24/mpay24as/debug') == 1)
650
+ $debug = TRUE;
651
+ else
652
+ $debug = FALSE;
653
 
654
+ if(Mage::getStoreConfig('mpay24/mpay24as/use_proxy') == 1) {
655
+ $proxy_host = Mage::getStoreConfig('mpay24/mpay24as/proxy_host');
656
+ $proxy_port = Mage::getStoreConfig('mpay24/mpay24as/proxy_port');
657
+ } else {
658
+ $proxy_host = null;
659
+ $proxy_port = null;
660
+ }
661
 
662
+ $mPay24MagentoShop = new MPay24MagentoShop(Mage::getStoreConfig('mpay24/mpay24as/merchantid'), Mage::getStoreConfig('mpay24/mpay24as/soap_pass'), $test, $proxy_host, $proxy_port, $debug);
663
+ return $mPay24MagentoShop;
664
+ }
665
 
666
+ /**
667
+ * @abstract Get the payment systems for the merchant from the core_config_data and explode it into an array
668
+ * @return Array $method
669
+ */
670
+ public function getActiveMethods() {
671
+ $methods = array();
672
+ $brandsAndDescriptions = explode(", ", Mage::getStoreConfig('mpay24/mpay24/active_payment_types'));
673
 
674
+ $firstPS = Mage::getStoreConfig('mpay24/mpay24/ps_1');
675
+ $allPS = true;
676
 
677
+ for($i=2; $i<=Mage::getStoreConfig('mpay24/mpay24/payments_count'); $i++)
678
+ if($firstPS != Mage::getStoreConfig('mpay24/mpay24/ps_'.$i)) {
679
+ $allPS = false;
680
+ break;
681
+ }
 
682
 
683
+ if($allPS) {
684
+ if(Mage::getStoreConfig('mpay24/mpay24/payments_active') == 'false')
685
+ if($firstPS == 1) {
686
+ Mage::getConfig()->saveConfig("payment/mpay24/active", 0);
687
+ Mage::getConfig()->reinit();
688
+ Mage::app()->reinitStores();
689
+ }
690
+ else
691
+ if($firstPS == 0) {
692
+ Mage::getConfig()->saveConfig("payment/mpay24/active", 0);
693
+ Mage::getConfig()->reinit();
694
+ Mage::app()->reinitStores();
695
+ }
 
696
 
697
+ foreach($brandsAndDescriptions as $brandAndDescr) {
698
+ $brand = substr($brandAndDescr, 0, strpos($brandAndDescr, "=>"));
699
+ $description = substr($brandAndDescr, strpos($brandAndDescr, "=>")+2);
700
+ $methods[$brand] = $description;
701
+ }
702
+ } else {
703
+ if(Mage::getStoreConfig('mpay24/mpay24/payments_active') == 'false')
704
+ $check = 0;
705
+ else
706
+ $check = 1;
707
+
708
+ $i=1;
709
+
710
+ foreach($brandsAndDescriptions as $brandAndDescr) {
711
+ if(Mage::getStoreConfig('mpay24/mpay24/ps_'.$i) == $check) {
712
  $brand = substr($brandAndDescr, 0, strpos($brandAndDescr, "=>"));
713
  $description = substr($brandAndDescr, strpos($brandAndDescr, "=>")+2);
714
  $methods[$brand] = $description;
715
+ }
716
+ $i++;
717
+ }
718
+ }
719
 
720
+ return $methods;
721
+ }
722
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
723
  ?>
app/code/community/Mpay24/Mpay24/Model/Selectpayment.php CHANGED
@@ -115,9 +115,12 @@ class Mpay24_Mpay24_Model_Selectpayment extends Mpay24_Mpay24_Model_Method_Selec
115
  $this->clearSession();
116
  if(!$payment->getAdditionalInformation('MIFReverse') && !$payment->getAdditionalInformation('error')) {
117
  $mPay24MagentoShop = MPay24MagentoShop::getMPay24Api();
 
 
 
118
  $mPAY24Result = $mPay24MagentoShop->cancelTransaction($payment->getOrder()->getIncrementId());
119
 
120
- if($mPAY24Result->getGeneralResponse()->getStatus() != 'OK') {
121
  Mage::log('The order was not canceled: ' . $mPAY24Result->getGeneralResponse()->getReturnCode(), 10);
122
  Mage::throwException(Mage::helper('mpay24')->__("The order could not be canceled! For mor information see the log files!"));
123
  return false;
@@ -136,21 +139,24 @@ class Mpay24_Mpay24_Model_Selectpayment extends Mpay24_Mpay24_Model_Method_Selec
136
  * @return Mpay24_Mpay24_Model_PaymentMethod
137
  */
138
  public function cancel(Varien_Object $payment) {
139
- $this->clearSession();
140
- if(!$payment->getAdditionalInformation('cancelButton') && !$payment->getAdditionalInformation('error')) {
141
- $mPay24MagentoShop = MPay24MagentoShop::getMPay24Api();
 
 
 
142
  $mPAY24Result = $mPay24MagentoShop->cancelTransaction($payment->getOrder()->getIncrementId());
143
 
144
- if($mPAY24Result->getGeneralResponse()->getStatus() != 'OK') {
145
- Mage::log('The order was not canceled: ' . $mPAY24Result->getGeneralResponse()->getReturnCode(), 10);
146
- Mage::throwException(Mage::helper('mpay24')->__("The order could not be canceled! For mor information see the log files!"));
147
- return false;
148
- }
149
- }
150
 
151
- parent::cancel($payment);
152
 
153
- return $this;
154
- }
155
  }
156
  ?>
115
  $this->clearSession();
116
  if(!$payment->getAdditionalInformation('MIFReverse') && !$payment->getAdditionalInformation('error')) {
117
  $mPay24MagentoShop = MPay24MagentoShop::getMPay24Api();
118
+ $status = $mPay24MagentoShop->updateStatusToCancel($payment->getOrder()->getIncrementId());
119
+
120
+ if($status != "SUSPENDED" && $status != "PENDING")
121
  $mPAY24Result = $mPay24MagentoShop->cancelTransaction($payment->getOrder()->getIncrementId());
122
 
123
+ if($status != "SUSPENDED" && $status != "PENDING" && $mPAY24Result->getGeneralResponse()->getStatus() != 'OK') {
124
  Mage::log('The order was not canceled: ' . $mPAY24Result->getGeneralResponse()->getReturnCode(), 10);
125
  Mage::throwException(Mage::helper('mpay24')->__("The order could not be canceled! For mor information see the log files!"));
126
  return false;
139
  * @return Mpay24_Mpay24_Model_PaymentMethod
140
  */
141
  public function cancel(Varien_Object $payment) {
142
+ $this->clearSession();
143
+ if(!$payment->getAdditionalInformation('cancelButton') && !$payment->getAdditionalInformation('error')) {
144
+ $mPay24MagentoShop = MPay24MagentoShop::getMPay24Api();
145
+ $status = $mPay24MagentoShop->updateStatusToCancel($payment->getOrder()->getIncrementId());
146
+
147
+ if($status != "SUSPENDED" && $status != "PENDING")
148
  $mPAY24Result = $mPay24MagentoShop->cancelTransaction($payment->getOrder()->getIncrementId());
149
 
150
+ if($status != "SUSPENDED" && $status != "PENDING" && $mPAY24Result->getGeneralResponse()->getStatus() != 'OK') {
151
+ Mage::log('The order was not canceled: ' . $mPAY24Result->getGeneralResponse()->getReturnCode(), 10);
152
+ Mage::throwException(Mage::helper('mpay24')->__("The order could not be canceled! For mor information see the log files!"));
153
+ return false;
154
+ }
155
+ }
156
 
157
+ parent::cancel($payment);
158
 
159
+ return $this;
160
+ }
161
  }
162
  ?>
app/code/community/Mpay24/Mpay24/Model/Source/AllowedIPs.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * @category Mpay24
16
+ * @package Mpay24_Mpay24
17
+ * @author Filipp Akinfiev
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ class Mpay24_Mpay24_Model_Source_AllowedIPs {
21
+ public function toOptionArray() {
22
+ return array(
23
+ array('value' => '213.164.23.169', 'label' => Mage::helper('mpay24')->__('213.164.23.169')),
24
+ array('value' => '213.164.25.245', 'label' => Mage::helper('mpay24')->__('213.164.25.245')),
25
+ array('value' => '80.110.33.70', 'label' => Mage::helper('mpay24')->__('80.110.33.70')),
26
+ array('value' => '127.0.0.1', 'label' => Mage::helper('mpay24')->__('127.0.0.1'))
27
+ );
28
+ }
29
+ }
app/code/community/Mpay24/Mpay24/controllers/IndexController.php CHANGED
@@ -19,7 +19,7 @@
19
  */
20
 
21
  class Mpay24_Mpay24_IndexController extends Mage_Core_Controller_Front_Action {
22
- public function indexAction() {
23
- $this->_redirect('/');
24
- }
25
  }
19
  */
20
 
21
  class Mpay24_Mpay24_IndexController extends Mage_Core_Controller_Front_Action {
22
+ public function indexAction() {
23
+ $this->_redirect('/');
24
+ }
25
  }
app/code/community/Mpay24/Mpay24/controllers/PaymentController.php CHANGED
@@ -22,16 +22,18 @@ include_once "app/code/community/Mpay24/Mpay24/Model/Api/MPay24MagentoShop.php";
22
  class Mpay24_Mpay24_PaymentController extends Mage_Core_Controller_Front_Action {
23
 
24
  protected function _expireAjax() {
25
- if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
26
- $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
27
- exit;
28
- }
29
  }
 
30
 
31
- /**
32
- * @abstract Redirect to mPAY24 pay page
33
- */
34
  public function redirectAction() {
 
35
  $order = $this->getOrder();
36
  $order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__("Redirected to mPAY24 pay page"));
37
  $order->save();
@@ -42,79 +44,82 @@ class Mpay24_Mpay24_PaymentController extends Mage_Core_Controller_Front_Action
42
  * @abstract Is called from mPAY24 as Confirmation-URL. Send TRANSACTION-STATUS request to mPAY24
43
  */
44
  public function confirmationAction() {
45
- Mage::log('confirmation action called');
46
 
47
  $this->getResponse()->setBody("OK: " . MPay24MagentoShop::MAGENTO_VERSION . " - confirmation received");
48
 
49
- $result = $this->getRequest()->getParams();
50
 
51
- $order = Mage::getModel('sales/order');
52
- $order->loadByIncrementId($result['TID']);
53
 
54
- Mage::log('RESULT from confirmation action:'."\n");
55
- Mage::log($result);
56
-
57
- switch($result['OPERATION']){
58
- case 'CONFIRMATION':
59
- $this->getTransactionStatus($result['TID'], true);
60
- break;
61
-
62
- default:
63
- break;
64
- }
65
 
 
 
 
 
 
 
 
66
  }
67
 
68
  public function indexAction() {
 
69
  $this->loadLayout();
70
  $this->renderLayout();
71
- }
72
 
73
- public function paymentAction() {
74
- $this->loadLayout();
 
75
  $this->renderLayout();
76
- }
77
 
78
- /**
79
- * @abstract Is called from mPAY24 as Success-URL. Send TRANSACTION-STATUS request to mPAY24
80
- */
81
  public function successAction() {
 
82
  $order = $this->getOrder($_REQUEST['TID']);
83
- Mage::log('success action called for order '.$order->getData('increment_id'));
84
  $order->getPayment()->setAdditionalInformation('success', true)->save();
85
  $this->getTransactionStatus($_REQUEST['TID']);
86
  $this->_redirect('sales/order/view/order_id/'.$order->getId().'/');
87
- }
88
 
89
- /**
90
- * @abstract Is called from mPAY24 as Success-URL for not registered customers. Send TRANSACTION-STATUS request to mPAY24
91
- */
92
- public function guestsuccessAction() {
93
- $order = $this->getOrder($_REQUEST['TID']);
94
- Mage::log('success guest action called for order '.$order->getData('increment_id'));
95
- $order->getPayment()->setAdditionalInformation('success', true)->save();
96
- $this->getTransactionStatus($_REQUEST['TID']);
97
- $this->_redirect('checkout/onepage/success/');
98
- }
 
99
 
100
- /**
101
- * @abstract Is called from mPAY24 as Error-URL. Send TRANSACTION-STATUS request to mPAY24
102
- */
103
- public function errorAction() {
104
- $order = $this->getOrder($_REQUEST['TID']);
105
- Mage::log('error action called for order '.$order->getData('increment_id'));
106
- $order->getPayment()->setAdditionalInformation('error_text', utf8_encode($_REQUEST['ERROR']))->save();
107
- $order->getPayment()->setAdditionalInformation('error', true)->save();
108
- $this->getTransactionStatus();
 
109
 
110
  Mage::getSingleton('mpay24/session')->setParentRedirectUrl('sales/order/view/order_id/'.$order->getId().'/');
111
  $this->getResponse()->setBody($this->getLayout()->createBlock("mpay24/parentRedirect")->toHtml());
112
- }
113
 
114
- /**
115
- * @abstract Is called from mPAY24 as Cancel-URL. Send TRANSACTION-STATUS request to mPAY24
116
- */
117
  public function cancelAction() {
 
118
  $order = $this->getOrder($_REQUEST['TID']);
119
  Mage::log('cancel action called for order '.$order->getData('increment_id'));
120
  $order->getPayment()->setAdditionalInformation('cancelButton', true)->save();
@@ -123,348 +128,360 @@ class Mpay24_Mpay24_PaymentController extends Mage_Core_Controller_Front_Action
123
 
124
  Mage::getSingleton('mpay24/session')->setParentRedirectUrl('sales/order/view/order_id/'.$order->getId().'/');
125
  $this->getResponse()->setBody($this->getLayout()->createBlock("mpay24/parentRedirect")->toHtml());
126
- }
127
 
128
- public function getCheckout() {
129
- return Mage::getSingleton('checkout/session');
130
- }
 
131
 
132
  /**
133
- * @abstract Get the order for a tid
134
- * @param String $tid
135
- * @return Mage_Sales_Model_Order The order with the $tid
136
- */
137
- public function getOrder($tid=null) {
138
- $order = Mage::getSingleton('sales/order');
139
- if($tid == null)
140
- return $order->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
141
- else
142
- return $order->loadByIncrementId($tid);
143
- }
144
 
145
- /**
146
- * @abstract Synchronize the transaction status with mPAY24
147
- * @param String $tid
148
- * @param Boolean $confirmation
149
- * @return String
150
- */
151
- public function getTransactionStatus($tid=null, $confirmation=false){
 
 
 
 
 
 
 
152
  $auth_refund = array("CC", "CB", "MAESTRO", "PAYPAL", "ELV", "PB", "MPASS", "INVOICE", "HP", "SAFETYPAY");
153
  $updateResult = "";
154
  $order = $this->getOrder($tid);
155
- Mage::log('getTransactionStatus called for order '.$order->getData('increment_id'));
156
- $confirmationCalled = "Payment ";
157
 
158
- if($confirmation)
159
- $confirmationCalled = "Confirmation URL called: Payment ";
160
 
161
 
162
- $incrementId = $order->getData('increment_id');
163
- $tid = $order->getId();
164
 
165
- if($order->getPayment()){
166
- $mPay24MagentoShop = MPay24MagentoShop::getMPay24Api();
167
- $mPAY24Result = $mPay24MagentoShop->updateTransactionStatus($incrementId);
168
-
169
- if($mPAY24Result->getGeneralResponse()->getStatus() != 'OK' || $mPAY24Result->getParam('APPR_CODE') == '')
170
- $apprCode = 'N/A';
171
- else
172
- $apprCode = $mPAY24Result->getParam('APPR_CODE');
 
 
 
 
 
 
173
 
174
- switch ($mPAY24Result->getGeneralResponse()->getStatus()) {
 
 
 
 
 
 
 
175
  case "OK":
176
  if($order->getPayment()->getAdditionalInformation('user_field') == $mPAY24Result->getParam('USER_FIELD')) {
177
  $updateResult = "The transaction status was succesfully updated!";
178
 
179
- $order->getPayment()->setAdditionalData($mPAY24Result->getParam("P_TYPE"))->save();
180
- $order->getPayment()->setCcType($mPAY24Result->getParam('BRAND'))->save();
181
- $order->getPayment()->setAdditionalInformation('status', true)->save();
182
- $updateResult .= "\n\nActual status: " . $mPAY24Result->getParam('STATUS ');
183
- $updateResult .= "\nAmount: " . number_format($mPAY24Result->getParam('PRICE')/100, 2, '.', '') . " " . $mPAY24Result->getParam('CURRENCY');
184
- $updateResult .= "\nMPAYTID: " . $mPAY24Result->getParam('MPAYTID');
185
- $updateResult .= "\nAppr_code: " . $apprCode;
186
-
187
- switch($mPAY24Result->getParam('TSTATUS')){
188
- case 'RESERVED':
189
- if($order->getId()){
190
- $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
191
- $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
192
- $order->getPayment()->setAmountAuthorized($mPAY24Result->getParam('PRICE')/100)->save();
193
- $order->getPayment()->setAdditionalInformation('error', false)->save();
194
- $order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("RESERVED") . ' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]');
195
- $order->sendNewOrderEmail();
 
 
 
 
 
 
 
 
 
 
 
 
 
196
 
197
- if($order->getInvoiceCollection()->count() == 0) {
198
- if(Mage::getStoreConfig('payment/mpay24/paid_payment_action') == MPay24MagentoShop::PAYMENT_TYPE_SALE) {
199
- $order->getPayment()->setAdditionalInformation('mpay24AutoClearing', true)->save();
200
- $this->_createInvoice($order, true);
201
- } else
202
- $this->_createInvoice($order);
203
- }
204
- }
205
- $order->save();
206
- break;
207
- case 'BILLED':
208
- if($order->getInvoiceCollection()->count() == 0) {
209
- if(in_array($mPAY24Result->getParam('P_TYPE'), MPay24MagentoShop::getAllowedAuth())) {
210
- $onlineCapture = false;
211
- $mif = true;
212
- } else {
213
- $onlineCapture = true;
214
- $mif = false;
215
- }
216
 
217
- $order->getPayment()->setAmountCharged($mPAY24Result->getParam('PRICE')/100)->save();
218
- $order->getPayment()->setAdditionalInformation('error', false)->save();
219
  $order->sendOrderUpdateEmail();
220
- if($confirmation) {
221
- $order->getPayment()->setAdditionalInformation('mpay24AutoClearing', false)->save();
222
- $this->_createInvoice($order, true, true, $onlineCapture);
223
- } else
224
- $this->_createInvoice($order, true, $mif, $onlineCapture);
225
- $order->save();
 
 
 
226
  }
227
 
228
- $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
229
- $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
230
-
231
- if($order->getIsNotVirtual()) {
232
- $s = Mage::getStoreConfig('payment/mpay24/paid_order_status');
233
- } else {
234
- $s = Mage_Sales_Model_Order::STATE_COMPLETE;
235
- }
236
 
237
  $order->addStatusToHistory($s, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("BILLED") .' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]', true)->save();
 
238
  $order->save();
239
- break;
240
-
241
- case 'CREDITED':
242
- if ($order->getTotalOnlineRefunded() == 0.00) {
243
- $creditmemo = Mage::getModel('sales/service_order', $order)
244
- ->prepareCreditmemo()
245
- ->setPaymentRefundDisallowed(true)
246
- ->setAutomaticallyCreated(true)
247
- ->register();
248
 
249
- $creditmemo->addComment(Mage::helper('mpay24')->__("Credit memo has been created automatically through of MI/F crediting!"));
250
- $creditmemo->save();
251
 
252
- $order->getPayment()->refund($creditmemo)->save();
253
-
254
- $order->sendOrderUpdateEmail();
255
- }
256
 
257
- $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
258
- $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
259
 
260
- $this->_addChildTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND,
261
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
262
 
263
- $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_COMPLETE, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("CREDITED") . ' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]')->save();
264
- $order->save();
265
 
266
- break;
267
- case 'SUSPENDED':
268
- if($order->getId()){
269
- $order->getPayment()->setAdditionalInformation('mpay_tid', $soapTransactionStatusResult->getData('MPAYTID'))->save();
270
- $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
271
- $order->getPayment()->setAdditionalInformation('error', false)->save();
272
- $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("SUSPENDED") . ' [ '.$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]');
273
- }
274
- $order->save();
275
- break;
276
-
277
- case 'REVERSED':
278
- if($order->getState() != Mage_Sales_Model_Order::STATE_CANCELED)
279
- foreach ($order->getInvoiceCollection() as $orderInvoice) {
280
- $order->getPayment()->setAdditionalInformation('MIFReverse', true)->save();
281
- $order->getPayment()->void($orderInvoice)->save();
282
- }
283
 
284
- $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
285
- $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
286
-
287
- $order->sendOrderUpdateEmail();
288
  $order->addStatusToHistory($order->getState(), Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("REVERSED") .' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]', true)->save();
289
  $order->save();
290
- break;
291
-
292
- case 'ERROR':
293
- $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
294
  $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
295
  $order->getPayment()->setAdditionalInformation('error', true)->save();
296
 
297
  if($order->canCancel() && $order->getState() != Mage_Sales_Model_Order::STATE_CANCELED && $order->getData('status') != Mage_Sales_Model_Order::STATE_CANCELED)
298
  $order->cancel($order->getPayment())->save();
299
 
300
- $order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("ERROR") . " " . $order->getPayment()->getAdditionalInformation('error_text'));
301
  $order->save();
302
 
303
- break;
304
- default:
305
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
306
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
 
308
- if(in_array($mPAY24Result->getParam('TSTATUS'), array("RESERVED", "BILLED", "CREDITED")) && Mage::getStoreConfig('mpay24/mpay24/billingAddressMode') == "ReadWrite"){
309
- if(!$mPAY24Result->getParam('BILLING_ADDR') || $mPAY24Result->getParam('BILLING_ADDR') == ''){
310
- $billingAddressMode = new Mage_Core_Model_Config();
311
- $billingAddressMode->saveConfig('mpay24/mpay24/billingAddressMode', 'ReadOnly', 'default', "");
312
-
313
- $request = $this->getRequest();
314
-
315
- $template = $this->_initTemplate('id');
316
-
317
- $template->setTemplateSubject(Mage::helper('mpay24')->__("ATTENTION!"))
318
- ->setTemplateCode('ADDR_MODE')
319
- ->setTemplateText('<table>
320
- <thead>
321
- <tr>
322
- <th>'.Mage::helper('mpay24')->__("The billing address las not returned by mPAY24!").'</th>
323
- </tr>
324
- </thead>
325
- <tbody>
326
- <tr>
327
- <td>
328
- <p>
329
- {{var reason}}
330
- </p>
331
- </td>
332
- </tr>
333
- </tbody>
334
- </table>');
335
-
336
- // The Id you just marked...
337
- if (!$template->getId()) {
338
- $template->setTemplateType(Mage_Core_Model_Email_Template::TYPE_HTML);
339
- }
340
-
341
- if($request->getParam('_change_type_flag')) {
342
- $template->setTemplateType(Mage_Core_Model_Email_Template::TYPE_TEXT);
343
- $template->setTemplateStyles('');
344
- }
345
-
346
- $template->save();
347
-
348
-
349
- // Define the sender, here we query Magento default email (in the configuration)
350
- // For customer support email, use : 'trans_email/ident_support/...'
351
- $sender = Array('name' => Mage::getStoreConfig('trans_email/ident_general/name'),
352
- 'email' => Mage::getStoreConfig('trans_email/ident_general/email'));
353
-
354
- // Set you store
355
- // This information may be taken from the current logged in user
356
- $store = Mage::app()->getStore();
357
-
358
- // In this array, you set the variables you use in your template
359
- $vars = Array(
360
- 'reason' => Mage::helper('mpay24')->__("ATTENTION! - It is possible that the billing address for the order ID '") .
361
- $order->getIncrementId() . Mage::helper('mpay24')->__("was changed by the customer, but not in your shop! The billing address mode was set back to 'ReadOnly'! If you want to use the mode 'ReadWrite', the variable 'BILLING_ADDR' has to be activated for the 'TRANSACTIONSTATUS' request by mPAY24. Please contact (including your merchant ID '") . Mage::getStoreConfig('mpay24/mpay24as/merchantid')
362
- . Mage::helper('mpay24')->__("') mPAY24 (support@mpay24.com)!"));
363
-
364
- // You don't care about this...
365
- $translate = Mage::getSingleton('core/translate');
366
-
367
- // Send your email
368
- Mage::getModel('core/email_template')->sendTransactional($template->getId(),
369
- $sender,
370
- Mage::getStoreConfig('trans_email/ident_general/email'),
371
- Mage::getStoreConfig('trans_email/ident_general/name'),
372
- $vars,
373
- $store->getId());
374
-
375
- // You don't care as well
376
- $translate->setTranslateInline(true);
377
-
378
- $template->delete();
379
- } else {
380
- $billingAddress = new DOMDocument();
381
- $billingAddress->loadXML(trim($mPAY24Result->getParam('BILLING_ADDR')));
382
- $billingAddress->saveXML();
383
-
384
- $name = $billingAddress->getElementsByTagName("Name")->item(0)->nodeValue;
385
- $street = $billingAddress->getElementsByTagName("Street")->item(0)->nodeValue;
386
- $street2 = $billingAddress->getElementsByTagName("Street2")->item(0)->nodeValue;
387
- $zip = $billingAddress->getElementsByTagName("Zip")->item(0)->nodeValue;
388
- $city = $billingAddress->getElementsByTagName("City")->item(0)->nodeValue;
389
- $countryCode = $billingAddress->getElementsByTagName("Country")->item(0)->getAttribute("code");
390
-
391
- //Build billing address for customer, for checkout
392
- if(strpos($name, " ")) {
393
- $_billing_address = array (
394
- 'firstname' => substr($name, 0, strpos($name, " ")),
395
- 'lastname' => substr($name, strpos($name, " ")+1),
396
- 'street' => array (
397
- '0' => $street,
398
- '1' => $street2,
399
- ),
400
-
401
- 'city' => $city,
402
- 'postcode' => $zip,
403
- 'country_id' => $countryCode,
404
- 'prefix' => '',
405
- 'middlename' => '',
406
- 'suffix' => '',
407
- 'company' => '',
408
- 'region' => '',
409
- 'region_id' => '',
410
- 'telephone' => '',
411
- 'fax' => ''
412
- );
413
- } else {
414
- $_billing_address = array (
415
- 'firstname' => $name,
416
- 'lastname' => '',
417
- 'street' => array (
418
- '0' => $street,
419
- '1' => $street2,
420
- ),
421
-
422
- 'city' => $city,
423
- 'postcode' => $zip,
424
- 'country_id' => $countryCode,
425
- 'prefix' => '',
426
- 'middlename' => '',
427
- 'suffix' => '',
428
- 'company' => '',
429
- 'region' => '',
430
- 'region_id' => '',
431
- 'telephone' => '',
432
- 'fax' => ''
433
- );
434
- }
435
-
436
- if(Mage::helper('customer')->isLoggedIn()){
437
- $addressAlreadySaved = false;
438
- foreach(Mage::getSingleton('customer/session')->getCustomer()->getAddressesCollection() as $a){
439
- if($a->getFirstname() == substr($name, 0, strpos($name, " ")) && $a->getLastname() == substr($name, strpos($name, " ")+1)
440
- && $a->getStreet1() == $street && $a->getStreet2() == $street2 && $a->getCity() == $city
441
- && $a->getPostcode() == $zip && $a->getCountry() == $countryCode){
442
- $addressAlreadySaved = true;
443
- }
444
- }
445
- if(!$addressAlreadySaved){
446
- $billAddress = Mage::getModel('customer/address');
447
- $billAddress->setData($_billing_address)
448
- ->setCustomerId(Mage::getSingleton('customer/session')->getCustomer()->getId())
449
- ->setIsDefaultBilling('0')
450
- ->setIsDefaultShipping('0')
451
- ->setSaveInAddressBook('1');
452
-
453
- $billAddress->save();
454
- }
455
- }
456
-
457
- // set Billing Address
458
- $addressId = $order->getBillingAddress()->getId();
459
- $address = Mage::getModel('sales/order_address')->load($addressId);
460
- $address->addData($_billing_address);
461
- $address->implodeStreetAddress()->save();Mage::log($_billing_address);
462
-
463
- $order->setBillingAddress($address);
464
- $order->save();
465
- }
466
  }
 
 
 
 
 
 
467
 
 
 
 
 
468
  } else {
469
  if($order->canCancel() && $order->getState() != Mage_Sales_Model_Order::STATE_CANCELED && $order->getData('status') != Mage_Sales_Model_Order::STATE_CANCELED)
470
  $order->cancel($order->getPayment())->save();
@@ -474,9 +491,7 @@ class Mpay24_Mpay24_PaymentController extends Mage_Core_Controller_Front_Action
474
  $order->getPayment()->setAdditionalInformation('mpay_tid', 'N/A')->save();
475
  $order->getPayment()->setAdditionalInformation('appr_code', 'N/A')->save();
476
  }
477
-
478
  break;
479
-
480
  case "ERROR":
481
  if($mPAY24Result->getReturnCode() == 'NOT_FOUND' && $order->getPayment()->getAdditionalInformation('cancelButton'))
482
  $updateResult = 'The order was canceled by the customer';
@@ -490,98 +505,96 @@ class Mpay24_Mpay24_PaymentController extends Mage_Core_Controller_Front_Action
490
  $order->getPayment()->setAdditionalInformation('status', true)->save();
491
  $order->getPayment()->setAdditionalInformation('mpay_tid', 'N/A')->save();
492
  $order->getPayment()->setAdditionalInformation('appr_code', 'N/A')->save();
493
-
494
  break;
495
-
496
  default:
497
  break;
498
  }
499
- }
500
-
501
- return $updateResult;
502
  }
503
 
504
- protected function _initTemplate($idFieldName = 'template_id') {
505
- $this->_title($this->__('System'))->_title($this->__('Transactional Emails'));
 
506
 
507
- $id = (int)$this->getRequest()->getParam($idFieldName);
508
- $model = Mage::getModel('adminhtml/email_template');
509
- if ($id) {
510
- $model->load($id);
511
- }
512
- if (!Mage::registry('email_template')) {
513
- Mage::register('email_template', $model);
514
- }
515
- if (!Mage::registry('current_email_template')) {
516
- Mage::register('current_email_template', $model);
517
- }
518
- return $model;
519
- }
 
520
 
521
- public function _createInvoice($order, $capture=false, $mif=false, $onlineCapture=true) {
522
- if ($order->canInvoice()) {
523
- $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
524
- if (!$invoice->getTotalQty()) {
525
- Mage::throwException(Mage::helper('core')->__('Cannot create an invoice without products.'));
526
- }
527
- if($capture && $onlineCapture)
528
- $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
529
 
530
- $invoice->register();
 
531
 
532
- Mage::getModel('core/resource_transaction')
533
- ->addObject($invoice)
534
- ->addObject($invoice->getOrder())
535
- ->save();
 
 
536
 
537
- $order->save();
538
 
539
- if($capture) {
540
- foreach ($order->getInvoiceCollection() as $orderInvoice) {
541
- if ($order->getTotalPaid() == 0.00) {
542
- $orderInvoice->pay();
543
- $orderInvoice->save();
544
- if($mif)
545
- $order->getPayment()->setAdditionalInformation('MIFClear', true)->save();
546
- $order->getPayment()->capture($orderInvoice)->save();
547
- }
548
- }
549
- }
550
 
551
- $invoice->sendEmail(true, '');
552
- return true;
553
- } else {
554
  Mage::throwException(Mage::helper('core')->__('Cannot create an invoice.'));
555
- }
556
- }
557
 
558
- /**
559
- * @abstract Add transaction to payment with defined type
560
- *
561
- * @param String $typeTarget
562
- * @param String $typeParent
563
- */
564
- protected function _addChildTransaction($typeTarget, $typeParent = Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH) {
565
- $payment = $this->getOrder()->getPayment();
566
- $parentTransactionId = $this->getOrder()->getIncrementId();
567
-
568
- if ($typeParent != Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH) {
569
- $parentTransactionId .= '-' . $typeParent;
570
- } else {
571
- $payment->setIsTransactionClosed(false);
572
- }
573
-
574
- $parentTransaction = $payment->getTransaction($parentTransactionId);
575
-
576
- if ($parentTransaction) {
577
- $payment->setParentTransactionId($parentTransactionId)
578
- ->setTransactionId($parentTransactionId . '-' . $typeTarget)
579
- ->addTransaction($typeTarget);
580
-
581
- if ($this->getOrder()->getTotalDue() < .0001) {
582
- $parentTransaction->setIsClosed(true)
583
- ->save();
584
- }
585
- }
586
- }
587
  }
22
  class Mpay24_Mpay24_PaymentController extends Mage_Core_Controller_Front_Action {
23
 
24
  protected function _expireAjax() {
25
+ Mage::log('mPAY24 Extension: expireAjax called');
26
+ if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
27
+ $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
28
+ exit;
29
  }
30
+ }
31
 
32
+ /**
33
+ * @abstract Redirect to mPAY24 pay page
34
+ */
35
  public function redirectAction() {
36
+ Mage::log('mPAY24 Extension: redirect action called');
37
  $order = $this->getOrder();
38
  $order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__("Redirected to mPAY24 pay page"));
39
  $order->save();
44
  * @abstract Is called from mPAY24 as Confirmation-URL. Send TRANSACTION-STATUS request to mPAY24
45
  */
46
  public function confirmationAction() {
47
+ Mage::log('mPAY24 Extension: confirmation action called for order '.$_REQUEST['TID']);
48
 
49
  $this->getResponse()->setBody("OK: " . MPay24MagentoShop::MAGENTO_VERSION . " - confirmation received");
50
 
51
+ $result = $this->getRequest()->getParams();
52
 
53
+ $order = Mage::getModel('sales/order');
54
+ $order->loadByIncrementId($result['TID']);
55
 
56
+ Mage::log('mPAY24 Extension: RESULT from confirmation action:'."\n");
57
+ Mage::log($result);
 
 
 
 
 
 
 
 
 
58
 
59
+ switch($result['OPERATION']) {
60
+ case 'CONFIRMATION':
61
+ $this->getTransactionStatus($result['TID'], true);
62
+ break;
63
+ default:
64
+ break;
65
+ }
66
  }
67
 
68
  public function indexAction() {
69
+ Mage::log('mPAY24 Extension: index action called');
70
  $this->loadLayout();
71
  $this->renderLayout();
72
+ }
73
 
74
+ public function paymentAction() {
75
+ Mage::log('mPAY24 Extension: payment action called');
76
+ $this->loadLayout();
77
  $this->renderLayout();
78
+ }
79
 
80
+ /**
81
+ * @abstract Is called from mPAY24 as Success-URL. Send TRANSACTION-STATUS request to mPAY24
82
+ */
83
  public function successAction() {
84
+ Mage::log('mPAY24 Extension: success action called for order '.$_REQUEST['TID']);
85
  $order = $this->getOrder($_REQUEST['TID']);
 
86
  $order->getPayment()->setAdditionalInformation('success', true)->save();
87
  $this->getTransactionStatus($_REQUEST['TID']);
88
  $this->_redirect('sales/order/view/order_id/'.$order->getId().'/');
89
+ }
90
 
91
+ /**
92
+ * @abstract Is called from mPAY24 as Success-URL for not registered customers. Send TRANSACTION-STATUS request to mPAY24
93
+ */
94
+ public function guestsuccessAction() {
95
+ Mage::log('mPAY24 Extension: guest success action called for order '.$_REQUEST['TID']);
96
+ $order = $this->getOrder($_REQUEST['TID']);
97
+ Mage::log('success guest action called for order '.$order->getData('increment_id'));
98
+ $order->getPayment()->setAdditionalInformation('success', true)->save();
99
+ $this->getTransactionStatus($_REQUEST['TID']);
100
+ $this->_redirect('checkout/onepage/success/');
101
+ }
102
 
103
+ /**
104
+ * @abstract Is called from mPAY24 as Error-URL. Send TRANSACTION-STATUS request to mPAY24
105
+ */
106
+ public function errorAction() {
107
+ Mage::log('mPAY24 Extension: error action called for order '.$_REQUEST['TID']);
108
+ $order = $this->getOrder($_REQUEST['TID']);
109
+ Mage::log('error action called for order '.$order->getData('increment_id'));
110
+ $order->getPayment()->setAdditionalInformation('error_text', utf8_encode($_REQUEST['ERROR']))->save();
111
+ $order->getPayment()->setAdditionalInformation('error', true)->save();
112
+ $this->getTransactionStatus();
113
 
114
  Mage::getSingleton('mpay24/session')->setParentRedirectUrl('sales/order/view/order_id/'.$order->getId().'/');
115
  $this->getResponse()->setBody($this->getLayout()->createBlock("mpay24/parentRedirect")->toHtml());
116
+ }
117
 
118
+ /**
119
+ * @abstract Is called from mPAY24 as Cancel-URL. Send TRANSACTION-STATUS request to mPAY24
120
+ */
121
  public function cancelAction() {
122
+ Mage::log('mPAY24 Extension: cancel action called for order '.$_REQUEST['TID']);
123
  $order = $this->getOrder($_REQUEST['TID']);
124
  Mage::log('cancel action called for order '.$order->getData('increment_id'));
125
  $order->getPayment()->setAdditionalInformation('cancelButton', true)->save();
128
 
129
  Mage::getSingleton('mpay24/session')->setParentRedirectUrl('sales/order/view/order_id/'.$order->getId().'/');
130
  $this->getResponse()->setBody($this->getLayout()->createBlock("mpay24/parentRedirect")->toHtml());
131
+ }
132
 
133
+ public function getCheckout() {
134
+ Mage::log('mPAY24 Extension: get checkout called');
135
+ return Mage::getSingleton('checkout/session');
136
+ }
137
 
138
  /**
139
+ * @abstract Get the order for a tid
140
+ * @param String $tid
141
+ * @return Mage_Sales_Model_Order The order with the $tid
142
+ */
143
+ public function getOrder($tid=null) {
144
+ Mage::log('mPAY24 Extension: get order called');
145
+ $order = Mage::getSingleton('sales/order');
 
 
 
 
146
 
147
+ if($tid == null)
148
+ return $order->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
149
+ else
150
+ return $order->loadByIncrementId($tid);
151
+ }
152
+
153
+ /**
154
+ * @abstract Synchronize the transaction status with mPAY24
155
+ * @param String $tid
156
+ * @param Boolean $confirmation
157
+ * @return String
158
+ */
159
+ public function getTransactionStatus($tid=null, $confirmation=false) {
160
+ Mage::log('mPAY24 Extension: getTransactionStatus called for order '.$tid);
161
  $auth_refund = array("CC", "CB", "MAESTRO", "PAYPAL", "ELV", "PB", "MPASS", "INVOICE", "HP", "SAFETYPAY");
162
  $updateResult = "";
163
  $order = $this->getOrder($tid);
164
+
165
+ $confirmationCalled = "Payment ";
166
 
167
+ if($confirmation)
168
+ $confirmationCalled = "Confirmation URL called: Payment ";
169
 
170
 
171
+ $incrementId = $order->getData('increment_id');
172
+ $tid = $order->getId();
173
 
174
+ if($order->getPayment()) {
175
+ if(!$confirmation || !in_array($this->getRequest()->getClientIp(), explode(',', Mage::getStoreConfig('mpay24/mpay24as/allowed_ips')))) {
176
+ $mPay24MagentoShop = MPay24MagentoShop::getMPay24Api();
177
+ $mPAY24Result = $mPay24MagentoShop->updateTransactionStatus($incrementId);
178
+ $res = $mPAY24Result->getGeneralResponse()->getStatus();
179
+ $status = $mPAY24Result->getParam('TSTATUS');
180
+
181
+ if($mPAY24Result->getGeneralResponse()->getStatus() != 'OK' || $mPAY24Result->getParam('APPR_CODE') == '')
182
+ $apprCode = 'N/A';
183
+ else
184
+ $apprCode = $mPAY24Result->getParam('APPR_CODE');
185
+ } else {
186
+ $mPAY24Result = new TransactionStatusResponse("");
187
+ $res = "OK";
188
 
189
+ foreach($this->getRequest()->getParams() as $key => $value)
190
+ $mPAY24Result->setParam($key, $value);
191
+
192
+ $status = $mPAY24Result->getParam('STATUS');
193
+ $apprCode = $mPAY24Result->getParam('APPR_CODE');
194
+ }
195
+
196
+ switch ($res) {
197
  case "OK":
198
  if($order->getPayment()->getAdditionalInformation('user_field') == $mPAY24Result->getParam('USER_FIELD')) {
199
  $updateResult = "The transaction status was succesfully updated!";
200
 
201
+ $order->getPayment()->setAdditionalData($mPAY24Result->getParam("P_TYPE"))->save();
202
+ $order->getPayment()->setCcType($mPAY24Result->getParam('BRAND'))->save();
203
+ $order->getPayment()->setAdditionalInformation('status', true)->save();
204
+ $updateResult .= "\n\nActual status: " . $mPAY24Result->getParam('STATUS ');
205
+ $updateResult .= "\nAmount: " . number_format($mPAY24Result->getParam('PRICE')/100, 2, '.', '') . " " . $mPAY24Result->getParam('CURRENCY');
206
+ $updateResult .= "\nMPAYTID: " . $mPAY24Result->getParam('MPAYTID');
207
+ $updateResult .= "\nAppr_code: " . $apprCode;
208
+
209
+ if($order->getIsNotVirtual())
210
+ $s = Mage::getStoreConfig('payment/mpay24/paid_order_status');
211
+ else
212
+ $s = Mage_Sales_Model_Order::STATE_COMPLETE;
213
+
214
+ switch($status) {
215
+ case 'RESERVED':
216
+ if($order->getId()){
217
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
218
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
219
+ $order->getPayment()->setAmountAuthorized($mPAY24Result->getParam('PRICE')/100)->save();
220
+ $order->getPayment()->setAdditionalInformation('error', false)->save();
221
+ $order->addStatusToHistory($s, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("RESERVED") . ' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]');
222
+ $order->sendNewOrderEmail();
223
+
224
+ if($order->getInvoiceCollection()->count() == 0)
225
+ if(Mage::getStoreConfig('payment/mpay24/paid_payment_action') == MPay24MagentoShop::PAYMENT_TYPE_SALE) {
226
+ $order->getPayment()->setAdditionalInformation('mpay24AutoClearing', true)->save();
227
+ $this->_createInvoice($order, true);
228
+ } else
229
+ $this->_createInvoice($order);
230
+ }
231
 
232
+ $order->save();
233
+ break;
234
+ case 'BILLED':
235
+ if($order->getInvoiceCollection()->count() == 0) {
236
+ if(in_array($mPAY24Result->getParam('P_TYPE'), MPay24MagentoShop::getAllowedAuth())) {
237
+ $onlineCapture = false;
238
+ $mif = true;
239
+ } else {
240
+ $onlineCapture = true;
241
+ $mif = false;
242
+ }
 
 
 
 
 
 
 
 
243
 
244
+ $order->getPayment()->setAmountCharged($mPAY24Result->getParam('PRICE')/100)->save();
245
+ $order->getPayment()->setAdditionalInformation('error', false)->save();
246
  $order->sendOrderUpdateEmail();
247
+
248
+ if($order->getInvoiceCollection()->count() == 0 && !$order->getPayment()->getAdditionalInformation('mpay24AutoClearing')) {
249
+ if($confirmation) {
250
+ $order->getPayment()->setAdditionalInformation('mpay24AutoClearing', false)->save();
251
+ $this->_createInvoice($order, true, true, $onlineCapture);
252
+ } else
253
+ $this->_createInvoice($order, true, $mif, $onlineCapture);
254
+ $order->save();
255
+ }
256
  }
257
 
258
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
259
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
 
 
 
 
 
 
260
 
261
  $order->addStatusToHistory($s, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("BILLED") .' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]', true)->save();
262
+
263
  $order->save();
264
+ break;
265
+ case 'CREDITED':
266
+ if ($order->getTotalOnlineRefunded() == 0.00) {
267
+ $creditmemo = Mage::getModel('sales/service_order', $order)
268
+ ->prepareCreditmemo()
269
+ ->setPaymentRefundDisallowed(true)
270
+ ->setAutomaticallyCreated(true)
271
+ ->register();
 
272
 
273
+ $creditmemo->addComment(Mage::helper('mpay24')->__("Credit memo has been created automatically through of MI/F crediting!"));
274
+ $creditmemo->save();
275
 
276
+ $order->getPayment()->refund($creditmemo)->save();
277
+ $order->sendOrderUpdateEmail();
278
+ }
 
279
 
280
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
281
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
282
 
283
+ $this->_addChildTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND,
284
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
285
 
286
+ $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_COMPLETE, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("CREDITED") . ' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]')->save();
287
+ $order->save();
288
 
289
+ break;
290
+ case 'SUSPENDED':
291
+ if($order->getId()) {
292
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $soapTransactionStatusResult->getData('MPAYTID'))->save();
293
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
294
+ $order->getPayment()->setAdditionalInformation('error', false)->save();
295
+ $order->addStatusToHistory(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("SUSPENDED") . ' [ '.$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]');
296
+ }
297
+ $order->save();
298
+ break;
299
+ case 'REVERSED':
300
+ if($order->getState() != Mage_Sales_Model_Order::STATE_CANCELED)
301
+ foreach ($order->getInvoiceCollection() as $orderInvoice) {
302
+ $order->getPayment()->setAdditionalInformation('MIFReverse', true)->save();
303
+ $order->getPayment()->void($orderInvoice)->save();
304
+ }
 
305
 
306
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
307
+ $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
308
+ $order->sendOrderUpdateEmail();
 
309
  $order->addStatusToHistory($order->getState(), Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("REVERSED") .' [ ' . $mPAY24Result->getParam('CURRENCY') . " " .$order->formatPriceTxt($mPAY24Result->getParam('PRICE')/100).' ]', true)->save();
310
  $order->save();
311
+ break;
312
+ case 'ERROR':
313
+ $order->getPayment()->setAdditionalInformation('mpay_tid', $mPAY24Result->getParam('MPAYTID'))->save();
 
314
  $order->getPayment()->setAdditionalInformation('appr_code', $apprCode)->save();
315
  $order->getPayment()->setAdditionalInformation('error', true)->save();
316
 
317
  if($order->canCancel() && $order->getState() != Mage_Sales_Model_Order::STATE_CANCELED && $order->getData('status') != Mage_Sales_Model_Order::STATE_CANCELED)
318
  $order->cancel($order->getPayment())->save();
319
 
320
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('mpay24')->__("$confirmationCalled") . Mage::helper('mpay24')->__("ERROR") . " " . $order->getPayment()->getAdditionalInformation('error_text'));
321
  $order->save();
322
 
323
+ break;
324
+ default:
325
+ break;
326
+ }
327
+
328
+ if(in_array($mPAY24Result->getParam('TSTATUS'), array("RESERVED", "BILLED", "CREDITED")) && Mage::getStoreConfig('mpay24/mpay24/billingAddressMode') == "ReadWrite") {
329
+ if(!$mPAY24Result->getParam('BILLING_ADDR') || $mPAY24Result->getParam('BILLING_ADDR') == '') {
330
+ $billingAddressMode = new Mage_Core_Model_Config();
331
+ $billingAddressMode->saveConfig('mpay24/mpay24/billingAddressMode', 'ReadOnly', 'default', "");
332
+
333
+ $request = $this->getRequest();
334
+
335
+ $template = $this->_initTemplate('id');
336
+
337
+ $template->setTemplateSubject(Mage::helper('mpay24')->__("ATTENTION!"))
338
+ ->setTemplateCode('ADDR_MODE')
339
+ ->setTemplateText('<table>
340
+ <thead>
341
+ <tr>
342
+ <th>'.Mage::helper('mpay24')->__("The billing address las not returned by mPAY24!").'</th>
343
+ </tr>
344
+ </thead>
345
+ <tbody>
346
+ <tr>
347
+ <td>
348
+ <p>
349
+ {{var reason}}
350
+ </p>
351
+ </td>
352
+ </tr>
353
+ </tbody>
354
+ </table>');
355
+
356
+ // The Id you just marked...
357
+ if (!$template->getId())
358
+ $template->setTemplateType(Mage_Core_Model_Email_Template::TYPE_HTML);
359
+
360
+ if($request->getParam('_change_type_flag')) {
361
+ $template->setTemplateType(Mage_Core_Model_Email_Template::TYPE_TEXT);
362
+ $template->setTemplateStyles('');
363
  }
364
+
365
+ $template->save();
366
+
367
+
368
+ // Define the sender, here we query Magento default email (in the configuration)
369
+ // For customer support email, use : 'trans_email/ident_support/...'
370
+ $sender = Array('name' => Mage::getStoreConfig('trans_email/ident_general/name'),
371
+ 'email' => Mage::getStoreConfig('trans_email/ident_general/email'));
372
+
373
+ // Set you store
374
+ // This information may be taken from the current logged in user
375
+ $store = Mage::app()->getStore();
376
+
377
+ // In this array, you set the variables you use in your template
378
+ $vars = Array(
379
+ 'reason' => Mage::helper('mpay24')->__("ATTENTION! - It is possible that the billing address for the order ID '") .
380
+ $order->getIncrementId() . Mage::helper('mpay24')->__("was changed by the customer, but not in your shop! The billing address mode was set back to 'ReadOnly'! If you want to use the mode 'ReadWrite', the variable 'BILLING_ADDR' has to be activated for the 'TRANSACTIONSTATUS' request by mPAY24. Please contact (including your merchant ID '") . Mage::getStoreConfig('mpay24/mpay24as/merchantid')
381
+ . Mage::helper('mpay24')->__("') mPAY24 (support@mpay24.com)!"));
382
+
383
+ // You don't care about this...
384
+ $translate = Mage::getSingleton('core/translate');
385
 
386
+ // Send your email
387
+ Mage::getModel('core/email_template')->sendTransactional($template->getId(),
388
+ $sender,
389
+ Mage::getStoreConfig('trans_email/ident_general/email'),
390
+ Mage::getStoreConfig('trans_email/ident_general/name'),
391
+ $vars,
392
+ $store->getId());
393
+
394
+ // You don't care as well
395
+ $translate->setTranslateInline(true);
396
+
397
+ $template->delete();
398
+ } else {
399
+ $billingAddress = new DOMDocument();
400
+ $billingAddress->loadXML(trim($mPAY24Result->getParam('BILLING_ADDR')));
401
+ $billingAddress->saveXML();
402
+
403
+ $name = $billingAddress->getElementsByTagName("Name")->item(0)->nodeValue;
404
+ $street = $billingAddress->getElementsByTagName("Street")->item(0)->nodeValue;
405
+ $street2 = $billingAddress->getElementsByTagName("Street2")->item(0)->nodeValue;
406
+ $zip = $billingAddress->getElementsByTagName("Zip")->item(0)->nodeValue;
407
+ $city = $billingAddress->getElementsByTagName("City")->item(0)->nodeValue;
408
+ $countryCode = $billingAddress->getElementsByTagName("Country")->item(0)->getAttribute("code");
409
+
410
+ //Build billing address for customer, for checkout
411
+ if(strpos($name, " "))
412
+ $_billing_address = array (
413
+ 'firstname' => substr($name, 0, strpos($name, " ")),
414
+ 'lastname' => substr($name, strpos($name, " ")+1),
415
+ 'street' => array (
416
+ '0' => $street,
417
+ '1' => $street2,
418
+ ),
419
+
420
+ 'city' => $city,
421
+ 'postcode' => $zip,
422
+ 'country_id' => $countryCode,
423
+ 'prefix' => '',
424
+ 'middlename' => '',
425
+ 'suffix' => '',
426
+ 'company' => '',
427
+ 'region' => '',
428
+ 'region_id' => '',
429
+ 'telephone' => '',
430
+ 'fax' => ''
431
+ );
432
+ else
433
+ $_billing_address = array (
434
+ 'firstname' => $name,
435
+ 'lastname' => '',
436
+ 'street' => array (
437
+ '0' => $street,
438
+ '1' => $street2,
439
+ ),
440
+
441
+ 'city' => $city,
442
+ 'postcode' => $zip,
443
+ 'country_id' => $countryCode,
444
+ 'prefix' => '',
445
+ 'middlename' => '',
446
+ 'suffix' => '',
447
+ 'company' => '',
448
+ 'region' => '',
449
+ 'region_id' => '',
450
+ 'telephone' => '',
451
+ 'fax' => ''
452
+ );
453
+
454
+ if(Mage::helper('customer')->isLoggedIn()) {
455
+ $addressAlreadySaved = false;
456
+
457
+ foreach(Mage::getSingleton('customer/session')->getCustomer()->getAddressesCollection() as $a)
458
+ if($a->getFirstname() == substr($name, 0, strpos($name, " ")) && $a->getLastname() == substr($name, strpos($name, " ")+1)
459
+ && $a->getStreet1() == $street && $a->getStreet2() == $street2 && $a->getCity() == $city
460
+ && $a->getPostcode() == $zip && $a->getCountry() == $countryCode)
461
+ $addressAlreadySaved = true;
462
+
463
+ if(!$addressAlreadySaved) {
464
+ $billAddress = Mage::getModel('customer/address');
465
+ $billAddress->setData($_billing_address)
466
+ ->setCustomerId(Mage::getSingleton('customer/session')->getCustomer()->getId())
467
+ ->setIsDefaultBilling('0')
468
+ ->setIsDefaultShipping('0')
469
+ ->setSaveInAddressBook('1');
470
+
471
+ $billAddress->save();
472
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  }
474
+
475
+ // set Billing Address
476
+ $addressId = $order->getBillingAddress()->getId();
477
+ $address = Mage::getModel('sales/order_address')->load($addressId);
478
+ $address->addData($_billing_address);
479
+ $address->implodeStreetAddress()->save();Mage::log($_billing_address);
480
 
481
+ $order->setBillingAddress($address);
482
+ $order->save();
483
+ }
484
+ }
485
  } else {
486
  if($order->canCancel() && $order->getState() != Mage_Sales_Model_Order::STATE_CANCELED && $order->getData('status') != Mage_Sales_Model_Order::STATE_CANCELED)
487
  $order->cancel($order->getPayment())->save();
491
  $order->getPayment()->setAdditionalInformation('mpay_tid', 'N/A')->save();
492
  $order->getPayment()->setAdditionalInformation('appr_code', 'N/A')->save();
493
  }
 
494
  break;
 
495
  case "ERROR":
496
  if($mPAY24Result->getReturnCode() == 'NOT_FOUND' && $order->getPayment()->getAdditionalInformation('cancelButton'))
497
  $updateResult = 'The order was canceled by the customer';
505
  $order->getPayment()->setAdditionalInformation('status', true)->save();
506
  $order->getPayment()->setAdditionalInformation('mpay_tid', 'N/A')->save();
507
  $order->getPayment()->setAdditionalInformation('appr_code', 'N/A')->save();
 
508
  break;
 
509
  default:
510
  break;
511
  }
512
+ }
513
+ return $updateResult;
 
514
  }
515
 
516
+ protected function _initTemplate($idFieldName = 'template_id') {
517
+ Mage::log('mPAY24 Extension: initTemplate called');
518
+ $this->_title($this->__('System'))->_title($this->__('Transactional Emails'));
519
 
520
+ $id = (int)$this->getRequest()->getParam($idFieldName);
521
+ $model = Mage::getModel('adminhtml/email_template');
522
+
523
+ if ($id)
524
+ $model->load($id);
525
+
526
+ if (!Mage::registry('email_template'))
527
+ Mage::register('email_template', $model);
528
+
529
+ if (!Mage::registry('current_email_template'))
530
+ Mage::register('current_email_template', $model);
531
+
532
+ return $model;
533
+ }
534
 
535
+ public function _createInvoice($order, $capture=false, $mif=false, $onlineCapture=true) {
536
+ Mage::log('mPAY24 Extension: create invoice called');
537
+ if ($order->canInvoice()) {
538
+ $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
539
+
540
+ if (!$invoice->getTotalQty())
541
+ Mage::throwException(Mage::helper('core')->__('Cannot create an invoice without products.'));
 
542
 
543
+ if($capture && $onlineCapture)
544
+ $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
545
 
546
+ $invoice->register();Mage::log("Invoice registered!");
547
+
548
+ Mage::getModel('core/resource_transaction')
549
+ ->addObject($invoice)
550
+ ->addObject($invoice->getOrder())
551
+ ->save();
552
 
553
+ $order->save();
554
 
555
+ if($capture)
556
+ foreach ($order->getInvoiceCollection() as $orderInvoice)
557
+ if ($order->getTotalPaid() == 0.00) {
558
+ $orderInvoice->pay();
559
+ $orderInvoice->save();
560
+
561
+ if($mif)
562
+ $order->getPayment()->setAdditionalInformation('MIFClear', true)->save();
563
+
564
+ $order->getPayment()->capture($orderInvoice)->save();
565
+ }
566
 
567
+ $invoice->sendEmail(true, '');
568
+ return true;
569
+ } else
570
  Mage::throwException(Mage::helper('core')->__('Cannot create an invoice.'));
571
+ }
 
572
 
573
+ /**
574
+ * @abstract Add transaction to payment with defined type
575
+ *
576
+ * @param String $typeTarget
577
+ * @param String $typeParent
578
+ */
579
+ protected function _addChildTransaction($typeTarget, $typeParent = Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH) {
580
+ Mage::log('mPAY24 Extension: addChildTransaction called');
581
+ $payment = $this->getOrder()->getPayment();
582
+ $parentTransactionId = $this->getOrder()->getIncrementId();
583
+
584
+ if ($typeParent != Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH)
585
+ $parentTransactionId .= '-' . $typeParent;
586
+ else
587
+ $payment->setIsTransactionClosed(false);
588
+
589
+ $parentTransaction = $payment->getTransaction($parentTransactionId);
590
+
591
+ if ($parentTransaction) {
592
+ $payment->setParentTransactionId($parentTransactionId)
593
+ ->setTransactionId($parentTransactionId . '-' . $typeTarget)
594
+ ->addTransaction($typeTarget);
595
+
596
+ if ($this->getOrder()->getTotalDue() < .0001)
597
+ $parentTransaction->setIsClosed(true)->save();
598
+ }
599
+ }
 
 
600
  }
app/code/community/Mpay24/Mpay24/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Mpay24_Mpay24>
5
- <version>1.3.0</version>
6
  </Mpay24_Mpay24>
7
  </modules>
8
 
@@ -169,6 +169,7 @@
169
  <soap_pass backend_model="adminhtml/system_config_backend_encrypted"/>
170
  <debug>1</debug>
171
  <use_proxy>0</use_proxy>
 
172
  </mpay24as>
173
  <mpay24sporder>
174
  <style>margin-left: auto; margin-right: auto; width: 600px;</style>
2
  <config>
3
  <modules>
4
  <Mpay24_Mpay24>
5
+ <version>1.4.3</version>
6
  </Mpay24_Mpay24>
7
  </modules>
8
 
169
  <soap_pass backend_model="adminhtml/system_config_backend_encrypted"/>
170
  <debug>1</debug>
171
  <use_proxy>0</use_proxy>
172
+ <allowed_ips>213.164.23.169,213.164.25.245,127.0.0.1</allowed_ips>
173
  </mpay24as>
174
  <mpay24sporder>
175
  <style>margin-left: auto; margin-right: auto; width: 600px;</style>
app/code/community/Mpay24/Mpay24/etc/system.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <config>
3
- <sections>
4
- <mpay24 translate="label" module="mpay24">
5
  <label>mPAY24</label>
6
  <tab>sales</tab>
7
  <frontend_type>text</frontend_type>
@@ -19,7 +19,7 @@
19
  <show_in_website>1</show_in_website>
20
  <show_in_store>1</show_in_store>
21
  <fields>
22
- <active translate="label comment">
23
  <label>mPAY24 enabled</label>
24
  <frontend_type>select</frontend_type>
25
  <source_model>adminhtml/system_config_source_yesno</source_model>
@@ -27,67 +27,74 @@
27
  <sort_order>0</sort_order>
28
  <show_in_default>1</show_in_default>
29
  <show_in_website>1</show_in_website>
 
30
  </active>
31
- <title translate="label">
32
- <label>Title</label>
33
- <config_path>payment/mpay24/title</config_path>
34
- <frontend_type>text</frontend_type>
35
- <sort_order>1</sort_order>
36
- <show_in_default>1</show_in_default>
37
- <show_in_website>1</show_in_website>
38
- <depends><active>1</active></depends>
39
- </title>
40
- <system translate="comment">
 
41
  <label>System</label>
42
  <frontend_type>select</frontend_type>
43
  <source_model>mpay24/source_system</source_model>
44
  <sort_order>2</sort_order>
45
  <show_in_default>1</show_in_default>
46
  <show_in_website>1</show_in_website>
 
47
  <depends><active>1</active></depends>
48
  <comment>When switching the system, please set the right merchant ID and SOAP password!</comment>
49
  </system>
50
- <merchantid translate="label">
51
- <label>Merchant ID</label>
52
  <frontend_type>text</frontend_type>
53
  <backend_model>mpay24/system_config_backend_encrypted</backend_model>
54
  <sort_order>3</sort_order>
55
  <show_in_default>1</show_in_default>
56
  <show_in_website>1</show_in_website>
 
57
  <depends><active>1</active></depends>
58
  <comment>The Merchant ID provided by mPAY24</comment>
59
  </merchantid>
60
  <old_merchantid>
61
- <label>OLD Merchant ID</label>
62
  <frontend_type>text</frontend_type>
63
  <sort_order>3</sort_order>
64
  </old_merchantid>
65
- <soap_pass translate="label">
66
- <label>SOAP password</label>
67
  <frontend_type>password</frontend_type>
68
  <backend_model>mpay24/system_config_backend_encrypted</backend_model>
69
  <sort_order>4</sort_order>
70
  <show_in_default>1</show_in_default>
71
  <show_in_website>1</show_in_website>
 
72
  <depends><active>1</active></depends>
73
  <comment>The SOAP password provided by mPAY24</comment>
74
  </soap_pass>
75
  <debug>
76
  <label>Debug</label>
77
  <frontend_type>select</frontend_type>
78
- <source_model>adminhtml/system_config_source_yesno</source_model>
79
  <sort_order>5</sort_order>
80
  <show_in_default>1</show_in_default>
81
  <show_in_website>1</show_in_website>
 
82
  <depends><active>1</active></depends>
83
  </debug>
84
- <use_proxy translate="label">
85
  <label>API uses proxy</label>
86
  <frontend_type>select</frontend_type>
87
- <source_model>adminhtml/system_config_source_yesno</source_model>
88
  <sort_order>7</sort_order>
89
  <show_in_default>1</show_in_default>
90
  <show_in_website>1</show_in_website>
 
91
  <depends><active>1</active></depends>
92
  </use_proxy>
93
  <proxy_host translate="label">
@@ -96,6 +103,7 @@
96
  <sort_order>8</sort_order>
97
  <show_in_default>1</show_in_default>
98
  <show_in_website>1</show_in_website>
 
99
  <depends><use_proxy>1</use_proxy></depends>
100
  </proxy_host>
101
  <proxy_port translate="label">
@@ -104,8 +112,18 @@
104
  <sort_order>9</sort_order>
105
  <show_in_default>1</show_in_default>
106
  <show_in_website>1</show_in_website>
 
107
  <depends><use_proxy>1</use_proxy></depends>
108
  </proxy_port>
 
 
 
 
 
 
 
 
 
109
  </fields>
110
  </mpay24as>
111
 
@@ -118,7 +136,7 @@
118
  <show_in_website>1</show_in_website>
119
  <show_in_store>1</show_in_store>
120
  <fields>
121
- <style translate="label">
122
  <label>Style</label>
123
  <frontend_type>text</frontend_type>
124
  <sort_order>101</sort_order>
@@ -214,8 +232,8 @@
214
  <show_in_website>1</show_in_website>
215
  <show_in_store>0</show_in_store>
216
  </footerstyle>
217
- </fields>
218
- </mpay24sporder>
219
  <mpay24spsc translate="label">
220
  <label>mPAY24 Selectpayment ShoppingCart Design</label>
221
  <frontend_type>text</frontend_type>
@@ -225,7 +243,7 @@
225
  <show_in_website>1</show_in_website>
226
  <show_in_store>1</show_in_store>
227
  <fields>
228
- <sc_row translate="label">
229
  <label>ShoppingCart Rows</label>
230
  <frontend_type>multiselect</frontend_type>
231
  <sort_order>50</sort_order>
@@ -234,159 +252,159 @@
234
  <show_in_website>1</show_in_website>
235
  <show_in_store>0</show_in_store>
236
  </sc_row>
237
- <sc_style translate="label">
238
- <label>Style</label>
239
- <frontend_type>text</frontend_type>
240
- <sort_order>101</sort_order>
241
- <show_in_default>1</show_in_default>
242
- <show_in_website>1</show_in_website>
243
- <show_in_store>0</show_in_store>
244
- </sc_style>
245
- <sc_header translate="label">
246
- <label>Header</label>
247
- <frontend_type>text</frontend_type>
248
- <sort_order>102</sort_order>
249
- <show_in_default>1</show_in_default>
250
- <show_in_website>1</show_in_website>
251
- <show_in_store>0</show_in_store>
252
- </sc_header>
253
- <sc_headerstyle translate="label">
254
- <label>HeaderStyle</label>
255
- <frontend_type>text</frontend_type>
256
- <sort_order>103</sort_order>
257
- <show_in_default>1</show_in_default>
258
- <show_in_website>1</show_in_website>
259
- <show_in_store>0</show_in_store>
260
- </sc_headerstyle>
261
- <sc_captionstyle translate="label">
262
- <label>CaptionStyle</label>
263
- <frontend_type>text</frontend_type>
264
- <sort_order>104</sort_order>
265
- <show_in_default>1</show_in_default>
266
- <show_in_website>1</show_in_website>
267
- <show_in_store>0</show_in_store>
268
- </sc_captionstyle>
269
- <sc_numberheader translate="label">
270
- <label>NumberHeader</label>
271
- <frontend_type>text</frontend_type>
272
- <sort_order>105</sort_order>
273
- <show_in_default>1</show_in_default>
274
- <show_in_website>1</show_in_website>
275
- <show_in_store>0</show_in_store>
276
- </sc_numberheader>
277
- <sc_numberstyle translate="label">
278
- <label>NumberStyle</label>
279
- <frontend_type>text</frontend_type>
280
- <sort_order>106</sort_order>
281
- <show_in_default>1</show_in_default>
282
- <show_in_website>1</show_in_website>
283
- <show_in_store>0</show_in_store>
284
- </sc_numberstyle>
285
- <sc_productnrheader translate="label">
286
- <label>ProductNrHeader</label>
287
- <frontend_type>text</frontend_type>
288
- <sort_order>107</sort_order>
289
- <show_in_default>1</show_in_default>
290
- <show_in_website>1</show_in_website>
291
- <show_in_store>0</show_in_store>
292
- </sc_productnrheader>
293
- <sc_productnrstyle translate="label">
294
- <label>ProductNrStyle</label>
295
- <frontend_type>text</frontend_type>
296
- <sort_order>108</sort_order>
297
- <show_in_default>1</show_in_default>
298
- <show_in_website>1</show_in_website>
299
- <show_in_store>0</show_in_store>
300
- </sc_productnrstyle>
301
- <sc_descriptionheader translate="label">
302
- <label>DescriptionHeader</label>
303
- <frontend_type>text</frontend_type>
304
- <sort_order>109</sort_order>
305
- <show_in_default>1</show_in_default>
306
- <show_in_website>1</show_in_website>
307
- <show_in_store>0</show_in_store>
308
- </sc_descriptionheader>
309
- <sc_descriptionstyle translate="label">
310
- <label>DescriptionStyle</label>
311
- <frontend_type>text</frontend_type>
312
- <sort_order>110</sort_order>
313
- <show_in_default>1</show_in_default>
314
- <show_in_website>1</show_in_website>
315
- <show_in_store>0</show_in_store>
316
- </sc_descriptionstyle>
317
- <sc_packageheader translate="label">
318
- <label>PackageHeader</label>
319
- <frontend_type>text</frontend_type>
320
- <sort_order>111</sort_order>
321
- <show_in_default>1</show_in_default>
322
- <show_in_website>1</show_in_website>
323
- <show_in_store>0</show_in_store>
324
- </sc_packageheader>
325
- <sc_packagestyle translate="label">
326
- <label>PackageStyle</label>
327
- <frontend_type>text</frontend_type>
328
- <sort_order>112</sort_order>
329
- <show_in_default>1</show_in_default>
330
- <show_in_website>1</show_in_website>
331
- <show_in_store>0</show_in_store>
332
- </sc_packagestyle>
333
- <sc_quantityheader translate="label">
334
- <label>QuantityHeader</label>
335
- <frontend_type>text</frontend_type>
336
- <sort_order>113</sort_order>
337
- <show_in_default>1</show_in_default>
338
- <show_in_website>1</show_in_website>
339
- <show_in_store>0</show_in_store>
340
- </sc_quantityheader>
341
- <sc_quantitystyle translate="label">
342
- <label>QuantityStyle</label>
343
- <frontend_type>text</frontend_type>
344
- <sort_order>114</sort_order>
345
- <show_in_default>1</show_in_default>
346
- <show_in_website>1</show_in_website>
347
- <show_in_store>0</show_in_store>
348
- </sc_quantitystyle>
349
- <sc_itempriceheader translate="label">
350
- <label>ItemPriceHeader</label>
351
- <frontend_type>text</frontend_type>
352
- <sort_order>115</sort_order>
353
- <show_in_default>1</show_in_default>
354
- <show_in_website>1</show_in_website>
355
- <show_in_store>0</show_in_store>
356
- </sc_itempriceheader>
357
- <sc_itempricestyle translate="label">
358
- <label>ItemPriceStyle</label>
359
- <frontend_type>text</frontend_type>
360
- <sort_order>116</sort_order>
361
- <show_in_default>1</show_in_default>
362
- <show_in_website>1</show_in_website>
363
- <show_in_store>0</show_in_store>
364
- </sc_itempricestyle>
365
- <sc_priceheader translate="label">
366
- <label>PriceHeader</label>
367
- <frontend_type>text</frontend_type>
368
- <sort_order>117</sort_order>
369
- <show_in_default>1</show_in_default>
370
- <show_in_website>1</show_in_website>
371
- <show_in_store>0</show_in_store>
372
- </sc_priceheader>
373
- <sc_pricestyle translate="label">
374
- <label>PriceStyle</label>
375
- <frontend_type>text</frontend_type>
376
- <sort_order>118</sort_order>
377
- <show_in_default>1</show_in_default>
378
- <show_in_website>1</show_in_website>
379
- <show_in_store>0</show_in_store>
380
- </sc_pricestyle>
381
- <description translate="label">
382
- <label>Description</label>
383
- <frontend_type>text</frontend_type>
384
- <sort_order>119</sort_order>
385
- <show_in_default>1</show_in_default>
386
- <show_in_website>1</show_in_website>$value == 'JCB'
387
- <show_in_store>0</show_in_store>
388
- </description>
389
- <item_style1 translate="label">
390
  <label>ItemStyle Line 1</label>
391
  <frontend_type>text</frontend_type>
392
  <sort_order>120</sort_order>
@@ -394,7 +412,7 @@
394
  <show_in_website>1</show_in_website>
395
  <show_in_store>0</show_in_store>
396
  </item_style1>
397
- <item_style2 translate="label">
398
  <label>ItemStyle Line 2</label>
399
  <frontend_type>text</frontend_type>
400
  <sort_order>121</sort_order>
@@ -474,7 +492,7 @@
474
  <show_in_website>1</show_in_website>
475
  <show_in_store>0</show_in_store>
476
  </price_style>
477
- <subtotal_header translate="label">
478
  <label>Subtotal Header</label>
479
  <frontend_type>text</frontend_type>
480
  <sort_order>135</sort_order>
@@ -499,17 +517,18 @@
499
  <show_in_store>0</show_in_store>
500
  </subtotal_style>
501
  </fields>
502
- </mpay24spsc> -->
503
-
504
- <mpay24 translate="label" module="mpay24">
505
- <label>Payment systems</label>
506
- <expanded>1</expanded>
507
- <frontend_type>text</frontend_type>
508
- <frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
509
- <sort_order>5</sort_order>
510
- <show_in_default>1</show_in_default>
511
- <show_in_website>1</show_in_website>
512
- <fields>
 
513
  <active_payments>
514
  <label>Active payments</label>
515
  <frontend_type>text</frontend_type>
@@ -523,17 +542,18 @@
523
  <frontend_type>text</frontend_type>
524
  </payments_count>
525
  <payments_error>
526
- <label>Payments error</label>
527
  <frontend_type>text</frontend_type>
528
  </payments_error>
529
- <payments_active transalte="label comment">
530
- <label>Payment systems</label>
531
  <frontend_type>select</frontend_type>
532
  <source_model>mpay24/source_paymentsActive</source_model>
533
  <sort_order>0</sort_order>
534
  <show_in_default>1</show_in_default>
535
- <show_in_website>1</show_in_website>
536
- <comment>Your customers can choose the payment system in the shop only by 'Custom configuration'! The payment systems will be synchronized when the settings are saved!</comment>
 
537
  </payments_active>
538
  <form_template translate="label comment">
539
  <label>Payment system selection</label>
@@ -542,498 +562,553 @@
542
  <sort_order>0</sort_order>
543
  <show_in_default>1</show_in_default>
544
  <show_in_website>1</show_in_website>
 
545
  <comment>Choose the way the mPAY24 systems are shown in the fronend (checkout)</comment>
546
  <depends><payments_active>true</payments_active></depends>
547
  </form_template>
548
- <ps_1>
549
- <label>PS_1</label>
550
- <frontend_type>select</frontend_type>
551
- <source_model>adminhtml/system_config_source_yesno</source_model>
552
- <sort_order>1</sort_order>
553
- <show_in_default>1</show_in_default>
554
- <show_in_website>1</show_in_website>
555
- <depends><payments_active>true</payments_active></depends>
556
- </ps_1>
557
- <ps_2>
558
- <label>PS_2</label>
559
- <frontend_type>select</frontend_type>
560
- <source_model>adminhtml/system_config_source_yesno</source_model>
561
- <sort_order>2</sort_order>
562
- <show_in_default>1</show_in_default>
563
- <show_in_website>1</show_in_website>
564
- <depends><payments_active>true</payments_active></depends>
565
- </ps_2>
566
- <ps_3>
567
- <label>PS_3</label>
568
- <frontend_type>select</frontend_type>
569
- <source_model>adminhtml/system_config_source_yesno</source_model>
570
- <sort_order>3</sort_order>
571
- <show_in_default>1</show_in_default>
572
- <show_in_website>1</show_in_website>
573
- <depends><payments_active>true</payments_active></depends>
574
- </ps_3>
575
- <ps_4>
576
- <label>PS_4</label>
577
- <frontend_type>select</frontend_type>
578
- <source_model>adminhtml/system_config_source_yesno</source_model>
579
- <sort_order>4</sort_order>
580
- <show_in_default>1</show_in_default>
581
- <show_in_website>1</show_in_website>
582
- <depends><payments_active>true</payments_active></depends>
583
- </ps_4>
584
- <ps_5>
585
- <label>PS_5</label>
586
- <frontend_type>select</frontend_type>
587
- <source_model>adminhtml/system_config_source_yesno</source_model>
588
- <sort_order>5</sort_order>
589
- <show_in_default>1</show_in_default>
590
- <show_in_website>1</show_in_website>
591
- <depends><payments_active>true</payments_active></depends>
592
- </ps_5>
593
- <ps_6>
594
- <label>PS_6</label>
595
- <frontend_type>select</frontend_type>
596
- <source_model>adminhtml/system_config_source_yesno</source_model>
597
- <sort_order>6</sort_order>
598
- <show_in_default>1</show_in_default>
599
- <show_in_website>1</show_in_website>
600
- <depends><payments_active>true</payments_active></depends>
601
- </ps_6>
602
- <ps_7>
603
- <label>PS_7</label>
604
- <frontend_type>select</frontend_type>
605
- <source_model>adminhtml/system_config_source_yesno</source_model>
606
- <sort_order>7</sort_order>
607
- <show_in_default>1</show_in_default>
608
- <show_in_website>1</show_in_website>
609
- <depends><payments_active>true</payments_active></depends>
610
- </ps_7>
611
- <ps_8>
612
- <label>PS_8</label>
613
- <frontend_type>select</frontend_type>
614
- <source_model>adminhtml/system_config_source_yesno</source_model>
615
- <sort_order>8</sort_order>
616
- <show_in_default>1</show_in_default>
617
- <show_in_website>1</show_in_website>
618
- <depends><payments_active>true</payments_active></depends>
619
- </ps_8>
620
- <ps_9>
621
- <label>PS_9</label>
622
- <frontend_type>select</frontend_type>
623
- <source_model>adminhtml/system_config_source_yesno</source_model>
624
- <sort_order>9</sort_order>
625
- <show_in_default>1</show_in_default>
626
- <show_in_website>1</show_in_website>
627
- <depends><payments_active>true</payments_active></depends>
628
- </ps_9>
629
- <ps_10>
630
- <label>PS_10</label>
631
- <frontend_type>select</frontend_type>
632
- <source_model>adminhtml/system_config_source_yesno</source_model>
633
- <sort_order>10</sort_order>
634
- <show_in_default>1</show_in_default>
635
- <show_in_website>1</show_in_website>
636
- <depends><payments_active>true</payments_active></depends>
637
- </ps_10>
638
- <ps_11>
639
- <label>PS_11</label>
640
- <frontend_type>select</frontend_type>
641
- <source_model>adminhtml/system_config_source_yesno</source_model>
642
- <sort_order>11</sort_order>
643
- <show_in_default>1</show_in_default>
644
- <show_in_website>1</show_in_website>
645
- <depends><payments_active>true</payments_active></depends>
646
- </ps_11>
647
- <ps_12>
648
- <label>PS_12</label>
649
- <frontend_type>select</frontend_type>
650
- <source_model>adminhtml/system_config_source_yesno</source_model>
651
- <sort_order>12</sort_order>
652
- <show_in_default>1</show_in_default>
653
- <show_in_website>1</show_in_website>
654
- <depends><payments_active>true</payments_active></depends>
655
- </ps_12>
656
- <ps_13>
657
- <label>PS_13</label>
658
- <frontend_type>select</frontend_type>
659
- <source_model>adminhtml/system_config_source_yesno</source_model>
660
- <sort_order>13</sort_order>
661
- <show_in_default>1</show_in_default>
662
- <show_in_website>1</show_in_website>
663
- <depends><payments_active>true</payments_active></depends>
664
- </ps_13>
665
- <ps_14>
666
- <label>PS_14</label>
667
- <frontend_type>select</frontend_type>
668
- <source_model>adminhtml/system_config_source_yesno</source_model>
669
- <sort_order>14</sort_order>
670
- <show_in_default>1</show_in_default>
671
- <show_in_website>1</show_in_website>
672
- <depends><payments_active>true</payments_active></depends>
673
- </ps_14>
674
- <ps_15>
675
- <label>PS_15</label>
676
- <frontend_type>select</frontend_type>
677
- <source_model>adminhtml/system_config_source_yesno</source_model>
678
- <sort_order>15</sort_order>
679
- <show_in_default>1</show_in_default>
680
- <show_in_website>1</show_in_website>
681
- <depends><payments_active>true</payments_active></depends>
682
- </ps_15>
683
- <ps_16>
684
- <label>PS_16</label>
685
- <frontend_type>select</frontend_type>
686
- <source_model>adminhtml/system_config_source_yesno</source_model>
687
- <sort_order>16</sort_order>
688
- <show_in_default>1</show_in_default>
689
- <show_in_website>1</show_in_website>
690
- <depends><payments_active>true</payments_active></depends>
691
- </ps_16>
692
- <ps_17>
693
- <label>PS_17</label>
694
- <frontend_type>select</frontend_type>
695
- <source_model>adminhtml/system_config_source_yesno</source_model>
696
- <sort_order>17</sort_order>
697
- <show_in_default>1</show_in_default>
698
- <show_in_website>1</show_in_website>
699
- <depends><payments_active>true</payments_active></depends>
700
- </ps_17>
701
- <ps_18>
702
- <label>PS_18</label>
703
- <frontend_type>select</frontend_type>
704
- <source_model>adminhtml/system_config_source_yesno</source_model>
705
- <sort_order>18</sort_order>
706
- <show_in_default>1</show_in_default>
707
- <show_in_website>1</show_in_website>
708
- <depends><payments_active>true</payments_active></depends>
709
- </ps_18>
710
- <ps_19>
711
- <label>PS_19</label>
712
- <frontend_type>select</frontend_type>
713
- <source_model>adminhtml/system_config_source_yesno</source_model>
714
- <sort_order>19</sort_order>
715
- <show_in_default>1</show_in_default>
716
- <show_in_website>1</show_in_website>
717
- <depends><payments_active>true</payments_active></depends>
718
- </ps_19>
719
- <ps_20>
720
- <label>PS_20</label>
721
- <frontend_type>select</frontend_type>
722
- <source_model>adminhtml/system_config_source_yesno</source_model>
723
- <sort_order>20</sort_order>
724
- <show_in_default>1</show_in_default>
725
- <show_in_website>1</show_in_website>
726
- <depends><payments_active>true</payments_active></depends>
727
- </ps_20>
728
- <ps_21>
729
- <label>PS_21</label>
730
- <frontend_type>select</frontend_type>
731
- <source_model>adminhtml/system_config_source_yesno</source_model>
732
- <sort_order>21</sort_order>
733
- <show_in_default>1</show_in_default>
734
- <show_in_website>1</show_in_website>
735
- <depends><payments_active>true</payments_active></depends>
736
- </ps_21>
737
- <ps_22>
738
- <label>PS_22</label>
739
- <frontend_type>select</frontend_type>
740
- <source_model>adminhtml/system_config_source_yesno</source_model>
741
- <sort_order>22</sort_order>
742
- <show_in_default>1</show_in_default>
743
- <show_in_website>1</show_in_website>
744
- <depends><payments_active>true</payments_active></depends>
745
- </ps_22>
746
- <ps_23>
747
- <label>PS_23</label>
748
- <frontend_type>select</frontend_type>
749
- <source_model>adminhtml/system_config_source_yesno</source_model>
750
- <sort_order>23</sort_order>
751
- <show_in_default>1</show_in_default>
752
- <show_in_website>1</show_in_website>
753
- <depends><payments_active>true</payments_active></depends>
754
- </ps_23>
755
- <ps_24>
756
- <label>PS_24</label>
757
- <frontend_type>select</frontend_type>
758
- <source_model>adminhtml/system_config_source_yesno</source_model>
759
- <sort_order>24</sort_order>
760
- <show_in_default>1</show_in_default>
761
- <show_in_website>1</show_in_website>
762
- <depends><payments_active>true</payments_active></depends>
763
- </ps_24>
764
- <ps_25>
765
- <label>PS_25</label>
766
- <frontend_type>select</frontend_type>
767
- <source_model>adminhtml/system_config_source_yesno</source_model>
768
- <sort_order>25</sort_order>
769
- <show_in_default>1</show_in_default>
770
- <show_in_website>1</show_in_website>
771
- <depends><payments_active>true</payments_active></depends>
772
- </ps_25>
773
- <ps_26>
774
- <label>PS_26</label>
775
- <frontend_type>select</frontend_type>
776
- <source_model>adminhtml/system_config_source_yesno</source_model>
777
- <sort_order>26</sort_order>
778
- <show_in_default>1</show_in_default>
779
- <show_in_website>1</show_in_website>
780
- <depends><payments_active>true</payments_active></depends>
781
- </ps_26>
782
- <ps_27>
783
- <label>PS_27</label>
784
- <frontend_type>select</frontend_type>
785
- <source_model>adminhtml/system_config_source_yesno</source_model>
786
- <sort_order>27</sort_order>
787
- <show_in_default>1</show_in_default>
788
- <show_in_website>1</show_in_website>
789
- <depends><payments_active>true</payments_active></depends>
790
- </ps_27>
791
- <ps_28>
792
- <label>PS_28</label>
793
- <frontend_type>select</frontend_type>
794
- <source_model>adminhtml/system_config_source_yesno</source_model>
795
- <sort_order>28</sort_order>
796
- <show_in_default>1</show_in_default>
797
- <show_in_website>1</show_in_website>
798
- <depends><payments_active>true</payments_active></depends>
799
- </ps_28>
800
- <ps_29>
801
- <label>PS_29</label>
802
- <frontend_type>select</frontend_type>
803
- <source_model>adminhtml/system_config_source_yesno</source_model>
804
- <sort_order>29</sort_order>
805
- <show_in_default>1</show_in_default>
806
- <show_in_website>1</show_in_website>
807
- <depends><payments_active>true</payments_active></depends>
808
- </ps_29>
809
- <ps_30>
810
- <label>PS_30</label>
811
- <frontend_type>select</frontend_type>
812
- <source_model>adminhtml/system_config_source_yesno</source_model>
813
- <sort_order>30</sort_order>
814
- <show_in_default>1</show_in_default>
815
- <show_in_website>1</show_in_website>
816
- <depends><payments_active>true</payments_active></depends>
817
- </ps_30>
818
- <ps_31>
819
- <label>PS_31</label>
820
- <frontend_type>select</frontend_type>
821
- <source_model>adminhtml/system_config_source_yesno</source_model>
822
- <sort_order>31</sort_order>
823
- <show_in_default>1</show_in_default>
824
- <show_in_website>1</show_in_website>
825
- <depends><payments_active>true</payments_active></depends>
826
- </ps_31>
827
- <ps_32>
828
- <label>PS_32</label>
829
- <frontend_type>select</frontend_type>
830
- <source_model>adminhtml/system_config_source_yesno</source_model>
831
- <sort_order>32</sort_order>
832
- <show_in_default>1</show_in_default>
833
- <show_in_website>1</show_in_website>
834
- <depends><payments_active>true</payments_active></depends>
835
- </ps_32>
836
- <ps_33>
837
- <label>PS_33</label>
838
- <frontend_type>select</frontend_type>
839
- <source_model>adminhtml/system_config_source_yesno</source_model>
840
- <sort_order>33</sort_order>
841
- <show_in_default>1</show_in_default>
842
- <show_in_website>1</show_in_website>
843
- <depends><payments_active>true</payments_active></depends>
844
- </ps_33>
845
- <ps_34>
846
- <label>PS_34</label>
847
- <frontend_type>select</frontend_type>
848
- <source_model>adminhtml/system_config_source_yesno</source_model>
849
- <sort_order>34</sort_order>
850
- <show_in_default>1</show_in_default>
851
- <show_in_website>1</show_in_website>
852
- <depends><payments_active>true</payments_active></depends>
853
- </ps_34>
854
- <ps_35>
855
- <label>PS_35</label>
856
- <frontend_type>select</frontend_type>
857
- <source_model>adminhtml/system_config_source_yesno</source_model>
858
- <sort_order>35</sort_order>
859
- <show_in_default>1</show_in_default>
860
- <show_in_website>1</show_in_website>
861
- <depends><payments_active>true</payments_active></depends>
862
- </ps_35>
863
- <ps_36>
864
- <label>PS_36</label>
865
- <frontend_type>select</frontend_type>
866
- <source_model>adminhtml/system_config_source_yesno</source_model>
867
- <sort_order>36</sort_order>
868
- <show_in_default>1</show_in_default>
869
- <show_in_website>1</show_in_website>
870
- <depends><payments_active>true</payments_active></depends>
871
- </ps_36>
872
- <ps_37>
873
- <label>PS_37</label>
874
- <frontend_type>select</frontend_type>
875
- <source_model>adminhtml/system_config_source_yesno</source_model>
876
- <sort_order>37</sort_order>
877
- <show_in_default>1</show_in_default>
878
- <show_in_website>1</show_in_website>
879
- <depends><payments_active>true</payments_active></depends>
880
- </ps_37>
881
- <ps_38>
882
- <label>PS_38</label>
883
- <frontend_type>select</frontend_type>
884
- <source_model>adminhtml/system_config_source_yesno</source_model>
885
- <sort_order>38</sort_order>
886
- <show_in_default>1</show_in_default>
887
- <show_in_website>1</show_in_website>
888
- <depends><payments_active>true</payments_active></depends>
889
- </ps_38>
890
- <ps_39>
891
- <label>PS_39</label>
892
- <frontend_type>select</frontend_type>
893
- <source_model>adminhtml/system_config_source_yesno</source_model>
894
- <sort_order>39</sort_order>
895
- <show_in_default>1</show_in_default>
896
- <show_in_website>1</show_in_website>
897
- <depends><payments_active>true</payments_active></depends>
898
- </ps_39>
899
- <ps_40>
900
- <label>PS_40</label>
901
- <frontend_type>select</frontend_type>
902
- <source_model>adminhtml/system_config_source_yesno</source_model>
903
- <sort_order>40</sort_order>
904
- <show_in_default>1</show_in_default>
905
- <show_in_website>1</show_in_website>
906
- <depends><payments_active>true</payments_active></depends>
907
- </ps_40>
908
- <ps_41>
909
- <label>PS_41</label>
910
- <frontend_type>select</frontend_type>
911
- <source_model>adminhtml/system_config_source_yesno</source_model>
912
- <sort_order>41</sort_order>
913
- <show_in_default>1</show_in_default>
914
- <show_in_website>1</show_in_website>
915
- <depends><payments_active>true</payments_active></depends>
916
- </ps_41>
917
- <ps_42>
918
- <label>PS_42</label>
919
- <frontend_type>select</frontend_type>
920
- <source_model>adminhtml/system_config_source_yesno</source_model>
921
- <sort_order>42</sort_order>
922
- <show_in_default>1</show_in_default>
923
- <show_in_website>1</show_in_website>
924
- <depends><payments_active>true</payments_active></depends>
925
- </ps_42>
926
- <ps_43>
927
- <label>PS_43</label>
928
- <frontend_type>select</frontend_type>
929
- <source_model>adminhtml/system_config_source_yesno</source_model>
930
- <sort_order>43</sort_order>
931
- <show_in_default>1</show_in_default>
932
- <show_in_website>1</show_in_website>
933
- <depends><payments_active>true</payments_active></depends>
934
- </ps_43>
935
- <ps_44>
936
- <label>PS_44</label>
937
- <frontend_type>select</frontend_type>
938
- <source_model>adminhtml/system_config_source_yesno</source_model>
939
- <sort_order>44</sort_order>
940
- <show_in_default>1</show_in_default>
941
- <show_in_website>1</show_in_website>
942
- <depends><payments_active>true</payments_active></depends>
943
- </ps_44>
944
- <ps_45>
945
- <label>PS_45</label>
946
- <frontend_type>select</frontend_type>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
947
  <source_model>adminhtml/system_config_source_yesno</source_model>
948
- <sort_order>45</sort_order>
949
- <show_in_default>1</show_in_default>
950
- <show_in_website>1</show_in_website>
951
- <depends><payments_active>true</payments_active></depends>
952
- </ps_45>
953
- <ps_46>
954
- <label>PS_46</label>
955
- <frontend_type>select</frontend_type>
 
956
  <source_model>adminhtml/system_config_source_yesno</source_model>
957
- <sort_order>46</sort_order>
958
- <show_in_default>1</show_in_default>
959
- <show_in_website>1</show_in_website>
960
- <depends><payments_active>true</payments_active></depends>
961
- </ps_46>
962
- <ps_47>
963
- <label>PS_47</label>
964
- <frontend_type>select</frontend_type>
 
965
  <source_model>adminhtml/system_config_source_yesno</source_model>
966
- <sort_order>47</sort_order>
967
- <show_in_default>1</show_in_default>
968
- <show_in_website>1</show_in_website>
969
- <depends><payments_active>true</payments_active></depends>
970
- </ps_47>
971
- <ps_48>
972
- <label>PS_48</label>
973
- <frontend_type>select</frontend_type>
 
974
  <source_model>adminhtml/system_config_source_yesno</source_model>
975
- <sort_order>48</sort_order>
976
- <show_in_default>1</show_in_default>
977
- <show_in_website>1</show_in_website>
978
- <depends><payments_active>true</payments_active></depends>
979
- </ps_48>
980
- <ps_49>
981
- <label>PS_49</label>
982
- <frontend_type>select</frontend_type>
 
983
  <source_model>adminhtml/system_config_source_yesno</source_model>
984
- <sort_order>49</sort_order>
985
- <show_in_default>1</show_in_default>
986
- <show_in_website>1</show_in_website>
987
- <depends><payments_active>true</payments_active></depends>
988
- </ps_49>
989
- <ps_50>
990
- <label>PS_50</label>
991
- <frontend_type>select</frontend_type>
 
 
 
 
 
 
 
 
 
 
 
992
  <source_model>adminhtml/system_config_source_yesno</source_model>
993
- <sort_order>50</sort_order>
994
- <show_in_default>1</show_in_default>
995
- <show_in_website>1</show_in_website>
996
- <depends><payments_active>true</payments_active></depends>
997
- </ps_50>
998
- <payment_action translate="label">
999
- <label>Automatic clearing for credit card payments</label>
1000
- <frontend_type>select</frontend_type>
1001
- <source_model>mpay24/source_clearingAction</source_model>
1002
- <config_path>payment/mpay24/paid_payment_action</config_path>
1003
- <sort_order>106</sort_order>
1004
- <show_in_default>1</show_in_default>
1005
- <show_in_website>1</show_in_website>
1006
- </payment_action>
1007
- <paid_order_status translate="label">
1008
- <label>Status of paid orders</label>
1009
- <frontend_type>select</frontend_type>
1010
- <source_model>mpay24/source_paidOrder</source_model>
1011
- <config_path>payment/mpay24/paid_order_status</config_path>
1012
- <sort_order>107</sort_order>
1013
- <show_in_default>1</show_in_default>
1014
- <show_in_website>1</show_in_website>
1015
- </paid_order_status>
1016
- <billingAddressMode translate="label comment">
 
 
 
1017
  <label>Billing address mode</label>
1018
  <frontend_type>select</frontend_type>
1019
  <source_model>mpay24/source_billAddr</source_model>
1020
  <sort_order>108</sort_order>
1021
  <show_in_default>1</show_in_default>
1022
  <show_in_website>1</show_in_website>
 
1023
  <comment>The mode 'ReadWrite' will only work if the parameter 'BILLING_ADDR' was set by mPAY24. Please contact the mPAY24 Support: support@mpay24.com!</comment>
1024
  </billingAddressMode>
1025
  <show_free_products translate="label comment">
1026
- <label>Show free products</label>
1027
- <frontend_type>select</frontend_type>
1028
  <source_model>adminhtml/system_config_source_yesno</source_model>
1029
- <sort_order>109</sort_order>
1030
- <show_in_default>1</show_in_default>
1031
- <show_in_website>1</show_in_website>
1032
- <comment>Show the free 'children' products of configurable products in the mPAY24 shopping cart</comment>
1033
- </show_free_products>
1034
- </fields>
1035
- </mpay24>
 
1036
  </groups>
1037
- </mpay24>
1038
- </sections>
1039
  </config>
1
  <?xml version="1.0"?>
2
  <config>
3
+ <sections>
4
+ <mpay24 translate="label" module="mpay24">
5
  <label>mPAY24</label>
6
  <tab>sales</tab>
7
  <frontend_type>text</frontend_type>
19
  <show_in_website>1</show_in_website>
20
  <show_in_store>1</show_in_store>
21
  <fields>
22
+ <active translate="label comment">
23
  <label>mPAY24 enabled</label>
24
  <frontend_type>select</frontend_type>
25
  <source_model>adminhtml/system_config_source_yesno</source_model>
27
  <sort_order>0</sort_order>
28
  <show_in_default>1</show_in_default>
29
  <show_in_website>1</show_in_website>
30
+ <show_in_store>1</show_in_store>
31
  </active>
32
+ <title translate="label">
33
+ <label>Title</label>
34
+ <config_path>payment/mpay24/title</config_path>
35
+ <frontend_type>text</frontend_type>
36
+ <sort_order>1</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+ <depends><active>1</active></depends>
41
+ </title>
42
+ <system translate="comment">
43
  <label>System</label>
44
  <frontend_type>select</frontend_type>
45
  <source_model>mpay24/source_system</source_model>
46
  <sort_order>2</sort_order>
47
  <show_in_default>1</show_in_default>
48
  <show_in_website>1</show_in_website>
49
+ <show_in_store>1</show_in_store>
50
  <depends><active>1</active></depends>
51
  <comment>When switching the system, please set the right merchant ID and SOAP password!</comment>
52
  </system>
53
+ <merchantid translate="label">
54
+ <label>Merchant ID</label>
55
  <frontend_type>text</frontend_type>
56
  <backend_model>mpay24/system_config_backend_encrypted</backend_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>1</show_in_store>
61
  <depends><active>1</active></depends>
62
  <comment>The Merchant ID provided by mPAY24</comment>
63
  </merchantid>
64
  <old_merchantid>
65
+ <label>OLD Merchant ID</label>
66
  <frontend_type>text</frontend_type>
67
  <sort_order>3</sort_order>
68
  </old_merchantid>
69
+ <soap_pass translate="label">
70
+ <label>SOAP password</label>
71
  <frontend_type>password</frontend_type>
72
  <backend_model>mpay24/system_config_backend_encrypted</backend_model>
73
  <sort_order>4</sort_order>
74
  <show_in_default>1</show_in_default>
75
  <show_in_website>1</show_in_website>
76
+ <show_in_store>1</show_in_store>
77
  <depends><active>1</active></depends>
78
  <comment>The SOAP password provided by mPAY24</comment>
79
  </soap_pass>
80
  <debug>
81
  <label>Debug</label>
82
  <frontend_type>select</frontend_type>
83
+ <source_model>adminhtml/system_config_source_yesno</source_model>
84
  <sort_order>5</sort_order>
85
  <show_in_default>1</show_in_default>
86
  <show_in_website>1</show_in_website>
87
+ <show_in_store>1</show_in_store>
88
  <depends><active>1</active></depends>
89
  </debug>
90
+ <use_proxy translate="label">
91
  <label>API uses proxy</label>
92
  <frontend_type>select</frontend_type>
93
+ <source_model>adminhtml/system_config_source_yesno</source_model>
94
  <sort_order>7</sort_order>
95
  <show_in_default>1</show_in_default>
96
  <show_in_website>1</show_in_website>
97
+ <show_in_store>1</show_in_store>
98
  <depends><active>1</active></depends>
99
  </use_proxy>
100
  <proxy_host translate="label">
103
  <sort_order>8</sort_order>
104
  <show_in_default>1</show_in_default>
105
  <show_in_website>1</show_in_website>
106
+ <show_in_store>1</show_in_store>
107
  <depends><use_proxy>1</use_proxy></depends>
108
  </proxy_host>
109
  <proxy_port translate="label">
112
  <sort_order>9</sort_order>
113
  <show_in_default>1</show_in_default>
114
  <show_in_website>1</show_in_website>
115
+ <show_in_store>1</show_in_store>
116
  <depends><use_proxy>1</use_proxy></depends>
117
  </proxy_port>
118
+ <allowed_ips translate="label">
119
+ <label>Allowed IPs for the Confirmation</label>
120
+ <frontend_type>multiselect</frontend_type>
121
+ <sort_order>10</sort_order>
122
+ <source_model>mpay24/source_allowedIPs</source_model>
123
+ <show_in_default>1</show_in_default>
124
+ <show_in_website>1</show_in_website>
125
+ <show_in_store>1</show_in_store>
126
+ </allowed_ips>
127
  </fields>
128
  </mpay24as>
129
 
136
  <show_in_website>1</show_in_website>
137
  <show_in_store>1</show_in_store>
138
  <fields>
139
+ <style translate="label">
140
  <label>Style</label>
141
  <frontend_type>text</frontend_type>
142
  <sort_order>101</sort_order>
232
  <show_in_website>1</show_in_website>
233
  <show_in_store>0</show_in_store>
234
  </footerstyle>
235
+ </fields>
236
+ </mpay24sporder>
237
  <mpay24spsc translate="label">
238
  <label>mPAY24 Selectpayment ShoppingCart Design</label>
239
  <frontend_type>text</frontend_type>
243
  <show_in_website>1</show_in_website>
244
  <show_in_store>1</show_in_store>
245
  <fields>
246
+ <sc_row translate="label">
247
  <label>ShoppingCart Rows</label>
248
  <frontend_type>multiselect</frontend_type>
249
  <sort_order>50</sort_order>
252
  <show_in_website>1</show_in_website>
253
  <show_in_store>0</show_in_store>
254
  </sc_row>
255
+ <sc_style translate="label">
256
+ <label>Style</label>
257
+ <frontend_type>text</frontend_type>
258
+ <sort_order>101</sort_order>
259
+ <show_in_default>1</show_in_default>
260
+ <show_in_website>1</show_in_website>
261
+ <show_in_store>0</show_in_store>
262
+ </sc_style>
263
+ <sc_header translate="label">
264
+ <label>Header</label>
265
+ <frontend_type>text</frontend_type>
266
+ <sort_order>102</sort_order>
267
+ <show_in_default>1</show_in_default>
268
+ <show_in_website>1</show_in_website>
269
+ <show_in_store>0</show_in_store>
270
+ </sc_header>
271
+ <sc_headerstyle translate="label">
272
+ <label>HeaderStyle</label>
273
+ <frontend_type>text</frontend_type>
274
+ <sort_order>103</sort_order>
275
+ <show_in_default>1</show_in_default>
276
+ <show_in_website>1</show_in_website>
277
+ <show_in_store>0</show_in_store>
278
+ </sc_headerstyle>
279
+ <sc_captionstyle translate="label">
280
+ <label>CaptionStyle</label>
281
+ <frontend_type>text</frontend_type>
282
+ <sort_order>104</sort_order>
283
+ <show_in_default>1</show_in_default>
284
+ <show_in_website>1</show_in_website>
285
+ <show_in_store>0</show_in_store>
286
+ </sc_captionstyle>
287
+ <sc_numberheader translate="label">
288
+ <label>NumberHeader</label>
289
+ <frontend_type>text</frontend_type>
290
+ <sort_order>105</sort_order>
291
+ <show_in_default>1</show_in_default>
292
+ <show_in_website>1</show_in_website>
293
+ <show_in_store>0</show_in_store>
294
+ </sc_numberheader>
295
+ <sc_numberstyle translate="label">
296
+ <label>NumberStyle</label>
297
+ <frontend_type>text</frontend_type>
298
+ <sort_order>106</sort_order>
299
+ <show_in_default>1</show_in_default>
300
+ <show_in_website>1</show_in_website>
301
+ <show_in_store>0</show_in_store>
302
+ </sc_numberstyle>
303
+ <sc_productnrheader translate="label">
304
+ <label>ProductNrHeader</label>
305
+ <frontend_type>text</frontend_type>
306
+ <sort_order>107</sort_order>
307
+ <show_in_default>1</show_in_default>
308
+ <show_in_website>1</show_in_website>
309
+ <show_in_store>0</show_in_store>
310
+ </sc_productnrheader>
311
+ <sc_productnrstyle translate="label">
312
+ <label>ProductNrStyle</label>
313
+ <frontend_type>text</frontend_type>
314
+ <sort_order>108</sort_order>
315
+ <show_in_default>1</show_in_default>
316
+ <show_in_website>1</show_in_website>
317
+ <show_in_store>0</show_in_store>
318
+ </sc_productnrstyle>
319
+ <sc_descriptionheader translate="label">
320
+ <label>DescriptionHeader</label>
321
+ <frontend_type>text</frontend_type>
322
+ <sort_order>109</sort_order>
323
+ <show_in_default>1</show_in_default>
324
+ <show_in_website>1</show_in_website>
325
+ <show_in_store>0</show_in_store>
326
+ </sc_descriptionheader>
327
+ <sc_descriptionstyle translate="label">
328
+ <label>DescriptionStyle</label>
329
+ <frontend_type>text</frontend_type>
330
+ <sort_order>110</sort_order>
331
+ <show_in_default>1</show_in_default>
332
+ <show_in_website>1</show_in_website>
333
+ <show_in_store>0</show_in_store>
334
+ </sc_descriptionstyle>
335
+ <sc_packageheader translate="label">
336
+ <label>PackageHeader</label>
337
+ <frontend_type>text</frontend_type>
338
+ <sort_order>111</sort_order>
339
+ <show_in_default>1</show_in_default>
340
+ <show_in_website>1</show_in_website>
341
+ <show_in_store>0</show_in_store>
342
+ </sc_packageheader>
343
+ <sc_packagestyle translate="label">
344
+ <label>PackageStyle</label>
345
+ <frontend_type>text</frontend_type>
346
+ <sort_order>112</sort_order>
347
+ <show_in_default>1</show_in_default>
348
+ <show_in_website>1</show_in_website>
349
+ <show_in_store>0</show_in_store>
350
+ </sc_packagestyle>
351
+ <sc_quantityheader translate="label">
352
+ <label>QuantityHeader</label>
353
+ <frontend_type>text</frontend_type>
354
+ <sort_order>113</sort_order>
355
+ <show_in_default>1</show_in_default>
356
+ <show_in_website>1</show_in_website>
357
+ <show_in_store>0</show_in_store>
358
+ </sc_quantityheader>
359
+ <sc_quantitystyle translate="label">
360
+ <label>QuantityStyle</label>
361
+ <frontend_type>text</frontend_type>
362
+ <sort_order>114</sort_order>
363
+ <show_in_default>1</show_in_default>
364
+ <show_in_website>1</show_in_website>
365
+ <show_in_store>0</show_in_store>
366
+ </sc_quantitystyle>
367
+ <sc_itempriceheader translate="label">
368
+ <label>ItemPriceHeader</label>
369
+ <frontend_type>text</frontend_type>
370
+ <sort_order>115</sort_order>
371
+ <show_in_default>1</show_in_default>
372
+ <show_in_website>1</show_in_website>
373
+ <show_in_store>0</show_in_store>
374
+ </sc_itempriceheader>
375
+ <sc_itempricestyle translate="label">
376
+ <label>ItemPriceStyle</label>
377
+ <frontend_type>text</frontend_type>
378
+ <sort_order>116</sort_order>
379
+ <show_in_default>1</show_in_default>
380
+ <show_in_website>1</show_in_website>
381
+ <show_in_store>0</show_in_store>
382
+ </sc_itempricestyle>
383
+ <sc_priceheader translate="label">
384
+ <label>PriceHeader</label>
385
+ <frontend_type>text</frontend_type>
386
+ <sort_order>117</sort_order>
387
+ <show_in_default>1</show_in_default>
388
+ <show_in_website>1</show_in_website>
389
+ <show_in_store>0</show_in_store>
390
+ </sc_priceheader>
391
+ <sc_pricestyle translate="label">
392
+ <label>PriceStyle</label>
393
+ <frontend_type>text</frontend_type>
394
+ <sort_order>118</sort_order>
395
+ <show_in_default>1</show_in_default>
396
+ <show_in_website>1</show_in_website>
397
+ <show_in_store>0</show_in_store>
398
+ </sc_pricestyle>
399
+ <description translate="label">
400
+ <label>Description</label>
401
+ <frontend_type>text</frontend_type>
402
+ <sort_order>119</sort_order>
403
+ <show_in_default>1</show_in_default>
404
+ <show_in_website>1</show_in_website>$value == 'JCB'
405
+ <show_in_store>0</show_in_store>
406
+ </description>
407
+ <item_style1 translate="label">
408
  <label>ItemStyle Line 1</label>
409
  <frontend_type>text</frontend_type>
410
  <sort_order>120</sort_order>
412
  <show_in_website>1</show_in_website>
413
  <show_in_store>0</show_in_store>
414
  </item_style1>
415
+ <item_style2 translate="label">
416
  <label>ItemStyle Line 2</label>
417
  <frontend_type>text</frontend_type>
418
  <sort_order>121</sort_order>
492
  <show_in_website>1</show_in_website>
493
  <show_in_store>0</show_in_store>
494
  </price_style>
495
+ <subtotal_header translate="label">
496
  <label>Subtotal Header</label>
497
  <frontend_type>text</frontend_type>
498
  <sort_order>135</sort_order>
517
  <show_in_store>0</show_in_store>
518
  </subtotal_style>
519
  </fields>
520
+ </mpay24spsc> -->
521
+
522
+ <mpay24 translate="label" module="mpay24">
523
+ <label>Payment systems</label>
524
+ <expanded>1</expanded>
525
+ <frontend_type>text</frontend_type>
526
+ <frontend_model>mpay24/adminhtml_system_config_fieldset_fieldset</frontend_model>
527
+ <sort_order>5</sort_order>
528
+ <show_in_default>1</show_in_default>
529
+ <show_in_website>1</show_in_website>
530
+ <show_in_store>1</show_in_store>
531
+ <fields>
532
  <active_payments>
533
  <label>Active payments</label>
534
  <frontend_type>text</frontend_type>
542
  <frontend_type>text</frontend_type>
543
  </payments_count>
544
  <payments_error>
545
+ <label>Payments error</label>
546
  <frontend_type>text</frontend_type>
547
  </payments_error>
548
+ <payments_active transalte="label comment">
549
+ <label>Payment systems</label>
550
  <frontend_type>select</frontend_type>
551
  <source_model>mpay24/source_paymentsActive</source_model>
552
  <sort_order>0</sort_order>
553
  <show_in_default>1</show_in_default>
554
+ <show_in_website>1</show_in_website>
555
+ <show_in_store>1</show_in_store>
556
+ <comment>Your customers can choose the payment system in the shop only by 'Custom configuration'! The payment systems will be synchronized when the settings are saved!</comment>
557
  </payments_active>
558
  <form_template translate="label comment">
559
  <label>Payment system selection</label>
562
  <sort_order>0</sort_order>
563
  <show_in_default>1</show_in_default>
564
  <show_in_website>1</show_in_website>
565
+ <show_in_store>1</show_in_store>
566
  <comment>Choose the way the mPAY24 systems are shown in the fronend (checkout)</comment>
567
  <depends><payments_active>true</payments_active></depends>
568
  </form_template>
569
+ <ps_1>
570
+ <label>PS_1</label>
571
+ <frontend_type>select</frontend_type>
572
+ <source_model>adminhtml/system_config_source_yesno</source_model>
573
+ <sort_order>1</sort_order>
574
+ <show_in_default>1</show_in_default>
575
+ <show_in_website>1</show_in_website>
576
+ <show_in_store>1</show_in_store>
577
+ <depends><payments_active>true</payments_active></depends>
578
+ </ps_1>
579
+ <ps_2>
580
+ <label>PS_2</label>
581
+ <frontend_type>select</frontend_type>
582
+ <source_model>adminhtml/system_config_source_yesno</source_model>
583
+ <sort_order>2</sort_order>
584
+ <show_in_default>1</show_in_default>
585
+ <show_in_website>1</show_in_website>
586
+ <show_in_store>1</show_in_store>
587
+ <depends><payments_active>true</payments_active></depends>
588
+ </ps_2>
589
+ <ps_3>
590
+ <label>PS_3</label>
591
+ <frontend_type>select</frontend_type>
592
+ <source_model>adminhtml/system_config_source_yesno</source_model>
593
+ <sort_order>3</sort_order>
594
+ <show_in_default>1</show_in_default>
595
+ <show_in_website>1</show_in_website>
596
+ <show_in_store>1</show_in_store>
597
+ <depends><payments_active>true</payments_active></depends>
598
+ </ps_3>
599
+ <ps_4>
600
+ <label>PS_4</label>
601
+ <frontend_type>select</frontend_type>
602
+ <source_model>adminhtml/system_config_source_yesno</source_model>
603
+ <sort_order>4</sort_order>
604
+ <show_in_default>1</show_in_default>
605
+ <show_in_website>1</show_in_website>
606
+ <show_in_store>1</show_in_store>
607
+ <depends><payments_active>true</payments_active></depends>
608
+ </ps_4>
609
+ <ps_5>
610
+ <label>PS_5</label>
611
+ <frontend_type>select</frontend_type>
612
+ <source_model>adminhtml/system_config_source_yesno</source_model>
613
+ <sort_order>5</sort_order>
614
+ <show_in_default>1</show_in_default>
615
+ <show_in_website>1</show_in_website>
616
+ <show_in_store>1</show_in_store>
617
+ <depends><payments_active>true</payments_active></depends>
618
+ </ps_5>
619
+ <ps_6>
620
+ <label>PS_6</label>
621
+ <frontend_type>select</frontend_type>
622
+ <source_model>adminhtml/system_config_source_yesno</source_model>
623
+ <sort_order>6</sort_order>
624
+ <show_in_default>1</show_in_default>
625
+ <show_in_website>1</show_in_website>
626
+ <show_in_store>1</show_in_store>
627
+ <depends><payments_active>true</payments_active></depends>
628
+ </ps_6>
629
+ <ps_7>
630
+ <label>PS_7</label>
631
+ <frontend_type>select</frontend_type>
632
+ <source_model>adminhtml/system_config_source_yesno</source_model>
633
+ <sort_order>7</sort_order>
634
+ <show_in_default>1</show_in_default>
635
+ <show_in_website>1</show_in_website>
636
+ <show_in_store>1</show_in_store>
637
+ <depends><payments_active>true</payments_active></depends>
638
+ </ps_7>
639
+ <ps_8>
640
+ <label>PS_8</label>
641
+ <frontend_type>select</frontend_type>
642
+ <source_model>adminhtml/system_config_source_yesno</source_model>
643
+ <sort_order>8</sort_order>
644
+ <show_in_default>1</show_in_default>
645
+ <show_in_website>1</show_in_website>
646
+ <show_in_store>1</show_in_store>
647
+ <depends><payments_active>true</payments_active></depends>
648
+ </ps_8>
649
+ <ps_9>
650
+ <label>PS_9</label>
651
+ <frontend_type>select</frontend_type>
652
+ <source_model>adminhtml/system_config_source_yesno</source_model>
653
+ <sort_order>9</sort_order>
654
+ <show_in_default>1</show_in_default>
655
+ <show_in_website>1</show_in_website>
656
+ <show_in_store>1</show_in_store>
657
+ <depends><payments_active>true</payments_active></depends>
658
+ </ps_9>
659
+ <ps_10>
660
+ <label>PS_10</label>
661
+ <frontend_type>select</frontend_type>
662
+ <source_model>adminhtml/system_config_source_yesno</source_model>
663
+ <sort_order>10</sort_order>
664
+ <show_in_default>1</show_in_default>
665
+ <show_in_website>1</show_in_website>
666
+ <show_in_store>1</show_in_store>
667
+ <depends><payments_active>true</payments_active></depends>
668
+ </ps_10>
669
+ <ps_11>
670
+ <label>PS_11</label>
671
+ <frontend_type>select</frontend_type>
672
+ <source_model>adminhtml/system_config_source_yesno</source_model>
673
+ <sort_order>11</sort_order>
674
+ <show_in_default>1</show_in_default>
675
+ <show_in_website>1</show_in_website>
676
+ <show_in_store>1</show_in_store>
677
+ <depends><payments_active>true</payments_active></depends>
678
+ </ps_11>
679
+ <ps_12>
680
+ <label>PS_12</label>
681
+ <frontend_type>select</frontend_type>
682
+ <source_model>adminhtml/system_config_source_yesno</source_model>
683
+ <sort_order>12</sort_order>
684
+ <show_in_default>1</show_in_default>
685
+ <show_in_website>1</show_in_website>
686
+ <show_in_store>1</show_in_store>
687
+ <depends><payments_active>true</payments_active></depends>
688
+ </ps_12>
689
+ <ps_13>
690
+ <label>PS_13</label>
691
+ <frontend_type>select</frontend_type>
692
+ <source_model>adminhtml/system_config_source_yesno</source_model>
693
+ <sort_order>13</sort_order>
694
+ <show_in_default>1</show_in_default>
695
+ <show_in_website>1</show_in_website>
696
+ <show_in_store>1</show_in_store>
697
+ <depends><payments_active>true</payments_active></depends>
698
+ </ps_13>
699
+ <ps_14>
700
+ <label>PS_14</label>
701
+ <frontend_type>select</frontend_type>
702
+ <source_model>adminhtml/system_config_source_yesno</source_model>
703
+ <sort_order>14</sort_order>
704
+ <show_in_default>1</show_in_default>
705
+ <show_in_website>1</show_in_website>
706
+ <show_in_store>1</show_in_store>
707
+ <depends><payments_active>true</payments_active></depends>
708
+ </ps_14>
709
+ <ps_15>
710
+ <label>PS_15</label>
711
+ <frontend_type>select</frontend_type>
712
+ <source_model>adminhtml/system_config_source_yesno</source_model>
713
+ <sort_order>15</sort_order>
714
+ <show_in_default>1</show_in_default>
715
+ <show_in_website>1</show_in_website>
716
+ <show_in_store>1</show_in_store>
717
+ <depends><payments_active>true</payments_active></depends>
718
+ </ps_15>
719
+ <ps_16>
720
+ <label>PS_16</label>
721
+ <frontend_type>select</frontend_type>
722
+ <source_model>adminhtml/system_config_source_yesno</source_model>
723
+ <sort_order>16</sort_order>
724
+ <show_in_default>1</show_in_default>
725
+ <show_in_website>1</show_in_website>
726
+ <show_in_store>1</show_in_store>
727
+ <depends><payments_active>true</payments_active></depends>
728
+ </ps_16>
729
+ <ps_17>
730
+ <label>PS_17</label>
731
+ <frontend_type>select</frontend_type>
732
+ <source_model>adminhtml/system_config_source_yesno</source_model>
733
+ <sort_order>17</sort_order>
734
+ <show_in_default>1</show_in_default>
735
+ <show_in_website>1</show_in_website>
736
+ <show_in_store>1</show_in_store>
737
+ <depends><payments_active>true</payments_active></depends>
738
+ </ps_17>
739
+ <ps_18>
740
+ <label>PS_18</label>
741
+ <frontend_type>select</frontend_type>
742
+ <source_model>adminhtml/system_config_source_yesno</source_model>
743
+ <sort_order>18</sort_order>
744
+ <show_in_default>1</show_in_default>
745
+ <show_in_website>1</show_in_website>
746
+ <show_in_store>1</show_in_store>
747
+ <depends><payments_active>true</payments_active></depends>
748
+ </ps_18>
749
+ <ps_19>
750
+ <label>PS_19</label>
751
+ <frontend_type>select</frontend_type>
752
+ <source_model>adminhtml/system_config_source_yesno</source_model>
753
+ <sort_order>19</sort_order>
754
+ <show_in_default>1</show_in_default>
755
+ <show_in_website>1</show_in_website>
756
+ <show_in_store>1</show_in_store>
757
+ <depends><payments_active>true</payments_active></depends>
758
+ </ps_19>
759
+ <ps_20>
760
+ <label>PS_20</label>
761
+ <frontend_type>select</frontend_type>
762
+ <source_model>adminhtml/system_config_source_yesno</source_model>
763
+ <sort_order>20</sort_order>
764
+ <show_in_default>1</show_in_default>
765
+ <show_in_website>1</show_in_website>
766
+ <show_in_store>1</show_in_store>
767
+ <depends><payments_active>true</payments_active></depends>
768
+ </ps_20>
769
+ <ps_21>
770
+ <label>PS_21</label>
771
+ <frontend_type>select</frontend_type>
772
+ <source_model>adminhtml/system_config_source_yesno</source_model>
773
+ <sort_order>21</sort_order>
774
+ <show_in_default>1</show_in_default>
775
+ <show_in_website>1</show_in_website>
776
+ <show_in_store>1</show_in_store>
777
+ <depends><payments_active>true</payments_active></depends>
778
+ </ps_21>
779
+ <ps_22>
780
+ <label>PS_22</label>
781
+ <frontend_type>select</frontend_type>
782
+ <source_model>adminhtml/system_config_source_yesno</source_model>
783
+ <sort_order>22</sort_order>
784
+ <show_in_default>1</show_in_default>
785
+ <show_in_website>1</show_in_website>
786
+ <show_in_store>1</show_in_store>
787
+ <depends><payments_active>true</payments_active></depends>
788
+ </ps_22>
789
+ <ps_23>
790
+ <label>PS_23</label>
791
+ <frontend_type>select</frontend_type>
792
+ <source_model>adminhtml/system_config_source_yesno</source_model>
793
+ <sort_order>23</sort_order>
794
+ <show_in_default>1</show_in_default>
795
+ <show_in_website>1</show_in_website>
796
+ <show_in_store>1</show_in_store>
797
+ <depends><payments_active>true</payments_active></depends>
798
+ </ps_23>
799
+ <ps_24>
800
+ <label>PS_24</label>
801
+ <frontend_type>select</frontend_type>
802
+ <source_model>adminhtml/system_config_source_yesno</source_model>
803
+ <sort_order>24</sort_order>
804
+ <show_in_default>1</show_in_default>
805
+ <show_in_website>1</show_in_website>
806
+ <show_in_store>1</show_in_store>
807
+ <depends><payments_active>true</payments_active></depends>
808
+ </ps_24>
809
+ <ps_25>
810
+ <label>PS_25</label>
811
+ <frontend_type>select</frontend_type>
812
+ <source_model>adminhtml/system_config_source_yesno</source_model>
813
+ <sort_order>25</sort_order>
814
+ <show_in_default>1</show_in_default>
815
+ <show_in_website>1</show_in_website>
816
+ <show_in_store>1</show_in_store>
817
+ <depends><payments_active>true</payments_active></depends>
818
+ </ps_25>
819
+ <ps_26>
820
+ <label>PS_26</label>
821
+ <frontend_type>select</frontend_type>
822
+ <source_model>adminhtml/system_config_source_yesno</source_model>
823
+ <sort_order>26</sort_order>
824
+ <show_in_default>1</show_in_default>
825
+ <show_in_website>1</show_in_website>
826
+ <show_in_store>1</show_in_store>
827
+ <depends><payments_active>true</payments_active></depends>
828
+ </ps_26>
829
+ <ps_27>
830
+ <label>PS_27</label>
831
+ <frontend_type>select</frontend_type>
832
+ <source_model>adminhtml/system_config_source_yesno</source_model>
833
+ <sort_order>27</sort_order>
834
+ <show_in_default>1</show_in_default>
835
+ <show_in_website>1</show_in_website>
836
+ <show_in_store>1</show_in_store>
837
+ <depends><payments_active>true</payments_active></depends>
838
+ </ps_27>
839
+ <ps_28>
840
+ <label>PS_28</label>
841
+ <frontend_type>select</frontend_type>
842
+ <source_model>adminhtml/system_config_source_yesno</source_model>
843
+ <sort_order>28</sort_order>
844
+ <show_in_default>1</show_in_default>
845
+ <show_in_website>1</show_in_website>
846
+ <show_in_store>1</show_in_store>
847
+ <depends><payments_active>true</payments_active></depends>
848
+ </ps_28>
849
+ <ps_29>
850
+ <label>PS_29</label>
851
+ <frontend_type>select</frontend_type>
852
+ <source_model>adminhtml/system_config_source_yesno</source_model>
853
+ <sort_order>29</sort_order>
854
+ <show_in_default>1</show_in_default>
855
+ <show_in_website>1</show_in_website>
856
+ <show_in_store>1</show_in_store>
857
+ <depends><payments_active>true</payments_active></depends>
858
+ </ps_29>
859
+ <ps_30>
860
+ <label>PS_30</label>
861
+ <frontend_type>select</frontend_type>
862
+ <source_model>adminhtml/system_config_source_yesno</source_model>
863
+ <sort_order>30</sort_order>
864
+ <show_in_default>1</show_in_default>
865
+ <show_in_website>1</show_in_website>
866
+ <show_in_store>1</show_in_store>
867
+ <depends><payments_active>true</payments_active></depends>
868
+ </ps_30>
869
+ <ps_31>
870
+ <label>PS_31</label>
871
+ <frontend_type>select</frontend_type>
872
+ <source_model>adminhtml/system_config_source_yesno</source_model>
873
+ <sort_order>31</sort_order>
874
+ <show_in_default>1</show_in_default>
875
+ <show_in_website>1</show_in_website>
876
+ <show_in_store>1</show_in_store>
877
+ <depends><payments_active>true</payments_active></depends>
878
+ </ps_31>
879
+ <ps_32>
880
+ <label>PS_32</label>
881
+ <frontend_type>select</frontend_type>
882
+ <source_model>adminhtml/system_config_source_yesno</source_model>
883
+ <sort_order>32</sort_order>
884
+ <show_in_default>1</show_in_default>
885
+ <show_in_website>1</show_in_website>
886
+ <show_in_store>1</show_in_store>
887
+ <depends><payments_active>true</payments_active></depends>
888
+ </ps_32>
889
+ <ps_33>
890
+ <label>PS_33</label>
891
+ <frontend_type>select</frontend_type>
892
+ <source_model>adminhtml/system_config_source_yesno</source_model>
893
+ <sort_order>33</sort_order>
894
+ <show_in_default>1</show_in_default>
895
+ <show_in_website>1</show_in_website>
896
+ <show_in_store>1</show_in_store>
897
+ <depends><payments_active>true</payments_active></depends>
898
+ </ps_33>
899
+ <ps_34>
900
+ <label>PS_34</label>
901
+ <frontend_type>select</frontend_type>
902
+ <source_model>adminhtml/system_config_source_yesno</source_model>
903
+ <sort_order>34</sort_order>
904
+ <show_in_default>1</show_in_default>
905
+ <show_in_website>1</show_in_website>
906
+ <show_in_store>1</show_in_store>
907
+ <depends><payments_active>true</payments_active></depends>
908
+ </ps_34>
909
+ <ps_35>
910
+ <label>PS_35</label>
911
+ <frontend_type>select</frontend_type>
912
+ <source_model>adminhtml/system_config_source_yesno</source_model>
913
+ <sort_order>35</sort_order>
914
+ <show_in_default>1</show_in_default>
915
+ <show_in_website>1</show_in_website>
916
+ <show_in_store>1</show_in_store>
917
+ <depends><payments_active>true</payments_active></depends>
918
+ </ps_35>
919
+ <ps_36>
920
+ <label>PS_36</label>
921
+ <frontend_type>select</frontend_type>
922
+ <source_model>adminhtml/system_config_source_yesno</source_model>
923
+ <sort_order>36</sort_order>
924
+ <show_in_default>1</show_in_default>
925
+ <show_in_website>1</show_in_website>
926
+ <show_in_store>1</show_in_store>
927
+ <depends><payments_active>true</payments_active></depends>
928
+ </ps_36>
929
+ <ps_37>
930
+ <label>PS_37</label>
931
+ <frontend_type>select</frontend_type>
932
+ <source_model>adminhtml/system_config_source_yesno</source_model>
933
+ <sort_order>37</sort_order>
934
+ <show_in_default>1</show_in_default>
935
+ <show_in_website>1</show_in_website>
936
+ <show_in_store>1</show_in_store>
937
+ <depends><payments_active>true</payments_active></depends>
938
+ </ps_37>
939
+ <ps_38>
940
+ <label>PS_38</label>
941
+ <frontend_type>select</frontend_type>
942
+ <source_model>adminhtml/system_config_source_yesno</source_model>
943
+ <sort_order>38</sort_order>
944
+ <show_in_default>1</show_in_default>
945
+ <show_in_website>1</show_in_website>
946
+ <show_in_store>1</show_in_store>
947
+ <depends><payments_active>true</payments_active></depends>
948
+ </ps_38>
949
+ <ps_39>
950
+ <label>PS_39</label>
951
+ <frontend_type>select</frontend_type>
952
+ <source_model>adminhtml/system_config_source_yesno</source_model>
953
+ <sort_order>39</sort_order>
954
+ <show_in_default>1</show_in_default>
955
+ <show_in_website>1</show_in_website>
956
+ <show_in_store>1</show_in_store>
957
+ <depends><payments_active>true</payments_active></depends>
958
+ </ps_39>
959
+ <ps_40>
960
+ <label>PS_40</label>
961
+ <frontend_type>select</frontend_type>
962
+ <source_model>adminhtml/system_config_source_yesno</source_model>
963
+ <sort_order>40</sort_order>
964
+ <show_in_default>1</show_in_default>
965
+ <show_in_website>1</show_in_website>
966
+ <show_in_store>1</show_in_store>
967
+ <depends><payments_active>true</payments_active></depends>
968
+ </ps_40>
969
+ <ps_41>
970
+ <label>PS_41</label>
971
+ <frontend_type>select</frontend_type>
972
+ <source_model>adminhtml/system_config_source_yesno</source_model>
973
+ <sort_order>41</sort_order>
974
+ <show_in_default>1</show_in_default>
975
+ <show_in_website>1</show_in_website>
976
+ <show_in_store>1</show_in_store>
977
+ <depends><payments_active>true</payments_active></depends>
978
+ </ps_41>
979
+ <ps_42>
980
+ <label>PS_42</label>
981
+ <frontend_type>select</frontend_type>
982
+ <source_model>adminhtml/system_config_source_yesno</source_model>
983
+ <sort_order>42</sort_order>
984
+ <show_in_default>1</show_in_default>
985
+ <show_in_website>1</show_in_website>
986
+ <show_in_store>1</show_in_store>
987
+ <depends><payments_active>true</payments_active></depends>
988
+ </ps_42>
989
+ <ps_43>
990
+ <label>PS_43</label>
991
+ <frontend_type>select</frontend_type>
992
+ <source_model>adminhtml/system_config_source_yesno</source_model>
993
+ <sort_order>43</sort_order>
994
+ <show_in_default>1</show_in_default>
995
+ <show_in_website>1</show_in_website>
996
+ <show_in_store>1</show_in_store>
997
+ <depends><payments_active>true</payments_active></depends>
998
+ </ps_43>
999
+ <ps_44>
1000
+ <label>PS_44</label>
1001
+ <frontend_type>select</frontend_type>
1002
  <source_model>adminhtml/system_config_source_yesno</source_model>
1003
+ <sort_order>44</sort_order>
1004
+ <show_in_default>1</show_in_default>
1005
+ <show_in_website>1</show_in_website>
1006
+ <show_in_store>1</show_in_store>
1007
+ <depends><payments_active>true</payments_active></depends>
1008
+ </ps_44>
1009
+ <ps_45>
1010
+ <label>PS_45</label>
1011
+ <frontend_type>select</frontend_type>
1012
  <source_model>adminhtml/system_config_source_yesno</source_model>
1013
+ <sort_order>45</sort_order>
1014
+ <show_in_default>1</show_in_default>
1015
+ <show_in_website>1</show_in_website>
1016
+ <show_in_store>1</show_in_store>
1017
+ <depends><payments_active>true</payments_active></depends>
1018
+ </ps_45>
1019
+ <ps_46>
1020
+ <label>PS_46</label>
1021
+ <frontend_type>select</frontend_type>
1022
  <source_model>adminhtml/system_config_source_yesno</source_model>
1023
+ <sort_order>46</sort_order>
1024
+ <show_in_default>1</show_in_default>
1025
+ <show_in_website>1</show_in_website>
1026
+ <show_in_store>1</show_in_store>
1027
+ <depends><payments_active>true</payments_active></depends>
1028
+ </ps_46>
1029
+ <ps_47>
1030
+ <label>PS_47</label>
1031
+ <frontend_type>select</frontend_type>
1032
  <source_model>adminhtml/system_config_source_yesno</source_model>
1033
+ <sort_order>47</sort_order>
1034
+ <show_in_default>1</show_in_default>
1035
+ <show_in_website>1</show_in_website>
1036
+ <show_in_store>1</show_in_store>
1037
+ <depends><payments_active>true</payments_active></depends>
1038
+ </ps_47>
1039
+ <ps_48>
1040
+ <label>PS_48</label>
1041
+ <frontend_type>select</frontend_type>
1042
  <source_model>adminhtml/system_config_source_yesno</source_model>
1043
+ <sort_order>48</sort_order>
1044
+ <show_in_default>1</show_in_default>
1045
+ <show_in_website>1</show_in_website>
1046
+ <show_in_store>1</show_in_store>
1047
+ <depends><payments_active>true</payments_active></depends>
1048
+ </ps_48>
1049
+ <ps_49>
1050
+ <label>PS_49</label>
1051
+ <frontend_type>select</frontend_type>
1052
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1053
+ <sort_order>49</sort_order>
1054
+ <show_in_default>1</show_in_default>
1055
+ <show_in_website>1</show_in_website>
1056
+ <show_in_store>1</show_in_store>
1057
+ <depends><payments_active>true</payments_active></depends>
1058
+ </ps_49>
1059
+ <ps_50>
1060
+ <label>PS_50</label>
1061
+ <frontend_type>select</frontend_type>
1062
  <source_model>adminhtml/system_config_source_yesno</source_model>
1063
+ <sort_order>50</sort_order>
1064
+ <show_in_default>1</show_in_default>
1065
+ <show_in_website>1</show_in_website>
1066
+ <show_in_store>1</show_in_store>
1067
+ <depends><payments_active>true</payments_active></depends>
1068
+ </ps_50>
1069
+ <payment_action translate="label">
1070
+ <label>Automatic clearing for credit card payments</label>
1071
+ <frontend_type>select</frontend_type>
1072
+ <source_model>mpay24/source_clearingAction</source_model>
1073
+ <config_path>payment/mpay24/paid_payment_action</config_path>
1074
+ <sort_order>106</sort_order>
1075
+ <show_in_default>1</show_in_default>
1076
+ <show_in_website>1</show_in_website>
1077
+ <show_in_store>1</show_in_store>
1078
+ </payment_action>
1079
+ <paid_order_status translate="label">
1080
+ <label>Status of paid orders</label>
1081
+ <frontend_type>select</frontend_type>
1082
+ <source_model>mpay24/source_paidOrder</source_model>
1083
+ <config_path>payment/mpay24/paid_order_status</config_path>
1084
+ <sort_order>107</sort_order>
1085
+ <show_in_default>1</show_in_default>
1086
+ <show_in_website>1</show_in_website>
1087
+ <show_in_store>1</show_in_store>
1088
+ </paid_order_status>
1089
+ <billingAddressMode translate="label comment">
1090
  <label>Billing address mode</label>
1091
  <frontend_type>select</frontend_type>
1092
  <source_model>mpay24/source_billAddr</source_model>
1093
  <sort_order>108</sort_order>
1094
  <show_in_default>1</show_in_default>
1095
  <show_in_website>1</show_in_website>
1096
+ <show_in_store>1</show_in_store>
1097
  <comment>The mode 'ReadWrite' will only work if the parameter 'BILLING_ADDR' was set by mPAY24. Please contact the mPAY24 Support: support@mpay24.com!</comment>
1098
  </billingAddressMode>
1099
  <show_free_products translate="label comment">
1100
+ <label>Show free products</label>
1101
+ <frontend_type>select</frontend_type>
1102
  <source_model>adminhtml/system_config_source_yesno</source_model>
1103
+ <sort_order>109</sort_order>
1104
+ <show_in_default>1</show_in_default>
1105
+ <show_in_website>1</show_in_website>
1106
+ <show_in_store>1</show_in_store>
1107
+ <comment>Show the free 'children' products of configurable products in the mPAY24 shopping cart</comment>
1108
+ </show_free_products>
1109
+ </fields>
1110
+ </mpay24>
1111
  </groups>
1112
+ </mpay24>
1113
+ </sections>
1114
  </config>
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-install-1.4.2.php → mysql4-install-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-0.6.2-1.4.2.php → mysql4-upgrade-0.6.2-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.0.0-1.4.2.php → mysql4-upgrade-1.0.0-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.0.4-1.4.2.php → mysql4-upgrade-1.0.4-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.0.6-1.4.2.php → mysql4-upgrade-1.0.6-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.0.7-1.4.2.php → mysql4-upgrade-1.0.7-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.1.1-1.4.2.php → mysql4-upgrade-1.1.1-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.1.7-1.4.2.php → mysql4-upgrade-1.1.7-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.1.8-1.4.2.php → mysql4-upgrade-1.1.8-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.1.9-1.4.2.php → mysql4-upgrade-1.1.9-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.2.0-1.4.2.php → mysql4-upgrade-1.2.0-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.2.1-1.4.2.php → mysql4-upgrade-1.2.1-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.2.2-1.4.2.php → mysql4-upgrade-1.2.2-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.3.0-1.4.2.php → mysql4-upgrade-1.3.0-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.4.0-1.4.2.php → mysql4-upgrade-1.4.0-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/{mysql4-upgrade-1.4.1-1.4.2.php → mysql4-upgrade-1.4.1-1.4.3.php} RENAMED
File without changes
app/code/community/Mpay24/Mpay24/sql/mpay24_setup/mysql4-upgrade-1.4.2-1.4.3.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * @category Mpay24
16
+ * @package Mpay24_Mpay24
17
+ * @author Filipp Akinfiev
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+
21
+ $code = 'mpay24';
22
+ $installer = $this;
23
+
24
+ $installer->startSetup();
25
+ $installer->run("
26
+ DROP TABLE if exists {$this->getTable('mpay24_debug')};
27
+ ");
28
+
29
+ $installer->run("
30
+ UPDATE `sales_flat_quote_payment` SET `method` = 'mpay24' WHERE `method` LIKE 'mpay24_sp_cc';
31
+ ");
32
+
33
+ $installer->run("
34
+ UPDATE `sales_flat_order_payment` SET `method` = 'mpay24' WHERE `method` LIKE 'mpay24_sp_cc';
35
+ ");
36
+
37
+ $installer->endSetup();
38
+ ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mPAY24</name>
4
- <version>1.4.2</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
@@ -26,34 +26,17 @@ Die Payment L&#xF6;sung der mPAY24 GmbH unterst&#xFC;tzt folgende Bezahlarten un
26
  &#xD;
27
  &#xD;
28
  Weitere Informationen unter www.mPAY24.com</description>
29
- <notes>UPDATE:&#xD;
30
  &#xD;
31
- *) bug by upgrading the extension -&gt; SOLVED&#xD;
32
- *) BILLPAY payment system bug -&gt; SOLVED&#xD;
33
  &#xD;
34
- The whole extension was updated:&#xD;
35
  &#xD;
36
- 1. The communication is realised with the help of the mPAY24 PHP API and not with Zend Soap Client.&#xD;
37
- &#xD;
38
- 2. The newest mPAY24 SOAP (v. 1.5) is used&#xD;
39
- &#xD;
40
- 3. Zhe backend updates the payment systems and all the configurations everytime the mPAY24 configurations are saved&#xD;
41
- &#xD;
42
- 4. There is a new possibility to choose the status for the orders that were paid (mPAY24 status - BILLED)&#xD;
43
- &#xD;
44
- 5. A new debug possibility was implmented&#xD;
45
- &#xD;
46
- 6. The function 'auto clearing' for credit card payments can and should be set directly in the extension.&#xD;
47
- &#xD;
48
- 7. A bug in the billing address mode functionallity was solved.&#xD;
49
- &#xD;
50
- 8. There was implemnted a possibility to choose whether the free (of charge) products should be shown in the mPAY24 pay page or not.&#xD;
51
- &#xD;
52
- 9. The HIGHLIGHT: the customers can choose the payment system (VISA, MasterCard, eps, etc.) directly by the checkout process. There are two different templates you can choose from in your backend: an area with all the payment methods or a drop-down list!</notes>
53
  <authors><author><name>Filipp Akinfiev</name><user>auto-converted</user><email>firedrago.magento@gmail.com</email></author></authors>
54
- <date>2013-03-05</date>
55
- <time>15:18:04</time>
56
- <contents><target name="magelocale"><dir name="de_AT"><file name="Mpay24_Mpay24.csv" hash="e55fbe56741682943f5565fec1b47442"/></dir><dir name="de_DE"><file name="Mpay24_Mpay24.csv" hash="e55fbe56741682943f5565fec1b47442"/></dir><dir name="de_CH"><file name="Mpay24_Mpay24.csv" hash="e55fbe56741682943f5565fec1b47442"/></dir><dir name="en_US"><file name="Mpay24_Mpay24.csv" hash="1cfa1bb474c632817c46f68b80669662"/></dir></target><target name="mageetc"><dir name="modules"><file name="Mpay24_Mpay24.xml" hash="500d0d91159d751caa6f5dc065ffc639"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="mpay24"><dir name="form"><file name="area.phtml" hash="8ac18b34ffddee061be1b07e68235f5f"/><file name="dropDown.phtml" hash="67e4d39102fd4dcfedda7d0562663576"/></dir><dir name="info"><file name="selectpayment.phtml" hash="96db95cc6bc384dad08716aa395c1d0a"/></dir></dir></dir><dir name="layout"><file name="mpay24.xml" hash="ce01cb3fe366d831d16d8bf7d4dee7e1"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="mpay24"><dir name="info"><file name="selectpayment.phtml" hash="85176bc9ae3ec8ebbad2669c6114150a"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Mpay24"><dir name="Mpay24"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Fieldset.php" hash="f01cc8118195304a4db192ddfe1fe51a"/></dir></dir></dir></dir><dir name="Form"><file name="Selectpayment.php" hash="372168b0b9545c790802af8ab111d284"/></dir><dir name="Info"><file name="Selectpayment.php" hash="1229dd9c525a9b6a2333d8cfcc947f41"/></dir><file name="Form.php" hash="4b2fce3add8a810041a6c5ab790329a5"/><file name="Mpay24.php" hash="f5a913fd2668759188e0eaf33491884b"/><file name="ParentRedirect.php" hash="b12291838895b40bcee7af52fbc2967f"/></dir><dir name="Helper"><file name="Data.php" hash="69a156b89e684bf4dee01e2a39fa66f4"/></dir><dir name="Model"><dir name="Api"><dir name="logs"><file name="curllog.log" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="mPAY24log.log" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="xmls"><file name="Example_MDXI.xml" hash="df8358d868eec37ab27802edc02bc932"/></dir><file name="MDXI.xsd" hash="457f9d0a7d591c8f0f8c1774388077ea"/><file name="MPay24Api.php" hash="9d604b6fc6bcd99b2c5a0807393d67c4"/><file name="MPay24MagentoShop.php" hash="0cac6f6a16ff6895102128acde993264"/><file name="MPay24Shop.php" hash="ca0b2dcc2962f7764104a9ddf0cfa828"/><file name="cacert.pem" hash="4e0c8fcca8148533e6723f94463a3c73"/><file name="orderXML.php" hash="f067d286e1a6282bb0d67483dd1d0d98"/></dir><dir name="Entity"><file name="Setup.php" hash="8dc9baf209d88d7b054d763066f601fb"/></dir><dir name="Method"><file name="Abstract.php" hash="fdbb5a39e0427876160fd2756d4ec2f9"/><file name="Selectpayment.php" hash="4f204e97ef936c00460ed204ac65a190"/></dir><dir name="Mpay24"><file name="Debug.php" hash="9cbf466aa62829ca7aac6246aa550d4a"/></dir><dir name="Mysql4"><dir name="Mpay24"><dir name="Debug"><file name="Collection.php" hash="f5094404eec10cb3eac5c6b6e2209287"/></dir><file name="Debug.php" hash="50291178d8bb20a50fee0d0c1d0d4f12"/></dir><file name="Setup.php" hash="9e19108b10a15d212fd9838b753c2302"/></dir><dir name="Source"><file name="BillAddr.php" hash="50a1eaf7afb455dbc2a47761560bdc87"/><file name="ClearingAction.php" hash="a8f705c72bad6c174ca61aee4a128008"/><file name="FormTemplate.php" hash="722994ae6dba839b21bd5f45487b55c2"/><file name="PaidOrder.php" hash="12265d4cc317818a11aa2b31d22118b4"/><file name="PaymentsActive.php" hash="ae7b566c2b840457f70ab48ee165ff9f"/><file name="Request.php" hash="8d33fa758355382b0171ec1ea1934bff"/><file name="Result.php" hash="0e6b4aa3f291d20dcdc840fd06c33e90"/><file name="ShoppingCartRowsAction.php" hash="9de2ded97cd6623c88def25477a0ca02"/><file name="System.php" hash="7e40794562cda9a8a4ad61052678d470"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Encrypted.php" hash="489a56ff8bd41e8b436b24dc3eeb5782"/></dir></dir></dir><file name="Config.php" hash="d205f45cd29c893cb50ca1b43957520f"/><file name="Observer.php" hash="53ff5a6a6d0de25a3be0252da28e72a6"/><file name="Selectpayment.php" hash="399da03227698003f65eaaa4a71f2280"/><file name="Session.php" hash="52b5b79a5d7662c46360ff3cc4f82c70"/></dir><dir name="controllers"><file name="IndexController.php" hash="2403526f34e65f03c723dc1fbcb001c2"/><file name="PaymentController.php" hash="02d0b0cb72d167ae83d1224283962cf6"/></dir><dir name="etc"><file name="config.xml" hash="f57888cce61d7457edf31458e92bb9d8"/><file name="system.xml" hash="ce48356769a535871d92c543ea81a27b"/></dir><dir name="sql"><dir name="mpay24_setup"><file name="mysql4-install-1.4.2.php" hash="810995cacabca2902926661cbfa0bf53"/><file name="mysql4-upgrade-0.6.2-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.0.0-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.0.4-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.0.6-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.0.7-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.1.1-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.1.7-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.1.8-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.1.9-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.2.0-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.2.1-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.2.2-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.3.0-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.4.0-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.4.1-1.4.2.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/></dir></dir></dir></dir></target></contents>
57
  <compatible/>
58
  <dependencies/>
59
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mPAY24</name>
4
+ <version>1.4.3</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
26
  &#xD;
27
  &#xD;
28
  Weitere Informationen unter www.mPAY24.com</description>
29
+ <notes>Bug fixing and upgardes:&#xD;
30
  &#xD;
31
+ 1. Orders which have status 'REDIRECTED' can be canceled/voided.&#xD;
 
32
  &#xD;
33
+ 2. An eps problem was solved&#xD;
34
  &#xD;
35
+ 3. There are specified IPs which are allowed for the confirmation requests. In case the request is coming not from one of these IPs a TRANSACTIONSTATUS request is executed.</notes>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  <authors><author><name>Filipp Akinfiev</name><user>auto-converted</user><email>firedrago.magento@gmail.com</email></author></authors>
37
+ <date>2013-05-08</date>
38
+ <time>06:07:33</time>
39
+ <contents><target name="magelocale"><dir name="de_AT"><file name="Mpay24_Mpay24.csv" hash="e55fbe56741682943f5565fec1b47442"/></dir><dir name="de_DE"><file name="Mpay24_Mpay24.csv" hash="e55fbe56741682943f5565fec1b47442"/></dir><dir name="de_CH"><file name="Mpay24_Mpay24.csv" hash="e55fbe56741682943f5565fec1b47442"/></dir><dir name="en_US"><file name="Mpay24_Mpay24.csv" hash="1cfa1bb474c632817c46f68b80669662"/></dir></target><target name="mageetc"><dir name="modules"><file name="Mpay24_Mpay24.xml" hash="500d0d91159d751caa6f5dc065ffc639"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="mpay24"><dir name="form"><file name="area.phtml" hash="8ac18b34ffddee061be1b07e68235f5f"/><file name="dropDown.phtml" hash="67e4d39102fd4dcfedda7d0562663576"/></dir><dir name="info"><file name="selectpayment.phtml" hash="96db95cc6bc384dad08716aa395c1d0a"/></dir></dir></dir><dir name="layout"><file name="mpay24.xml" hash="ce01cb3fe366d831d16d8bf7d4dee7e1"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="mpay24"><dir name="info"><file name="selectpayment.phtml" hash="85176bc9ae3ec8ebbad2669c6114150a"/></dir></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Mpay24"><dir name="Mpay24"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Fieldset.php" hash="62fd9d141a1d3c6aa42c34010d720aac"/></dir></dir></dir></dir><dir name="Form"><file name="Selectpayment.php" hash="372168b0b9545c790802af8ab111d284"/></dir><dir name="Info"><file name="Selectpayment.php" hash="1229dd9c525a9b6a2333d8cfcc947f41"/></dir><file name="Form.php" hash="4b2fce3add8a810041a6c5ab790329a5"/><file name="Mpay24.php" hash="f5a913fd2668759188e0eaf33491884b"/><file name="ParentRedirect.php" hash="b12291838895b40bcee7af52fbc2967f"/></dir><dir name="Helper"><file name="Data.php" hash="69a156b89e684bf4dee01e2a39fa66f4"/></dir><dir name="Model"><dir name="Api"><dir name="logs"><file name="curllog.log" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="mPAY24log.log" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="xmls"><file name="Example_MDXI.xml" hash="df8358d868eec37ab27802edc02bc932"/></dir><file name="MDXI.xsd" hash="2d029fdb0e21e7fd47df247af2cdbc64"/><file name="MPay24Api.php" hash="84ac62b08a01b568550fd47ae40fb806"/><file name="MPay24MagentoShop.php" hash="e4e273b2bfd7343be8bcd1afc4e1b783"/><file name="MPay24Shop.php" hash="ca0b2dcc2962f7764104a9ddf0cfa828"/><file name="cacert.pem" hash="4e0c8fcca8148533e6723f94463a3c73"/><file name="orderXML.php" hash="f067d286e1a6282bb0d67483dd1d0d98"/></dir><dir name="Entity"><file name="Setup.php" hash="8dc9baf209d88d7b054d763066f601fb"/></dir><dir name="Method"><file name="Abstract.php" hash="fdbb5a39e0427876160fd2756d4ec2f9"/><file name="Selectpayment.php" hash="4f204e97ef936c00460ed204ac65a190"/></dir><dir name="Mpay24"><file name="Debug.php" hash="9cbf466aa62829ca7aac6246aa550d4a"/></dir><dir name="Mysql4"><dir name="Mpay24"><dir name="Debug"><file name="Collection.php" hash="f5094404eec10cb3eac5c6b6e2209287"/></dir><file name="Debug.php" hash="50291178d8bb20a50fee0d0c1d0d4f12"/></dir><file name="Setup.php" hash="9e19108b10a15d212fd9838b753c2302"/></dir><dir name="Source"><file name="AllowedIPs.php" hash="0da1578960a00676c7a38fcca759f097"/><file name="BillAddr.php" hash="50a1eaf7afb455dbc2a47761560bdc87"/><file name="ClearingAction.php" hash="a8f705c72bad6c174ca61aee4a128008"/><file name="FormTemplate.php" hash="722994ae6dba839b21bd5f45487b55c2"/><file name="PaidOrder.php" hash="12265d4cc317818a11aa2b31d22118b4"/><file name="PaymentsActive.php" hash="ae7b566c2b840457f70ab48ee165ff9f"/><file name="Request.php" hash="8d33fa758355382b0171ec1ea1934bff"/><file name="Result.php" hash="0e6b4aa3f291d20dcdc840fd06c33e90"/><file name="ShoppingCartRowsAction.php" hash="9de2ded97cd6623c88def25477a0ca02"/><file name="System.php" hash="7e40794562cda9a8a4ad61052678d470"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Encrypted.php" hash="489a56ff8bd41e8b436b24dc3eeb5782"/></dir></dir></dir><file name="Config.php" hash="d205f45cd29c893cb50ca1b43957520f"/><file name="Observer.php" hash="53ff5a6a6d0de25a3be0252da28e72a6"/><file name="Selectpayment.php" hash="dd5fcb91a45110ea350f43bc54c935e9"/><file name="Session.php" hash="52b5b79a5d7662c46360ff3cc4f82c70"/></dir><dir name="controllers"><file name="IndexController.php" hash="b23f8648cf7568f55978bea219c766f6"/><file name="PaymentController.php" hash="25e7e44c2a8dacca84e116011dbcd15f"/></dir><dir name="etc"><file name="config.xml" hash="54394ef777505efb45d8db2c01eeb127"/><file name="system.xml" hash="69228cdd79fbaae4f44c221ad6c26bc4"/></dir><dir name="sql"><dir name="mpay24_setup"><file name="mysql4-install-1.4.3.php" hash="810995cacabca2902926661cbfa0bf53"/><file name="mysql4-upgrade-0.6.2-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.0.0-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.0.4-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.0.6-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.0.7-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.1.1-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.1.7-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.1.8-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.1.9-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.2.0-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.2.1-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.2.2-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.3.0-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.4.0-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.4.1-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/><file name="mysql4-upgrade-1.4.2-1.4.3.php" hash="006ed8882377b8d3d3c8b6e813051d2b"/></dir></dir></dir></dir></target></contents>
40
  <compatible/>
41
  <dependencies/>
42
  </package>