Allopass_Hipay - Version 1.6.0

Version Notes

Download this release

Release Info

Developer Kassim Belghait
Extension Allopass_Hipay
Version 1.6.0
Comparing to
See all releases


Code changes from version 1.5.1 to 1.6.0

Files changed (36) hide show
  1. app/code/community/Allopass/Hipay/Block/Adminhtml/Customer/Edit/Tab/Card.php +2 -2
  2. app/code/community/Allopass/Hipay/Block/Adminhtml/PaymentProfile/Edit/Form.php +1 -1
  3. app/code/community/Allopass/Hipay/Block/Adminhtml/SplitPayment/Edit/Form.php +10 -2
  4. app/code/community/Allopass/Hipay/Block/Adminhtml/System/Config/Form/Field/Notice.php +39 -0
  5. app/code/community/Allopass/Hipay/Block/Card.php +1 -1
  6. app/code/community/Allopass/Hipay/Block/Checkout/Cart/Totals.php +48 -0
  7. app/code/community/Allopass/Hipay/Controller/Payment.php +298 -297
  8. app/code/community/Allopass/Hipay/Helper/Data.php +1146 -620
  9. app/code/community/Allopass/Hipay/Model/Api/Request.php +177 -108
  10. app/code/community/Allopass/Hipay/Model/Config.php +71 -10
  11. app/code/community/Allopass/Hipay/Model/Method/Abstract.php +1645 -1516
  12. app/code/community/Allopass/Hipay/Model/Method/Cc.php +27 -8
  13. app/code/community/Allopass/Hipay/Model/Method/Hosted.php +141 -121
  14. app/code/community/Allopass/Hipay/Model/Method/Klarna.php +29 -0
  15. app/code/community/Allopass/Hipay/Model/Observer.php +209 -226
  16. app/code/community/Allopass/Hipay/Model/PaymentProfile.php +1 -1
  17. app/code/community/Allopass/Hipay/Model/Rule/Condition/Address.php +202 -126
  18. app/code/community/Allopass/Hipay/Model/Source/Attributes.php +41 -0
  19. app/code/community/Allopass/Hipay/controllers/Adminhtml/PaymentController.php +293 -287
  20. app/code/community/Allopass/Hipay/controllers/KlarnaController.php +13 -0
  21. app/code/community/Allopass/Hipay/etc/config.xml +454 -383
  22. app/code/community/Allopass/Hipay/etc/system.xml +2352 -1549
  23. app/code/community/Allopass/Hipay/sql/allopass_hipay_setup/mysql4-upgrade-1.1.0-1.6.0.php +25 -0
  24. app/design/adminhtml/default/default/template/hipay/form/hosted.phtml +3 -0
  25. app/design/adminhtml/default/default/template/hipay/system/config/form/field/notice.phtml +19 -0
  26. app/design/frontend/base/default/layout/hipay.xml +1 -1
  27. app/design/frontend/base/default/template/hipay/card/account.phtml +1 -1
  28. app/design/frontend/base/default/template/hipay/checkout/tokenjs.phtml +2 -2
  29. app/design/frontend/base/default/template/hipay/form/cc.phtml +13 -2
  30. app/locale/en_US/Allopass_Hipay.csv +13 -8
  31. app/locale/en_US/template/email/hipay_hipay_api_moto.html +45 -0
  32. app/locale/fr_FR/Allopass_Hipay.csv +14 -7
  33. app/locale/fr_FR/template/email/hipay_hipay_api_moto.html +45 -0
  34. app/locale/it_IT/Allopass_Hipay.csv +10 -5
  35. app/locale/it_IT/template/email/hipay_hipay_api_moto.html +45 -0
  36. package.xml +1 -1
app/code/community/Allopass/Hipay/Block/Adminhtml/Customer/Edit/Tab/Card.php CHANGED
@@ -128,11 +128,11 @@ class Allopass_Hipay_Block_Adminhtml_Customer_Edit_Tab_Card extends
128
  }
129
 
130
  public function getTabLabel() {
131
- return Mage::helper('hipay')->__("Hipay's Cards");
132
 
133
  }
134
  public function getTabTitle() {
135
- return Mage::helper('hipay')->__("Hipay's Cards");
136
 
137
  }
138
 
128
  }
129
 
130
  public function getTabLabel() {
131
+ return Mage::helper('hipay')->__("My Payment Cards");
132
 
133
  }
134
  public function getTabTitle() {
135
+ return Mage::helper('hipay')->__("My Payment Cards");
136
 
137
  }
138
 
app/code/community/Allopass/Hipay/Block/Adminhtml/PaymentProfile/Edit/Form.php CHANGED
@@ -41,7 +41,7 @@ class Allopass_Hipay_Block_Adminhtml_PaymentProfile_Edit_Form extends Mage_Admin
41
  'class' => 'required-entry validate-number',
42
  'required' => true,
43
  'name' => 'period_frequency',
44
- 'note'=>$this->__('Number of billing periods that make up one billing cycle.')
45
  ));
46
 
47
  $fieldset->addField('period_max_cycles', 'text', array(
41
  'class' => 'required-entry validate-number',
42
  'required' => true,
43
  'name' => 'period_frequency',
44
+ 'note'=>$this->__('Time to wait between installments in a billing cycle.')
45
  ));
46
 
47
  $fieldset->addField('period_max_cycles', 'text', array(
app/code/community/Allopass/Hipay/Block/Adminhtml/SplitPayment/Edit/Form.php CHANGED
@@ -84,8 +84,16 @@ class Allopass_Hipay_Block_Adminhtml_SplitPayment_Edit_Form extends Mage_Adminht
84
  'title' => Mage::helper('hipay')->__('Status'),
85
  'name' => 'status',
86
  'values' => Allopass_Hipay_Model_SplitPayment::getStatues(),
87
- )
88
- );
 
 
 
 
 
 
 
 
89
 
90
  $form->setUseContainer(true);
91
  $form->setValues($splitPayment->getData());
84
  'title' => Mage::helper('hipay')->__('Status'),
85
  'name' => 'status',
86
  'values' => Allopass_Hipay_Model_SplitPayment::getStatues(),
87
+ ));
88
+
89
+ $fieldset->addField('split_number', 'text', array(
90
+ 'label' => Mage::helper('hipay')->__('Split number'),
91
+ 'title' => Mage::helper('hipay')->__('Split number'),
92
+ 'required' => false,
93
+ 'name' => 'split_number',
94
+ 'readonly' => false,
95
+ ));
96
+
97
 
98
  $form->setUseContainer(true);
99
  $form->setValues($splitPayment->getData());
app/code/community/Allopass/Hipay/Block/Adminhtml/System/Config/Form/Field/Notice.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class Allopass_Hipay_Block_Adminhtml_System_Config_Form_Field_Notice
5
+ */
6
+ class Allopass_Hipay_Block_Adminhtml_System_Config_Form_Field_Notice extends Mage_Adminhtml_Block_System_Config_Form_Field
7
+ {
8
+
9
+ /**
10
+ * Check if columns are defined, set template
11
+ *
12
+ */
13
+ public function __construct()
14
+ {
15
+ parent::__construct();
16
+
17
+ if (!$this->getTemplate()) {
18
+ $this->setTemplate('hipay/system/config/form/field/notice.phtml');
19
+ }
20
+ }
21
+
22
+ /**
23
+ * Custom field
24
+ *
25
+ * @param Varien_Data_Form_Element_Abstract $element
26
+ * @return string
27
+ */
28
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
29
+ {
30
+ $notices = array();
31
+ if (!Mage::getStoreConfigFlag('hipay/hipay_basket/activate_basket', Mage::app()->getStore())) {
32
+ $notices[] = Mage::helper('adminhtml')->__('You have to activate and configuring the support of basket before activate the payment method klarna.');
33
+ }
34
+
35
+ $element->setNoticesHipay($notices);
36
+ $this->setElement($element);
37
+ return $this->_toHtml();
38
+ }
39
+ }
app/code/community/Allopass/Hipay/Block/Card.php CHANGED
@@ -17,7 +17,7 @@ class Allopass_Hipay_Block_Card extends Mage_Core_Block_Template
17
 
18
  $this->setCards($cards);
19
 
20
- Mage::app()->getFrontController()->getAction()->getLayout()->getBlock('root')->setHeaderTitle(Mage::helper('hipay')->__("Hipay's Cards"));
21
  }
22
 
23
  protected function _prepareLayout()
17
 
18
  $this->setCards($cards);
19
 
20
+ Mage::app()->getFrontController()->getAction()->getLayout()->getBlock('root')->setHeaderTitle(Mage::helper('hipay')->__("My Payment Cards"));
21
  }
22
 
23
  protected function _prepareLayout()
app/code/community/Allopass/Hipay/Block/Checkout/Cart/Totals.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magento.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magento.com for more information.
21
+ *
22
+ * @category Mage
23
+ * @package Mage_Checkout
24
+ * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Allopass_Hipay_Block_Checkout_Cart_Totals extends Mage_Checkout_Block_Cart_Totals
28
+ {
29
+ /**
30
+ * Check if we have display grand total in base currency
31
+ *
32
+ * @return bool
33
+ */
34
+ public function needDisplayBaseGrandtotal()
35
+ {
36
+ $quote = $this->getQuote();
37
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
38
+
39
+ if (!$useOrderCurrency) {
40
+ if ($quote->getBaseCurrencyCode() != $quote->getQuoteCurrencyCode()) {
41
+ return true;
42
+ }
43
+ }
44
+
45
+ return false;
46
+ }
47
+
48
+ }
app/code/community/Allopass/Hipay/Controller/Payment.php CHANGED
@@ -1,314 +1,315 @@
1
  <?php
2
  class Allopass_Hipay_Controller_Payment extends Mage_Core_Controller_Front_Action
3
  {
4
- /**
5
- *
6
- * @var Mage_Sales_Model_Order $order
7
- */
8
- protected $_order = null;
9
-
10
-
11
- /**
12
- * @return Mage_Core_Controller_Front_Action
13
- */
14
- public function preDispatch() {
15
- parent::preDispatch();
 
 
16
 
17
- }
 
 
 
 
 
 
 
 
18
 
19
-
20
- /**
21
- *
22
- * @return Allopass_Hipay_Model_Method_Abstract $methodInstance
23
- */
24
- protected function _getMethodInstance()
25
- {
26
- Mage::throwException("Method: '" . __METHOD__ . "' must be implemented!");
27
- }
28
 
29
- public function sendRequestAction()
30
- {
31
- $order = $this->getOrder();
32
- $payment = $order->getPayment();
33
 
34
- $methodInstance = $this->_getMethodInstance();
35
-
36
- try
37
- {
38
- $redirectUrl = $methodInstance->place($payment,$order->getBaseTotalDue());
39
- }
40
- catch (Exception $e)
41
- {
42
- Mage::logException($e);
43
- $this->getCheckout()->addError($e->getMessage());
44
- $this->_redirect('checkout/cart');
45
- return $this;
46
- }
47
-
48
-
49
- $this->_redirectUrl($redirectUrl);
50
-
51
- return $this;
52
-
53
- }
54
-
55
-
56
- public function acceptAction()
57
- {
58
- if(($profileIds = Mage::getSingleton('checkout/session')->getLastRecurringProfileIds()))
59
- {
60
- if(is_array($profileIds))
61
- {
62
- /* @var $gatewayResponse Allopass_Hipay_Model_Api_Response_Gateway */
63
- $gatewayResponse = Mage::getSingleton('hipay/api_response_gateway',$this->getRequest()->getParams());
64
- $collection = Mage::getModel('sales/recurring_profile')->getCollection()
65
- ->addFieldToFilter('profile_id', array('in' => $profileIds))
66
- ;
67
- $profiles = array();
68
- foreach ($collection as $profile) {
69
- //$referenceId = $gatewayResponse->getToken()."-".$profile->getId();
70
- $additionalInfo = array();
71
- $additionalInfo['ccType'] = $gatewayResponse->getBrand();
72
- $additionalInfo['ccExpMonth'] = $gatewayResponse->getCardExpiryMonth() ;
73
- $additionalInfo['ccExpYear'] = $gatewayResponse->getCardExpiryYear();
74
- $additionalInfo['token'] = $gatewayResponse->getToken();
75
- $additionalInfo['transaction_id'] = $gatewayResponse->getTransactionReference();
76
- $profile->setAdditionalInfo($additionalInfo);
77
- //$profile->setReferenceId($referenceId);
78
- $profile->setState(Mage_Sales_Model_Recurring_Profile::STATE_ACTIVE);
79
-
80
- $profile->save();
81
- }
82
- }
83
-
84
-
85
- $session = Mage::getSingleton('checkout/session');
86
- if (!$session->getLastSuccessQuoteId()) {
87
-
88
- $session->setLastSuccessQuoteId($this->getOrder()->getIncrementId());
89
- $session->setLastQuoteId($this->getOrder()->getId());
90
- }
91
-
92
- }
93
- /*else
94
- {
95
- $this->processResponse();
96
- }*/
97
- $this->processResponse();
98
 
99
- $url_redirect = Mage::helper('hipay')->getCheckoutSuccessPage($this->getOrder()->getPayment());
100
  if (preg_match('/http/',$url_redirect)){
101
  $this->_redirectUrl($url_redirect);
102
  }else{
103
  $this->_redirect($url_redirect);
104
  }
105
-
106
- return $this;
107
- }
108
-
109
- public function pendingAction()
110
- {
111
- $this->processResponse();
112
-
113
- $this->_redirect($this->_getMethodInstance()->getConfigData('pending_redirect_page'));
114
-
115
- return $this;
116
- }
117
-
118
- public function declineAction()
119
- {
120
- $lastOrderId = $this->getOrder()->getIncrementId();
121
-
122
- Mage::getSingleton('checkout/session')->setLastQuoteId($lastOrderId);
123
- Mage::getSingleton('checkout/session')->setLastOrderId($lastOrderId);
124
-
125
- $this->processResponse();
126
-
127
- Mage::getSingleton('checkout/session')->addError("Your payment is declined. Please retry checkout with another payment card.");
128
-
129
- $this->_redirect('checkout/cart');
130
- return $this;
131
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
-
134
- public function exceptionAction()
135
- {
136
-
137
- $lastOrderId = $this->getOrder()->getIncrementId();
138
-
139
- Mage::getSingleton('checkout/session')->setLastQuoteId($lastOrderId);
140
- Mage::getSingleton('checkout/session')->setLastOrderId($lastOrderId);
141
-
142
- Mage::getSingleton('checkout/session')->addError("An exception has occured. Please retry checkout.");
143
-
144
- $this->_redirect('checkout/cart');
145
- return $this;
146
- }
147
-
148
-
149
- public function cancelAction()
150
- {
151
- $this->processResponse();
152
- $this->_redirect('checkout/cart');
153
- return $this;
154
- }
155
-
156
- protected function processResponse()
157
- {
158
- $order = $this->getOrder();
159
- $payment = $order->getPayment();
160
-
161
- /* @var $gatewayResponse Allopass_Hipay_Model_Api_Response_Gateway */
162
- $gatewayResponse = Mage::getSingleton('hipay/api_response_gateway',$this->getRequest()->getParams());
163
-
164
- $this->_getMethodInstance()->processResponseToRedirect($gatewayResponse, $payment, $order->getBaseTotalDue());
165
- }
166
 
167
-
168
-
169
- /**
170
- *
171
- * @return Mage_Sales_Model_Order
172
- */
173
- protected function getOrder()
174
- {
175
- if(is_null($this->_order))
176
- {
177
-
178
- if(($profileIds = $this->getCheckout()->getLastRecurringProfileIds()))
179
- {
180
-
181
- if (is_array($profileIds)) {
182
-
183
- foreach ($profileIds as $profileId)
184
- {
185
- /* @var $profile Mage_Sales_Model_Recurring_Profile */
186
- $profile = Mage::getModel('sales/recurring_profile')->load($profileId);
187
- /* @var $_helperRecurring Allopass_Hipayrecurring_Helper_Data */
188
- $_helperRecurring = Mage::helper('hipayrecurring');
189
-
190
- if($_helperRecurring->isInitialProfileOrder($profile))
191
- $this->_order = $_helperRecurring->createOrderFromProfile($profile);
192
- else
193
- {
194
- $orderId = current($profile->getChildOrderIds());
195
- $this->_order = Mage::getModel('sales/order')->load($orderId);
196
-
197
- $additionalInfo = $profile->getAdditionalInfo();
198
-
199
- $this->_order->getPayment()->setCcType(isset($additionalInfo['ccType']) ? $additionalInfo['ccType'] : "");
200
- $this->_order->getPayment()->setCcExpMonth(isset($additionalInfo['ccExpMonth']) ? $additionalInfo['ccExpMonth'] : "");
201
- $this->_order->getPayment()->setCcExpYear(isset($additionalInfo['ccExpYear']) ? $additionalInfo['ccExpYear'] : "");
202
- $this->_order->getPayment()->setAdditionalInformation('token',isset($additionalInfo['token']) ? $additionalInfo['token'] : "");
203
- $this->_order->getPayment()->setAdditionalInformation('create_oneclick',isset($additionalInfo['create_oneclick']) ? $additionalInfo['create_oneclick'] : 1);
204
- $this->_order->getPayment()->setAdditionalInformation('use_oneclick',isset($additionalInfo['use_oneclick']) ? $additionalInfo['use_oneclick'] : 0);
205
- $this->_order->getPayment()->setAdditionalInformation('selected_oneclick_card',isset($additionalInfo['selected_oneclick_card']) ? $additionalInfo['selected_oneclick_card'] : 0);
206
- }
207
-
208
-
209
-
210
- return $this->_order; //because only one nominal item in cart is authorized and Hipay not manage many profiles
211
- }
212
-
213
-
214
- }
215
-
216
- Mage::throwException("An error occured. Profile Ids not present!");
217
-
218
-
219
-
220
- }
221
- else
222
- {
223
- $this->_order = Mage::getModel('sales/order')->load($this->getCheckout()->getLastOrderId());
224
- }
225
- }
226
-
227
- return $this->_order;
228
- }
229
-
230
- /**
231
- * Add method to calculate amount from recurring profile
232
- * @param Mage_Sales_Model_Recurring_Profile $profile
233
- * @return int $amount
234
- **/
235
- public function getAmountFromProfile(Mage_Sales_Model_Recurring_Profile $profile) {
236
- $amount = $profile->getBillingAmount() + $profile->getTaxAmount() + $profile->getShippingAmount();
237
-
238
- if($this->isInitialProfileOrder($profile))
239
- $amount += $profile->getInitAmount() ;
240
-
241
- return $amount;
242
- }
243
-
244
- protected function isInitialProfileOrder(Mage_Sales_Model_Recurring_Profile $profile)
245
- {
246
- if(count($profile->getChildOrderIds()) && current($profile->getChildOrderIds()) == "-1")
247
- return true;
248
-
249
- return false;
250
- }
251
-
252
-
253
- /**
254
- *
255
- * @return Mage_Checkout_Model_Session
256
- */
257
- protected function getCheckout()
258
- {
259
- return Mage::getSingleton('checkout/session');
260
- }
261
-
262
-
263
- public function updateDebitAmountAction()
264
- {
265
- /* @var $_helper Allopass_Hipay_Helper_Data */
266
- $_helper = Mage::helper('hipay');
267
- $response = array();
268
- $response['error'] = true;
269
- $response['success'] = false;
270
-
271
- $payment_profile_id = $this->getRequest()->getParam('payment_profile_id',false);
272
- $amount = $this->getCheckout()->getQuote()->getGrandTotal();
273
-
274
- $response['message'] = Mage::helper('hipay')->__('You will be debit of amount %s only after submit order.',Mage::app()->getStore()->getBaseCurrency()->format($amount, array(), true));
275
-
276
- if($payment_profile_id)
277
- {
278
- try {
279
-
280
- $splitPayment = $_helper->splitPayment((int)$payment_profile_id, $amount);
281
- $response['success'] = true;
282
- $response['error'] = false;
283
- $response['splitPayment'] = $splitPayment;
284
- $response['grandTotal'] = $amount;
285
- $firstAmount = $splitPayment[0]['amountToPay'];
286
- array_shift($splitPayment);
287
- $otherPayments = "<p><span>" . Mage::helper('hipay')->__("Your next payments:") . '</span><table class="data-table" id="split-payment-cc-table">';
288
- foreach ($splitPayment as $value)
289
- {
290
- $otherPayments .= '<tr>';
291
- $amount = Mage::app()->getStore()->getBaseCurrency()->format($value['amountToPay'], array(), true);
292
- $dateToPay = new Zend_Date($value['dateToPay']);
293
- $otherPayments .= '<td>' . $dateToPay->toString(Zend_Date::DATE_LONG) . "</td><td> " . $amount . '</td>' ;
294
- $otherPayments .= '</tr>';
295
- }
296
- $otherPayments .= '<table></p>';
297
-
298
- $response['labelSplitPayment'] = "<p><span>" . Mage::helper('hipay')->__('You will be debit of amount %s only after submit order.',Mage::app()->getStore()->getBaseCurrency()->format($firstAmount, array(), true)) . '</span></p>';
299
- $response['labelSplitPayment'] .= $otherPayments;
300
-
301
- } catch (Exception $e) {
302
 
303
- $response['message'] = $e->getMessage();
304
-
305
- }
306
-
307
-
308
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
 
310
-
311
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
312
-
313
- }
314
- }
1
  <?php
2
  class Allopass_Hipay_Controller_Payment extends Mage_Core_Controller_Front_Action
3
  {
4
+ /**
5
+ *
6
+ * @var Mage_Sales_Model_Order $order
7
+ */
8
+ protected $_order = null;
9
+
10
+
11
+ /**
12
+ * @return Mage_Core_Controller_Front_Action
13
+ */
14
+ public function preDispatch()
15
+ {
16
+ parent::preDispatch();
17
+ }
18
 
19
+
20
+ /**
21
+ *
22
+ * @return Allopass_Hipay_Model_Method_Abstract $methodInstance
23
+ */
24
+ protected function _getMethodInstance()
25
+ {
26
+ Mage::throwException("Method: '" . __METHOD__ . "' must be implemented!");
27
+ }
28
 
29
+ public function sendRequestAction()
30
+ {
31
+ $order = $this->getOrder();
32
+ $payment = $order->getPayment();
33
+ $amount= $order->getBaseTotalDue();
 
 
 
 
34
 
35
+ $methodInstance = $this->_getMethodInstance();
36
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
 
 
37
 
38
+ if ($useOrderCurrency){
39
+ $amount = $order->getTotalDue();
40
+ }
41
+
42
+ try {
43
+ $redirectUrl = $methodInstance->place($payment, $amount);
44
+ } catch (Exception $e) {
45
+ Mage::logException($e);
46
+ $this->getCheckout()->addError($e->getMessage());
47
+ $this->_redirect('checkout/cart');
48
+ return $this;
49
+ }
50
+
51
+ $this->_redirectUrl($redirectUrl);
52
+
53
+ return $this;
54
+ }
55
+
56
+
57
+ public function acceptAction()
58
+ {
59
+ if (($profileIds = Mage::getSingleton('checkout/session')->getLastRecurringProfileIds())) {
60
+ if (is_array($profileIds)) {
61
+ /* @var $gatewayResponse Allopass_Hipay_Model_Api_Response_Gateway */
62
+ $gatewayResponse = Mage::getSingleton('hipay/api_response_gateway', $this->getRequest()->getParams());
63
+ $collection = Mage::getModel('sales/recurring_profile')->getCollection()
64
+ ->addFieldToFilter('profile_id', array('in' => $profileIds))
65
+ ;
66
+ $profiles = array();
67
+ foreach ($collection as $profile) {
68
+ //$referenceId = $gatewayResponse->getToken()."-".$profile->getId();
69
+ $additionalInfo = array();
70
+ $additionalInfo['ccType'] = $gatewayResponse->getBrand();
71
+ $additionalInfo['ccExpMonth'] = $gatewayResponse->getCardExpiryMonth() ;
72
+ $additionalInfo['ccExpYear'] = $gatewayResponse->getCardExpiryYear();
73
+ $additionalInfo['token'] = $gatewayResponse->getToken();
74
+ $additionalInfo['transaction_id'] = $gatewayResponse->getTransactionReference();
75
+ $profile->setAdditionalInfo($additionalInfo);
76
+ //$profile->setReferenceId($referenceId);
77
+ $profile->setState(Mage_Sales_Model_Recurring_Profile::STATE_ACTIVE);
78
+
79
+ $profile->save();
80
+ }
81
+ }
82
+
83
+
84
+ $session = Mage::getSingleton('checkout/session');
85
+ if (!$session->getLastSuccessQuoteId()) {
86
+ $session->setLastSuccessQuoteId($this->getOrder()->getIncrementId());
87
+ $session->setLastQuoteId($this->getOrder()->getId());
88
+ }
89
+ }
90
+
91
+ $this->processResponse();
92
+ $url_redirect = Mage::helper('hipay')->getCheckoutSuccessPage($this->getOrder()->getPayment());
 
 
 
 
 
 
 
 
 
93
 
 
94
  if (preg_match('/http/',$url_redirect)){
95
  $this->_redirectUrl($url_redirect);
96
  }else{
97
  $this->_redirect($url_redirect);
98
  }
99
+
100
+ return $this;
101
+ }
102
+
103
+ public function pendingAction()
104
+ {
105
+ $this->processResponse();
106
+
107
+ $this->_redirect($this->_getMethodInstance()->getConfigData('pending_redirect_page'));
108
+
109
+ return $this;
110
+ }
111
+
112
+ public function declineAction()
113
+ {
114
+ $lastOrderId = $this->getOrder()->getIncrementId();
115
+
116
+ Mage::getSingleton('checkout/session')->setLastQuoteId($lastOrderId);
117
+ Mage::getSingleton('checkout/session')->setLastOrderId($lastOrderId);
118
+
119
+ $this->processResponse();
120
+
121
+ // Translate with Helper
122
+ Mage::getSingleton('checkout/session')->addError(Mage::helper('hipay')->__("Your payment is declined. Please retry checkout with another payment card."));
123
+
124
+ $this->_redirect(Mage::helper('hipay')->getCheckoutFailurePage($this->getOrder()->getPayment()));
125
+
126
+ return $this;
127
+ }
128
+
129
+
130
+ public function exceptionAction()
131
+ {
132
+ $lastOrderId = $this->getOrder()->getIncrementId();
133
+
134
+ Mage::getSingleton('checkout/session')->setLastQuoteId($lastOrderId);
135
+ Mage::getSingleton('checkout/session')->setLastOrderId($lastOrderId);
136
+
137
+ // Translate with Helper
138
+ Mage::getSingleton('checkout/session')->addError(Mage::helper('hipay')->__("An exception has occured. Please retry checkout."));
139
+
140
+ $this->_redirect('checkout/cart');
141
+ return $this;
142
+ }
143
+
144
+
145
+ public function cancelAction()
146
+ {
147
+ $this->processResponse();
148
+ $this->_redirect('checkout/cart');
149
+ return $this;
150
+ }
151
+
152
+ protected function processResponse()
153
+ {
154
+ $order = $this->getOrder();
155
+ $payment = $order->getPayment();
156
+
157
+ /* @var $gatewayResponse Allopass_Hipay_Model_Api_Response_Gateway */
158
+ $gatewayResponse = Mage::getSingleton('hipay/api_response_gateway', $this->getRequest()->getParams());
159
+
160
+ if (!$payment && $gatewayResponse->getData('order')){
161
+ $order = Mage::getModel('sales/order')->loadByIncrementId($gatewayResponse->getData('order'));
162
+ $this->_order = $order;
163
+ $payment = $order->getPayment();
164
+
165
+ $session = Mage::getSingleton('checkout/session');
166
+ if (!$session->getLastOrderId()) {
167
+ $session->setLastOrderId($this->getOrder()->getIncrementId());
168
+ }
169
+
170
+ if (!$session->getLastSuccessQuoteId()){
171
+ $session->setLastSuccessQuoteId($this->getOrder()->getIncrementId());
172
+ $session->setLastQuoteId($this->getOrder()->getId());
173
+ }
174
+ }else{
175
+ $order = $payment->getOrder();
176
+ }
177
 
178
+ return $this->_getMethodInstance()->processResponseToRedirect($gatewayResponse, $payment, $order->getBaseTotalDue());
179
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
+
182
+
183
+ /**
184
+ *
185
+ * @return Mage_Sales_Model_Order
186
+ */
187
+ protected function getOrder()
188
+ {
189
+ if (is_null($this->_order)) {
190
+ if (($profileIds = $this->getCheckout()->getLastRecurringProfileIds())) {
191
+ if (is_array($profileIds)) {
192
+ foreach ($profileIds as $profileId) {
193
+ /* @var $profile Mage_Sales_Model_Recurring_Profile */
194
+ $profile = Mage::getModel('sales/recurring_profile')->load($profileId);
195
+ /* @var $_helperRecurring Allopass_Hipayrecurring_Helper_Data */
196
+ $_helperRecurring = Mage::helper('hipayrecurring');
197
+
198
+ if ($_helperRecurring->isInitialProfileOrder($profile)) {
199
+ $this->_order = $_helperRecurring->createOrderFromProfile($profile);
200
+ } else {
201
+ $orderId = current($profile->getChildOrderIds());
202
+ $this->_order = Mage::getModel('sales/order')->load($orderId);
203
+
204
+ $additionalInfo = $profile->getAdditionalInfo();
205
+
206
+ $this->_order->getPayment()->setCcType(isset($additionalInfo['ccType']) ? $additionalInfo['ccType'] : "");
207
+ $this->_order->getPayment()->setCcExpMonth(isset($additionalInfo['ccExpMonth']) ? $additionalInfo['ccExpMonth'] : "");
208
+ $this->_order->getPayment()->setCcExpYear(isset($additionalInfo['ccExpYear']) ? $additionalInfo['ccExpYear'] : "");
209
+ $this->_order->getPayment()->setAdditionalInformation('token', isset($additionalInfo['token']) ? $additionalInfo['token'] : "");
210
+ $this->_order->getPayment()->setAdditionalInformation('create_oneclick', isset($additionalInfo['create_oneclick']) ? $additionalInfo['create_oneclick'] : 1);
211
+ $this->_order->getPayment()->setAdditionalInformation('use_oneclick', isset($additionalInfo['use_oneclick']) ? $additionalInfo['use_oneclick'] : 0);
212
+ $this->_order->getPayment()->setAdditionalInformation('selected_oneclick_card', isset($additionalInfo['selected_oneclick_card']) ? $additionalInfo['selected_oneclick_card'] : 0);
213
+ }
214
+
215
+
216
+
217
+ return $this->_order; //because only one nominal item in cart is authorized and Hipay not manage many profiles
218
+ }
219
+ }
220
+
221
+ Mage::throwException("An error occured. Profile Ids not present!");
222
+ } else {
223
+ $this->_order = Mage::getModel('sales/order')->load($this->getCheckout()->getLastOrderId());
224
+ }
225
+ }
226
+
227
+ return $this->_order;
228
+ }
229
+
230
+ /**
231
+ * Add method to calculate amount from recurring profile
232
+ * @param Mage_Sales_Model_Recurring_Profile $profile
233
+ * @return int $amount
234
+ **/
235
+ public function getAmountFromProfile(Mage_Sales_Model_Recurring_Profile $profile)
236
+ {
237
+ $amount = $profile->getBillingAmount() + $profile->getTaxAmount() + $profile->getShippingAmount();
238
+
239
+ if ($this->isInitialProfileOrder($profile)) {
240
+ $amount += $profile->getInitAmount() ;
241
+ }
242
+
243
+ return $amount;
244
+ }
245
+
246
+ protected function isInitialProfileOrder(Mage_Sales_Model_Recurring_Profile $profile)
247
+ {
248
+ if (count($profile->getChildOrderIds()) && current($profile->getChildOrderIds()) == "-1") {
249
+ return true;
250
+ }
251
+
252
+ return false;
253
+ }
254
+
255
+
256
+ /**
257
+ *
258
+ * @return Mage_Checkout_Model_Session
259
+ */
260
+ protected function getCheckout()
261
+ {
262
+ return Mage::getSingleton('checkout/session');
263
+ }
264
+
265
+
266
+ public function updateDebitAmountAction()
267
+ {
268
+ /* @var $_helper Allopass_Hipay_Helper_Data */
269
+ $_helper = Mage::helper('hipay');
270
+ $response = array();
271
+ $response['error'] = true;
272
+ $response['success'] = false;
273
+
274
+ $payment_profile_id = $this->getRequest()->getParam('payment_profile_id', false);
275
+ $amount = $this->getCheckout()->getQuote()->getGrandTotal();
276
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
277
+
278
+ if ($useOrderCurrency) {
279
+ $currency = Mage::app()->getStore()->getCurrency();
280
+ } else {
281
+ $currency = Mage::app()->getStore()->getBaseCurrency();
282
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
 
284
+ $response['message'] = Mage::helper('hipay')->__('You will be debit of amount %s only after submit order.', $currency->format($amount, array(), true));
285
+
286
+ if ($payment_profile_id) {
287
+ try {
288
+ $splitPayment = $_helper->splitPayment((int)$payment_profile_id, $amount);
289
+ $response['success'] = true;
290
+ $response['error'] = false;
291
+ $response['splitPayment'] = $splitPayment;
292
+ $response['grandTotal'] = $amount;
293
+ $firstAmount = $splitPayment[0]['amountToPay'];
294
+ array_shift($splitPayment);
295
+ $otherPayments = "<p><span>" . Mage::helper('hipay')->__("Your next payments:") . '</span><table class="data-table" id="split-payment-cc-table">';
296
+ foreach ($splitPayment as $value) {
297
+ $otherPayments .= '<tr>';
298
+ $amount = $currency->format($value['amountToPay'], array(), true);
299
+ $dateToPay = new Zend_Date($value['dateToPay']);
300
+ $otherPayments .= '<td>' . $dateToPay->toString(Zend_Date::DATE_LONG) . "</td><td> " . $amount . '</td>' ;
301
+ $otherPayments .= '</tr>';
302
+ }
303
+ $otherPayments .= '<table></p>';
304
+
305
+ $response['labelSplitPayment'] = "<p><span>" . Mage::helper('hipay')->__('You will be debit of amount %s only after submit order.', $currency->format($firstAmount, array(), true)) . '</span></p>';
306
+ $response['labelSplitPayment'] .= $otherPayments;
307
+ } catch (Exception $e) {
308
+ $response['message'] = $e->getMessage();
309
+ }
310
+ }
311
 
312
+
313
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
314
+ }
315
+ }
 
app/code/community/Allopass/Hipay/Helper/Data.php CHANGED
@@ -1,623 +1,1149 @@
1
  <?php
 
2
  class Allopass_Hipay_Helper_Data extends Mage_Core_Helper_Abstract
3
  {
4
-
5
- /**
6
- *
7
- * @param Allopass_Hipay_Model_PaymentProfile|int $profile
8
- * @param float $amount
9
- */
10
- public function splitPayment($profile,$amount)
11
- {
12
- $paymentsSplit = array();
13
-
14
- if(is_int($profile))
15
- $profile = Mage::getModel('hipay/paymentProfile')->load($profile);
16
-
17
- if($profile)
18
- {
19
- $maxCycles = (int)$profile->getPeriodMaxCycles();
20
-
21
- $periodFrequency = (int)$profile->getPeriodFrequency();
22
- $periodUnit = $profile->getPeriodUnit();
23
-
24
- $todayDate = new Zend_Date();
25
-
26
- if($maxCycles < 1)
27
- Mage::throwException("Period max cycles is equals zero or negative for Payment Profile ID: ".$profile->getId());
28
-
29
-
30
- $part = (int)($amount / $maxCycles);
31
- //$reste = $amount%$maxCycles;
32
- $fmod = fmod($amount, $maxCycles);
33
-
34
- for ($i=0;$i<=($maxCycles-1);$i++)
35
- {
36
- $j = $i - 1;
37
- $todayClone = clone $todayDate;
38
- switch ($periodUnit)
39
- {
40
- case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_MONTH:
41
- {
42
- $dateToPay = $todayClone->addMonth($periodFrequency+$j)->getDate()->toString('yyyy-MM-dd');
43
- break;
44
- }
45
- case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_DAY:
46
- {
47
- $dateToPay = $todayClone->addDay($periodFrequency+$j)->getDate()->toString('yyyy-MM-dd');
48
-
49
- break;
50
- }
51
- case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_SEMI_MONTH://TODO test this case !!!
52
- {
53
- $dateToPay = $todayClone->addDay(15 + $periodFrequency+$j)->getDate()->toString('yyyy-MM-dd');
54
- break;
55
- }
56
- case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_WEEK:
57
- {
58
- $dateToPay = $todayClone->addWeek($periodFrequency+$j)->getDate()->toString('yyyy-MM-dd');
59
- break;
60
- }
61
- case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_YEAR:
62
- {
63
- $dateToPay = $todayClone->addYear($periodFrequency+$j)->getDate()->toString('yyyy-MM-dd');
64
- break;
65
- }
66
- }
67
-
68
- $amountToPay = $i==0 ? ($part + $fmod) : $part;
69
- $paymentsSplit[] = array('dateToPay'=>$dateToPay,'amountToPay'=>$amountToPay);
70
- }
71
-
72
- return $paymentsSplit;
73
-
74
- }
75
-
76
- Mage::throwException("Payment Profile not found");
77
-
78
- }
79
-
80
- /**
81
- *
82
- * @param Mage_Sales_Model_Order $order
83
- * @param Allopass_Hipay_Model_PaymentProfile|int $profile $profile
84
- */
85
- public function insertSplitPayment($order,$profile,$customerId,$cardToken)
86
- {
87
-
88
-
89
-
90
- if(is_int($profile))
91
- $profile = Mage::getModel('hipay/paymentProfile')->load($profile);
92
-
93
- if(!$this->splitPaymentsExists($order->getId()))
94
- {
95
-
96
- $paymentsSplit = $this->splitPayment($profile, $order->getBaseGrandTotal());
97
-
98
-
99
- //remove first element because is already paid
100
- array_shift($paymentsSplit);
101
-
102
-
103
- //remove last element because the first split is already paid
104
- //array_pop($paymentsSplit);
105
-
106
- foreach ($paymentsSplit as $split)
107
- {
108
- $splitPayment = Mage::getModel('hipay/splitPayment');
109
- $data = array('order_id'=>$order->getId(),
110
- 'real_order_id'=>(int)$order->getRealOrderId(),
111
- 'customer_id'=>$customerId,
112
- 'card_token'=>$cardToken,
113
- 'total_amount'=>$order->getBaseGrandTotal(),
114
- 'amount_to_pay'=>$split['amountToPay'],
115
- 'date_to_pay'=>$split['dateToPay'],
116
- 'method_code'=>$order->getPayment()->getMethod(),
117
- 'status'=>Allopass_Hipay_Model_SplitPayment::SPLIT_PAYMENT_STATUS_PENDING,
118
- );
119
-
120
- $splitPayment->setData($data);
121
-
122
-
123
- try {
124
- $splitPayment->save();
125
- } catch (Exception $e) {
126
-
127
- Mage::throwException("Error on save split payments!");
128
- }
129
- }
130
-
131
- }
132
- }
133
-
134
-
135
- /**
136
- *
137
- * @param int $orderId
138
- * @return boolean
139
- */
140
- public function splitPaymentsExists($orderId)
141
- {
142
- $collection = Mage::getModel('hipay/splitPayment')->getCollection()->addFieldToFilter('order_id',$orderId);
143
- if($collection->count())
144
- return true;
145
-
146
- return false;
147
- }
148
-
149
- public function getHipayMethods()
150
- {
151
- $methods = array();
152
-
153
- foreach (Mage::getStoreConfig('payment') as $code => $data) {
154
- if(strpos($code, 'hipay') !== false)
155
- {
156
- if (isset($data['model']))
157
- $methods[$code] = $data['model'];
158
- }
159
- }
160
-
161
- return $methods;
162
-
163
- }
164
-
165
- public function checkSignature($signature,$fromNotification = false,$response = null)
166
- {
167
- $passphrase =$this->getConfig()->getSecretPassphrase();
168
- if(!is_null($response))
169
- {
170
- $orderArr = $response->getOrder();
171
-
172
- /* @var $order Mage_Sales_Model_Order */
173
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderArr['id']);
174
-
175
- if($order->getId())
176
- {
177
- $method = $order->getPayment()->getMethodInstance();
178
- if($method->getConfigData('is_test_mode'))
179
- {
180
- $passphrase = $this->getConfig()->getSecretPassphraseTest();
181
- }
182
- }
183
- }
184
-
185
-
186
- if(empty($passphrase) || empty($signature))
187
- return true;
188
-
189
- if($fromNotification)
190
- {
191
- $rawPostData = file_get_contents("php://input");
192
- if($signature == sha1($rawPostData . $passphrase));
193
- return true;
194
-
195
- return false;
196
- }
197
-
198
-
199
- $parameters = $this->_getRequest()->getParams();
200
- $string2compute = "";
201
- unset($parameters['hash']);
202
- ksort($parameters);
203
- foreach ($parameters as $name => $value) {
204
- if (strlen($value) > 0) {
205
- $string2compute .= $name . $value . $passphrase;
206
- }
207
- }
208
-
209
- if(sha1($string2compute) == $signature)
210
- return true;
211
-
212
- return false;
213
- }
214
-
215
- public function checkIfCcExpDateIsValid($customer)
216
- {
217
- if(is_int($customer))
218
- $customer = Mage::getModel('customer/customer')->load($customer);
219
-
220
- $expDate = $customer->getHipayCcExpDate();
221
- $alias = $customer->getHipayAliasOneclick();
222
- if(!empty($expDate) && !empty($alias))
223
- {
224
- list($expMonth,$expYear) = explode("-", $expDate);
225
-
226
- return $this->checkIfCcIsExpired($expMonth, $expYear);
227
-
228
- /*$today = new Zend_Date(Mage::app()->getLocale()->storeTimeStamp());
229
-
230
- $currentYear = (int)$today->getYear()->toString("YY");
231
- $currentMonth = (int)$today->getMonth()->toString("MM");
232
-
233
- if($currentYear > (int)$expYear)
234
- return false;
235
-
236
- if($currentYear == (int)$expYear && $currentMonth > (int)$expMonth)
237
- return false;
238
-
239
- return true;*/
240
-
241
- }
242
-
243
- return false;
244
- }
245
-
246
- public function checkIfCcIsExpired($expMonth,$expYear)
247
- {
248
- $today = new Zend_Date(Mage::app()->getLocale()->storeTimeStamp());
249
-
250
- $currentYear = (int)$today->getYear()->toString("YY");
251
- $currentMonth = (int)$today->getMonth()->toString("MM");
252
-
253
- if($currentYear > (int)$expYear)
254
- return false;
255
-
256
- if($currentYear == (int)$expYear && $currentMonth > (int)$expMonth)
257
- return false;
258
-
259
- return true;
260
- }
261
-
262
- /**
263
- *
264
- * @param Mage_Customer_Model_Customer $customer
265
- * @param Allopass_Hipay_Model_Api_Response_Gateway $response
266
- * @param boolean $isRecurring
267
- */
268
- public function responseToCustomer($customer,$response,$isRecurring = false)
269
- {
270
-
271
- $paymentMethod = $response->getPaymentMethod();
272
- $paymentProduct = $response->getPaymentProduct();
273
- $token = isset($paymentMethod['token']) ? $paymentMethod['token'] : $response->getData('cardtoken');
274
-
275
- if($isRecurring)
276
- $customer->setHipayAliasRecurring($token);
277
- else
278
- $customer->setHipayAliasOneclick($token );
279
-
280
- if(isset($paymentMethod['card_expiry_month']) && $paymentMethod['card_expiry_year'])
281
- $customer->setHipayCcExpDate($paymentMethod['card_expiry_month'] . "-" . $paymentMethod['card_expiry_year'] );
282
- else
283
- $customer->setHipayCcExpDate(substr($response->getData('cardexpiry'), 4,2) . "-" . substr($response->getData('cardexpiry'), 0,4) );
284
-
285
- $customer->setHipayCcNumberEnc(isset($paymentMethod['pan']) ? $paymentMethod['pan'] : $response->getData('cardpan'));
286
- //$customer->setHipayCcType(isset($paymentMethod['brand']) ? strtolower($paymentMethod['brand']) : strtolower($response->getData('cardbrand')));
287
- $customer->setHipayCcType($paymentProduct);
288
-
289
- $customer->getResource()->saveAttribute($customer, 'hipay_alias_oneclick');
290
- $customer->getResource()->saveAttribute($customer, 'hipay_cc_exp_date');
291
- $customer->getResource()->saveAttribute($customer, 'hipay_cc_number_enc');
292
- $customer->getResource()->saveAttribute($customer, 'hipay_cc_type');
293
-
294
- return $this;
295
- }
296
-
297
- protected function _cardTokenExist($ccToken,$customer_id=0)
298
- {
299
- $cards = Mage::getResourceModel('hipay/card_collection')
300
- ->addFieldToSelect('card_id')
301
- ->addFieldToFilter('cc_token', $ccToken);
302
-
303
- if($customer_id > 0)
304
- {
305
- $cards->addFieldToFilter('customer_id', $customer_id);
306
- }
307
-
308
- return $cards->count() > 0;
309
- }
310
-
311
- public function createCustomerCardFromResponse($customerId,$response,$isRecurring = false)
312
- {
313
-
314
- $paymentMethod = $response->getPaymentMethod();
315
- $paymentProduct = $response->getPaymentProduct();
316
- $token = isset($paymentMethod['token']) ? $paymentMethod['token'] : $response->getData('cardtoken');
317
-
318
- if($this->_cardTokenExist($token,$customerId))
319
- {
320
- return null;
321
- }
322
-
323
- $pan = isset($paymentMethod['pan']) ? $paymentMethod['pan'] : $response->getData('cardpan');
324
-
325
- $newCard = Mage::getModel('hipay/card');
326
- $newCard->setCustomerId($customerId);
327
- $newCard->setCcToken($token);
328
- $newCard->setCcNumberEnc($pan);
329
- $newCard->setCcType($paymentProduct);
330
- $newCard->setCcStatus(Allopass_Hipay_Model_Card::STATUS_ENABLED);
331
- $newCard->setName($this->__('Card %s - %s',$paymentProduct,$pan));
332
-
333
- if(isset($paymentMethod['card_expiry_month']) && $paymentMethod['card_expiry_year'])
334
- {
335
- $newCard->setCcExpMonth($paymentMethod['card_expiry_month']);
336
- $newCard->setCcExpYear($paymentMethod['card_expiry_year'] );
337
- }
338
- else
339
- {
340
- $newCard->setCcExpMonth(substr($response->getData('cardexpiry'), 4,2));
341
- $newCard->setCcExpYear(substr($response->getData('cardexpiry'), 0,4));
342
- }
343
-
344
- try {
345
- $newCard->save();
346
- return $newCard;
347
- } catch (Exception $e) {
348
- Mage::logException($e);
349
- }
350
-
351
- }
352
-
353
- public function reAddToCart($incrementId) {
354
-
355
- $cart = Mage::getSingleton('checkout/cart');
356
- $order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);
357
-
358
- if ($order->getId()) {
359
- $items = $order->getItemsCollection();
360
- foreach ($items as $item) {
361
- try {
362
- $cart->addOrderItem($item);
363
- } catch (Mage_Core_Exception $e) {
364
- if (Mage::getSingleton('checkout/session')->getUseNotice(true)) {
365
- Mage::getSingleton('checkout/session')->addNotice($e->getMessage());
366
- } else {
367
- Mage::getSingleton('checkout/session')->addError($e->getMessage());
368
- }
369
- } catch (Exception $e) {
370
- Mage::getSingleton('checkout/session')->addException($e, Mage::helper('checkout')->__('Cannot add the item to shopping cart.')
371
- );
372
- }
373
- }
374
- }
375
-
376
- $cart->save();
377
- }
378
-
379
-
380
- /**
381
- * Return message for gateway transaction request
382
- *
383
- * @param Mage_Payment_Model_Info $payment
384
- * @param string $requestType
385
- * @param string $lastTransactionId
386
- * @param float $amount
387
- * @param string $exception
388
- * @return bool|string
389
- */
390
- public function getTransactionMessage($payment, $requestType, $lastTransactionId, $amount = false,
391
- $exception = false,$additionalMessage = false
392
- ) {
393
- return $this->getExtendedTransactionMessage(
394
- $payment, $requestType, $lastTransactionId, $amount, $exception,$additionalMessage
395
- );
396
- }
397
-
398
- /**
399
- * Return message for gateway transaction request
400
- *
401
- * @param Mage_Payment_Model_Info $payment
402
- * @param string $requestType
403
- * @param string $lastTransactionId
404
- * @param float $amount
405
- * @param string $exception
406
- * @param string $additionalMessage Custom message, which will be added to the end of generated message
407
- * @return bool|string
408
- */
409
- public function getExtendedTransactionMessage($payment, $requestType, $lastTransactionId, $amount = false,
410
- $exception = false, $additionalMessage = false
411
- ) {
412
- $operation = 'Operation: ' . $requestType;// $this->_getOperation($requestType);
413
-
414
- if (!$operation) {
415
- return false;
416
- }
417
-
418
- if ($amount) {
419
- $amount = $this->__('amount: %s', $this->_formatPrice($payment, $amount));
420
- }
421
-
422
- if ($exception) {
423
- $result = $this->__('failed');
424
- } else {
425
- $result = $this->__('successful');
426
- }
427
-
428
- $card = $this->__('Credit Card: xxxx-%s', $payment->getCcLast4());
429
- $cardType = $this->__('Card type: %s',ucfirst($this->getCcTypeHipay($payment->getCcType())));
430
-
431
- $pattern = '%s - %s.<br /> %s<br /> %s.<br /> %s';
432
- $texts = array($operation,$result,$card, $amount,$cardType);
433
-
434
- if (!is_null($lastTransactionId)) {
435
- $pattern .= '<br />%s.';
436
- $texts[] = $this->__('Hipay Transaction ID %s', $lastTransactionId);
437
- }
438
-
439
- if ($additionalMessage) {
440
- $pattern .= '<br />%s.';
441
- $texts[] = $additionalMessage;
442
- }
443
- //$pattern .= '<br />%s';
444
- //$texts[] = $exception;
445
-
446
- return call_user_func_array(array($this, '__'), array_merge(array($pattern), $texts));
447
- }
448
-
449
- /**
450
- * Format price with currency sign
451
- * @param Mage_Payment_Model_Info $payment
452
- * @param float $amount
453
- * @return string
454
- */
455
- protected function _formatPrice($payment, $amount)
456
- {
457
- return $payment->getOrder()->getBaseCurrency()->formatTxt($amount);
458
- }
459
-
460
-
461
- /**
462
- * Send email id payment is in Fraud status
463
- * @param Mage_Customer_Model_Customer $receiver
464
- * @param Mage_Sales_Model_Order $order
465
- * @param string $message
466
- * @return Mage_Checkout_Helper_Data
467
- */
468
- public function sendFraudPaymentEmail($receiver,$order, $message,$email_key = 'fraud_payment')
469
- {
470
- $translate = Mage::getSingleton('core/translate');
471
- /* @var $translate Mage_Core_Model_Translate */
472
- $translate->setTranslateInline(false);
473
-
474
- $mailTemplate = Mage::getModel('core/email_template');
475
- /* @var $mailTemplate Mage_Core_Model_Email_Template */
476
-
477
- $template = Mage::getStoreConfig('hipay/'.$email_key.'/template', $order->getStoreId());
478
-
479
- $copyTo = $this->_getEmails('hipay/'.$email_key.'/copy_to', $order->getStoreId());
480
- $copyMethod = Mage::getStoreConfig('hipay/'.$email_key.'/copy_method', $order->getStoreId());
481
- if ($copyTo && $copyMethod == 'bcc') {
482
- $mailTemplate->addBcc($copyTo);
483
- }
484
-
485
- $sendTo = array(
486
- array(
487
- 'email' => $receiver->getEmail(),
488
- 'name' => $receiver->getName()
489
- )
490
- );
491
-
492
- if ($copyTo && $copyMethod == 'copy') {
493
- foreach ($copyTo as $email) {
494
- $sendTo[] = array(
495
- 'email' => $email,
496
- 'name' => null
497
- );
498
- }
499
- }
500
- $shippingMethod = '';
501
- if ($shippingInfo = $order->getShippingAddress()->getShippingMethod()) {
502
- $data = explode('_', $shippingInfo);
503
- $shippingMethod = $data[0];
504
- }
505
-
506
- $paymentMethod = '';
507
- if ($paymentInfo = $order->getPayment()) {
508
- $paymentMethod = $paymentInfo->getMethod();
509
- }
510
-
511
- $items = '';
512
- foreach ($order->getAllVisibleItems() as $_item) {
513
- /* @var $_item Mage_Sales_Model_Quote_Item */
514
- $items .= $_item->getProduct()->getName() . ' x '. $_item->getQty() . ' '
515
- . $order->getStoreCurrencyCode() . ' '
516
- . $_item->getProduct()->getFinalPrice($_item->getQty()) . "\n";
517
- }
518
- $total = $order->getStoreCurrencyCode() . ' ' . $order->getGrandTotal();
519
-
520
- foreach ($sendTo as $recipient) {
521
- $mailTemplate->setDesignConfig(array('area'=>'frontend', 'store'=>$order->getStoreId()))
522
- ->sendTransactional(
523
- $template,
524
- Mage::getStoreConfig('hipay/'.$email_key.'/identity', $order->getStoreId()),
525
- $recipient['email'],
526
- $recipient['name'],
527
- array(
528
- 'reason' => $message,
529
- 'dateAndTime' => Mage::app()->getLocale()->date(),
530
- 'customer' => $order->getCustomerFirstname() . ' ' . $order->getCustomerLastname(),
531
- 'customerEmail' => $order->getCustomerEmail(),
532
- 'billingAddress' => $order->getBillingAddress(),
533
- 'shippingAddress' => $order->getShippingAddress(),
534
- 'shippingMethod' => Mage::getStoreConfig('carriers/'.$shippingMethod.'/title'),
535
- 'paymentMethod' => Mage::getStoreConfig('payment/'.$paymentMethod.'/title'),
536
- 'items' => nl2br($items),
537
- 'total' => $total
538
- )
539
- );
540
- }
541
-
542
- $translate->setTranslateInline(true);
543
-
544
- return $this;
545
- }
546
-
547
- protected function _getEmails($configPath, $storeId)
548
- {
549
- $data = Mage::getStoreConfig($configPath, $storeId);
550
- if (!empty($data)) {
551
- return explode(',', $data);
552
- }
553
- return false;
554
- }
555
-
556
- /**
557
- *
558
- * @return Allopass_Hipay_Model_Config
559
- */
560
- protected function getConfig()
561
- {
562
- return Mage::getSingleton('hipay/config');
563
- }
564
-
565
- public function getCcTypeHipay($ccTypeMagento,$exceptionIfNotFound = false)
566
- {
567
- $ccTypes = Mage::getSingleton('hipay/config')->getCcTypesHipay();
568
-
569
- if(isset($ccTypes[$ccTypeMagento]))
570
- return $ccTypes[$ccTypeMagento];
571
-
572
- if($exceptionIfNotFound)
573
- Mage::throwException(Mage::helper('hipay')->__("Code Credit Card Type Hipay not found!"));
574
-
575
- return $ccTypeMagento;
576
- }
577
- /*
578
- * TPPMAG1-2 - JPN
579
- */
580
- public function is3dSecure($use3dSecure, $config3dsRules, $payment = false)
581
- {
582
- $params = 0;
583
- if($use3dSecure > 0 && !$payment){
584
- $params = 1;
585
- }else{
586
- switch ((int)$use3dSecure) {
587
- case 1:
588
- $params = 1;
589
- break;
590
- case 2:
591
- case 3:
592
- /* @var $rule Allopass_Hipay_Model_Rule */
593
- $rule = Mage::getModel('hipay/rule')->load($config3dsRules);
594
- if($rule->getId() && $rule->validate($payment->getOrder()) )
595
- {
596
- $params = 1;
597
- if((int)$use3dSecure == 3)//case for force 3ds if rules are validated
598
- $params = 2;
599
-
600
- }
601
- break;
602
- case 4:
603
- $params = 2;
604
- break;
605
- }
606
- }
607
- return $params;
608
- }
609
-
610
- /**
611
- * @param Mage_Sales_Model_Order_Payment $payment
612
- *
613
- * @return string
614
- */
615
- public function getCheckoutSuccessPage($payment) {
616
- // if empty success page magento
617
- return empty(Mage::getStoreConfig('payment/'.$payment->getMethod().'/success_redirect_page')) ?
618
- Mage::getUrl('checkout/onepage/success') :
619
- Mage::getStoreConfig('payment/'.$payment->getMethod().'/success_redirect_page');
620
- }
621
-
622
-
623
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+
3
  class Allopass_Hipay_Helper_Data extends Mage_Core_Helper_Abstract
4
  {
5
+ const TYPE_ITEM_BASKET_GOOD = "good";
6
+ const TYPE_ITEM_BASKET_FEE = "fee";
7
+ const TYPE_ITEM_BASKET_DISCOUNT = "discount";
8
+
9
+
10
+ const FIELD_BASE_INVOICED = 'row_invoiced';
11
+ const FIELD_BASE_DISCOUNT_INVOICED = 'discount_invoiced';
12
+ const FIELD_BASE_TAX_INVOICED = 'tax_invoiced';
13
+ const FIELD_BASE_ROW = 'row_total_incl_tax';
14
+ const FIELD_BASE_DISCOUNT = 'discount_amount';
15
+ const FIELD_BASE_TAX = 'tax_amount';
16
+ const FIELD_BASE_REFUNDED = 'amount_refunded';
17
+ const FIELD_DISCOUNT_REFUNDED = 'discount_refunded';
18
+ const FIELD_TAX_REFUNDED = 'tax_refunded';
19
+ const FIELD_BASE_DISCOUNT_REFUNDED = 'base_discount_refunded';
20
+ const FIELD_BASE_TAX_REFUNDED = '_base_tax_refunded';
21
+
22
+ const FIELD_BASE_TAX_HIDDEN_INVOICED = 'hidden_tax_invoiced';
23
+ const FIELD_BASE_TAX_HIDDEN_REFUNDED = 'hidden_tax_amount';
24
+ const FIELD_BASE_TAX_HIDDEN = 'hidden_tax_refunded';
25
+
26
+ const STATE_AUTHORIZATION = '0';
27
+ const STATE_REFUND = '1';
28
+ const STATE_CAPTURE = '2';
29
+
30
+ /**
31
+ * Return to TPP Tax rate only if all products have the same tax
32
+ *
33
+ * @param Mage_Sales_Model_Order
34
+ * @return json
35
+ */
36
+ public function getTaxeRateInformation($order)
37
+ {
38
+ $products = $order->getAllItems();
39
+ $taxPercentbasket = 0;
40
+
41
+ // =============================================================== //
42
+ // For each product in basket
43
+ // =============================================================== //
44
+ foreach ($products as $key => $product) {
45
+ $item = array();
46
+ // For configurable products
47
+ if ($product->getParentItem()) {
48
+ $productParent = $product->getParentItem();
49
+
50
+ // Check if simple product override configurable his parent
51
+ $tax_percent = $product->getData('tax_percent');
52
+
53
+ if (!empty($tax_percent) && $product->getData('tax_percent') > 0) {
54
+ $product->getData('tax_percent');
55
+ } else {
56
+ $productParent->getData('tax_percent');
57
+ }
58
+ } else {
59
+ $taxPercent = $product->getData('tax_percent');
60
+ }
61
+
62
+ // Checking
63
+ if ($product->getProductType() == 'simple') {
64
+ // Check if taxe rate is the same for all products
65
+ if ($taxPercentbasket == 0) {
66
+ $taxPercentbasket = $taxPercent;
67
+ } else {
68
+ if ($taxPercentbasket != $taxPercent) {
69
+ $taxPercentbasket = 0;
70
+ }
71
+ }
72
+ }
73
+ }
74
+
75
+ return $taxPercentbasket;
76
+ }
77
+
78
+
79
+ /**
80
+ * Add item discount in basket
81
+ *
82
+ * @param $order
83
+ * @param $refund
84
+ * @param $capture
85
+ * @return array
86
+ */
87
+ private function processDiscount($order,$action, $basket)
88
+ {
89
+ $coupon = $order->getCouponCode();
90
+ if (!empty($coupon)) {
91
+ $item = array();
92
+ $item['type'] = Allopass_Hipay_Helper_Data::TYPE_ITEM_BASKET_DISCOUNT;
93
+ $item['product_reference'] = $order->getCouponCode();
94
+ $item['name'] = $order->getDiscountDescription();
95
+ $item['discount'] = 0;
96
+ $item['total_amount'] = 0;
97
+ $item['quantity'] = '1';
98
+ $item['unit_price'] = '0';
99
+ $basket[] = $item;
100
+ }
101
+
102
+ return $basket;
103
+ }
104
+
105
+ /**
106
+ * Add item Shipping in basket
107
+ *
108
+ * @param $order
109
+ * @param $refund
110
+ * @param $capture
111
+ * @return array
112
+ */
113
+ private function processShipping($order, $action,$basket)
114
+ {
115
+ if ($order->getBaseShippingAmount() > 0) {
116
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
117
+
118
+ $item = array();
119
+ $item['type'] = Allopass_Hipay_Helper_Data::TYPE_ITEM_BASKET_FEE;
120
+ $item['product_reference'] = $order->getShippingDescription();
121
+ $item['name'] = $order->getShippingDescription();
122
+ $item['quantity'] = '1';
123
+
124
+ if (!$useOrderCurrency){
125
+ $item['unit_price'] =round( $order->getBaseShippingAmount(),3);
126
+ $item['total_amount'] = round($order->getBaseShippingAmount(),3);
127
+ $item['tax_rate'] = round($order->getBaseShippingTaxAmount() / $order->getBaseShippingAmount() * 100 ,2);
128
+ }else{
129
+ $item['unit_price'] =round( $order->getShippingAmount(),3);
130
+ $item['total_amount'] = round($order->getShippingAmount(),3);
131
+ $item['tax_rate'] = round($order->getShippingTaxAmount() / $order->getShippingAmount() * 100 ,2);
132
+ }
133
+
134
+ if ($action == Allopass_Hipay_Helper_Data::STATE_CAPTURE || $action == Allopass_Hipay_Helper_Data::STATE_REFUND){
135
+ $item['product_reference'] = $order->getOrder()->getShippingDescription();
136
+ $item['name'] = $order->getOrder()->getShippingDescription();
137
+ }
138
+
139
+ $basket[] = $item;
140
+ }
141
+
142
+ return $basket;
143
+ }
144
+
145
+ /*
146
+ * Calculate unit price for one product and quantity
147
+ *
148
+ *@param $product
149
+ *@param $quantity
150
+ */
151
+ private function returnUnitPrice($product,$quantity){
152
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
153
+
154
+ if (!$useOrderCurrency) {
155
+ return $product->getBasePrice() + $product->getBaseTaxAmount() / $quantity;
156
+ }else{
157
+ return $product->getPrice() + $product->getTaxAmount() / $quantity;
158
+ }
159
+ }
160
+
161
+ /**
162
+ *
163
+ * Add product in the basket
164
+ *
165
+ * @param $product
166
+ * @param @action
167
+ */
168
+ private function addItem($product, $action,$products)
169
+ {
170
+ $item = array();
171
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
172
+
173
+ // Select base Field according the action
174
+ switch ($action)
175
+ {
176
+ case Allopass_Hipay_Helper_Data::STATE_REFUND:
177
+ $base_discount = Allopass_Hipay_Helper_Data::FIELD_BASE_DISCOUNT_REFUNDED;
178
+ $base_hidden_tax = Allopass_Hipay_Helper_Data::FIELD_BASE_TAX_HIDDEN_REFUNDED;
179
+ break;
180
+ default:
181
+ $base_discount = Allopass_Hipay_Helper_Data::FIELD_BASE_DISCOUNT;
182
+ $base_hidden_tax = Allopass_Hipay_Helper_Data::FIELD_BASE_TAX_HIDDEN;
183
+ }
184
+
185
+ if ($action == Allopass_Hipay_Helper_Data::STATE_CAPTURE || $action == Allopass_Hipay_Helper_Data::STATE_REFUND) {
186
+ $item['quantity'] = intval($product->getData('qty'));
187
+ } else {
188
+ $item['quantity'] = intval($product->getData('qty_ordered'));
189
+ }
190
+
191
+ $sku = trim($product->getData('sku'));
192
+ $taxPercent = $product->getData('tax_percent');
193
+
194
+ if (!$useOrderCurrency) {
195
+ $hidden_tax = $product->getData('base_'+ $base_hidden_tax);
196
+ $discount = $product->getData('base_'+ $base_discount);
197
+ $total_amount = $product->getBaseRowTotal() + $product->getBaseTaxAmount() + $product->getBaseHiddenTaxAmount() + Mage::helper('weee')->getRowWeeeAmountAfterDiscount($product) - $product->getBaseDiscountAmount();
198
+ }else{
199
+ $hidden_tax = $product->getData($base_hidden_tax);
200
+ $discount = $product->getData($base_discount);
201
+ $total_amount = $product->getRowTotal() + $product->getTaxAmount() + $product->getHiddenTaxAmount() + Mage::helper('weee')->getRowWeeeAmountAfterDiscount($product) - $product->getDiscountAmount();
202
+ }
203
+ // Add information in basket only if the product is simple
204
+ if ($item['quantity'] > 0 && $total_amount > 0 ) {
205
+ if ($action == Allopass_Hipay_Helper_Data::STATE_CAPTURE || $action == Allopass_Hipay_Helper_Data::STATE_REFUND){
206
+ // To avoid 0.001 between original authorization and capture
207
+ foreach ($products as $key => $original) {
208
+ if ($product->getSku() == $original->getSku()){
209
+ if ($original->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE && $original->isChildrenCalculated()) {
210
+ foreach ($original->getChildren() as $children) {
211
+ $unitPrice = $this->returnUnitPrice($children,$item);
212
+ }
213
+ } else {
214
+ $unitPrice = $this->returnUnitPrice($original,$original->getData('qty_ordered'));
215
+ }
216
+ }
217
+ }
218
+ }else{
219
+ // Don't use unit price in product because we need a better precision
220
+ $unitPrice = $this->returnUnitPrice($product,$item['quantity']);
221
+ }
222
+
223
+ // if store support EAN ( Please set the attribute on hipay config )
224
+ if (Mage::getStoreConfig('hipay/hipay_basket/attribute_ean', Mage::app()->getStore())) {
225
+ $attribute = Mage::getStoreConfig('hipay/hipay_basket/attribute_ean', Mage::app()->getStore());
226
+
227
+ if (Mage::getStoreConfig('hipay/hipay_basket/load_product_ean', Mage::app()->getStore())) {
228
+ $resource = Mage::getSingleton('catalog/product')->getResource();
229
+ $ean = $resource->getAttributeRawValue($product->getProductId(), $attribute,
230
+ Mage::app()->getStore());
231
+ } else {
232
+ // The custom attribute have to be present in quote and order
233
+ $ean = $product->getData($attribute);
234
+ }
235
+ }
236
+
237
+ $item['type'] = Allopass_Hipay_Helper_Data::TYPE_ITEM_BASKET_GOOD;
238
+ $item['tax_rate'] = Mage::app()->getStore()->roundPrice($taxPercent);
239
+ $item['unit_price'] = round($unitPrice, 3);
240
+ $item['total_amount'] = $total_amount;
241
+
242
+ if (!empty($ean) && $ean != 'null') {
243
+ $item['european_article_numbering'] = $ean;
244
+ }
245
+ $item['product_reference'] = $sku;
246
+ $item['name'] = $product->getName();
247
+
248
+ // According the configuration we use this trick to complete the discount with tax hidden
249
+ $item['discount'] = round($total_amount - ($unitPrice * $item['quantity']), 3);
250
+
251
+ return $item;
252
+ }
253
+
254
+
255
+ }
256
+ /**
257
+ * Return to TPP API basket informations
258
+ *
259
+ * @param Mage_Sales_Model_Order
260
+ * @param STATE_REFUND OU STATE_CAPTURE
261
+ * @return json
262
+ *
263
+ */
264
+ public function getCartInformation($order,$action = Allopass_Hipay_Helper_Data::STATE_AUTHORIZATION,$payment = null)
265
+ {
266
+ $basket = array();
267
+ $products = $order->getAllVisibleItems();
268
+
269
+ // =============================================================== //
270
+ // Add each product in basket
271
+ // =============================================================== //
272
+ if ($action == Allopass_Hipay_Helper_Data::STATE_AUTHORIZATION) {
273
+
274
+ $basket = $this->processDiscount($order, $action,$basket);
275
+
276
+ $basket = $this->processShipping($order, $action,$basket);
277
+
278
+ foreach ($products as $key => $product) {
279
+ if ($product->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
280
+ if ($product->isChildrenCalculated()) {
281
+ foreach ($product->getChildren() as $children) {
282
+ $basket[] = $this->addItem($children, $action);
283
+ }
284
+ } else {
285
+ $basket[] = $this->addItem($product, $action);
286
+ }
287
+ } else {
288
+ $basket[] = $this->addItem($product, $action);
289
+ }
290
+ }
291
+ }
292
+
293
+ // Partial capture
294
+ if ($action == Allopass_Hipay_Helper_Data::STATE_CAPTURE) {
295
+ if ($order->hasInvoices()) {
296
+ $invoice = $order->getInvoiceCollection()->getLastItem();
297
+
298
+ // =============================================================== //
299
+ // Add Shipping in basket
300
+ // =============================================================== //
301
+ $basket = $this->processShipping($invoice, $action,$basket);
302
+
303
+ foreach ($invoice->getAllItems() as $product) {
304
+ $item = $this->addItem($product, $action,$products);
305
+ if ($item){
306
+ $basket[] = $item;
307
+ }
308
+ }
309
+ }
310
+ }
311
+
312
+ // Refund
313
+ if ($action == Allopass_Hipay_Helper_Data::STATE_REFUND) {
314
+ $creditMemo = $payment->getCreditmemo();
315
+
316
+ // =============================================================== //
317
+ // Add Shipping in basket
318
+ // =============================================================== //
319
+ $basket = $this->processShipping($creditMemo, $action,$basket);
320
+
321
+ foreach ($creditMemo->getAllItems() as $product) {
322
+ $item = $this->addItem($product, $action,$products);
323
+ if ($item) {
324
+ $basket[] = $item;
325
+ }
326
+ }
327
+
328
+ }
329
+
330
+ return json_encode($basket);
331
+ }
332
+
333
+ /**
334
+ *
335
+ * @param Allopass_Hipay_Model_PaymentProfile|int $profile
336
+ * @param float $amount
337
+ */
338
+ public function splitPayment(
339
+ $profile,
340
+ $amount,
341
+ $taxAmount = 0
342
+ ) {
343
+ $paymentsSplit = array();
344
+
345
+ if (is_int($profile)) {
346
+ $profile = Mage::getModel('hipay/paymentProfile')->load($profile);
347
+ }
348
+
349
+ if ($profile) {
350
+ $maxCycles = (int)$profile->getPeriodMaxCycles();
351
+
352
+ $periodFrequency = (int)$profile->getPeriodFrequency();
353
+ $periodUnit = $profile->getPeriodUnit();
354
+
355
+ $todayDate = new Zend_Date();
356
+
357
+ if ($maxCycles < 1) {
358
+ Mage::throwException("Period max cycles is equals zero or negative for Payment Profile ID: " . $profile->getId());
359
+ }
360
+
361
+ $part = (int)($amount / $maxCycles);
362
+ $taxPart = $taxAmount / $maxCycles;
363
+
364
+ //$reste = $amount%$maxCycles;
365
+ $fmod = fmod($amount, $maxCycles);
366
+
367
+ for ($i = 0; $i <= ($maxCycles - 1); $i++) {
368
+ $j = $i - 1;
369
+ $todayClone = clone $todayDate;
370
+ switch ($periodUnit) {
371
+ case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_MONTH: {
372
+ $dateToPay = $todayClone->addMonth($periodFrequency + $j)->getDate()->toString('yyyy-MM-dd');
373
+ break;
374
+ }
375
+ case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_DAY: {
376
+ $dateToPay = $todayClone->addDay($periodFrequency + $j)->getDate()->toString('yyyy-MM-dd');
377
+
378
+ break;
379
+ }
380
+ case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_SEMI_MONTH://TODO test this case !!!
381
+ {
382
+ $dateToPay = $todayClone->addDay(15 + $periodFrequency + $j)->getDate()->toString('yyyy-MM-dd');
383
+ break;
384
+ }
385
+ case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_WEEK: {
386
+ $dateToPay = $todayClone->addWeek($periodFrequency + $j)->getDate()->toString('yyyy-MM-dd');
387
+ break;
388
+ }
389
+ case Allopass_Hipay_Model_PaymentProfile::PERIOD_UNIT_YEAR: {
390
+ $dateToPay = $todayClone->addYear($periodFrequency + $j)->getDate()->toString('yyyy-MM-dd');
391
+ break;
392
+ }
393
+ }
394
+
395
+ $amountToPay = $i == 0 ? ($part + $fmod) : $part;
396
+ $paymentsSplit[] = array(
397
+ 'dateToPay' => $dateToPay,
398
+ 'amountToPay' => $amountToPay,
399
+ 'taxAmountToPay' => $taxPart,
400
+ 'totalAmount' => $taxAmount
401
+ );
402
+ }
403
+
404
+ return $paymentsSplit;
405
+ }
406
+
407
+ Mage::throwException("Payment Profile not found");
408
+ }
409
+
410
+ /**
411
+ *
412
+ * @param Mage_Sales_Model_Order $order
413
+ * @param Allopass_Hipay_Model_PaymentProfile|int $profile $profile
414
+ */
415
+ public function insertSplitPayment(
416
+ $order,
417
+ $profile,
418
+ $customerId,
419
+ $cardToken
420
+ ) {
421
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
422
+
423
+ if ($useOrderCurrency) {
424
+ $total = $order->getGrandTotal();
425
+ } else {
426
+ $total = $order->getBaseGrandTotal();
427
+ }
428
+
429
+ if (is_int($profile)) {
430
+ $profile = Mage::getModel('hipay/paymentProfile')->load($profile);
431
+ }
432
+
433
+ if (!$this->splitPaymentsExists($order->getId())) {
434
+ $taxAmount = $order->getTaxAmount();
435
+ $paymentsSplit = $this->splitPayment($profile, $total, $taxAmount);
436
+
437
+ //remove last element because the first split is already paid
438
+ //array_pop($paymentsSplit);
439
+ $numberSplit = 1;
440
+ foreach ($paymentsSplit as $split) {
441
+ $splitPayment = Mage::getModel('hipay/splitPayment');
442
+ $data = array(
443
+ 'order_id' => $order->getId(),
444
+ 'real_order_id' => (int)$order->getRealOrderId(),
445
+ 'customer_id' => $customerId,
446
+ 'card_token' => $cardToken,
447
+ 'total_amount' => $total,
448
+ 'amount_to_pay' => $split['amountToPay'],
449
+ 'tax_amount_to_pay' => $split['taxAmountToPay'],
450
+ 'total_tax_amount' => $split['totalAmount'],
451
+ 'date_to_pay' => $split['dateToPay'],
452
+ 'method_code' => $order->getPayment()->getMethod(),
453
+ 'status' => Allopass_Hipay_Model_SplitPayment::SPLIT_PAYMENT_STATUS_PENDING,
454
+ 'split_number' => strval($numberSplit) . '-' . strval(count($paymentsSplit)),
455
+ );
456
+
457
+ // First split is already paid
458
+ if ($numberSplit == 1){
459
+ $data['status'] = Allopass_Hipay_Model_SplitPayment::SPLIT_PAYMENT_STATUS_COMPLETE;
460
+ }
461
+
462
+ $splitPayment->setData($data);
463
+
464
+ try {
465
+ $splitPayment->save();
466
+ } catch (Exception $e) {
467
+ Mage::throwException("Error on save split payments!");
468
+ }
469
+
470
+ $numberSplit++;
471
+ }
472
+ }
473
+ }
474
+
475
+
476
+ /**
477
+ *
478
+ * @param int $orderId
479
+ * @return boolean
480
+ */
481
+ public function splitPaymentsExists(
482
+ $orderId
483
+ ) {
484
+ $collection = Mage::getModel('hipay/splitPayment')->getCollection()->addFieldToFilter('order_id', $orderId);
485
+ if ($collection->count()) {
486
+ return true;
487
+ }
488
+
489
+ return false;
490
+ }
491
+
492
+ public function getHipayMethods()
493
+ {
494
+ $methods = array();
495
+
496
+ foreach (Mage::getStoreConfig('payment') as $code => $data) {
497
+ if (strpos($code, 'hipay') !== false) {
498
+ if (isset($data['model'])) {
499
+ $methods[$code] = $data['model'];
500
+ }
501
+ }
502
+ }
503
+
504
+ return $methods;
505
+ }
506
+
507
+ public function checkSignature(
508
+ $signature,
509
+ $fromNotification = false,
510
+ $response = null
511
+ ) {
512
+ $passphrase = $this->getConfig()->getSecretPassphrase();
513
+ if (!is_null($response)) {
514
+ $orderArr = $response->getOrder();
515
+
516
+ /* @var $order Mage_Sales_Model_Order */
517
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderArr['id']);
518
+
519
+ if ($order->getId()) {
520
+ $method = $order->getPayment()->getMethodInstance();
521
+ if ($method->getConfigData('is_test_mode')) {
522
+ $passphrase = $this->getConfig()->getSecretPassphraseTest();
523
+ }
524
+ }
525
+ }
526
+
527
+
528
+ if (empty($passphrase) || empty($signature)) {
529
+ return true;
530
+ }
531
+
532
+ if ($fromNotification) {
533
+ $rawPostData = file_get_contents("php://input");
534
+ if ($signature == sha1($rawPostData . $passphrase)) {
535
+ ;
536
+ }
537
+ return true;
538
+
539
+ return false;
540
+ }
541
+
542
+
543
+ $parameters = $this->_getRequest()->getParams();
544
+ $string2compute = "";
545
+ unset($parameters['hash']);
546
+ ksort($parameters);
547
+ foreach ($parameters as $name => $value) {
548
+ if (strlen($value) > 0) {
549
+ $string2compute .= $name . $value . $passphrase;
550
+ }
551
+ }
552
+
553
+ if (sha1($string2compute) == $signature) {
554
+ return true;
555
+ }
556
+
557
+ return false;
558
+ }
559
+
560
+ public function checkIfCcExpDateIsValid(
561
+ $customer
562
+ ) {
563
+ if (is_int($customer)) {
564
+ $customer = Mage::getModel('customer/customer')->load($customer);
565
+ }
566
+
567
+ $expDate = $customer->getHipayCcExpDate();
568
+ $alias = $customer->getHipayAliasOneclick();
569
+ if (!empty($expDate) && !empty($alias)) {
570
+ list($expMonth, $expYear) = explode("-", $expDate);
571
+
572
+ return $this->checkIfCcIsExpired($expMonth, $expYear);
573
+
574
+ /*$today = new Zend_Date(Mage::app()->getLocale()->storeTimeStamp());
575
+
576
+ $currentYear = (int)$today->getYear()->toString("YY");
577
+ $currentMonth = (int)$today->getMonth()->toString("MM");
578
+
579
+ if($currentYear > (int)$expYear)
580
+ return false;
581
+
582
+ if($currentYear == (int)$expYear && $currentMonth > (int)$expMonth)
583
+ return false;
584
+
585
+ return true;*/
586
+ }
587
+
588
+ return false;
589
+ }
590
+
591
+ public function checkIfCcIsExpired(
592
+ $expMonth,
593
+ $expYear
594
+ ) {
595
+ $today = new Zend_Date(Mage::app()->getLocale()->storeTimeStamp());
596
+
597
+ $currentYear = (int)$today->getYear()->toString("YY");
598
+ $currentMonth = (int)$today->getMonth()->toString("MM");
599
+
600
+ if ($currentYear > (int)$expYear) {
601
+ return false;
602
+ }
603
+
604
+ if ($currentYear == (int)$expYear && $currentMonth > (int)$expMonth) {
605
+ return false;
606
+ }
607
+
608
+ return true;
609
+ }
610
+
611
+ /**
612
+ *
613
+ * @param Mage_Customer_Model_Customer $customer
614
+ * @param Allopass_Hipay_Model_Api_Response_Gateway $response
615
+ * @param boolean $isRecurring
616
+ */
617
+ public function responseToCustomer(
618
+ $customer,
619
+ $response,
620
+ $isRecurring = false
621
+ ) {
622
+ $paymentMethod = $response->getPaymentMethod();
623
+ $paymentProduct = $response->getPaymentProduct();
624
+ $token = isset($paymentMethod['token']) ? $paymentMethod['token'] : $response->getData('cardtoken');
625
+
626
+ if ($isRecurring) {
627
+ $customer->setHipayAliasRecurring($token);
628
+ } else {
629
+ $customer->setHipayAliasOneclick($token);
630
+ }
631
+
632
+ if (isset($paymentMethod['card_expiry_month']) && $paymentMethod['card_expiry_year']) {
633
+ $customer->setHipayCcExpDate($paymentMethod['card_expiry_month'] . "-" . $paymentMethod['card_expiry_year']);
634
+ } else {
635
+ $customer->setHipayCcExpDate(substr($response->getData('cardexpiry'), 4,
636
+ 2) . "-" . substr($response->getData('cardexpiry'), 0, 4));
637
+ }
638
+
639
+ $customer->setHipayCcNumberEnc(isset($paymentMethod['pan']) ? $paymentMethod['pan'] : $response->getData('cardpan'));
640
+ //$customer->setHipayCcType(isset($paymentMethod['brand']) ? strtolower($paymentMethod['brand']) : strtolower($response->getData('cardbrand')));
641
+ $customer->setHipayCcType($paymentProduct);
642
+
643
+ $customer->getResource()->saveAttribute($customer, 'hipay_alias_oneclick');
644
+ $customer->getResource()->saveAttribute($customer, 'hipay_cc_exp_date');
645
+ $customer->getResource()->saveAttribute($customer, 'hipay_cc_number_enc');
646
+ $customer->getResource()->saveAttribute($customer, 'hipay_cc_type');
647
+
648
+ return $this;
649
+ }
650
+
651
+ protected function _cardTokenExist(
652
+ $ccToken,
653
+ $customer_id = 0
654
+ ) {
655
+ $cards = Mage::getResourceModel('hipay/card_collection')
656
+ ->addFieldToSelect('card_id')
657
+ ->addFieldToFilter('cc_token', $ccToken);
658
+
659
+ if ($customer_id > 0) {
660
+ $cards->addFieldToFilter('customer_id', $customer_id);
661
+ }
662
+
663
+ return $cards->count() > 0;
664
+ }
665
+
666
+ public function createCustomerCardFromResponse(
667
+ $customerId,
668
+ $response,
669
+ $isRecurring = false
670
+ ) {
671
+ $paymentMethod = $response->getPaymentMethod();
672
+ $paymentProduct = $response->getPaymentProduct();
673
+ $token = isset($paymentMethod['token']) ? $paymentMethod['token'] : $response->getData('cardtoken');
674
+
675
+ if ($this->_cardTokenExist($token, $customerId)) {
676
+ return null;
677
+ }
678
+
679
+ $pan = isset($paymentMethod['pan']) ? $paymentMethod['pan'] : $response->getData('cardpan');
680
+
681
+ $newCard = Mage::getModel('hipay/card');
682
+ $newCard->setCustomerId($customerId);
683
+ $newCard->setCcToken($token);
684
+ $newCard->setCcNumberEnc($pan);
685
+ $newCard->setCcType($paymentProduct);
686
+ $newCard->setCcStatus(Allopass_Hipay_Model_Card::STATUS_ENABLED);
687
+ $newCard->setName($this->__('Card %s - %s', $paymentProduct, $pan));
688
+
689
+ if (isset($paymentMethod['card_expiry_month']) && $paymentMethod['card_expiry_year']) {
690
+ $newCard->setCcExpMonth($paymentMethod['card_expiry_month']);
691
+ $newCard->setCcExpYear($paymentMethod['card_expiry_year']);
692
+ } else {
693
+ $newCard->setCcExpMonth(substr($response->getData('cardexpiry'), 4, 2));
694
+ $newCard->setCcExpYear(substr($response->getData('cardexpiry'), 0, 4));
695
+ }
696
+
697
+ try {
698
+ $newCard->save();
699
+ return $newCard;
700
+ } catch (Exception $e) {
701
+ Mage::logException($e);
702
+ }
703
+ }
704
+
705
+ public function reAddToCart(
706
+ $incrementId
707
+ ) {
708
+ $cart = Mage::getSingleton('checkout/cart');
709
+ $order = Mage::getModel('sales/order')->loadByIncrementId($incrementId);
710
+
711
+ if ($order->getId()) {
712
+ $items = $order->getItemsCollection();
713
+ foreach ($items as $item) {
714
+ try {
715
+ $cart->addOrderItem($item);
716
+ } catch (Mage_Core_Exception $e) {
717
+ if (Mage::getSingleton('checkout/session')->getUseNotice(true)) {
718
+ Mage::getSingleton('checkout/session')->addNotice($e->getMessage());
719
+ } else {
720
+ Mage::getSingleton('checkout/session')->addError($e->getMessage());
721
+ }
722
+ } catch (Exception $e) {
723
+ Mage::getSingleton('checkout/session')->addException($e,
724
+ Mage::helper('checkout')->__('Cannot add the item to shopping cart.')
725
+ );
726
+ }
727
+ }
728
+ }
729
+
730
+ $cart->save();
731
+ }
732
+
733
+
734
+ /**
735
+ * Return message for gateway transaction request
736
+ *
737
+ * @param Mage_Payment_Model_Info $payment
738
+ * @param string $requestType
739
+ * @param string $lastTransactionId
740
+ * @param float $amount
741
+ * @param string $exception
742
+ * @return bool|string
743
+ */
744
+ public function getTransactionMessage(
745
+ $payment,
746
+ $requestType,
747
+ $lastTransactionId,
748
+ $amount = false,
749
+ $exception = false,
750
+ $additionalMessage = false
751
+ ) {
752
+ return $this->getExtendedTransactionMessage(
753
+ $payment, $requestType, $lastTransactionId, $amount, $exception, $additionalMessage
754
+ );
755
+ }
756
+
757
+ /**
758
+ * Return message for gateway transaction request
759
+ *
760
+ * @param Mage_Payment_Model_Info $payment
761
+ * @param string $requestType
762
+ * @param string $lastTransactionId
763
+ * @param float $amount
764
+ * @param string $exception
765
+ * @param string $additionalMessage Custom message, which will be added to the end of generated message
766
+ * @return bool|string
767
+ */
768
+ public function getExtendedTransactionMessage(
769
+ $payment,
770
+ $requestType,
771
+ $lastTransactionId,
772
+ $amount = false,
773
+ $exception = false,
774
+ $additionalMessage = false
775
+ ) {
776
+ $operation = 'Operation: ' . $requestType;// $this->_getOperation($requestType);
777
+
778
+ if (!$operation) {
779
+ return false;
780
+ }
781
+
782
+ if ($amount) {
783
+ $amount = $this->__('amount: %s', $this->_formatPrice($payment, $amount));
784
+ }
785
+
786
+ if ($exception) {
787
+ $result = $this->__('failed');
788
+ } else {
789
+ $result = $this->__('successful');
790
+ }
791
+
792
+ $card = $this->__('Credit Card: xxxx-%s', $payment->getCcLast4());
793
+ $cardType = $this->__('Card type: %s', ucfirst($this->getCcTypeHipay($payment->getCcType())));
794
+
795
+ $pattern = '%s - %s.<br /> %s<br /> %s.<br /> %s';
796
+ $texts = array($operation, $result, $card, $amount, $cardType);
797
+
798
+ if (!is_null($lastTransactionId)) {
799
+ $pattern .= '<br />%s.';
800
+ $texts[] = $this->__('Hipay Transaction ID %s', $lastTransactionId);
801
+ }
802
+
803
+ if ($additionalMessage) {
804
+ $pattern .= '<br />%s.';
805
+ $texts[] = $additionalMessage;
806
+ }
807
+ //$pattern .= '<br />%s';
808
+ //$texts[] = $exception;
809
+
810
+ return call_user_func_array(array($this, '__'), array_merge(array($pattern), $texts));
811
+ }
812
+
813
+ /**
814
+ * Format price with currency sign
815
+ * @param Mage_Payment_Model_Info $payment
816
+ * @param float $amount
817
+ * @return string
818
+ */
819
+ protected function _formatPrice(
820
+ $payment,
821
+ $amount
822
+ ) {
823
+ return $payment->getOrder()->getBaseCurrency()->formatTxt($amount);
824
+ }
825
+
826
+
827
+ /**
828
+ * Send email id payment is in Fraud status
829
+ * @param Mage_Customer_Model_Customer $receiver
830
+ * @param Mage_Sales_Model_Order $order
831
+ * @param string $message
832
+ * @return Mage_Checkout_Helper_Data
833
+ */
834
+ public function sendFraudPaymentEmail(
835
+ $receiver,
836
+ $order,
837
+ $message,
838
+ $email_key = 'fraud_payment'
839
+ ) {
840
+ $translate = Mage::getSingleton('core/translate');
841
+ /* @var $translate Mage_Core_Model_Translate */
842
+ $translate->setTranslateInline(false);
843
+
844
+ $mailTemplate = Mage::getModel('core/email_template');
845
+ /* @var $mailTemplate Mage_Core_Model_Email_Template */
846
+
847
+ $template = Mage::getStoreConfig('hipay/' . $email_key . '/template', $order->getStoreId());
848
+
849
+ $copyTo = $this->_getEmails('hipay/' . $email_key . '/copy_to', $order->getStoreId());
850
+ $copyMethod = Mage::getStoreConfig('hipay/' . $email_key . '/copy_method', $order->getStoreId());
851
+ if ($copyTo && $copyMethod == 'bcc') {
852
+ $mailTemplate->addBcc($copyTo);
853
+ }
854
+
855
+ $sendTo = array(
856
+ array(
857
+ 'email' => $receiver->getEmail(),
858
+ 'name' => $receiver->getName()
859
+ )
860
+ );
861
+
862
+ if ($copyTo && $copyMethod == 'copy') {
863
+ foreach ($copyTo as $email) {
864
+ $sendTo[] = array(
865
+ 'email' => $email,
866
+ 'name' => null
867
+ );
868
+ }
869
+ }
870
+ $shippingMethod = '';
871
+ if ($shippingInfo = $order->getShippingAddress()->getShippingMethod()) {
872
+ $data = explode('_', $shippingInfo);
873
+ $shippingMethod = $data[0];
874
+ }
875
+
876
+ $paymentMethod = '';
877
+ if ($paymentInfo = $order->getPayment()) {
878
+ $paymentMethod = $paymentInfo->getMethod();
879
+ }
880
+
881
+ $items = '';
882
+ foreach ($order->getAllVisibleItems() as $_item) {
883
+ /* @var $_item Mage_Sales_Model_Quote_Item */
884
+ $items .= $_item->getProduct()->getName() . ' x ' . $_item->getQty() . ' '
885
+ . $order->getStoreCurrencyCode() . ' '
886
+ . $_item->getProduct()->getFinalPrice($_item->getQty()) . "\n";
887
+ }
888
+ $total = $order->getStoreCurrencyCode() . ' ' . $order->getGrandTotal();
889
+
890
+ foreach ($sendTo as $recipient) {
891
+ $mailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $order->getStoreId()))
892
+ ->sendTransactional(
893
+ $template,
894
+ Mage::getStoreConfig('hipay/' . $email_key . '/identity', $order->getStoreId()),
895
+ $recipient['email'],
896
+ $recipient['name'],
897
+ array(
898
+ 'reason' => $message,
899
+ 'dateAndTime' => Mage::app()->getLocale()->date(),
900
+ 'customer' => $order->getCustomerFirstname() . ' ' . $order->getCustomerLastname(),
901
+ 'customerEmail' => $order->getCustomerEmail(),
902
+ 'billingAddress' => $order->getBillingAddress(),
903
+ 'shippingAddress' => $order->getShippingAddress(),
904
+ 'shippingMethod' => Mage::getStoreConfig('carriers/' . $shippingMethod . '/title'),
905
+ 'paymentMethod' => Mage::getStoreConfig('payment/' . $paymentMethod . '/title'),
906
+ 'items' => nl2br($items),
907
+ 'total' => $total
908
+ )
909
+ );
910
+ }
911
+
912
+ $translate->setTranslateInline(true);
913
+
914
+ return $this;
915
+ }
916
+
917
+ protected function _getEmails(
918
+ $configPath,
919
+ $storeId
920
+ ) {
921
+ $data = Mage::getStoreConfig($configPath, $storeId);
922
+ if (!empty($data)) {
923
+ return explode(',', $data);
924
+ }
925
+ return false;
926
+ }
927
+
928
+ /**
929
+ *
930
+ * @return Allopass_Hipay_Model_Config
931
+ */
932
+ protected function getConfig()
933
+ {
934
+ return Mage::getSingleton('hipay/config');
935
+ }
936
+
937
+ public function getCcTypeHipay(
938
+ $ccTypeMagento,
939
+ $exceptionIfNotFound = false
940
+ ) {
941
+ $ccTypes = Mage::getSingleton('hipay/config')->getCcTypesHipay();
942
+
943
+ if (isset($ccTypes[$ccTypeMagento])) {
944
+ return $ccTypes[$ccTypeMagento];
945
+ }
946
+
947
+ if ($exceptionIfNotFound) {
948
+ Mage::throwException(Mage::helper('hipay')->__("Code Credit Card Type Hipay not found!"));
949
+ }
950
+
951
+ return $ccTypeMagento;
952
+ }
953
+
954
+ /*
955
+ * TPPMAG1-2 - JPN
956
+ */
957
+ public function is3dSecure(
958
+ $use3dSecure,
959
+ $config3dsRules,
960
+ $payment = false
961
+ ) {
962
+ $params = 0;
963
+ if ($use3dSecure > 0 && !$payment) {
964
+ $params = 1;
965
+ } else {
966
+ switch ((int)$use3dSecure) {
967
+ case 1:
968
+ $params = 1;
969
+ break;
970
+ case 2:
971
+ case 3:
972
+ /* @var $rule Allopass_Hipay_Model_Rule */
973
+ $rule = Mage::getModel('hipay/rule')->load($config3dsRules);
974
+ if ($rule->getId() && $rule->validate($payment->getOrder())) {
975
+ $params = 1;
976
+
977
+ if ((int)$use3dSecure == 3) {//case for force 3ds if rules are validated
978
+ $params = 2;
979
+ }
980
+ }
981
+ break;
982
+ case 4:
983
+ $params = 2;
984
+ break;
985
+ }
986
+ }
987
+ return $params;
988
+ }
989
+
990
+ /**
991
+ * @param Mage_Sales_Model_Order_Payment $payment
992
+ *
993
+ * @return string
994
+ */
995
+ public function getCheckoutSuccessPage($payment)
996
+ {
997
+ // if empty success page magento
998
+ $url = Mage::getStoreConfig('payment/' . $payment->getMethod() . '/success_redirect_page');
999
+ return empty($url) ? Mage::getUrl('checkout/onepage/success') : $url;
1000
+ }
1001
+
1002
+ /**
1003
+ * @param Mage_Sales_Model_Order_Payment $payment
1004
+ *
1005
+ * @return string
1006
+ */
1007
+ public function getCheckoutFailurePage($payment)
1008
+ {
1009
+ return is_null(Mage::getStoreConfig('payment/' . $payment->getMethod() . '/failure_redirect_page')) ?
1010
+ 'checkout/onepage/failure' :
1011
+ Mage::getStoreConfig('payment/' . $payment->getMethod() . '/failure_redirect_page');
1012
+ }
1013
+
1014
+ /**
1015
+ * Return informations for TPP about the request
1016
+ *
1017
+ * @return json
1018
+ */
1019
+ public function getRequestSource()
1020
+ {
1021
+ $request = array();
1022
+
1023
+ $request['source'] = 'CMS';
1024
+ $request['brand'] = 'magento';
1025
+ $request['brand_version'] = Mage::getVersion();
1026
+ $request['integration_version'] = strval(Mage::getConfig()->getNode('modules')->Allopass_Hipay->version);
1027
+
1028
+ return json_encode($request);
1029
+ }
1030
+
1031
+ /**
1032
+ * Return customs data from Hipay
1033
+ *
1034
+ * @param array $payment
1035
+ * @param float $amount
1036
+ *
1037
+ */
1038
+ public function getCustomData(
1039
+ $payment,
1040
+ $amount,
1041
+ $method,
1042
+ $split_number = null
1043
+ ) {
1044
+ $customData = array();
1045
+
1046
+ // Shipping description
1047
+ $customData['shipping_description'] = $payment->getOrder()->getShippingDescription();
1048
+
1049
+ // Customer information
1050
+ $customer = $payment->getOrder()->getCustomerId();
1051
+ $customerData = Mage::getModel('customer/customer')->load($customer);
1052
+ $codeCustomer = Mage::getModel('customer/group')->load($customerData->getGroupId())->getCustomerGroupCode();
1053
+ $customData['customer_code'] = $codeCustomer;
1054
+
1055
+ // Method payment information
1056
+ $customData['payment_code'] = $method->getCode();
1057
+ $customData['display_iframe'] = $method->getConfigData('display_iframe');
1058
+
1059
+ // Payment type
1060
+ if ($split_number) {
1061
+ $customData['payment_type'] = 'Split ' . $split_number;
1062
+ }
1063
+
1064
+ // Use Onclick
1065
+ if ($payment->getAdditionalInformation('use_oneclick') == '1') {
1066
+ $customData['payment_type'] = 'OneClick';
1067
+ }
1068
+
1069
+ return $customData;
1070
+ }
1071
+
1072
+ /**
1073
+ *
1074
+ * Send an email to customer to pay his order
1075
+ *
1076
+ * @param $receiver
1077
+ * @param $order
1078
+ * @param $message
1079
+ * @param string $email_key
1080
+ * @return $this
1081
+ */
1082
+ public function sendLinkPaymentEmail(
1083
+ $receiver,
1084
+ $order
1085
+ ) {
1086
+ $email_key = 'hipay_api_moto';
1087
+ $translate = Mage::getSingleton('core/translate');
1088
+ /* @var $translate Mage_Core_Model_Translate */
1089
+ $translate->setTranslateInline(false);
1090
+
1091
+ $mailTemplate = Mage::getModel('core/email_template');
1092
+ /* @var $mailTemplate Mage_Core_Model_Email_Template */
1093
+
1094
+ $template = Mage::getStoreConfig('hipay/' . $email_key . '/template', $order->getStoreId());
1095
+
1096
+ $sendTo = array(
1097
+ array(
1098
+ 'email' => $receiver->getEmail(),
1099
+ 'name' => $receiver->getName()
1100
+ )
1101
+ );
1102
+
1103
+ $shippingMethod = '';
1104
+ if ($shippingInfo = $order->getShippingAddress()->getShippingMethod()) {
1105
+ $data = explode('_', $shippingInfo);
1106
+ $shippingMethod = $data[0];
1107
+ }
1108
+
1109
+ $paymentMethod = '';
1110
+ if ($paymentInfo = $order->getPayment()) {
1111
+ $paymentMethod = $paymentInfo->getMethod();
1112
+ }
1113
+
1114
+ $items = '';
1115
+ foreach ($order->getAllVisibleItems() as $_item) {
1116
+ /* @var $_item Mage_Sales_Model_Quote_Item */
1117
+ $items .= $_item->getProduct()->getName() . ' x ' . $_item->getQty() . ' '
1118
+ . $order->getStoreCurrencyCode() . ' '
1119
+ . $_item->getProduct()->getFinalPrice($_item->getQty()) . "\n";
1120
+ }
1121
+ $total = $order->getStoreCurrencyCode() . ' ' . $order->getGrandTotal();
1122
+
1123
+ foreach ($sendTo as $recipient) {
1124
+ $mailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $order->getStoreId()))
1125
+ ->sendTransactional(
1126
+ $template,
1127
+ Mage::getStoreConfig('hipay/' . $email_key . '/identity', $order->getStoreId()),
1128
+ $recipient['email'],
1129
+ $recipient['name'],
1130
+ array(
1131
+ 'redirectUrl' => $paymentInfo->getAdditionalInformation('redirectUrl'),
1132
+ 'dateAndTime' => Mage::app()->getLocale()->date(),
1133
+ 'customer' => $order->getCustomerFirstname() . ' ' . $order->getCustomerLastname(),
1134
+ 'customerEmail' => $order->getCustomerEmail(),
1135
+ 'billingAddress' => $order->getBillingAddress(),
1136
+ 'shippingAddress' => $order->getShippingAddress(),
1137
+ 'shippingMethod' => Mage::getStoreConfig('carriers/' . $shippingMethod . '/title'),
1138
+ 'paymentMethod' => Mage::getStoreConfig('payment/' . $paymentMethod . '/title'),
1139
+ 'items' => nl2br($items),
1140
+ 'total' => $total
1141
+ )
1142
+ );
1143
+ }
1144
+
1145
+ $translate->setTranslateInline(true);
1146
+
1147
+ return $this;
1148
+ }
1149
+ }
app/code/community/Allopass/Hipay/Model/Api/Request.php CHANGED
@@ -1,124 +1,169 @@
1
  <?php
2
  class Allopass_Hipay_Model_Api_Request
3
  {
4
-
5
- const VAULT_ACTION_CREATE = 'create';
6
-
7
- const VAULT_ACTION_UPDATE = 'update';
8
-
9
- const VAULT_ACTION_LOOKUP = '';
10
-
11
- const GATEWAY_ACTION_ORDER = 'order';
12
-
13
- const GATEWAY_ACTION_MAINTENANCE = 'maintenance/transaction/';
14
-
15
- const GATEWAY_ACTION_HOSTED = "hpayment";
16
 
17
-
18
- /**
19
- *
20
- * @var Zend_Http_Client
21
- */
22
- protected $_client = null;
23
-
24
- protected $_methodInstance = null;
25
-
26
- protected $_storeId = null;
27
-
28
- public function __construct( $methodInstance)
29
- {
30
- $this->_methodInstance = $methodInstance[0];
31
- }
32
-
33
- protected function getMethodInstance()
34
- {
35
- if(!$this->_methodInstance instanceof Mage_Payment_Model_Method_Abstract)
36
- Mage::throwException("Method instance must be setted or must be type of Mage_Payment_Model_Method_Abstract");
37
-
38
- return $this->_methodInstance;
39
- }
40
-
41
- /**
42
- *
43
- * @param Mage_Payment_Model_Method_Abstract $methodInstance
44
- */
45
- protected function setMethodInstance($methodInstance)
46
- {
47
- $this->_methodInstance = $methodInstance;
48
- }
49
-
50
-
51
- protected function getApiUsername($storeId=null)
52
- {
53
- if($this->isTestMode())
54
- return $this->getConfig()->getApiUsernameTest($storeId);
55
-
56
- return $this->getConfig()->getApiUsername($storeId);
57
- }
58
-
59
- protected function getApiPassword($storeId=null)
60
- {
61
- if($this->isTestMode())
62
- return $this->getConfig()->getApiPasswordTest($storeId);
63
-
64
- return $this->getConfig()->getApiPassword($storeId);
65
- }
66
-
67
- protected function isTestMode()
68
- {
69
- return (bool)$this->getMethodInstance()->getConfigData('is_test_mode');
70
- }
71
-
72
-
73
-
74
- /**
75
- *
76
- * @return Allopass_Hipay_Model_Config $config
77
- */
78
- protected function getConfig()
79
- {
80
- return Mage::getSingleton('hipay/config');
81
- }
82
-
83
- /**
84
- * Get client HTTP
85
- * @return Zend_Http_Client
86
- */
87
- public function getClient()
88
- {
89
- if(is_null($this->_client))
90
- {
91
- //$credentials = $this->getApiUsername($storeId) . ':' . $this->getApiPassword($storeId);
92
-
93
- //adapter options
94
- $config = array('curloptions' => array(
95
- //CURLOPT_USERPWD=>$credentials,
96
- //CURLOPT_HTTPHEADER => array('Accept: application/json'),
97
- CURLOPT_FAILONERROR => false,
98
- CURLOPT_HEADER=>false,
99
- CURLOPT_RETURNTRANSFER=>true),
100
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
 
102
  // ----------------------------------------------------------------------
103
  // init proxy if not empty
104
  // ----------------------------------------------------------------------
105
- $proxy_host = Mage::getStoreConfig('hipay/hipay_api/proxy_host',Mage::app()->getStore());
106
  // if host not empty, we use the proxy parameters
107
- if(!empty($proxy_host)){
108
- $proxy_user = Mage::getStoreConfig('hipay/hipay_api/proxy_user',Mage::app()->getStore());
109
- $proxy_pass = Mage::getStoreConfig('hipay/hipay_api/proxy_pass',Mage::app()->getStore());
110
- $proxy_port = Mage::getStoreConfig('hipay/hipay_api/proxy_port',Mage::app()->getStore());
111
  // init config for cURL
112
  $config['curloptions'][CURLOPT_PROXYUSERPWD] = true;
113
  $config['curloptions'][CURLOPT_PROXY] = $proxy_host.':'.$proxy_port;
114
  // if user and password not empty, we use the credentials
115
- if(!empty($proxy_user) && !empty($proxy_pass)){
116
  $config['curloptions'][CURLOPT_PROXYUSERPWD] = $proxy_user.':'.$proxy_pass;
117
  }
118
  }
119
  // Mage::log($config, null, 'curl.log');
120
- // ----------------------------------------------------------------------
121
-
122
  try {
123
  //innitialize http client and adapter curl
124
  $adapter = Mage::getSingleton('hipay/api_http_client_adapter_curl');
@@ -142,7 +187,7 @@ class Allopass_Hipay_Model_Api_Request
142
  return $this->_client;
143
  }
144
 
145
- protected function _request($uri,$params=array(),$method=Zend_Http_Client::POST,$storeId=null)
146
  {
147
 
148
  if($method == Zend_Http_Client::POST)
@@ -154,7 +199,7 @@ class Allopass_Hipay_Model_Api_Request
154
 
155
  /* @var $response Zend_Http_Response */
156
  $response = $this->getClient()->request($method);
157
-
158
  if($response->isSuccessful())
159
  {
160
  //$this->getClient()->getAdapter()->close();
@@ -169,7 +214,11 @@ class Allopass_Hipay_Model_Api_Request
169
  if($error->getDescription() != "")
170
  $messageError .= ". Details: " . $error->getDescription();
171
 
172
- Mage::throwException($messageError);
 
 
 
 
173
  }
174
 
175
 
@@ -242,6 +291,25 @@ class Allopass_Hipay_Model_Api_Request
242
 
243
  return $response;
244
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
 
246
  public function setStoreId($storeId)
247
  {
@@ -254,4 +322,5 @@ class Allopass_Hipay_Model_Api_Request
254
  return $this->_storeId;
255
  }
256
 
257
- }
 
1
  <?php
2
  class Allopass_Hipay_Model_Api_Request
3
  {
4
+ const VAULT_ACTION_CREATE = 'create';
5
+
6
+ const VAULT_ACTION_UPDATE = 'update';
7
+
8
+ const VAULT_ACTION_LOOKUP = '';
9
+
10
+ const GATEWAY_ACTION_ORDER = 'order';
11
+
12
+ const GATEWAY_ACTION_MAINTENANCE = 'maintenance/transaction/';
13
+
14
+ const GATEWAY_ACTION_HOSTED = "hpayment";
 
15
 
16
+
17
+ /**
18
+ *
19
+ * @var Zend_Http_Client
20
+ */
21
+ protected $_client = null;
22
+
23
+ protected $_methodInstance = null;
24
+
25
+ protected $_storeId = null;
26
+
27
+ protected $_useMotoCredentials = false;
28
+
29
+ public function __construct($methodInstance)
30
+ {
31
+ $this->_methodInstance = $methodInstance[0];
32
+ }
33
+
34
+ protected function getMethodInstance()
35
+ {
36
+ if (!$this->_methodInstance instanceof Mage_Payment_Model_Method_Abstract) {
37
+ Mage::throwException("Method instance must be setted or must be type of Mage_Payment_Model_Method_Abstract");
38
+ }
39
+
40
+ return $this->_methodInstance;
41
+ }
42
+
43
+ /**
44
+ * @return bool
45
+ */
46
+ public function getUseMotoCredentials()
47
+ {
48
+ return $this->_useMotoCredentials;
49
+ }
50
+
51
+ /**
52
+ *
53
+ * @param Mage_Payment_Model_Method_Abstract $methodInstance
54
+ */
55
+ protected function setMethodInstance($methodInstance)
56
+ {
57
+ $this->_methodInstance = $methodInstance;
58
+ }
59
+
60
+ /**
61
+ * @param null $storeId
62
+ * @return mixed
63
+ */
64
+ protected function getApiUsername($storeId = null)
65
+ {
66
+ $this->_useMotoCredentials = false;
67
+
68
+ if ($this->getMethodInstance()->isAdmin()) {
69
+ if ($this->isTestMode()) {
70
+ if ($this->getConfig()->getApiUsernameTestMoto($storeId)) {
71
+ $this->_useMotoCredentials = true;
72
+ return $this->getConfig()->getApiUsernameTestMoto($storeId);
73
+ }
74
+ } else {
75
+ if ($this->getConfig()->getApiUsernameMoto($storeId)) {
76
+ $this->_useMotoCredentials = true;
77
+ return $this->getConfig()->getApiUsernameMoto($storeId);
78
+ }
79
+ }
80
+ }
81
+
82
+ if ($this->isTestMode()) {
83
+ return $this->getConfig()->getApiUsernameTest($storeId);
84
+ } else {
85
+ return $this->getConfig()->getApiUsername($storeId);
86
+ }
87
+ }
88
+
89
+ /**
90
+ * @param null $storeId
91
+ * @return mixed
92
+ */
93
+ protected function getApiPassword($storeId=null)
94
+ {
95
+ if ($this->getMethodInstance()->isAdmin()) {
96
+ if ($this->isTestMode()) {
97
+ if ($this->getConfig()->getApiPasswordTestMoto($storeId)) {
98
+ return $this->getConfig()->getApiPasswordTestMoto($storeId);
99
+ }
100
+ } else {
101
+ if ($this->getConfig()->getApiPasswordMoto($storeId)) {
102
+ return $this->getConfig()->getApiPasswordMoto($storeId);
103
+ }
104
+ }
105
+ }
106
+
107
+ if ($this->isTestMode()) {
108
+ return $this->getConfig()->getApiPasswordTest($storeId);
109
+ } else {
110
+ return $this->getConfig()->getApiPassword($storeId);
111
+ }
112
+ }
113
+
114
+ protected function isTestMode()
115
+ {
116
+ return (bool)$this->getMethodInstance()->getConfigData('is_test_mode');
117
+ }
118
+
119
+
120
+
121
+ /**
122
+ *
123
+ * @return Allopass_Hipay_Model_Config $config
124
+ */
125
+ protected function getConfig()
126
+ {
127
+ return Mage::getSingleton('hipay/config');
128
+ }
129
+
130
+ /**
131
+ * Get client HTTP
132
+ * @return Zend_Http_Client
133
+ */
134
+ public function getClient()
135
+ {
136
+ if (is_null($this->_client)) {
137
+ //$credentials = $this->getApiUsername($storeId) . ':' . $this->getApiPassword($storeId);
138
+
139
+ //adapter options
140
+ $config = array('curloptions' => array(
141
+ //CURLOPT_USERPWD=>$credentials,
142
+ //CURLOPT_HTTPHEADER => array('Accept: application/json'),
143
+ CURLOPT_FAILONERROR => false,
144
+ CURLOPT_HEADER=>false,
145
+ CURLOPT_RETURNTRANSFER=>true),
146
+ );
147
 
148
  // ----------------------------------------------------------------------
149
  // init proxy if not empty
150
  // ----------------------------------------------------------------------
151
+ $proxy_host = Mage::getStoreConfig('hipay/hipay_api/proxy_host', Mage::app()->getStore());
152
  // if host not empty, we use the proxy parameters
153
+ if (!empty($proxy_host)) {
154
+ $proxy_user = Mage::getStoreConfig('hipay/hipay_api/proxy_user', Mage::app()->getStore());
155
+ $proxy_pass = Mage::getStoreConfig('hipay/hipay_api/proxy_pass', Mage::app()->getStore());
156
+ $proxy_port = Mage::getStoreConfig('hipay/hipay_api/proxy_port', Mage::app()->getStore());
157
  // init config for cURL
158
  $config['curloptions'][CURLOPT_PROXYUSERPWD] = true;
159
  $config['curloptions'][CURLOPT_PROXY] = $proxy_host.':'.$proxy_port;
160
  // if user and password not empty, we use the credentials
161
+ if (!empty($proxy_user) && !empty($proxy_pass)) {
162
  $config['curloptions'][CURLOPT_PROXYUSERPWD] = $proxy_user.':'.$proxy_pass;
163
  }
164
  }
165
  // Mage::log($config, null, 'curl.log');
166
+ // ---------------------------------------------------------------------
 
167
  try {
168
  //innitialize http client and adapter curl
169
  $adapter = Mage::getSingleton('hipay/api_http_client_adapter_curl');
187
  return $this->_client;
188
  }
189
 
190
+ protected function _request($uri,$params=array(),$method=Zend_Http_Client::POST,$storeId=null,$throwException=true)
191
  {
192
 
193
  if($method == Zend_Http_Client::POST)
199
 
200
  /* @var $response Zend_Http_Response */
201
  $response = $this->getClient()->request($method);
202
+
203
  if($response->isSuccessful())
204
  {
205
  //$this->getClient()->getAdapter()->close();
214
  if($error->getDescription() != "")
215
  $messageError .= ". Details: " . $error->getDescription();
216
 
217
+ if ($throwException){
218
+ Mage::throwException($messageError);
219
+ }else{
220
+ return $error;
221
+ }
222
  }
223
 
224
 
291
 
292
  return $response;
293
  }
294
+
295
+
296
+ /**
297
+ *
298
+ * @param string $action
299
+ * @param array $params
300
+ * @param int $storeId
301
+ * @return Allopass_Hipay_Model_Response_Abstract
302
+ */
303
+ public function gatewayRequestMaintenance($action,$params,$storeId=null)
304
+ {
305
+ $this->setStoreId($storeId);
306
+ $uri = $this->getGatewayApiEndpoint($storeId) . $action;
307
+
308
+ /* @var $response Allopass_Hipay_Model_Api_Response_Gateway */
309
+ $response = $this->_request($uri,$params,$this->getMethodHttp($action),$storeId,false);
310
+
311
+ return $response;
312
+ }
313
 
314
  public function setStoreId($storeId)
315
  {
322
  return $this->_storeId;
323
  }
324
 
325
+ }
326
+
app/code/community/Allopass/Hipay/Model/Config.php CHANGED
@@ -28,24 +28,61 @@ class Allopass_Hipay_Model_Config extends Varien_Object
28
  const GATEWAY_ENDPOINT_TEST = 'gateway_endpoint_stage';
29
 
30
  const GATEWAY_ENDPOINT = 'gateway_endpoint_production';
31
-
32
-
 
 
 
 
 
 
 
 
 
 
 
 
33
  /**
34
- * Return config var
35
  *
 
36
  * @param string $key Var path key
37
  * @param int $storeId Store View Id
38
  * @return mixed
39
  */
40
- public function getConfigData($key, $storeId = null)
41
  {
42
-
43
- if (!$this->hasData($key)) {
44
- $value = Mage::getStoreConfig('hipay/hipay_api/' . $key, $storeId);
45
- $this->setData($key, $value);
46
- }
47
- return $this->getData($key);
48
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  /**
51
  * Return config var
@@ -132,6 +169,30 @@ class Allopass_Hipay_Model_Config extends Varien_Object
132
  {
133
  return $this->getConfigData(self::GATEWAY_ENDPOINT_TEST,$storeId);
134
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
  /**
137
  * Retrieve array of credit card types
28
  const GATEWAY_ENDPOINT_TEST = 'gateway_endpoint_stage';
29
 
30
  const GATEWAY_ENDPOINT = 'gateway_endpoint_production';
31
+
32
+
33
+ /**
34
+ * Use as Helper
35
+ *
36
+ * @param string $key Var path key
37
+ * @param int $storeId Store View Id
38
+ * @return mixed
39
+ */
40
+ public function getConfigData($key, $storeId = null)
41
+ {
42
+ return $this->getInternalConfig('hipay_api',$key, $storeId = null);
43
+ }
44
+
45
  /**
46
+ * Internal to get config and cache it
47
  *
48
+ * @param string $key context key
49
  * @param string $key Var path key
50
  * @param int $storeId Store View Id
51
  * @return mixed
52
  */
53
+ private function getInternalConfig($key_api,$key, $storeId = null)
54
  {
55
+ $index = 'hipay' . $key_api . $key . $storeId;
56
+ if (!$this->hasData($index)) {
57
+ $value = Mage::getStoreConfig('hipay/' . $key_api . '/' . $key, $storeId);
58
+ $this->setData($index, $value);
59
+ }
60
+ return $this->getData($index);
61
  }
62
+
63
+ /**
64
+ * Return config NORMAL ( HIPAY_API )
65
+ *
66
+ * @param string $key Var path key
67
+ * @param int $storeId Store View Id
68
+ * @return mixed
69
+ */
70
+ public function getConfig($key, $storeId = null)
71
+ {
72
+ return $this->getInternalConfig('hipay_api',$key, $storeId = null);
73
+ }
74
+
75
+ /**
76
+ * Return config MOTO ( HIPAY_MOT)
77
+ *
78
+ * @param string $key Var path key
79
+ * @param int $storeId Store View Id
80
+ * @return mixed
81
+ */
82
+ public function getConfigDataMoto($key, $storeId = null)
83
+ {
84
+ return $this->getInternalConfig('hipay_api_moto',$key, $storeId = null);
85
+ }
86
 
87
  /**
88
  * Return config var
169
  {
170
  return $this->getConfigData(self::GATEWAY_ENDPOINT_TEST,$storeId);
171
  }
172
+
173
+ public function getApiUsernameMoto($storeId =null)
174
+ {
175
+ return $this->getConfigDataMoto(self::API_USERNAME,$storeId);
176
+ }
177
+
178
+ public function getApiPasswordMoto($storeId=null)
179
+ {
180
+ return $this->getConfigDataMoto(self::API_PASSWORD,$storeId);
181
+ }
182
+
183
+ public function getApiUsernameTestMoto($storeId =null)
184
+ {
185
+ return $this->getConfigDataMoto(self::API_USERNAME_TEST,$storeId);
186
+ }
187
+
188
+ public function getApiPasswordTestMoto($storeId=null)
189
+ {
190
+ return $this->getConfigDataMoto(self::API_PASSWORD_TEST,$storeId);
191
+ }
192
+
193
+
194
+
195
+
196
 
197
  /**
198
  * Retrieve array of credit card types
app/code/community/Allopass/Hipay/Model/Method/Abstract.php CHANGED
@@ -1,1459 +1,1571 @@
1
  <?php
 
2
  abstract class Allopass_Hipay_Model_Method_Abstract extends Mage_Payment_Model_Method_Abstract
3
  {
4
- const OPERATION_SALE = "Sale";
5
- const OPERATION_AUTHORIZATION = "Authorization";
6
- const OPERATION_MAINTENANCE_CAPTURE = "Capture";
7
- const OPERATION_MAINTENANCE_REFUND = "Refund";
8
- const OPERATION_MAINTENANCE_ACCEPT_CHALLENGE = 'acceptChallenge';
9
- const OPERATION_MAINTENANCE_DENY_CHALLENGE = 'denyChallenge';
10
-
11
-
12
- const STATE_COMPLETED = "completed";
13
- const STATE_FORWARDING = "forwarding";
14
- const STATE_PENDING = "pending";
15
- const STATE_DECLINED = "declined";
16
- const STATE_ERROR = "error";
17
-
18
- const STATUS_AUTHORIZATION_REQUESTED = 'authorization_requested';
19
- const STATUS_EXPIRED = 'expired';
20
- const STATUS_PARTIAL_REFUND = 'partial_refund';
21
- const STATUS_PARTIAL_CAPTURE = 'partial_capture';
22
- const STATUS_CAPTURE_REQUESTED = 'capture_requested';
23
- const STATUS_PENDING_CAPTURE = 'pending_capture';
24
-
25
- /**
26
- * Bit masks to specify different payment method checks.
27
- * @see Mage_Payment_Model_Method_Abstract::isApplicableToQuote
28
- */
29
- const CHECK_USE_FOR_COUNTRY = 1;
30
- const CHECK_USE_FOR_CURRENCY = 2;
31
- const CHECK_USE_CHECKOUT = 4;
32
- const CHECK_USE_FOR_MULTISHIPPING = 8;
33
- const CHECK_USE_INTERNAL = 16;
34
- const CHECK_ORDER_TOTAL_MIN_MAX = 32;
35
- const CHECK_RECURRING_PROFILES = 64;
36
- const CHECK_ZERO_TOTAL = 128;
37
-
38
- //const STATUS_PENDING_CAPTURE = 'pending_capture';
39
-
40
- /**
41
- * Availability options
42
- */
43
- protected $_isGateway = true;
44
- protected $_canAuthorize = true;
45
- protected $_canCapture = true;
46
- protected $_canCapturePartial = true;
47
- protected $_canRefund = true;
48
- protected $_canRefundInvoicePartial = true;
49
- protected $_canVoid = true;
50
- protected $_canUseInternal = true;
51
- protected $_canUseCheckout = true;
52
- protected $_canUseForMultishipping = false;
53
- protected $_canSaveCc = false;
54
- protected $_canReviewPayment = false;
55
-
56
- //protected $_allowCurrencyCode = array('EUR');
57
-
58
- /**
 
59
  * Fields that should be replaced in debug with '***'
60
  *
61
  * @var array
62
  */
63
- protected $_debugReplacePrivateDataKeys = array('token','cardtoken','card_number','cvc');
64
-
65
-
66
- public function isInitializeNeeded()
67
- {
68
- return true;
69
- }
70
-
71
-
72
- protected function getOperation()
73
- {
74
- switch ($this->getConfigPaymentAction())
75
- {
76
- case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE:
77
- return self::OPERATION_AUTHORIZATION;
78
- default:
79
- return self::OPERATION_SALE;
80
- }
81
-
82
- return '';
83
- }
84
-
85
-
86
- public function authorize(Varien_Object $payment, $amount)
87
- {
88
- parent::authorize($payment, $amount);
89
-
90
- $payment->setSkipTransactionCreation(true);
91
- return $this;
92
- }
93
-
94
- public function assignInfoData($info,$data)
95
- {
96
-
97
- $oneclickMode = $data->getData($this->getCode() . '_oneclick');
98
- $oneclickCard = $data->getData($this->getCode() . '_oneclick_card');
99
- $splitPaymentId = $data->getData($this->getCode() . '_split_payment_id');
100
- $token = $data->getData($this->getCode() . '_cc_token');
101
-
102
- $info->setAdditionalInformation('create_oneclick', $oneclickMode == "create_oneclick" ? 1 : 0)
103
- ->setAdditionalInformation('use_oneclick',$oneclickMode == "use_oneclick" ? 1 : 0)
104
- ->setAdditionalInformation('selected_oneclick_card',$oneclickCard == "" ? 0 : $oneclickCard)
105
- ->setAdditionalInformation('split_payment_id',$splitPaymentId != "" ? $splitPaymentId : 0)
106
- ->setAdditionalInformation('token',$token != "" ? $token : "")
107
- ->setAdditionalInformation('device_fingerprint', $data->getData('device_fingerprint'));
108
-
109
-
110
- }
111
-
112
-
113
- public function acceptPayment(Mage_Payment_Model_Info $payment)
114
- {
115
- parent::acceptPayment($payment);
116
- $transactionId = $payment->getLastTransId();
117
- $amount = $payment->getAmountAuthorized();
118
-
119
- $transactionId = $payment->getLastTransId();
120
-
121
- $gatewayParams = array('operation'=>self::OPERATION_MAINTENANCE_ACCEPT_CHALLENGE,'amount'=>$amount);
122
- $this->_debug($gatewayParams);
123
- /* @var $request Allopass_Hipay_Model_Api_Request */
124
- $request = Mage::getModel('hipay/api_request',array($this));
125
- $uri = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
126
-
127
- $gatewayResponse = $request->gatewayRequest($uri,$gatewayParams,$payment->getOrder()->getStoreId());
128
-
129
- $this->_debug($gatewayResponse->debug());
130
- $receiver = Mage::getModel('customer/customer')->load($payment->getOrder()->getCustomerId());
131
- $message = Mage::helper('hipay')->__('Your transaction has been approved.');
132
- $email_key = "fraud_payment_accept";
133
- if($this->canSendFraudEmail($payment->getOrder()->getStoreId())){
134
- $this->getHelper()->sendFraudPaymentEmail($receiver, $payment->getOrder(), $message,$email_key);
135
- }
136
-
137
- $payment->setPreparedMessage( Mage::helper('hipay')->__('Transaction is in pending notification.'));
138
-
139
- // Return false because payment is accepted by notification
140
- return false;
141
- }
142
-
143
- public function denyPayment(Mage_Payment_Model_Info $payment)
144
- {
145
-
146
- /*@var $payment Mage_Sales_Model_Order_Payment */
147
- parent::denyPayment($payment);
148
- $transactionId = $payment->getLastTransId();
149
- $amount = $payment->getAmountAuthorized();
150
-
151
- $transactionId = $payment->getLastTransId();
152
-
153
- $gatewayParams = array('operation'=>self::OPERATION_MAINTENANCE_DENY_CHALLENGE,'amount'=>$amount);
154
- $this->_debug($gatewayParams);
155
- /* @var $request Allopass_Hipay_Model_Api_Request */
156
- $request = Mage::getModel('hipay/api_request',array($this));
157
- $uri = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
158
-
159
- $gatewayResponse = $request->gatewayRequest($uri,$gatewayParams,$payment->getOrder()->getStoreId());
160
-
161
- $this->_debug($gatewayResponse->debug());
162
-
163
- $receiver = Mage::getModel('customer/customer')->load($payment->getOrder()->getCustomerId());
164
- $message = Mage::helper('hipay')->__('Your transaction has been refused.');
165
- $email_key = "fraud_payment_deny";
166
- if($this->canSendFraudEmail($payment->getOrder()->getStoreId())){
167
- $this->getHelper()->sendFraudPaymentEmail($receiver, $payment->getOrder(), $message,$email_key);
168
- }
169
-
170
- return true;
171
- }
172
-
173
- /**
174
- *
175
- * @param Allopass_Hipay_Model_Api_Response_Gateway $gatewayResponse
176
- * @param Mage_Sales_Model_Order_Payment $payment
177
- * @param float $amount
178
- */
179
- public function processResponse($gatewayResponse,$payment,$amount)
180
- {
181
-
182
- $order = $payment->getOrder();
183
- $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
184
-
185
- //$defaultExceptionMessage = Mage::helper('hipay')->__('Error in process response!');
186
-
187
- switch ($this->getConfigPaymentAction()) {
188
- case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE:
189
- $requestType = self::OPERATION_AUTHORIZATION;
190
- $newTransactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH;
191
- $defaultExceptionMessage = Mage::helper('hipay')->__('Payment authorization error.');
192
- break;
193
- case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE:
194
- $requestType = self::OPERATION_SALE;
195
- $newTransactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE;
196
- $defaultExceptionMessage = Mage::helper('hipay')->__('Payment capturing error.');
197
- break;
198
- }
199
-
200
- //add data to payment object
201
- if($payment->getCcType() == "")
202
- {
203
- $payment->setCcType($gatewayResponse->getPaymentProduct());
204
- }
205
-
206
- switch ($gatewayResponse->getState())
207
- {
208
- case self::STATE_COMPLETED:
209
- case self::STATE_PENDING:
210
- switch ((int)$gatewayResponse->getStatus())
211
- {
212
- case 111: //denied
213
-
214
- $this->addTransaction(
215
- $payment,
216
- $gatewayResponse->getTransactionReference(),
217
- $newTransactionType,
218
- array('is_transaction_closed' => 0),
219
- array(),
220
- Mage::helper('hipay')->getTransactionMessage(
221
- $payment, $requestType, /*$gatewayResponse->getTransactionReference()*/null, $amount
222
- )
223
- );
224
-
225
-
226
- if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) {
227
- $order->unhold();
228
- }
229
-
230
- if (!$status = $this->getConfigData('order_status_payment_refused')) {
231
- $status = $order->getStatus();
232
- }
233
-
234
-
235
- if ($status == Mage_Sales_Model_Order::STATE_HOLDED && $order->canHold()) {
236
- $order->hold();
237
- } elseif ($status == Mage_Sales_Model_Order::STATE_CANCELED && $order->canCancel()) {
238
- $order->cancel();
239
- }
240
-
241
- $order->addStatusToHistory($status, Mage::helper('hipay')->getTransactionMessage(
242
- $payment, self::OPERATION_AUTHORIZATION, null, $amount,true,$gatewayResponse->getMessage()
243
- ));
244
-
245
- $order->save();
246
-
247
-
248
- break;
249
- case 112: //Authorized and pending
250
-
251
-
252
- $this->addTransaction(
253
- $payment,
254
- $gatewayResponse->getTransactionReference(),
255
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
256
- array('is_transaction_closed' => 0),
257
- array(
258
- $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
259
- ),
260
- Mage::helper('hipay')->getTransactionMessage(
261
- $payment, self::OPERATION_AUTHORIZATION, $gatewayResponse->getTransactionReference(), $amount,true
262
- )
263
- );
264
- $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
265
- $status = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
266
- if(defined('Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW'))
267
- {
268
- $state = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
269
- $status = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
270
- }
271
-
272
-
273
- $this->_setFraudDetected($gatewayResponse,$customer, $payment,$amount);
274
-
275
- $order->setState($state,$status,$gatewayResponse->getMessage());
276
-
277
- $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
278
- $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
279
-
280
- $order->save();
281
- break;
282
-
283
- case 142: //Authorized Requested
284
- if($order->getStatus() == self::STATUS_CAPTURE_REQUESTED || $order->getStatus() == Mage_Sales_Model_Order::STATE_PROCESSING
285
- || $order->getStatus() == Mage_Sales_Model_Order::STATE_COMPLETE || $order->getStatus() == Mage_Sales_Model_Order::STATE_CLOSED
286
- || $order->getStatus() == self::STATUS_PENDING_CAPTURE )// for logic process
287
- break;
288
-
289
- $this->addTransaction(
290
- $payment,
291
- $gatewayResponse->getTransactionReference(),
292
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
293
- array('is_transaction_closed' => 0),
294
- array(
295
- $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
296
- ),
297
- Mage::helper('hipay')->getTransactionMessage(
298
- $payment, self::OPERATION_AUTHORIZATION, $gatewayResponse->getTransactionReference(), $amount,true
299
- )
300
- );
301
- $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
302
- if(defined('Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW'))
303
- $state = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
304
- $status = self::STATUS_AUTHORIZATION_REQUESTED;
305
-
306
- $order->setState($state,$status,$gatewayResponse->getMessage());
307
-
308
- $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
309
- $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
310
-
311
- $order->save();
312
- break;
313
-
314
- case 114: //Expired
315
- if($order->getStatus() != self::STATUS_PENDING_CAPTURE)// for logic process
316
- break;
317
-
318
- $this->addTransaction(
319
- $payment,
320
- $gatewayResponse->getTransactionReference(),
321
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID,
322
- array('is_transaction_closed' => 0),//Transaction was not closed, because admin can try capture after expiration
323
- array(
324
- $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
325
- ),
326
- Mage::helper('hipay')->getTransactionMessage(
327
- $payment, self::OPERATION_AUTHORIZATION, $gatewayResponse->getTransactionReference(), $amount,true
328
- )
329
- );
330
-
331
- /**
332
- * We change status to expired and state to holded
333
- * So the administrator can try to capture transaction even if
334
- * the auhorization was expired
335
- *
336
- */
337
- $state = Mage_Sales_Model_Order::STATE_HOLDED;
338
- $status = self::STATUS_EXPIRED;
339
- $order->setState(
340
- $state,
341
- $status,
342
- $gatewayResponse->getMessage());
343
-
344
- $order->save();
345
- break;
346
- case 115: //Canceled
347
- if($order->cancel())
348
- {
349
-
350
- $order->cancel();
351
-
352
- $this->addTransaction(
353
- $payment,
354
- $gatewayResponse->getTransactionReference(),
355
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID,
356
- array('is_transaction_closed' => 1),//Transaction was not closed, because admin can try capture after expiration
357
- array(
358
- $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
359
- ),
360
- Mage::helper('hipay')->getTransactionMessage(
361
- $payment, self::OPERATION_AUTHORIZATION, $gatewayResponse->getTransactionReference(), $amount,true
362
- )
363
- );
364
- }
365
-
366
-
367
- break;
368
- case 116: //Authorized
369
-
370
- //check if this order was in state fraud detected
371
- $fraud_type = $order->getPayment()->getAdditionalInformation('fraud_type');
372
- $fraud_score = $order->getPayment()->getAdditionalInformation('scoring');
373
- $has_fraud = !empty($fraud_type) && !empty($fraud_score);
374
-
375
- if($order->getStatus() == 'capture_requested' || ($order->getStatus() == 'processing' && !$has_fraud ) //check fraud for allow notif in payment review case
376
- || $order->getStatus() == 'complete' || $order->getStatus() == 'closed' )// for logic process
377
- break;
378
- if(!$this->isPreauthorizeCapture($payment))
379
- $this->addTransaction(
380
- $payment,
381
- $gatewayResponse->getTransactionReference(),
382
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
383
- array('is_transaction_closed' => 0),
384
- array(),
385
- Mage::helper('hipay')->getTransactionMessage(
386
- $payment, self::OPERATION_AUTHORIZATION, null, $amount
387
- )
388
- );
389
-
390
- $order->setState(
391
- Mage_Sales_Model_Order::STATE_PROCESSING,
392
- self::STATUS_PENDING_CAPTURE,
393
- Mage::helper('hipay')
394
- ->__("Waiting for capture transaction ID '%s' of amount %s",
395
- $gatewayResponse->getTransactionReference(),
396
- $order->getBaseCurrency()->formatTxt($order->getBaseTotalDue())),
397
- $notified = true);
398
-
399
- $order->save();
400
- // Send order confirmation email - TPPMAG1-29
401
- if (!$order->getEmailSent() && $order->getCanSendNewEmailFlag()) {
402
- try {
403
- if (method_exists($order, 'queueNewOrderEmail')) {
404
- $order->queueNewOrderEmail();
405
- } else {
406
- $order->sendNewOrderEmail();
407
- }
408
- } catch (Exception $e) {
409
- Mage::logException($e);
410
- }
411
- }
412
-
413
- $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
414
- $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
415
-
416
-
417
- break;
418
- case 117: //Capture Requested
419
-
420
- if($order->getStatus() == 'capture' || $order->getStatus() == 'processing' )// for logic process
421
- break;
422
-
423
- $this->addTransaction(
424
- $payment,
425
- $gatewayResponse->getTransactionReference(),
426
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
427
- array('is_transaction_closed' => 0),
428
- array(),
429
- Mage::helper('hipay')->getTransactionMessage(
430
- $payment, self::OPERATION_SALE, null, $amount
431
- )
432
- );
433
-
434
- $message = Mage::helper("hipay")->__('Capture Requested by Hipay.');
435
-
436
- $order->setState(
437
- Mage_Sales_Model_Order::STATE_PROCESSING, 'capture_requested', $message, null, false
438
- );
439
-
440
- $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
441
- $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
442
-
443
- //If status Capture Requested is not configured to validate the order, we break.
444
- if(((int)$this->getConfigData('hipay_status_validate_order') == 117) === false )
445
- break;
446
-
447
- case 118: //Capture. There are 2 ways to enter in this case: 1. direct capture notification. 2. After 117 case, when it is configured for valid order with 117 status.
448
-
449
- if($order->getStatus() == $this->getConfigData('order_status_payment_accepted') )
450
- {
451
- break;
452
- }
453
- //If status Capture Requested is configured to validate the order and is a direct capture notification (118), we break because order is already validate.
454
- if(((int)$this->getConfigData('hipay_status_validate_order') == 117) === true && (int)$gatewayResponse->getStatus() == 118)
455
- {
456
- // if callback 118 and config validate order = 117 and no 117 in history - execute treatment alse break
457
- $histories = Mage::getResourceModel('sales/order_status_history_collection')
458
- ->setOrderFilter($order)
459
- ->addFieldToFilter('comment',array('like'=>'%code-117%'));
460
- if($histories->count() > 0){
461
- break;
462
- }
463
- }
464
-
465
- //Check if it is split payment and insert it
466
- $profile=0;
467
- if(($profile = (int)$payment->getAdditionalInformation('split_payment_id')) && $customer->getId())
468
- {
469
- $token = isset( $gatewayResponse->paymentMethod['token']) ? $gatewayResponse->paymentMethod['token'] : $gatewayResponse->getData('cardtoken');
470
- $this->getHelper()->insertSplitPayment($order, $profile,$customer->getId(),$token);
471
- }
472
-
473
- if ($amount != $order->getBaseGrandTotal() && !$profile && $order->getState() != Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) {
474
-
475
- $transactionId = $gatewayResponse->getTransactionReference();
476
- $order->addStatusHistoryComment(Mage::helper('hipay')->__('Notification "Capture". Capture issued by merchant. Registered notification about captured amount of %s. Transaction ID: "%s". Invoice has not been created. Please create offline Invoice.',
477
- $order->getBaseCurrency()->formatTxt($amount), $transactionId), false);
478
- break;
479
- }
480
-
481
- if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) {
482
- $order->unhold();
483
- }
484
-
485
- // Create invoice
486
- if ($this->getConfigData('invoice_create',$order->getStoreId()) && !$order->hasInvoices()) {
487
-
488
- $invoice = $this->create_invoice($order, $gatewayResponse->getTransactionReference(),false);
489
-
490
- Mage::getModel('core/resource_transaction')
491
- ->addObject($invoice)->addObject($invoice->getOrder())
492
- ->save();
493
-
494
- }
495
- elseif($order->hasInvoices())
496
- {
497
- foreach ($order->getInvoiceCollection() as $invoice)
498
- {
499
- if($invoice->getState() == Mage_Sales_Model_Order_Invoice::STATE_OPEN && round(($invoice->getBaseGrandTotal() + $order->getBaseTotalPaid()),2) == $gatewayResponse->getCapturedAmount())
500
- {
501
- $invoice->pay();
502
- Mage::getModel('core/resource_transaction')
503
- ->addObject($invoice)->addObject($invoice->getOrder())
504
- ->save();
505
-
506
- }
507
- }
508
- }
509
-
510
- if(($profile = (int)$payment->getAdditionalInformation('split_payment_id')) && $customer->getId())
511
- {
512
- $token = isset( $gatewayResponse->paymentMethod['token']) ? $gatewayResponse->paymentMethod['token'] : $gatewayResponse->getData('cardtoken');
513
- $this->getHelper()->insertSplitPayment($order, $profile,$customer->getId(),$token);
514
- }
515
-
516
-
517
- if (!$status = $this->getConfigData('order_status_payment_accepted')) {
518
- $status = $order->getStatus();
519
- }
520
-
521
- $message = Mage::helper("hipay")->__('Payment accepted by Hipay.');
522
-
523
- if ($status == Mage_Sales_Model_Order::STATE_PROCESSING) {
524
- $order->setState(
525
- Mage_Sales_Model_Order::STATE_PROCESSING, $status, $message
526
- );
527
- } else if ($status == Mage_Sales_Model_Order::STATE_COMPLETE) {
528
- $order->setData('state',Mage_Sales_Model_Order::STATE_COMPLETE);
529
- $order->addStatusToHistory($status, $message, true);
530
- /*$order->setState(
531
- Mage_Sales_Model_Order::STATE_COMPLETE, $status, $message, null, false
532
- );*/
533
- } else {
534
- $order->addStatusToHistory($status, $message, true);
535
- }
536
-
537
- $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
538
- $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
539
-
540
-
541
- // Send order confirmation email - TPPMAG1-29
542
- if (!$order->getEmailSent() && $order->getCanSendNewEmailFlag()) {
543
- try {
544
- if (method_exists($order, 'queueNewOrderEmail')) {
545
- $order->queueNewOrderEmail();
546
- } else {
547
- $order->sendNewOrderEmail();
548
- }
549
- } catch (Exception $e) {
550
- Mage::logException($e);
551
- }
552
- }
553
-
554
- break;
555
-
556
- case 124: //Refund Requested
557
-
558
- $message = Mage::helper("hipay")->__('Refund Requested by Hipay.');
559
-
560
- $order->setState(
561
- Mage_Sales_Model_Order::STATE_PROCESSING, 'refund_requested', $message, null, false
562
- );
563
-
564
- break;
565
- case 125: //Refund
566
- case 126: //Partially Refund
567
-
568
- if($order->hasCreditmemos())
569
- {
570
-
571
- $total_already_refunded = 0;
572
-
573
- /* @var $creditmemo Mage_Sales_Model_Order_Creditmemo */
574
- //We get total already refunded for found the amount of this creditmemo
575
- foreach ($order->getCreditmemosCollection() as $creditmemo)
576
- {
577
- if($creditmemo->getState() == Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED)
578
- {
579
- $total_already_refunded += $creditmemo->getGrandTotal();
580
- }
581
- }
582
-
583
- $cm_amount_check = round($gatewayResponse->getRefundedAmount() - $total_already_refunded,2);
584
- $status = $order->getStatus();
585
- if(round($gatewayResponse->getRefundedAmount(),2) < round($order->getGrandTotal(),2)){
586
- $status = self::STATUS_PARTIAL_REFUND;
587
- }
588
-
589
- /* @var $creditmemo Mage_Sales_Model_Order_Creditmemo */
590
- foreach ($order->getCreditmemosCollection() as $creditmemo)
591
- {
592
- if($creditmemo->getState() == Mage_Sales_Model_Order_Creditmemo::STATE_OPEN
593
- && round($creditmemo->getGrandTotal(),2) == $cm_amount_check)
594
- {
595
- $creditmemo->setState(Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED);
596
-
597
- $message = Mage::helper("hipay")->__('Refund accepted by Hipay.');
598
-
599
- $order->addStatusToHistory($status, $message);
600
-
601
- Mage::getModel('core/resource_transaction')
602
- ->addObject($creditmemo)->addObject($creditmemo->getOrder())
603
- ->save();
604
-
605
- break;
606
-
607
- }
608
- }
609
- }
610
- elseif($order->canCreditmemo())
611
- {
612
-
613
- if ($amount != $order->getBaseGrandTotal()) {
614
-
615
- $transactionId = $gatewayResponse->getTransactionReference();
616
- $order->addStatusHistoryComment(Mage::helper('hipay')->__('Notification "Refunded". Refund issued by merchant. Registered notification about refunded amount of %s. Transaction ID: "%s". Credit Memo has not been created. Please create offline Credit Memo.',
617
- $order->getBaseCurrency()->formatTxt($amount), $transactionId), false);
618
- return $this;
619
- }
620
-
621
- $amountTxt = $order->getBaseCurrency()->formatTxt($amount);
622
-
623
- $transactionId = $gatewayResponse->getTransactionReference();
624
-
625
- $comment = Mage::helper('hipay')->__('Refunded amount of %s. Transaction ID: "%s"', $amountTxt, $transactionId);
626
-
627
- $isRefundFinal = $gatewayResponse->getRefundedAmount() == $order->getGrandTotal();
628
- $payment->setIsTransactionClosed($isRefundFinal)
629
- ->registerRefundNotification($amount);
630
- $order->addStatusHistoryComment($comment, false);
631
-
632
- // TODO: there is no way to close a capture right now
633
- $creditmemo = $payment->getCreatedCreditmemo();
634
- if ($creditmemo) {
635
- $creditmemo->sendEmail();
636
- $order->addStatusHistoryComment(
637
- Mage::helper('hipay')->__('Notified customer about creditmemo #%s.', $creditmemo->getIncrementId())
638
- )
639
- ->setIsCustomerNotified(true)
640
- ->save();
641
- }
642
-
643
- }
644
-
645
- break;
646
- default:
647
- $message = Mage::helper("hipay")->__('Message Hipay: %s. Status: %s',$gatewayResponse->getMessage(),$gatewayResponse->getStatus());
648
- $order->addStatusToHistory($order->getStatus(), $message);
649
- break;
650
- }
651
-
652
-
653
- if($gatewayResponse->getState() == self::STATE_COMPLETED)
654
- {
655
- if(in_array($gatewayResponse->getPaymentProduct(), array('visa','american-express','mastercard','cb'))
656
- && ((int)$gatewayResponse->getEci() == 9 || $payment->getAdditionalInformation('create_oneclick'))
657
- && !$order->isNominal()) //Recurring E-commerce
658
- {
659
-
660
- if($customer->getId())
661
- {
662
- $this->responseToCustomer($customer,$gatewayResponse);
663
-
664
- }
665
- }
666
- }
667
- $order->save();
668
- break;
669
-
670
- case self::STATE_FORWARDING:
671
- $this->addTransaction(
672
- $payment,
673
- $gatewayResponse->getTransactionReference(),
674
- $newTransactionType,
675
- array('is_transaction_closed' => 0),
676
- array(),
677
- Mage::helper('hipay')->getTransactionMessage(
678
- $payment, $requestType, $gatewayResponse->getTransactionReference(), $amount
679
- )
680
- );
681
-
682
- $payment->setIsTransactionPending(1);
683
- $order->save();
684
- break;
685
-
686
- case self::STATE_DECLINED:
687
- if(/* @TODO wait for response from hipay support
688
- About issue #10 les notifications des différentes transactions HiPay se croisent
689
- $order->getStatus() == self::STATUS_CAPTURE_REQUESTED || $order->getStatus() == self::STATUS_PENDING_CAPTURE ||*/
690
- $order->getStatus() == Mage_Sales_Model_Order::STATE_PROCESSING
691
- || $order->getStatus() == Mage_Sales_Model_Order::STATE_COMPLETE || $order->getStatus() == Mage_Sales_Model_Order::STATE_CLOSED
692
- )// for logic process
693
- break;
694
-
695
- $statusCode = (int)$gatewayResponse->getStatus();
696
- $reason = $gatewayResponse->getReason();
697
- $this->addTransaction(
698
- $payment,
699
- $gatewayResponse->getTransactionReference(),
700
- $newTransactionType,
701
- array('is_transaction_closed' => 0),
702
- array(
703
- $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
704
- $this->_isTransactionFraud => true
705
- ),
706
- Mage::helper('hipay')->getTransactionMessage(
707
- $payment, $requestType, null, $amount,true,"Code: ".$reason['code']." " . Mage::helper('hipay')->__("Reason") . " : ".$reason['message']
708
- )
709
- );
710
-
711
-
712
- if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) {
713
- $order->unhold();
714
- }
715
-
716
- if (!$status = $this->getConfigData('order_status_payment_refused')) {
717
- $status = $order->getStatus();
718
- }
719
-
720
- if(in_array($statusCode,array(110)))
721
- $this->_setFraudDetected($gatewayResponse,$customer, $payment,$amount,true);
722
-
723
-
724
-
725
- if ($status == Mage_Sales_Model_Order::STATE_HOLDED && $order->canHold()) {
726
- $order->hold();
727
- } elseif ($status == Mage_Sales_Model_Order::STATE_CANCELED && $order->canCancel()) {
728
- $order->cancel();
729
- }
730
-
731
-
732
- $order->addStatusToHistory($status, Mage::helper('hipay')->getTransactionMessage(
733
- $payment, $this->getOperation(), null, $amount,true,$gatewayResponse->getMessage()
734
- ));
735
-
736
- $order->save();
737
-
738
- break;
739
-
740
- case self::STATE_ERROR:
741
- default:
742
- Mage::throwException($defaultExceptionMessage);
743
- break;
744
-
745
- }
746
- }
747
-
748
- /**
749
- *
750
- * @param Allopass_Hipay_Model_Api_Response_Gateway $gatewayResponse
751
- * @param Mage_Sales_Model_Order_Payment $payment
752
- */
753
- protected function _setFraudDetected($gatewayResponse,$customer,$payment,$amount,$addToHistory = false)
754
- {
755
-
756
-
757
- if($fraudScreening = $gatewayResponse->getFraudScreening())
758
- {
759
-
760
- if(isset($fraudScreening['result']) && isset($fraudScreening['scoring']))
761
- {
762
- $order = $payment->getOrder();
763
- $payment->setIsFraudDetected(true);
764
-
765
- if(defined('Mage_Sales_Model_Order::STATUS_FRAUD'))
766
- $status = Mage_Sales_Model_Order::STATUS_FRAUD;
767
-
768
- $payment->setAdditionalInformation('fraud_type',$fraudScreening['result']);
769
- $payment->setAdditionalInformation('fraud_score',$fraudScreening['scoring']);
770
- $payment->setAdditionalInformation('fraud_review',$fraudScreening['review']);
771
-
772
- if($addToHistory)
773
- $order->addStatusToHistory($status, Mage::helper('hipay')->getTransactionMessage(
774
- $payment, $this->getOperation(), null, $amount,true,$gatewayResponse->getMessage()
775
- ));
776
-
777
- $message = Mage::helper('hipay')->__($gatewayResponse->getMessage());
778
-
779
- if($this->canSendFraudEmail($order->getStoreId()))
780
- {
781
- $email_key='fraud_payment';
782
- if($fraudScreening['result'] != 'challenged' || $gatewayResponse->getState() == self::STATE_DECLINED)
783
- $email_key = 'fraud_payment_deny';
784
-
785
- $this->getHelper()->sendFraudPaymentEmail($customer, $order, $message,$email_key);
786
- }
787
- }
788
-
789
- }
790
- }
791
-
792
- /**
793
- *
794
- * @param int $storeId
795
- * @return bool
796
- */
797
- protected function canSendFraudEmail($storeId=null){
798
- return (bool)$this->getConfigData('send_fraud_payment_email',$storeId);
799
- }
800
-
801
- /**
802
- * Create object invoice
803
- * @param Mage_Sales_Model_Order $order
804
- * @param string $transactionReference
805
- * @param boolean $capture
806
- * @param boolean $paid
807
- * @return Mage_Sales_Model_Order_Invoice $invoice
808
- */
809
- protected function create_invoice($order,$transactionReference,$capture = true,$paid = false)
810
- {
811
- /* @var $invoice Mage_Sales_Model_Order_Invoice */
812
- $invoice = $order->prepareInvoice();
813
- $invoice->setTransactionId($transactionReference);
814
-
815
- $capture_case = Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE;
816
- if($capture)
817
- $capture_case = Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE;
818
- $invoice->setRequestedCaptureCase($capture_case);
819
-
820
- $invoice->register();
821
-
822
- $invoice->getOrder()->setIsInProcess(true);
823
-
824
- if($paid)
825
- $invoice->setIsPaid(1);
826
-
827
- return $invoice;
828
- }
829
-
830
- /**
831
- *
832
- * @param Allopass_Hipay_Model_Api_Response_Gateway $gatewayResponse
833
- * @param Mage_Sales_Model_Order_Payment $payment
834
- * @param float $amount
835
- */
836
- public function processResponseToRedirect($gatewayResponse,$payment,$amount)
837
- {
838
-
839
- $order = $payment->getOrder();
840
- $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
841
-
842
- switch ($this->getConfigPaymentAction()) {
843
- case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE:
844
- $requestType = self::OPERATION_AUTHORIZATION;
845
- $newTransactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH;
846
- $defaultExceptionMessage = Mage::helper('hipay')->__('Payment authorization error.');
847
- break;
848
- case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE:
849
- $requestType = self::OPERATION_SALE;
850
- $newTransactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE;
851
- $defaultExceptionMessage = Mage::helper('hipay')->__('Payment capturing error.');
852
- break;
853
- }
854
-
855
- $urlAdmin = Mage::getUrl('adminhtml/sales_order/index');
856
- if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
857
- $urlAdmin = Mage::getUrl('adminhtml/sales_order/view', array('order_id' => $order->getId()));
858
- }
859
-
860
- switch ($gatewayResponse->getState())
861
- {
862
- case self::STATE_COMPLETED:
863
- return $this->isAdmin() ? $urlAdmin : Mage::helper('hipay')->getCheckoutSuccessPage($payment);
864
-
865
- case self::STATE_FORWARDING:
866
- $payment->setIsTransactionPending(1);
867
- $order->save();
868
- return $gatewayResponse->getForwardUrl();
869
-
870
- case self::STATE_PENDING:
871
- if($this->getConfigData('re_add_to_cart'))
872
- $this->getHelper()->reAddToCart($order->getIncrementId());
873
-
874
- return $this->isAdmin() ? $urlAdmin : Mage::getUrl($this->getConfigData('pending_redirect_page'));
875
-
876
- case self::STATE_DECLINED:
877
-
878
- if($this->getConfigData('re_add_to_cart'))
879
- $this->getHelper()->reAddToCart($order->getIncrementId());
880
-
881
- return $this->isAdmin() ? $urlAdmin : Mage::getUrl('checkout/onepage/failure');
882
-
883
- case self::STATE_ERROR:
884
- default:
885
-
886
- if($this->getConfigData('re_add_to_cart'))
887
- $this->getHelper()->reAddToCart($order->getIncrementId());
888
-
889
- $this->_getCheckout()->setErrorMessage($defaultExceptionMessage);
890
- return $this->isAdmin() ? $urlAdmin : Mage::getUrl('checkout/onepage/failure');
891
-
892
- }
893
- }
894
-
895
- /**
896
- *
897
- * @return Allopass_Hipay_Helper_Data $helper
898
- */
899
- protected function getHelper()
900
- {
901
- return Mage::helper('hipay');
902
- }
903
-
904
-
905
- /**
906
- *
907
- * @param Mage_Customer_Model_Customer $customer
908
- * @param Allopass_Hipay_Model_Api_Response_Gateway $response
909
- */
910
- protected function responseToCustomer($customer,$response)
911
- {
912
- $this->getHelper()->responseToCustomer($customer,$response);
913
- $this->getHelper()->createCustomerCardFromResponse($customer->getId(), $response);
914
- return $this;
915
- }
916
-
917
- /**
918
- *
919
- * @param Mage_Sales_Model_Order_Payment $payment
920
- * @param float $amount
921
- * @return @return Mage_Payment_Model_Abstract
922
- */
923
- public function refund(Varien_Object $payment, $amount)
924
- {
925
- parent::refund($payment, $amount);
926
-
927
- $transactionId = $payment->getLastTransId();
928
-
929
- $gatewayParams = array('operation'=>'refund','amount'=>$amount);
930
-
931
- /* @var $request Allopass_Hipay_Model_Api_Request */
932
- $request = Mage::getModel('hipay/api_request',array($this));
933
- $action = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
934
-
935
-
936
-
937
- $this->_debug($gatewayParams);
938
-
939
- $gatewayResponse = $request->gatewayRequest($action,$gatewayParams,$payment->getOrder()->getStoreId());
940
-
941
- $this->_debug($gatewayResponse->debug());
942
-
943
-
944
- switch ($gatewayResponse->getStatus())
945
- {
946
- case "124":
947
- case "125":
948
- case "126":
949
-
950
- /* @var $creditmemo Mage_Sales_Model_Order_Creditmemo */
951
- $creditmemo = $payment->getCreditmemo();
952
- $creditmemo->setState(Mage_Sales_Model_Order_Creditmemo::STATE_OPEN);//State open = pending state
953
-
954
- break;
955
- default:
956
- Mage::throwException( $gatewayResponse->getStatus() . " ==> " .$gatewayResponse->getMessage());
957
- break;
958
- }
959
-
960
- return $this;
961
- }
962
-
963
- /**
964
- *
965
- * @param Mage_Sales_Model_Order_Payment $payment
966
- * @param float $amount
967
- * @param string|null $token
968
- * @return multitype:
969
- */
970
- public function getGatewayParams($payment,$amount,$token=null)
971
- {
972
- $params = array();
973
-
974
- $params['orderid'] = $payment->getOrder()->getIncrementId();
975
-
976
- $paymentProduct = null;
977
-
978
- $longDesc ="";
979
-
980
- if(($profile = $payment->getAdditionalInformation('split_payment_id')))
981
- {
982
- //Check if this order is already split
983
- $spCollection = Mage::getModel('hipay/splitPayment')->getCollection()
984
- ->addFieldToFilter('order_id',$payment->getOrder()->getId());
985
-
986
- if(!$spCollection->count())
987
- {
988
- $longDesc = Mage::helper('hipay')->__('Split payment');
989
- $paymentsSplit = $this->getHelper()->splitPayment((int)$profile, $amount);
990
-
991
- $amount = $paymentsSplit[0]['amountToPay'];
992
- }
993
-
994
- }
995
-
996
- $params['description'] = Mage::helper('hipay')->__("Order %s by %s",$payment->getOrder()->getIncrementId(),$payment->getOrder()->getCustomerEmail());//MANDATORY
997
- $params['long_description'] = $longDesc;// optional
998
- $params['currency'] = $payment->getOrder()->getBaseCurrencyCode();
999
- $params['amount'] = $amount;
1000
- $params['shipping'] = $payment->getOrder()->getShippingAmount();
1001
- $params['tax'] = $payment->getOrder()->getTaxAmount();
1002
- $params['cid'] = $payment->getOrder()->getCustomerId();//CUSTOMER ID
1003
-
1004
- $remoteIp = $payment->getOrder()->getRemoteIp();
1005
-
1006
- //Check if it's forwarded and in this case, explode and retrieve the first part
1007
- if(!is_null($payment->getOrder()->getXForwardedFor()) && strpos($payment->getOrder()->getXForwardedFor(), ",") !== false)
1008
- {
1009
- $xfParts = explode(",",$payment->getOrder()->getXForwardedFor());
1010
- $remoteIp = current($xfParts);
1011
- }
1012
-
1013
- $params['ipaddr'] = $remoteIp;
1014
-
1015
- $params['http_accept'] = "*/*";
1016
- $params['http_user_agent'] = Mage::helper('core/http')->getHttpUserAgent();
1017
- $params['language'] = Mage::app()->getLocale()->getLocaleCode();//strpos(Mage::app()->getLocale()->getLocaleCode(), "fr") !== false ? "fr_FR" : 'en';
1018
-
1019
- /**
1020
- * Parameters specific to the payment product
1021
- */
1022
- if(!is_null($token))
1023
- $params['cardtoken'] = $token;
1024
-
1025
- // TPPMAG1-2 - JPN
1026
- //$params['authentication_indicator'] = 0;
1027
- //switch ((int)$this->getConfigData('use_3d_secure')) {
1028
- // case 1:
1029
- // $params['authentication_indicator'] = 1;
1030
- // break;
1031
- // case 2:
1032
- // case 3:
1033
- // /* @var $rule Allopass_Hipay_Model_Rule */
1034
- // $rule = Mage::getModel('hipay/rule')->load($this->getConfigData('config_3ds_rules'));
1035
- // if($rule->getId() && $rule->validate($payment->getOrder()) )
1036
- // {
1037
- // $params['authentication_indicator'] = 1;
1038
- // if((int)$this->getConfigData('use_3d_secure') == 3)//case for force 3ds if rules are validated
1039
- // $params['authentication_indicator'] = 2;
1040
- //
1041
- // }
1042
- // break;
1043
- // case 4:
1044
- // $params['authentication_indicator'] = 2;
1045
- // break;
1046
- //}
1047
- $params['authentication_indicator'] = Mage::helper('hipay')->is3dSecure($this->getConfigData('use_3d_secure'), $this->getConfigData('config_3ds_rules'), $payment);
1048
-
1049
- $isAdmin = $this->isAdmin();
1050
-
1051
- /**
1052
- * Electronic Commerce Indicator
1053
- */
1054
- if($payment->getAdditionalInformation('use_oneclick')){
1055
-
1056
- $params['eci'] = 9; //Recurring E-commerce
1057
- }
1058
- elseif($isAdmin){
1059
- $params['eci'] = 1; //MO/TO (Card Not Present). This value prevent from 3ds redirection in Admin payment.
1060
- }
1061
-
1062
- /**
1063
- * Redirect urls
1064
- */
1065
- $params['accept_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/accept') : Mage::getUrl($this->getConfigData('accept_url'));
1066
- $params['decline_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/decline') : Mage::getUrl($this->getConfigData('decline_url'));
1067
- $params['pending_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/pending') : Mage::getUrl($this->getConfigData('pending_url'));
1068
- $params['exception_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/exception') : Mage::getUrl($this->getConfigData('exception_url'));
1069
- $params['cancel_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/cancel') : Mage::getUrl($this->getConfigData('cancel_url'));
1070
-
1071
- $params = $this->getCustomerParams($payment,$params);
1072
- $params = $this->getShippingParams($payment,$params);
1073
-
1074
- //add url to order in BO Magento
1075
- $params['cdata1'] = Mage::getUrl('adminhtml/sales_order/view',array('_secure'=>true,'order_id'=>$payment->getOrder()->getId()));
1076
-
1077
- // Add custom data for transaction request
1078
- if(class_exists('Allopass_Hipay_Helper_CustomData',false) &&
1079
- method_exists(Mage::helper('hipay/customData'),'getCustomData'))
1080
- {
1081
- $customData = Mage::helper('hipay/customData')->getCustomData($payment,$amount);
1082
-
1083
- if (is_array($customData)){
1084
- $params['custom_data'] = json_encode(($customData));
1085
- }
1086
-
1087
- }
1088
-
1089
- $params['device_fingerprint'] = $payment->getAdditionalInformation('device_fingerprint');
1090
-
1091
- return $params;
1092
- }
1093
-
1094
- /**
1095
- *
1096
- * @param Mage_Sales_Model_Order_Payment $payment
1097
- * @param array $params
1098
- * @return array $params
1099
- */
1100
- protected function getCustomerParams($payment,$params=array())
1101
- {
1102
- $order = $payment->getOrder();
1103
- $params['email'] = $order->getCustomerEmail();
1104
- $params['phone'] = $order->getBillingAddress()->getTelephone();
1105
- if(($dob = $order->getCustomerDob()) != "")
1106
- {
1107
- $dob = new Zend_Date($dob);
1108
- $validator = new Zend_Validate_Date();
1109
- if($validator->isValid($dob))
1110
- $params['birthdate'] = $dob->toString('YYYYMMdd');
1111
- }
1112
-
1113
- $gender = $order->getCustomerGender();
1114
-
1115
- $customer = Mage::getModel('customer/customer');
1116
- $customer->setData('gender',$gender);
1117
- $attribute = $customer->getResource()->getAttribute('gender');
1118
- if($attribute)
1119
- {
1120
- $gender = $attribute->getFrontend()->getValue($customer);
1121
- $gender = strtoupper(substr($gender, 0,1));
1122
- }
1123
-
1124
- if($gender != "M" && $gender != "F")
1125
- $gender = "U";
1126
-
1127
-
1128
- $params['gender'] =$gender ;
1129
- $params['firstname'] = $order->getCustomerFirstname();
1130
- $params['lastname'] = $order->getCustomerLastname();
1131
- $params['recipientinfo'] = $order->getBillingAddress()->getCompany();
1132
- $params['streetaddress'] = $order->getBillingAddress()->getStreet1();
1133
- $params['streetaddress2'] = $order->getBillingAddress()->getStreet2();
1134
- $params['city'] = $order->getBillingAddress()->getCity();
1135
- //$params['state'] = $order->getBillingAddress(); //TODO checck if country is US or Canada
1136
- $zipcode = explode('-',$order->getBillingAddress()->getPostcode());
1137
- $params['zipcode'] = $zipcode[0];
1138
- //$params['zipcode'] = $order->getBillingAddress()->getPostcode();
1139
- $params['country'] = $order->getBillingAddress()->getCountry();
1140
-
1141
- return $params;
1142
- }
1143
-
1144
- /**
1145
- *
1146
- * @param Mage_Sales_Model_Order_Payment $payment
1147
- * @param array $params
1148
- * @return array $params
1149
- */
1150
- protected function getShippingParams($payment,$params =array())
1151
- {
1152
- if($payment->getOrder()->getIsVirtual())
1153
- return $params;
1154
-
1155
- $shippingAddress = $payment->getOrder()->getShippingAddress();
1156
- $params['shipto_firstname'] = $shippingAddress->getFirstname();
1157
- $params['shipto_lastname'] = $shippingAddress->getLastname();
1158
- $params['shipto_recipientinfo'] = $shippingAddress->getCompany();
1159
- $params['shipto_streetaddress'] = $shippingAddress->getStreet1();
1160
- $params['shipto_streetaddress2'] = $shippingAddress->getStreet2();
1161
- $params['shipto_city'] = $shippingAddress->getCity();
1162
- //$params['shipto_state'] = $shippingAddress; //TODO check if country is US or Canada
1163
- $params['shipto_zipcode'] = $shippingAddress->getPostcode();
1164
- $params['shipto_country'] = $shippingAddress->getCountry();
1165
-
1166
- return $params;
1167
- }
1168
-
1169
- /**
1170
- *
1171
- * @param Allopass_Hipay_Model_SplitPayment $spiltPayment
1172
- */
1173
- public function paySplitPayment($splitPayment)
1174
- {
1175
- $request = Mage::getModel('hipay/api_request',array($this));
1176
-
1177
- $order = Mage::getModel('sales/order')->load($splitPayment->getOrderId());
1178
- if($order->getId())
1179
- {
1180
- $gatewayParams = $this->getGatewayParams($order->getPayment(), $splitPayment->getAmountToPay());
1181
- $gatewayParams['orderid'] .= "-split-".$splitPayment->getId();//added because if the same order_id tpp respond "Max Attempts exceed!"
1182
- $gatewayParams['description'] = Mage::helper('hipay')->__("Order SPLIT %s by %s",$order->getIncrementId(),$order->getCustomerEmail());//MANDATORY;
1183
- $gatewayParams['eci'] = 9;
1184
- $gatewayParams['operation'] =self::OPERATION_SALE;
1185
- $gatewayParams['payment_product'] = $this->getCcTypeHipay($order->getPayment()->getCcType());
1186
-
1187
- /**
1188
- * Parameters specific to the payment product
1189
- */
1190
- $gatewayParams['cardtoken'] = $splitPayment->getCardToken();
1191
-
1192
- $gatewayParams['authentication_indicator'] = 0;//$this->getConfigData('use_3d_secure');
1193
- $this->_debug($gatewayParams);
1194
-
1195
- $gatewayResponse = $request->gatewayRequest(Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_ORDER,$gatewayParams);
1196
-
1197
- $this->_debug($gatewayResponse->debug());
1198
-
1199
-
1200
- return $gatewayResponse->getState();
1201
- }
1202
-
1203
-
1204
-
1205
-
1206
- }
1207
-
1208
- protected function getCcTypeHipay($ccTypeMagento)
1209
- {
1210
- $ccTypes = Mage::getSingleton('hipay/config')->getCcTypesHipay();
1211
-
1212
- if(isset($ccTypes[$ccTypeMagento]))
1213
- return $ccTypes[$ccTypeMagento];
1214
- else //Maybe it's already hipay code, we return it directly
1215
- return $ccTypeMagento;
1216
-
1217
- }
1218
-
1219
- /**
1220
- * Return true if there are authorized transactions
1221
- *
1222
- * @param Mage_Sales_Model_Order_Payment $payment
1223
- * @return bool
1224
- */
1225
- protected function isPreauthorizeCapture($payment)
1226
- {
1227
- $lastTransaction = $payment->getTransaction($payment->getLastTransId());
1228
-
1229
- if(!$lastTransaction)
1230
- return false;
1231
-
1232
- /*if ($this->getOperation() == self::OPERATION_SALE && $lastTransaction->getTxnType() == Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH )
1233
- return false;
1234
- */
1235
- if($lastTransaction->getTxnType() == Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE && $this->orderDue($payment->getOrder()))
1236
- return true;
1237
-
1238
- if ($lastTransaction->getTxnType() != Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH )
1239
- return false;
1240
-
1241
- return true;
1242
- }
1243
-
1244
- /**
1245
- *
1246
- * @param Mage_Sales_Model_Order_Payment $payment
1247
- * @param float $amount
1248
- */
1249
- protected function _preauthorizeCapture($payment,$amount)
1250
- {
1251
- $transactionId = $payment->getLastTransId();
1252
-
1253
- $gatewayParams = array('operation'=>'capture','amount'=>$amount);
1254
- $this->_debug($gatewayParams);
1255
- /* @var $request Allopass_Hipay_Model_Api_Request */
1256
- $request = Mage::getModel('hipay/api_request',array($this));
1257
- $uri = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
1258
-
1259
- $gatewayResponse = $request->gatewayRequest($uri,$gatewayParams,$payment->getOrder()->getStoreId());
1260
-
1261
- $this->_debug($gatewayResponse->debug());
1262
-
1263
- switch ($gatewayResponse->getStatus())
1264
- {
1265
- case "116":
1266
- $this->addTransaction(
1267
- $payment,
1268
- $gatewayResponse->getTransactionReference(),
1269
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
1270
- array('is_transaction_closed' => 0),
1271
- array(),
1272
- Mage::helper('hipay')->getTransactionMessage(
1273
- $payment, self::OPERATION_MAINTENANCE_ACCEPT_CHALLENGE, $gatewayResponse->getTransactionReference(), $amount
1274
- )
1275
- );
1276
- $payment->setIsTransactionPending(true);
1277
- break;
1278
- case "117": //Capture requested
1279
- case "118": //Capture
1280
- case "119": //Partially Capture
1281
- $this->addTransaction(
1282
- $payment,
1283
- $gatewayResponse->getTransactionReference(),
1284
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
1285
- array('is_transaction_closed' => 0),
1286
- array(),
1287
- Mage::helper('hipay')->getTransactionMessage(
1288
- $payment, self::OPERATION_MAINTENANCE_CAPTURE, $gatewayResponse->getTransactionReference(), $amount
1289
- )
1290
- );
1291
-
1292
- $payment->setIsTransactionPending(true);
1293
- break;
1294
- default:
1295
- Mage::throwException( $gatewayResponse->getStatus() . " ==> " .$gatewayResponse->getMessage() . " is not processed!");
1296
- break;
1297
- }
1298
-
1299
- return $this;
1300
- }
1301
-
1302
-
1303
- /**
1304
- * Add payment transaction
1305
- *
1306
- * @param Mage_Sales_Model_Order_Payment $payment
1307
- * @param string $transactionId
1308
- * @param string $transactionType
1309
- * @param array $transactionDetails
1310
- * @param array $transactionAdditionalInfo
1311
- * @return null|Mage_Sales_Model_Order_Payment_Transaction
1312
- */
1313
- public function addTransaction(Mage_Sales_Model_Order_Payment $payment, $transactionId, $transactionType,
1314
- array $transactionDetails = array(), array $transactionAdditionalInfo = array(), $message = false
1315
- ) {
1316
- $payment->setTransactionId($transactionId);
1317
- if(method_exists($payment, "resetTransactionAdditionalInfo"))
1318
- $payment->resetTransactionAdditionalInfo();
1319
- foreach ($transactionDetails as $key => $value) {
1320
- $payment->setData($key, $value);
1321
- }
1322
- foreach ($transactionAdditionalInfo as $key => $value) {
1323
- $payment->setTransactionAdditionalInfo($key, $value);
1324
- }
1325
-
1326
- if(!class_exists("Mage_Sales_Model_Order_Payment_Transaction"))
1327
- return null;
1328
-
1329
- if(method_exists($payment, "addTransaction"))
1330
- $transaction = $payment->addTransaction($transactionType, null, false , $message);
1331
- else
1332
- $transaction = $this->_addTransaction($payment, $transactionType,null,false);
1333
-
1334
- /**
1335
- * It for self using
1336
- */
1337
- $transaction->setMessage($message);
1338
-
1339
- return $transaction;
1340
- }
1341
-
1342
- /**
1343
- * Create transaction, prepare its insertion into hierarchy and add its information to payment and comments
1344
- *
1345
- * To add transactions and related information, the following information should be set to payment before processing:
1346
- * - transaction_id
1347
- * - is_transaction_closed (optional) - whether transaction should be closed or open (closed by default)
1348
- * - parent_transaction_id (optional)
1349
- * - should_close_parent_transaction (optional) - whether to close parent transaction (closed by default)
1350
- *
1351
- * If the sales document is specified, it will be linked to the transaction as related for future usage.
1352
- * Currently transaction ID is set into the sales object
1353
- * This method writes the added transaction ID into last_trans_id field of the payment object
1354
- *
1355
- * To make sure transaction object won't cause trouble before saving, use $failsafe = true
1356
- *
1357
- * @param Mage_Sales_Model_Order_Payment
1358
- * @param string $type
1359
- * @param Mage_Sales_Model_Abstract $salesDocument
1360
- * @param bool $failsafe
1361
- * @return null|Mage_Sales_Model_Order_Payment_Transaction
1362
- */
1363
- protected function _addTransaction($payment,$type, $salesDocument = null, $failsafe = false)
1364
- {
1365
- // look for set transaction ids
1366
- $transactionId = $payment->getTransactionId();
1367
- if (null !== $transactionId) {
1368
- // set transaction parameters
1369
- /*$transaction = Mage::getModel('sales/order_payment_transaction')
1370
- ->setOrderPaymentObject($payment)
1371
- ->setTxnType($type)
1372
- ->setTxnId($transactionId)
1373
- ->isFailsafe($failsafe)
1374
- ;*/
1375
-
1376
- // set transaction parameters
1377
- //$transaction = false;
1378
- $transaction = $this->_lookupTransaction($payment,$transactionId);
1379
-
1380
- if (!$transaction) {
1381
- $transaction = Mage::getModel('sales/order_payment_transaction')->setTxnId($transactionId);
1382
- }
1383
-
1384
- $transaction
1385
- ->setOrderPaymentObject($payment)
1386
- ->setTxnType($type)
1387
- ->isFailsafe($failsafe);
1388
-
1389
- if ($payment->hasIsTransactionClosed()) {
1390
- $transaction->setIsClosed((int)$payment->getIsTransactionClosed());
1391
- }
1392
-
1393
- // link with sales entities
1394
- $payment->setLastTransId($transactionId);
1395
- $payment->setCreatedTransaction($transaction);
1396
- $payment->getOrder()->addRelatedObject($transaction);
1397
- if ($salesDocument && $salesDocument instanceof Mage_Sales_Model_Abstract) {
1398
- $salesDocument->setTransactionId($transactionId);
1399
- // TODO: linking transaction with the sales document
1400
- }
1401
-
1402
- // link with parent transaction Not used because transaction Id is the same
1403
- $parentTransactionId = $payment->getParentTransactionId();
1404
-
1405
- if ($parentTransactionId) {
1406
- $transaction->setParentTxnId($parentTransactionId);
1407
- if ($payment->getShouldCloseParentTransaction()) {
1408
- $parentTransaction = $this->_lookupTransaction($payment,$parentTransactionId);//
1409
- if ($parentTransaction) {
1410
- $parentTransaction->isFailsafe($failsafe)->close(false);
1411
- $payment->getOrder()->addRelatedObject($parentTransaction);
1412
- }
1413
- }
1414
- }
1415
- return $transaction;
1416
- }
1417
- }
1418
-
1419
- /**
1420
- * Find one transaction by ID or type
1421
- * @param Mage_Sales_Model_Order_Payment
1422
- * @param string $txnId
1423
- * @param string $txnType
1424
- * @return Mage_Sales_Model_Order_Payment_Transaction|false
1425
- */
1426
- protected function _lookupTransaction($payment,$txnId, $txnType = false)
1427
- {
1428
- $_transactionsLookup = array();
1429
- if (!$txnId) {
1430
- if ($txnType && $payment->getId()) {
1431
- $collection = Mage::getModel('sales/order_payment_transaction')->getCollection()
1432
- ->addPaymentIdFilter($payment->getId())
1433
- ->addTxnTypeFilter($txnType);
1434
- foreach ($collection as $txn) {
1435
- $txn->setOrderPaymentObject($payment);
1436
- $_transactionsLookup[$txn->getTxnId()] = $txn;
1437
- return $txn;
1438
- }
1439
- }
1440
- return false;
1441
- }
1442
- if (isset($_transactionsLookup[$txnId])) {
1443
- return $_transactionsLookup[$txnId];
1444
- }
1445
- $txn = Mage::getModel('sales/order_payment_transaction')
1446
- ->setOrderPaymentObject($payment)
1447
- ->loadByTxnId($txnId);
1448
- if ($txn->getId()) {
1449
- $_transactionsLookup[$txnId] = $txn;
1450
- } else {
1451
- $_transactionsLookup[$txnId] = false;
1452
- }
1453
- return $_transactionsLookup[$txnId];
1454
- }
1455
-
1456
- /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1457
  * Check method for processing with base currency
1458
  *
1459
  * @param string $currencyCode
@@ -1461,12 +1573,12 @@ abstract class Allopass_Hipay_Model_Method_Abstract extends Mage_Payment_Model_M
1461
  */
1462
  public function canUseForCurrency($currencyCode)
1463
  {
1464
- /* if (!in_array($currencyCode, $this->_allowCurrencyCode)) {
1465
- return false;
1466
- }*/
1467
  return true;
1468
  }
1469
-
1470
  /**
1471
  * Whether this method can accept or deny payment
1472
  *
@@ -1476,70 +1588,87 @@ abstract class Allopass_Hipay_Model_Method_Abstract extends Mage_Payment_Model_M
1476
  */
1477
  public function canReviewPayment(Mage_Payment_Model_Info $payment)
1478
  {
1479
- $fraud_type = $payment->getAdditionalInformation('fraud_type');
1480
- $fraud_review = $payment->getAdditionalInformation('fraud_review');
1481
- return parent::canReviewPayment($payment) && ($fraud_type == 'challenged' && $fraud_review != 'allowed');
1482
  }
1483
-
1484
  public function canRefund()
1485
  {
1486
- return $this->_canRefund;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1487
  }
1488
-
1489
- protected function orderDue($order)
1490
- {
1491
- return $order->hasInvoices() && $order->getBaseTotalDue() > 0;
1492
- }
1493
-
1494
-
1495
- /**
1496
- *
1497
- * @return Mage_Checkout_Model_Session $checkout
1498
- */
1499
- protected function _getCheckout()
1500
- {
1501
- return Mage::getSingleton('checkout/session');
1502
- }
1503
-
1504
- /**
1505
- * Log debug data to file
1506
- *
1507
- * @param mixed $debugData
1508
- */
1509
- protected function _debug($debugData)
1510
- {
1511
- if ($this->getDebugFlag()) {
1512
- Mage::getModel('hipay/log_adapter', 'payment_' . $this->getCode() . '.log')
1513
- ->setFilterDataKeys($this->_debugReplacePrivateDataKeys)
1514
- ->log($debugData);
1515
- }
1516
- }
1517
-
1518
- /**
1519
- * Define if debugging is enabled
1520
- *
1521
- * @return bool
1522
- */
1523
- public function getDebugFlag()
1524
- {
1525
- return $this->getConfigData('debug');
1526
- }
1527
-
1528
- /**
1529
- * Used to call debug method from not Payment Method context
1530
- *
1531
- * @param mixed $debugData
1532
- */
1533
- public function debugData($debugData)
1534
- {
1535
- $this->_debug($debugData);
1536
- }
1537
-
1538
- public function isAdmin()
1539
- {
1540
- return Mage::app()->getStore()->isAdmin();
1541
- }
1542
-
1543
-
1544
-
1545
- }
1
  <?php
2
+
3
  abstract class Allopass_Hipay_Model_Method_Abstract extends Mage_Payment_Model_Method_Abstract
4
  {
5
+ const OPERATION_SALE = "Sale";
6
+ const OPERATION_AUTHORIZATION = "Authorization";
7
+ const OPERATION_MAINTENANCE_CAPTURE = "Capture";
8
+ const OPERATION_MAINTENANCE_REFUND = "Refund";
9
+ const OPERATION_MAINTENANCE_ACCEPT_CHALLENGE = 'acceptChallenge';
10
+ const OPERATION_MAINTENANCE_DENY_CHALLENGE = 'denyChallenge';
11
+ const OPERATION_MAINTENANCE_CANCEL = 'cancel';
12
+
13
+
14
+ const STATE_COMPLETED = "completed";
15
+ const STATE_FORWARDING = "forwarding";
16
+ const STATE_PENDING = "pending";
17
+ const STATE_DECLINED = "declined";
18
+ const STATE_ERROR = "error";
19
+
20
+ const STATUS_AUTHORIZATION_REQUESTED = 'authorization_requested';
21
+ const STATUS_EXPIRED = 'expired';
22
+ const STATUS_PARTIAL_REFUND = 'partial_refund';
23
+ const STATUS_PARTIAL_CAPTURE = 'partial_capture';
24
+ const STATUS_CAPTURE_REQUESTED = 'capture_requested';
25
+ const STATUS_PENDING_CAPTURE = 'pending_capture';
26
+
27
+ /**
28
+ * Bit masks to specify different payment method checks.
29
+ * @see Mage_Payment_Model_Method_Abstract::isApplicableToQuote
30
+ */
31
+ const CHECK_USE_FOR_COUNTRY = 1;
32
+ const CHECK_USE_FOR_CURRENCY = 2;
33
+ const CHECK_USE_CHECKOUT = 4;
34
+ const CHECK_USE_FOR_MULTISHIPPING = 8;
35
+ const CHECK_USE_INTERNAL = 16;
36
+ const CHECK_ORDER_TOTAL_MIN_MAX = 32;
37
+ const CHECK_RECURRING_PROFILES = 64;
38
+ const CHECK_ZERO_TOTAL = 128;
39
+
40
+ //const STATUS_PENDING_CAPTURE = 'pending_capture';
41
+
42
+ /**
43
+ * Availability options
44
+ */
45
+ protected $_isGateway = true;
46
+ protected $_canAuthorize = true;
47
+ protected $_canCapture = true;
48
+ protected $_canCapturePartial = true;
49
+ protected $_canRefund = true;
50
+ protected $_canRefundInvoicePartial = true;
51
+ protected $_canVoid = true;
52
+ protected $_canUseInternal = true;
53
+ protected $_canUseCheckout = true;
54
+ protected $_canUseForMultishipping = false;
55
+ protected $_canSaveCc = false;
56
+ protected $_canReviewPayment = false;
57
+
58
+ //protected $_allowCurrencyCode = array('EUR');
59
+
60
+ /**
61
  * Fields that should be replaced in debug with '***'
62
  *
63
  * @var array
64
  */
65
+ protected $_debugReplacePrivateDataKeys = array('token', 'cardtoken', 'card_number', 'cvc');
66
+
67
+
68
+ public function isInitializeNeeded()
69
+ {
70
+ return true;
71
+ }
72
+
73
+
74
+ protected function getOperation()
75
+ {
76
+ switch ($this->getConfigPaymentAction()) {
77
+ case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE:
78
+ return self::OPERATION_AUTHORIZATION;
79
+ default:
80
+ return self::OPERATION_SALE;
81
+ }
82
+
83
+ return '';
84
+ }
85
+
86
+
87
+ public function authorize(Varien_Object $payment, $amount)
88
+ {
89
+ parent::authorize($payment, $amount);
90
+
91
+ $payment->setSkipTransactionCreation(true);
92
+ return $this;
93
+ }
94
+
95
+ public function assignInfoData($info, $data)
96
+ {
97
+ $oneclickMode = $data->getData($this->getCode() . '_oneclick');
98
+ $oneclickCard = $data->getData($this->getCode() . '_oneclick_card');
99
+ $splitPaymentId = $data->getData($this->getCode() . '_split_payment_id');
100
+ $token = $data->getData($this->getCode() . '_cc_token');
101
+
102
+ $info->setAdditionalInformation('create_oneclick', $oneclickMode == "create_oneclick" ? 1 : 0)
103
+ ->setAdditionalInformation('use_oneclick', $oneclickMode == "use_oneclick" ? 1 : 0)
104
+ ->setAdditionalInformation('selected_oneclick_card', $oneclickCard == "" ? 0 : $oneclickCard)
105
+ ->setAdditionalInformation('split_payment_id', $splitPaymentId != "" ? $splitPaymentId : 0)
106
+ ->setAdditionalInformation('token', $token != "" ? $token : "")
107
+ ->setAdditionalInformation('device_fingerprint', $data->getData('device_fingerprint'));
108
+ }
109
+
110
+ /**
111
+ * A request instructing the payment gateway to cancel a previously authorized transaction.
112
+ * Only authorized transactions can be cancelled, captured transactions must be refunded.
113
+ *
114
+ */
115
+ public function cancelTransaction(Mage_Payment_Model_Info $payment)
116
+ {
117
+ $transactionId = $payment->getLastTransId();
118
+ $order = $payment->getOrder();
119
+
120
+ $gatewayParams = array('operation' => self::OPERATION_MAINTENANCE_CANCEL);
121
+
122
+ /* @var $request Allopass_Hipay_Model_Api_Request */
123
+ $request = Mage::getModel('hipay/api_request', array($this));
124
+ $uri = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
125
+
126
+ if ($transactionId) {
127
+ $gatewayResponse = $request->gatewayRequestMaintenance($uri, $gatewayParams,
128
+ $payment->getOrder()->getStoreId());
129
+
130
+ if (is_a($gatewayResponse, 'Allopass_Hipay_Model_Api_Response_Error')) {
131
+ $order->addStatusHistoryComment(Mage::helper('hipay')->__('Error in canceling Transaction ID: "%s". %s',
132
+ $transactionId, $gatewayResponse->getMessage()), false);
133
+ } else {
134
+ $response = Mage::getModel('hipay/api_response_gateway', $gatewayResponse);
135
+
136
+ if ($response->getStatus() == '115') {
137
+ $order->addStatusHistoryComment(Mage::helper('hipay')->__('Cancel Transaction ID: "%s".',
138
+ $transactionId), false);
139
+ } else {
140
+ $order->addStatusHistoryComment(Mage::helper('hipay')->__('Error in canceling transaction ID: "%s". %s',
141
+ $transactionId, $gatewayResponse->getMessage()), false);
142
+ }
143
+
144
+ $this->_debug($response->debug());
145
+ }
146
+ } else {
147
+ $order->addStatusHistoryComment(Mage::helper('hipay')->__('No Cancel Transaction because no transaction number'),
148
+ false);
149
+ }
150
+
151
+ // Return false because payment is accepted by notification
152
+ return false;
153
+ }
154
+
155
+
156
+ public function acceptPayment(Mage_Payment_Model_Info $payment)
157
+ {
158
+ parent::acceptPayment($payment);
159
+ $transactionId = $payment->getLastTransId();
160
+ $amount = $payment->getAmountAuthorized();
161
+
162
+ $transactionId = $payment->getLastTransId();
163
+
164
+ $gatewayParams = array('operation' => self::OPERATION_MAINTENANCE_ACCEPT_CHALLENGE, 'amount' => $amount);
165
+ $this->_debug($gatewayParams);
166
+ /* @var $request Allopass_Hipay_Model_Api_Request */
167
+ $request = Mage::getModel('hipay/api_request', array($this));
168
+ $uri = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
169
+
170
+ $gatewayResponse = $request->gatewayRequest($uri, $gatewayParams, $payment->getOrder()->getStoreId());
171
+
172
+ $this->_debug($gatewayResponse->debug());
173
+ $receiver = Mage::getModel('customer/customer')->load($payment->getOrder()->getCustomerId());
174
+ $message = Mage::helper('hipay')->__('Your transaction has been approved.');
175
+ $email_key = "fraud_payment_accept";
176
+ if ($this->canSendFraudEmail($payment->getOrder()->getStoreId())) {
177
+ $this->getHelper()->sendFraudPaymentEmail($receiver, $payment->getOrder(), $message, $email_key);
178
+ }
179
+
180
+ $payment->setPreparedMessage(Mage::helper('hipay')->__('Transaction is in pending notification.'));
181
+
182
+ // Return false because payment is accepted by notification
183
+ return false;
184
+ }
185
+
186
+ public function denyPayment(Mage_Payment_Model_Info $payment)
187
+ {
188
+
189
+ /*@var $payment Mage_Sales_Model_Order_Payment */
190
+ parent::denyPayment($payment);
191
+ $transactionId = $payment->getLastTransId();
192
+ $amount = $payment->getAmountAuthorized();
193
+
194
+ $transactionId = $payment->getLastTransId();
195
+
196
+ $gatewayParams = array('operation' => self::OPERATION_MAINTENANCE_DENY_CHALLENGE, 'amount' => $amount);
197
+ $this->_debug($gatewayParams);
198
+ /* @var $request Allopass_Hipay_Model_Api_Request */
199
+ $request = Mage::getModel('hipay/api_request', array($this));
200
+ $uri = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
201
+
202
+ $gatewayResponse = $request->gatewayRequest($uri, $gatewayParams, $payment->getOrder()->getStoreId());
203
+
204
+ $this->_debug($gatewayResponse->debug());
205
+
206
+ $receiver = Mage::getModel('customer/customer')->load($payment->getOrder()->getCustomerId());
207
+ $message = Mage::helper('hipay')->__('Your transaction has been refused.');
208
+ $email_key = "fraud_payment_deny";
209
+ if ($this->canSendFraudEmail($payment->getOrder()->getStoreId())) {
210
+ $this->getHelper()->sendFraudPaymentEmail($receiver, $payment->getOrder(), $message, $email_key);
211
+ }
212
+
213
+ return true;
214
+ }
215
+
216
+ /**
217
+ *
218
+ * @param Allopass_Hipay_Model_Api_Response_Gateway $gatewayResponse
219
+ * @param Mage_Sales_Model_Order_Payment $payment
220
+ * @param float $amount
221
+ */
222
+ public function processResponse($gatewayResponse, $payment, $amount)
223
+ {
224
+ $order = $payment->getOrder();
225
+ $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
226
+
227
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
228
+
229
+ if ($useOrderCurrency) {
230
+ $currency = $order->getOrderCurrency();
231
+ $total = $order->getGrandTotal();
232
+ } else {
233
+ $currency = Mage::app()->getStore()->getBaseCurrency();
234
+ $total = $order->getBaseGrandTotal();
235
+ }
236
+
237
+ //$defaultExceptionMessage = Mage::helper('hipay')->__('Error in process response!');
238
+
239
+ switch ($this->getConfigPaymentAction()) {
240
+ case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE:
241
+ $requestType = self::OPERATION_AUTHORIZATION;
242
+ $newTransactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH;
243
+ $defaultExceptionMessage = Mage::helper('hipay')->__('Payment authorization error.');
244
+ break;
245
+ case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE:
246
+ $requestType = self::OPERATION_SALE;
247
+ $newTransactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE;
248
+ $defaultExceptionMessage = Mage::helper('hipay')->__('Payment capturing error.');
249
+ break;
250
+ }
251
+
252
+ //add data to payment object
253
+ if ($payment->getCcType() == "") {
254
+ $payment->setCcType($gatewayResponse->getPaymentProduct());
255
+ }
256
+
257
+ switch ($gatewayResponse->getState()) {
258
+ case self::STATE_COMPLETED:
259
+ case self::STATE_PENDING:
260
+ switch ((int)$gatewayResponse->getStatus()) {
261
+ case 111: //denied
262
+
263
+ $this->addTransaction(
264
+ $payment,
265
+ $gatewayResponse->getTransactionReference(),
266
+ $newTransactionType,
267
+ array('is_transaction_closed' => 0),
268
+ array(),
269
+ Mage::helper('hipay')->getTransactionMessage(
270
+ $payment, $requestType, /*$gatewayResponse->getTransactionReference()*/
271
+ null, $amount
272
+ )
273
+ );
274
+
275
+
276
+ if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) {
277
+ $order->unhold();
278
+ }
279
+
280
+ if (!$status = $this->getConfigData('order_status_payment_refused')) {
281
+ $status = $order->getStatus();
282
+ }
283
+
284
+
285
+ if ($status == Mage_Sales_Model_Order::STATE_HOLDED && $order->canHold()) {
286
+ $order->hold();
287
+ } elseif ($status == Mage_Sales_Model_Order::STATE_CANCELED && $order->canCancel()) {
288
+ $order->cancel();
289
+ }
290
+
291
+ $order->addStatusToHistory($status, Mage::helper('hipay')->getTransactionMessage(
292
+ $payment, self::OPERATION_AUTHORIZATION, null, $amount, true, $gatewayResponse->getMessage()
293
+ ));
294
+
295
+ $order->save();
296
+
297
+
298
+ break;
299
+ case 112: //Authorized and pending
300
+
301
+
302
+ $this->addTransaction(
303
+ $payment,
304
+ $gatewayResponse->getTransactionReference(),
305
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
306
+ array('is_transaction_closed' => 0),
307
+ array(
308
+ $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
309
+ ),
310
+ Mage::helper('hipay')->getTransactionMessage(
311
+ $payment, self::OPERATION_AUTHORIZATION, $gatewayResponse->getTransactionReference(),
312
+ $amount, true
313
+ )
314
+ );
315
+ $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
316
+ $status = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
317
+ if (defined('Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW')) {
318
+ $state = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
319
+ $status = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
320
+ }
321
+
322
+
323
+ $this->_setFraudDetected($gatewayResponse, $customer, $payment, $amount);
324
+
325
+ $order->setState($state, $status, $gatewayResponse->getMessage());
326
+
327
+ $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
328
+ $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
329
+
330
+ $order->save();
331
+ break;
332
+
333
+ case 142: //Authorized Requested
334
+ if ($order->getStatus() == self::STATUS_CAPTURE_REQUESTED || $order->getStatus() == Mage_Sales_Model_Order::STATE_PROCESSING
335
+ || $order->getStatus() == Mage_Sales_Model_Order::STATE_COMPLETE || $order->getStatus() == Mage_Sales_Model_Order::STATE_CLOSED
336
+ || $order->getStatus() == self::STATUS_PENDING_CAPTURE
337
+ ) {// for logic process
338
+ break;
339
+ }
340
+
341
+ $this->addTransaction(
342
+ $payment,
343
+ $gatewayResponse->getTransactionReference(),
344
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
345
+ array('is_transaction_closed' => 0),
346
+ array(
347
+ $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
348
+ ),
349
+ Mage::helper('hipay')->getTransactionMessage(
350
+ $payment, self::OPERATION_AUTHORIZATION, $gatewayResponse->getTransactionReference(),
351
+ $amount, true
352
+ )
353
+ );
354
+ $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
355
+ if (defined('Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW')) {
356
+ $state = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
357
+ }
358
+ $status = self::STATUS_AUTHORIZATION_REQUESTED;
359
+
360
+ $order->setState($state, $status, $gatewayResponse->getMessage());
361
+
362
+ $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
363
+ $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
364
+
365
+ $order->save();
366
+ break;
367
+
368
+ case 114: //Expired
369
+ if ($order->getStatus() != self::STATUS_PENDING_CAPTURE) {// for logic process
370
+ break;
371
+ }
372
+
373
+ $this->addTransaction(
374
+ $payment,
375
+ $gatewayResponse->getTransactionReference(),
376
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID,
377
+ array('is_transaction_closed' => 0),
378
+ //Transaction was not closed, because admin can try capture after expiration
379
+ array(
380
+ $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
381
+ ),
382
+ Mage::helper('hipay')->getTransactionMessage(
383
+ $payment, self::OPERATION_AUTHORIZATION, $gatewayResponse->getTransactionReference(),
384
+ $amount, true
385
+ )
386
+ );
387
+
388
+ /**
389
+ * We change status to expired and state to holded
390
+ * So the administrator can try to capture transaction even if
391
+ * the auhorization was expired
392
+ *
393
+ */
394
+ $state = Mage_Sales_Model_Order::STATE_HOLDED;
395
+ $status = self::STATUS_EXPIRED;
396
+ $order->setState(
397
+ $state,
398
+ $status,
399
+ $gatewayResponse->getMessage());
400
+
401
+ $order->save();
402
+ break;
403
+ case 115: //Canceled
404
+ if ($order->cancel()) {
405
+ $order->cancel();
406
+
407
+ $this->addTransaction(
408
+ $payment,
409
+ $gatewayResponse->getTransactionReference(),
410
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_VOID,
411
+ array('is_transaction_closed' => 1),
412
+ //Transaction was not closed, because admin can try capture after expiration
413
+ array(
414
+ $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
415
+ ),
416
+ Mage::helper('hipay')->getTransactionMessage(
417
+ $payment, self::OPERATION_AUTHORIZATION,
418
+ $gatewayResponse->getTransactionReference(), $amount, true
419
+ )
420
+ );
421
+ }
422
+
423
+
424
+ break;
425
+ case 116: //Authorized
426
+
427
+ //check if this order was in state fraud detected
428
+ $fraud_type = $order->getPayment()->getAdditionalInformation('fraud_type');
429
+ $fraud_score = $order->getPayment()->getAdditionalInformation('scoring');
430
+ $has_fraud = !empty($fraud_type) && !empty($fraud_score);
431
+
432
+ if ($order->getStatus() == 'capture_requested' || ($order->getStatus() == 'processing' && !$has_fraud) //check fraud for allow notif in payment review case
433
+ || $order->getStatus() == 'complete' || $order->getStatus() == 'closed'
434
+ ) {// for logic process
435
+ break;
436
+ }
437
+ if (!$this->isPreauthorizeCapture($payment)) {
438
+ $this->addTransaction(
439
+ $payment,
440
+ $gatewayResponse->getTransactionReference(),
441
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
442
+ array('is_transaction_closed' => 0),
443
+ array(),
444
+ Mage::helper('hipay')->getTransactionMessage(
445
+ $payment, self::OPERATION_AUTHORIZATION, null, $amount
446
+ )
447
+ );
448
+ }
449
+
450
+ $order->setState(
451
+ Mage_Sales_Model_Order::STATE_PROCESSING,
452
+ self::STATUS_PENDING_CAPTURE,
453
+ Mage::helper('hipay')
454
+ ->__("Waiting for capture transaction ID '%s' of amount %s",
455
+ $gatewayResponse->getTransactionReference(),
456
+ $currency->formatTxt($total)),
457
+ $notified = true);
458
+
459
+ $order->save();
460
+ // Send order confirmation email - TPPMAG1-29
461
+ if (!$order->getEmailSent() && $order->getCanSendNewEmailFlag()) {
462
+ try {
463
+ if (method_exists($order, 'queueNewOrderEmail')) {
464
+ $order->queueNewOrderEmail();
465
+ } else {
466
+ $order->sendNewOrderEmail();
467
+ }
468
+ } catch (Exception $e) {
469
+ Mage::logException($e);
470
+ }
471
+ }
472
+
473
+ $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
474
+ $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
475
+
476
+
477
+ break;
478
+ case 117: //Capture Requested
479
+
480
+ if ($order->getStatus() == 'capture' || $order->getStatus() == 'processing') {// for logic process
481
+ break;
482
+ }
483
+
484
+ $this->addTransaction(
485
+ $payment,
486
+ $gatewayResponse->getTransactionReference(),
487
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
488
+ array('is_transaction_closed' => 0),
489
+ array(),
490
+ Mage::helper('hipay')->getTransactionMessage(
491
+ $payment, self::OPERATION_SALE, null, $amount
492
+ )
493
+ );
494
+
495
+ $message = Mage::helper("hipay")->__('Capture Requested by Hipay.');
496
+
497
+ $order->setState(
498
+ Mage_Sales_Model_Order::STATE_PROCESSING, 'capture_requested', $message, null, false
499
+ );
500
+
501
+ $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
502
+ $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
503
+
504
+ //If status Capture Requested is not configured to validate the order, we break.
505
+ if (((int)$this->getConfigData('hipay_status_validate_order') == 117) === false) {
506
+ break;
507
+ }
508
+
509
+ case 118: //Capture. There are 2 ways to enter in this case: 1. direct capture notification. 2. After 117 case, when it is configured for valid order with 117 status.
510
+
511
+ if ($order->getStatus() == $this->getConfigData('order_status_payment_accepted')) {
512
+ break;
513
+ }
514
+ //If status Capture Requested is configured to validate the order and is a direct capture notification (118), we break because order is already validate.
515
+ if (((int)$this->getConfigData('hipay_status_validate_order') == 117) === true && (int)$gatewayResponse->getStatus() == 118) {
516
+ // if callback 118 and config validate order = 117 and no 117 in history - execute treatment alse break
517
+ $histories = Mage::getResourceModel('sales/order_status_history_collection')
518
+ ->setOrderFilter($order)
519
+ ->addFieldToFilter('comment', array('like' => '%code-117%'));
520
+ if ($histories->count() > 0) {
521
+ break;
522
+ }
523
+ }
524
+
525
+ //Check if it is split payment and insert it
526
+ $profile = 0;
527
+ if (($profile = (int)$payment->getAdditionalInformation('split_payment_id')) && $customer->getId()) {
528
+ $token = isset($gatewayResponse->paymentMethod['token']) ? $gatewayResponse->paymentMethod['token'] : $gatewayResponse->getData('cardtoken');
529
+ $this->getHelper()->insertSplitPayment($order, $profile, $customer->getId(), $token);
530
+ }
531
+
532
+ if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) {
533
+ $order->unhold();
534
+ }
535
+
536
+ // Create invoice
537
+ if ($this->getConfigData('invoice_create', $order->getStoreId()) && !$order->hasInvoices()) {
538
+
539
+ if ($amount != $total && !$profile && $order->getState() != Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) {
540
+ $transactionId = $gatewayResponse->getTransactionReference();
541
+ $order->addStatusHistoryComment(Mage::helper('hipay')->__('Notification "Capture". Capture issued by merchant. Registered notification about captured amount of %s. Transaction ID: "%s". Invoice has not been created. Please create offline Invoice.',
542
+ $currency->formatTxt($amount), $transactionId), false);
543
+ break;
544
+ }
545
+
546
+ $invoice = $this->create_invoice($order, $gatewayResponse->getTransactionReference(),
547
+ false);
548
+
549
+ Mage::getModel('core/resource_transaction')
550
+ ->addObject($invoice)->addObject($invoice->getOrder())
551
+ ->save();
552
+ } elseif ($order->hasInvoices()) {
553
+ foreach ($order->getInvoiceCollection() as $invoice) {
554
+ if ($invoice->getState() == Mage_Sales_Model_Order_Invoice::STATE_OPEN && (round(($invoice->getBaseGrandTotal() + $order->getBaseTotalPaid()),
555
+ 2) == $gatewayResponse->getCapturedAmount() || round(($invoice->getBaseGrandTotal()),2) == $gatewayResponse->getCapturedAmount())
556
+ ) {
557
+ $invoice->pay();
558
+ Mage::getModel('core/resource_transaction')
559
+ ->addObject($invoice)->addObject($invoice->getOrder())
560
+ ->save();
561
+ }
562
+ }
563
+ }
564
+
565
+ if (($profile = (int)$payment->getAdditionalInformation('split_payment_id')) && $customer->getId()) {
566
+ $token = isset($gatewayResponse->paymentMethod['token']) ? $gatewayResponse->paymentMethod['token'] : $gatewayResponse->getData('cardtoken');
567
+ $this->getHelper()->insertSplitPayment($order, $profile, $customer->getId(), $token);
568
+ }
569
+
570
+
571
+ if (!$status = $this->getConfigData('order_status_payment_accepted')) {
572
+ $status = $order->getStatus();
573
+ }
574
+
575
+ $message = Mage::helper("hipay")->__('Payment accepted by Hipay.');
576
+
577
+ if ($status == Mage_Sales_Model_Order::STATE_PROCESSING) {
578
+ $order->setState(
579
+ Mage_Sales_Model_Order::STATE_PROCESSING, $status, $message
580
+ );
581
+ } else {
582
+ if ($status == Mage_Sales_Model_Order::STATE_COMPLETE) {
583
+ $order->setData('state', Mage_Sales_Model_Order::STATE_COMPLETE);
584
+ $order->addStatusToHistory($status, $message, true);
585
+ /*$order->setState(
586
+ Mage_Sales_Model_Order::STATE_COMPLETE, $status, $message, null, false
587
+ );*/
588
+ } else {
589
+ $order->addStatusToHistory($status, $message, true);
590
+ }
591
+ }
592
+
593
+ $payment->setAmountAuthorized($gatewayResponse->getAuthorizedAmount());
594
+ $payment->setBaseAmountAuthorized($gatewayResponse->getAuthorizedAmount());
595
+
596
+
597
+ // Send order confirmation email - TPPMAG1-29
598
+ if (!$order->getEmailSent() && $order->getCanSendNewEmailFlag()) {
599
+ try {
600
+ if (method_exists($order, 'queueNewOrderEmail')) {
601
+ $order->queueNewOrderEmail();
602
+ } else {
603
+ $order->sendNewOrderEmail();
604
+ }
605
+ } catch (Exception $e) {
606
+ Mage::logException($e);
607
+ }
608
+ }
609
+
610
+ break;
611
+ case 124: //Refund Requested
612
+
613
+ $message = Mage::helper("hipay")->__('Refund Requested by Hipay.');
614
+
615
+ $order->setState(
616
+ Mage_Sales_Model_Order::STATE_PROCESSING, 'refund_requested', $message, null, false
617
+ );
618
+
619
+ break;
620
+ case 125: //Refund
621
+ case 126: //Partially Refund
622
+
623
+ if ($order->hasCreditmemos()) {
624
+ $total_already_refunded = 0;
625
+
626
+ /* @var $creditmemo Mage_Sales_Model_Order_Creditmemo */
627
+ //We get total already refunded for found the amount of this creditmemo
628
+ foreach ($order->getCreditmemosCollection() as $creditmemo) {
629
+ if ($creditmemo->getState() == Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED) {
630
+ $total_already_refunded += $creditmemo->getGrandTotal();
631
+ }
632
+ }
633
+
634
+ $cm_amount_check = round($gatewayResponse->getRefundedAmount() - $total_already_refunded,
635
+ 2);
636
+ $status = $order->getStatus();
637
+ if (round($gatewayResponse->getRefundedAmount(), 2) < round($order->getGrandTotal(), 2)) {
638
+ $status = self::STATUS_PARTIAL_REFUND;
639
+ }
640
+
641
+ /* @var $creditmemo Mage_Sales_Model_Order_Creditmemo */
642
+ foreach ($order->getCreditmemosCollection() as $creditmemo) {
643
+ if ($creditmemo->getState() == Mage_Sales_Model_Order_Creditmemo::STATE_OPEN
644
+ && round($creditmemo->getGrandTotal(), 2) == $cm_amount_check
645
+ ) {
646
+ $creditmemo->setState(Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED);
647
+
648
+ $message = Mage::helper("hipay")->__('Refund accepted by Hipay.');
649
+
650
+ $order->addStatusToHistory($status, $message);
651
+
652
+ Mage::getModel('core/resource_transaction')
653
+ ->addObject($creditmemo)->addObject($creditmemo->getOrder())
654
+ ->save();
655
+
656
+ break;
657
+ }
658
+ }
659
+ } elseif ($order->canCreditmemo()) {
660
+ if ($amount != $total) {
661
+ $transactionId = $gatewayResponse->getTransactionReference();
662
+ $order->addStatusHistoryComment(Mage::helper('hipay')->__('Notification "Refunded". Refund issued by merchant. Registered notification about refunded amount of %s. Transaction ID: "%s". Credit Memo has not been created. Please create offline Credit Memo.',
663
+ $currency->formatTxt($amount), $transactionId), false);
664
+ return $this;
665
+ }
666
+
667
+ $amountTxt = $currency->formatTxt($amount);
668
+
669
+ $transactionId = $gatewayResponse->getTransactionReference();
670
+
671
+ $comment = Mage::helper('hipay')->__('Refunded amount of %s. Transaction ID: "%s"',
672
+ $amountTxt, $transactionId);
673
+
674
+ $isRefundFinal = $gatewayResponse->getRefundedAmount() == $order->getGrandTotal();
675
+ $payment->setIsTransactionClosed($isRefundFinal)
676
+ ->registerRefundNotification($amount);
677
+ $order->addStatusHistoryComment($comment, false);
678
+
679
+ // TODO: there is no way to close a capture right now
680
+ $creditmemo = $payment->getCreatedCreditmemo();
681
+ if ($creditmemo) {
682
+ $creditmemo->sendEmail();
683
+ $order->addStatusHistoryComment(
684
+ Mage::helper('hipay')->__('Notified customer about creditmemo #%s.',
685
+ $creditmemo->getIncrementId())
686
+ )
687
+ ->setIsCustomerNotified(true)
688
+ ->save();
689
+ }
690
+ }
691
+
692
+ break;
693
+ default:
694
+ $message = Mage::helper("hipay")->__('Message Hipay: %s. Status: %s',
695
+ $gatewayResponse->getMessage(), $gatewayResponse->getStatus());
696
+ $order->addStatusToHistory($order->getStatus(), $message);
697
+ break;
698
+ }
699
+
700
+
701
+ if ($gatewayResponse->getState() == self::STATE_COMPLETED) {
702
+ if (in_array($gatewayResponse->getPaymentProduct(),
703
+ array('visa', 'american-express', 'mastercard', 'cb'))
704
+ && ((int)$gatewayResponse->getEci() == 9 || $payment->getAdditionalInformation('create_oneclick'))
705
+ && !$order->isNominal()
706
+ ) { //Recurring E-commerce
707
+
708
+ if ($customer->getId()) {
709
+ $this->responseToCustomer($customer, $gatewayResponse);
710
+ }
711
+ }
712
+ }
713
+ $order->save();
714
+ break;
715
+
716
+ case self::STATE_FORWARDING:
717
+ $this->addTransaction(
718
+ $payment,
719
+ $gatewayResponse->getTransactionReference(),
720
+ $newTransactionType,
721
+ array('is_transaction_closed' => 0),
722
+ array(),
723
+ Mage::helper('hipay')->getTransactionMessage(
724
+ $payment, $requestType, $gatewayResponse->getTransactionReference(), $amount
725
+ )
726
+ );
727
+
728
+ $payment->setIsTransactionPending(1);
729
+ $order->save();
730
+ break;
731
+
732
+ case self::STATE_DECLINED:
733
+ if (/* @TODO wait for response from hipay support
734
+ * About issue #10 les notifications des différentes transactions HiPay se croisent
735
+ * $order->getStatus() == self::STATUS_CAPTURE_REQUESTED || $order->getStatus() == self::STATUS_PENDING_CAPTURE ||*/
736
+ $order->getStatus() == Mage_Sales_Model_Order::STATE_PROCESSING
737
+ || $order->getStatus() == Mage_Sales_Model_Order::STATE_COMPLETE || $order->getStatus() == Mage_Sales_Model_Order::STATE_CLOSED
738
+ ) {// for logic process
739
+ break;
740
+ }
741
+
742
+ $statusCode = (int)$gatewayResponse->getStatus();
743
+ $reason = $gatewayResponse->getReason();
744
+ $this->addTransaction(
745
+ $payment,
746
+ $gatewayResponse->getTransactionReference(),
747
+ $newTransactionType,
748
+ array('is_transaction_closed' => 0),
749
+ array(
750
+ $this->_realTransactionIdKey => $gatewayResponse->getTransactionReference(),
751
+ $this->_isTransactionFraud => true
752
+ ),
753
+ Mage::helper('hipay')->getTransactionMessage(
754
+ $payment, $requestType, null, $amount, true,
755
+ "Code: " . $reason['code'] . " " . Mage::helper('hipay')->__("Reason") . " : " . $reason['message']
756
+ )
757
+ );
758
+
759
+
760
+ if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) {
761
+ $order->unhold();
762
+ }
763
+
764
+ if (!$status = $this->getConfigData('order_status_payment_refused')) {
765
+ $status = $order->getStatus();
766
+ }
767
+
768
+ if (in_array($statusCode, array(110))) {
769
+ $this->_setFraudDetected($gatewayResponse, $customer, $payment, $amount, true);
770
+ }
771
+
772
+
773
+ if ($status == Mage_Sales_Model_Order::STATE_HOLDED && $order->canHold()) {
774
+ $order->hold();
775
+ } elseif ($status == Mage_Sales_Model_Order::STATE_CANCELED && $order->canCancel()) {
776
+ $order->cancel();
777
+ }
778
+
779
+
780
+ $order->addStatusToHistory($status, Mage::helper('hipay')->getTransactionMessage(
781
+ $payment, $this->getOperation(), null, $amount, true, $gatewayResponse->getMessage()
782
+ ));
783
+
784
+ $order->save();
785
+
786
+ break;
787
+
788
+ case self::STATE_ERROR:
789
+ default:
790
+ Mage::throwException($defaultExceptionMessage);
791
+ break;
792
+
793
+ }
794
+ }
795
+
796
+ /**
797
+ *
798
+ * @param Allopass_Hipay_Model_Api_Response_Gateway $gatewayResponse
799
+ * @param Mage_Sales_Model_Order_Payment $payment
800
+ */
801
+ protected function _setFraudDetected($gatewayResponse, $customer, $payment, $amount, $addToHistory = false)
802
+ {
803
+ if ($fraudScreening = $gatewayResponse->getFraudScreening()) {
804
+ if (isset($fraudScreening['result']) && isset($fraudScreening['scoring'])) {
805
+ $order = $payment->getOrder();
806
+ $payment->setIsFraudDetected(true);
807
+
808
+ if (defined('Mage_Sales_Model_Order::STATUS_FRAUD')) {
809
+ $status = Mage_Sales_Model_Order::STATUS_FRAUD;
810
+ }
811
+
812
+ $payment->setAdditionalInformation('fraud_type', $fraudScreening['result']);
813
+ $payment->setAdditionalInformation('fraud_score', $fraudScreening['scoring']);
814
+ $payment->setAdditionalInformation('fraud_review', $fraudScreening['review']);
815
+
816
+ if ($addToHistory) {
817
+ $order->addStatusToHistory($status, Mage::helper('hipay')->getTransactionMessage(
818
+ $payment, $this->getOperation(), null, $amount, true, $gatewayResponse->getMessage()
819
+ ));
820
+ }
821
+
822
+ $message = Mage::helper('hipay')->__($gatewayResponse->getMessage());
823
+
824
+ if ($this->canSendFraudEmail($order->getStoreId())) {
825
+ $email_key = 'fraud_payment';
826
+ if ($fraudScreening['result'] != 'challenged' || $gatewayResponse->getState() == self::STATE_DECLINED) {
827
+ $email_key = 'fraud_payment_deny';
828
+ }
829
+
830
+ $this->getHelper()->sendFraudPaymentEmail($customer, $order, $message, $email_key);
831
+ }
832
+ }
833
+ }
834
+ }
835
+
836
+ /**
837
+ *
838
+ * @param int $storeId
839
+ * @return bool
840
+ */
841
+ protected function canSendFraudEmail($storeId = null)
842
+ {
843
+ return (bool)$this->getConfigData('send_fraud_payment_email', $storeId);
844
+ }
845
+
846
+ /**
847
+ * Create object invoice
848
+ * @param Mage_Sales_Model_Order $order
849
+ * @param string $transactionReference
850
+ * @param boolean $capture
851
+ * @param boolean $paid
852
+ * @return Mage_Sales_Model_Order_Invoice $invoice
853
+ */
854
+ protected function create_invoice($order, $transactionReference, $capture = true, $paid = false)
855
+ {
856
+ /* @var $invoice Mage_Sales_Model_Order_Invoice */
857
+ $invoice = $order->prepareInvoice();
858
+ $invoice->setTransactionId($transactionReference);
859
+
860
+ $capture_case = Mage_Sales_Model_Order_Invoice::CAPTURE_OFFLINE;
861
+ if ($capture) {
862
+ $capture_case = Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE;
863
+ }
864
+ $invoice->setRequestedCaptureCase($capture_case);
865
+
866
+ $invoice->register();
867
+
868
+ $invoice->getOrder()->setIsInProcess(true);
869
+
870
+ if ($paid) {
871
+ $invoice->setIsPaid(1);
872
+ }
873
+
874
+ return $invoice;
875
+ }
876
+
877
+ /**
878
+ *
879
+ * @param Allopass_Hipay_Model_Api_Response_Gateway $gatewayResponse
880
+ * @param Mage_Sales_Model_Order_Payment $payment
881
+ * @param float $amount
882
+ */
883
+ public function processResponseToRedirect($gatewayResponse, $payment, $amount)
884
+ {
885
+ $order = $payment->getOrder();
886
+ $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
887
+
888
+ switch ($this->getConfigPaymentAction()) {
889
+ case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE:
890
+ $requestType = self::OPERATION_AUTHORIZATION;
891
+ $newTransactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH;
892
+ $defaultExceptionMessage = Mage::helper('hipay')->__('Payment authorization error.');
893
+ break;
894
+ case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE:
895
+ $requestType = self::OPERATION_SALE;
896
+ $newTransactionType = Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE;
897
+ $defaultExceptionMessage = Mage::helper('hipay')->__('Payment capturing error.');
898
+ break;
899
+ }
900
+
901
+ $urlAdmin = Mage::getUrl('adminhtml/sales_order/index');
902
+ if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
903
+ $urlAdmin = Mage::getUrl('adminhtml/sales_order/view', array('order_id' => $order->getId()));
904
+ }
905
+
906
+
907
+ if ($gatewayResponse->getState()) {
908
+ switch ($gatewayResponse->getState()) {
909
+ case self::STATE_COMPLETED:
910
+ return $this->isAdmin() ? $urlAdmin : Mage::helper('hipay')->getCheckoutSuccessPage($payment);
911
+
912
+ case self::STATE_FORWARDING:
913
+ $payment->setIsTransactionPending(1);
914
+ $order->save();
915
+ return $gatewayResponse->getForwardUrl();
916
+
917
+ case self::STATE_PENDING:
918
+ if ($this->getConfigData('re_add_to_cart')) {
919
+ $this->getHelper()->reAddToCart($order->getIncrementId());
920
+ }
921
+
922
+ return $this->isAdmin() ? $urlAdmin : Mage::getUrl($this->getConfigData('pending_redirect_page'));
923
+
924
+ case self::STATE_DECLINED:
925
+
926
+ if ($this->getConfigData('re_add_to_cart')) {
927
+ $this->getHelper()->reAddToCart($order->getIncrementId());
928
+ }
929
+
930
+ return $this->isAdmin() ? $urlAdmin : Mage::getUrl('checkout/onepage/failure');
931
+
932
+ case self::STATE_ERROR:
933
+ default:
934
+
935
+ if ($this->getConfigData('re_add_to_cart')) {
936
+ $this->getHelper()->reAddToCart($order->getIncrementId());
937
+ }
938
+
939
+ $this->_getCheckout()->setErrorMessage($defaultExceptionMessage);
940
+ return $this->isAdmin() ? $urlAdmin : Mage::getUrl('checkout/onepage/failure');
941
+
942
+ }
943
+ }
944
+ }
945
+
946
+ /**
947
+ *
948
+ * @return Allopass_Hipay_Helper_Data $helper
949
+ */
950
+ protected function getHelper()
951
+ {
952
+ return Mage::helper('hipay');
953
+ }
954
+
955
+
956
+ /**
957
+ *
958
+ * @param Mage_Customer_Model_Customer $customer
959
+ * @param Allopass_Hipay_Model_Api_Response_Gateway $response
960
+ */
961
+ protected function responseToCustomer($customer, $response)
962
+ {
963
+ $this->getHelper()->responseToCustomer($customer, $response);
964
+ $this->getHelper()->createCustomerCardFromResponse($customer->getId(), $response);
965
+ return $this;
966
+ }
967
+
968
+ /**
969
+ *
970
+ * @param Mage_Sales_Model_Order_Payment $payment
971
+ * @param float $amount
972
+ * @return @return Mage_Payment_Model_Abstract
973
+ */
974
+ public function refund(Varien_Object $payment, $amount)
975
+ {
976
+ parent::refund($payment, $amount);
977
+
978
+ $transactionId = $payment->getLastTransId();
979
+
980
+ $gatewayParams = array('operation' => 'refund', 'amount' => $amount);
981
+
982
+ if (Mage::getStoreConfig('hipay/hipay_basket/activate_basket', Mage::app()->getStore())) {
983
+ $gatewayParams['basket'] = Mage::helper('hipay')->getCartInformation($payment->getOrder(),Allopass_Hipay_Helper_Data::STATE_REFUND,$payment);
984
+ }
985
+
986
+ /* @var $request Allopass_Hipay_Model_Api_Request */
987
+ $request = Mage::getModel('hipay/api_request', array($this));
988
+ $action = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
989
+
990
+
991
+ $this->_debug($gatewayParams);
992
+
993
+ $gatewayResponse = $request->gatewayRequest($action, $gatewayParams, $payment->getOrder()->getStoreId());
994
+
995
+ $this->_debug($gatewayResponse->debug());
996
+
997
+
998
+ switch ($gatewayResponse->getStatus()) {
999
+ case "124":
1000
+ case "125":
1001
+ case "126":
1002
+
1003
+ /* @var $creditmemo Mage_Sales_Model_Order_Creditmemo */
1004
+ $creditmemo = $payment->getCreditmemo();
1005
+ $creditmemo->setState(Mage_Sales_Model_Order_Creditmemo::STATE_OPEN);//State open = pending state
1006
+
1007
+ break;
1008
+ default:
1009
+ Mage::throwException($gatewayResponse->getStatus() . " ==> " . $gatewayResponse->getMessage());
1010
+ break;
1011
+ }
1012
+
1013
+ return $this;
1014
+ }
1015
+
1016
+ /**
1017
+ *
1018
+ * @param Mage_Sales_Model_Order_Payment $payment
1019
+ * @param float $amount
1020
+ * @param string|null $token
1021
+ * @return multitype:
1022
+ */
1023
+ public function getGatewayParams($payment, $amount, $token = null, $split_number = null)
1024
+ {
1025
+ $params = array();
1026
+
1027
+ $params['orderid'] = $payment->getOrder()->getIncrementId();
1028
+
1029
+ $paymentProduct = null;
1030
+
1031
+ $longDesc = "";
1032
+
1033
+ $taxAmount = $payment->getOrder()->getTaxAmount();
1034
+ if (($profile = $payment->getAdditionalInformation('split_payment_id'))) {
1035
+ //Check if this order is already split
1036
+ $spCollection = Mage::getModel('hipay/splitPayment')->getCollection()
1037
+ ->addFieldToFilter('order_id', $payment->getOrder()->getId());
1038
+
1039
+ if (!$spCollection->count()) {
1040
+ $longDesc = Mage::helper('hipay')->__('Split payment');
1041
+ $paymentsSplit = $this->getHelper()->splitPayment((int)$profile, $amount, $taxAmount);
1042
+
1043
+ $amount = $paymentsSplit[0]['amountToPay'];
1044
+ $taxAmount = $paymentsSplit[0]['taxAmountToPay'];
1045
+ }
1046
+ }
1047
+
1048
+ $params['description'] = Mage::helper('hipay')->__("Order %s by %s", $payment->getOrder()->getIncrementId(),
1049
+ $payment->getOrder()->getCustomerEmail());//MANDATORY
1050
+ $params['long_description'] = $longDesc;// optional
1051
+
1052
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
1053
+
1054
+
1055
+ if ($useOrderCurrency) {
1056
+ $params['currency'] = $payment->getOrder()->getOrderCurrencyCode();
1057
+ } else {
1058
+ $params['currency'] = $payment->getOrder()->getBaseCurrencyCode();
1059
+ }
1060
+ $params['amount'] = $amount;
1061
+ $params['shipping'] = $payment->getOrder()->getShippingAmount();
1062
+ $params['tax'] = $taxAmount;
1063
+ $params['tax_rate'] = Mage::helper('hipay')->getTaxeRateInformation($payment->getOrder());
1064
+
1065
+ $params['cid'] = $payment->getOrder()->getCustomerId();//CUSTOMER ID
1066
+
1067
+ $remoteIp = $payment->getOrder()->getRemoteIp();
1068
+
1069
+ //Check if it's forwarded and in this case, explode and retrieve the first part
1070
+ if (!is_null($payment->getOrder()->getXForwardedFor()) && strpos($payment->getOrder()->getXForwardedFor(),
1071
+ ",") !== false
1072
+ ) {
1073
+ $xfParts = explode(",", $payment->getOrder()->getXForwardedFor());
1074
+ $remoteIp = current($xfParts);
1075
+ }
1076
+
1077
+ $params['ipaddr'] = $remoteIp;
1078
+
1079
+ $params['http_accept'] = "*/*";
1080
+ $params['http_user_agent'] = Mage::helper('core/http')->getHttpUserAgent();
1081
+ $params['language'] = Mage::app()->getLocale()->getLocaleCode();//strpos(Mage::app()->getLocale()->getLocaleCode(), "fr") !== false ? "fr_FR" : 'en';
1082
+
1083
+ /**
1084
+ * Parameters specific to the payment product
1085
+ */
1086
+ if (!is_null($token)) {
1087
+ $params['cardtoken'] = $token;
1088
+ }
1089
+
1090
+ // TPPMAG1-2 - JPN
1091
+ //$params['authentication_indicator'] = 0;
1092
+ //switch ((int)$this->getConfigData('use_3d_secure')) {
1093
+ // case 1:
1094
+ // $params['authentication_indicator'] = 1;
1095
+ // break;
1096
+ // case 2:
1097
+ // case 3:
1098
+ // /* @var $rule Allopass_Hipay_Model_Rule */
1099
+ // $rule = Mage::getModel('hipay/rule')->load($this->getConfigData('config_3ds_rules'));
1100
+ // if($rule->getId() && $rule->validate($payment->getOrder()) )
1101
+ // {
1102
+ // $params['authentication_indicator'] = 1;
1103
+ // if((int)$this->getConfigData('use_3d_secure') == 3)//case for force 3ds if rules are validated
1104
+ // $params['authentication_indicator'] = 2;
1105
+ //
1106
+ // }
1107
+ // break;
1108
+ // case 4:
1109
+ // $params['authentication_indicator'] = 2;
1110
+ // break;
1111
+ //}
1112
+ $params['authentication_indicator'] = Mage::helper('hipay')->is3dSecure($this->getConfigData('use_3d_secure'),
1113
+ $this->getConfigData('config_3ds_rules'), $payment);
1114
+
1115
+ $isAdmin = $this->isAdmin();
1116
+
1117
+ /**
1118
+ * Electronic Commerce Indicator
1119
+ */
1120
+ if ($payment->getAdditionalInformation('use_oneclick')) {
1121
+ $params['eci'] = 9; //Recurring E-commerce
1122
+ } elseif ($isAdmin) {
1123
+ $params['eci'] = 1; //MO/TO (Card Not Present). This value prevent from 3ds redirection in Admin payment.
1124
+ }
1125
+
1126
+ /**
1127
+ * Redirect urls
1128
+ */
1129
+ if ($this->sendMailToCustomer() && $this->getCode() == 'hipay_hosted') {
1130
+ $paramsMoto['order'] = $payment->getOrder()->getIncrementId();
1131
+
1132
+ // MOTO with mail to customer
1133
+ $params['accept_url'] = Mage::getUrl($this->getConfigData('accept_url'), $paramsMoto);
1134
+ $params['decline_url'] = Mage::getUrl($this->getConfigData('decline_url'), $paramsMoto);
1135
+ $params['pending_url'] = Mage::getUrl($this->getConfigData('pending_url'), $paramsMoto);
1136
+ $params['exception_url'] = Mage::getUrl($this->getConfigData('exception_url'), $paramsMoto);
1137
+ $params['cancel_url'] = Mage::getUrl($this->getConfigData('cancel_url'), $paramsMoto);
1138
+ $params['moto_url_redirect'] = Mage::helper('adminhtml')->getUrl('*/payment/accept');
1139
+ } else {
1140
+ // MOTO is not activated
1141
+ $params['accept_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/accept') : Mage::getUrl($this->getConfigData('accept_url'));
1142
+ $params['decline_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/decline') : Mage::getUrl($this->getConfigData('decline_url'));
1143
+ $params['pending_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/pending') : Mage::getUrl($this->getConfigData('pending_url'));
1144
+ $params['exception_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/exception') : Mage::getUrl($this->getConfigData('exception_url'));
1145
+ $params['cancel_url'] = $isAdmin ? Mage::helper('adminhtml')->getUrl('*/payment/cancel') : Mage::getUrl($this->getConfigData('cancel_url'));
1146
+ }
1147
+
1148
+ $params = $this->getCustomerParams($payment, $params);
1149
+ $params = $this->getShippingParams($payment, $params);
1150
+
1151
+ //add url to order in BO Magento
1152
+ $params['cdata1'] = Mage::getUrl('adminhtml/sales_order/view',
1153
+ array('_secure' => true, 'order_id' => $payment->getOrder()->getId()));
1154
+
1155
+ $customDataHipay = Mage::helper('hipay')->getCustomData($payment, $amount, $this, $split_number);
1156
+
1157
+ // Add custom data for transaction request
1158
+ if(file_exists(Mage::getModuleDir('','Allopass_Hipay') . DS . 'Helper' . DS . 'CustomData.php')){
1159
+ if (class_exists('Allopass_Hipay_Helper_CustomData',true)){
1160
+ if (method_exists(Mage::helper('hipay/customData'),'getCustomData')){
1161
+ $customData = Mage::helper('hipay/customData')->getCustomData($payment,$amount);
1162
+ if (is_array($customData)){
1163
+ $customDataHipay = array_merge($customData,$customDataHipay);
1164
+ }
1165
+ }
1166
+ }
1167
+ }
1168
+
1169
+ $params['custom_data'] = json_encode(($customDataHipay));
1170
+
1171
+ // Add device fingerprint for the transaction request (Token of device)
1172
+ $params['device_fingerprint'] = $payment->getAdditionalInformation('device_fingerprint');
1173
+
1174
+ if (Mage::getStoreConfig('hipay/hipay_basket/activate_basket', Mage::app()->getStore())) {
1175
+ $params['basket'] = Mage::helper('hipay')->getCartInformation($payment->getOrder(),Allopass_Hipay_Helper_Data::STATE_AUTHORIZATION);
1176
+ }
1177
+
1178
+ // Add Request resource (Informations module and cms)
1179
+ $params['source'] = Mage::helper('hipay')->getRequestSource();
1180
+
1181
+ return $params;
1182
+ }
1183
+
1184
+ /**
1185
+ *
1186
+ * @param Mage_Sales_Model_Order_Payment $payment
1187
+ * @param array $params
1188
+ * @return array $params
1189
+ */
1190
+ protected function getCustomerParams($payment, $params = array())
1191
+ {
1192
+ $order = $payment->getOrder();
1193
+ $params['email'] = $order->getCustomerEmail();
1194
+ $params['phone'] = $order->getBillingAddress()->getTelephone();
1195
+
1196
+ if (($dob = $order->getCustomerDob()) != "") {
1197
+ $dob = new Zend_Date($dob);
1198
+ $validator = new Zend_Validate_Date();
1199
+ if ($validator->isValid($dob)) {
1200
+ $params['birthdate'] = $dob->toString('YYYYMMdd');
1201
+ }
1202
+ }
1203
+
1204
+ $gender = $order->getCustomerGender();
1205
+
1206
+ $customer = Mage::getModel('customer/customer');
1207
+ $customer->setData('gender', $gender);
1208
+ $attribute = $customer->getResource()->getAttribute('gender');
1209
+ if ($attribute) {
1210
+ $gender = $attribute->getFrontend()->getValue($customer);
1211
+ $gender = strtoupper(substr($gender, 0, 1));
1212
+ }
1213
+
1214
+ if ($gender != "M" && $gender != "F") {
1215
+ $gender = "U";
1216
+ }
1217
+
1218
+
1219
+ $params['gender'] = $gender;
1220
+ $params['firstname'] = $order->getCustomerFirstname();
1221
+ $params['lastname'] = $order->getCustomerLastname();
1222
+ $params['recipientinfo'] = $order->getBillingAddress()->getCompany();
1223
+ $params['streetaddress'] = $order->getBillingAddress()->getStreet1();
1224
+ $params['streetaddress2'] = $order->getBillingAddress()->getStreet2();
1225
+ $params['city'] = $order->getBillingAddress()->getCity();
1226
+ //$params['state'] = $order->getBillingAddress(); //TODO checck if country is US or Canada
1227
+ $zipcode = explode('-', $order->getBillingAddress()->getPostcode());
1228
+ $params['zipcode'] = $zipcode[0];
1229
+ //$params['zipcode'] = $order->getBillingAddress()->getPostcode();
1230
+ $params['country'] = $order->getBillingAddress()->getCountry();
1231
+
1232
+ return $params;
1233
+ }
1234
+
1235
+ /**
1236
+ *
1237
+ * @param Mage_Sales_Model_Order_Payment $payment
1238
+ * @param array $params
1239
+ * @return array $params
1240
+ */
1241
+ protected function getShippingParams($payment, $params = array())
1242
+ {
1243
+ if ($payment->getOrder()->getIsVirtual()) {
1244
+ return $params;
1245
+ }
1246
+
1247
+ $shippingAddress = $payment->getOrder()->getShippingAddress();
1248
+ $params['shipto_firstname'] = $shippingAddress->getFirstname();
1249
+ $params['shipto_lastname'] = $shippingAddress->getLastname();
1250
+ $params['shipto_recipientinfo'] = $shippingAddress->getCompany();
1251
+ $params['shipto_streetaddress'] = $shippingAddress->getStreet1();
1252
+ $params['shipto_streetaddress2'] = $shippingAddress->getStreet2();
1253
+ $params['shipto_city'] = $shippingAddress->getCity();
1254
+ //$params['shipto_state'] = $shippingAddress; //TODO check if country is US or Canada
1255
+ $params['shipto_zipcode'] = $shippingAddress->getPostcode();
1256
+ $params['shipto_country'] = $shippingAddress->getCountry();
1257
+ $params['shipto_msisdn'] = $shippingAddress->getTelephone();
1258
+
1259
+
1260
+ return $params;
1261
+ }
1262
+
1263
+ /**
1264
+ *
1265
+ * @param Allopass_Hipay_Model_SplitPayment $spiltPayment
1266
+ */
1267
+ public function paySplitPayment($splitPayment)
1268
+ {
1269
+ $request = Mage::getModel('hipay/api_request', array($this));
1270
+
1271
+ $order = Mage::getModel('sales/order')->load($splitPayment->getOrderId());
1272
+ if ($order->getId()) {
1273
+ $gatewayParams = $this->getGatewayParams($order->getPayment(), $splitPayment->getAmountToPay(), null,
1274
+ $splitPayment->getSplitNumber());
1275
+
1276
+ //Added because if the same order_id tpp respond "Max Attempts exceed!"
1277
+ $gatewayParams['orderid'] .= $this->generateSplitOrderId($splitPayment);
1278
+
1279
+ $gatewayParams['description'] = Mage::helper('hipay')->__("Order SPLIT %s by %s", $order->getIncrementId(),
1280
+ $order->getCustomerEmail());//MANDATORY;
1281
+ $gatewayParams['eci'] = 9;
1282
+ $gatewayParams['operation'] = self::OPERATION_SALE;
1283
+ $gatewayParams['payment_product'] = $this->getCcTypeHipay($order->getPayment()->getCcType());
1284
+
1285
+ /**
1286
+ * Parameters specific to the payment product
1287
+ */
1288
+ $gatewayParams['cardtoken'] = $splitPayment->getCardToken();
1289
+
1290
+ $gatewayParams['authentication_indicator'] = 0;//$this->getConfigData('use_3d_secure');
1291
+ $this->_debug($gatewayParams);
1292
+
1293
+ $gatewayResponse = $request->gatewayRequest(Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_ORDER,
1294
+ $gatewayParams);
1295
+
1296
+ $this->_debug($gatewayResponse->debug());
1297
+
1298
+
1299
+ return $gatewayResponse->getState();
1300
+ }
1301
+ }
1302
+
1303
+ protected function getCcTypeHipay($ccTypeMagento)
1304
+ {
1305
+ $ccTypes = Mage::getSingleton('hipay/config')->getCcTypesHipay();
1306
+
1307
+ if (isset($ccTypes[$ccTypeMagento])) {
1308
+ return $ccTypes[$ccTypeMagento];
1309
+ } else { //Maybe it's already hipay code, we return it directly
1310
+ return $ccTypeMagento;
1311
+ }
1312
+ }
1313
+
1314
+ /**
1315
+ * Return true if there are authorized transactions
1316
+ *
1317
+ * @param Mage_Sales_Model_Order_Payment $payment
1318
+ * @return bool
1319
+ */
1320
+ protected function isPreauthorizeCapture($payment)
1321
+ {
1322
+ $lastTransaction = $payment->getTransaction($payment->getLastTransId());
1323
+
1324
+ if (!$lastTransaction) {
1325
+ return false;
1326
+ }
1327
+
1328
+ /*if ($this->getOperation() == self::OPERATION_SALE && $lastTransaction->getTxnType() == Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH )
1329
+ return false;
1330
+ */
1331
+ if ($lastTransaction->getTxnType() == Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE && $this->orderDue($payment->getOrder())) {
1332
+ return true;
1333
+ }
1334
+
1335
+ if ($lastTransaction->getTxnType() != Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH) {
1336
+ return false;
1337
+ }
1338
+
1339
+ return true;
1340
+ }
1341
+
1342
+ /**
1343
+ *
1344
+ * @param Mage_Sales_Model_Order_Payment $payment
1345
+ * @param float $amount
1346
+ */
1347
+ protected function _preauthorizeCapture($payment, $amount)
1348
+ {
1349
+ $transactionId = $payment->getLastTransId();
1350
+
1351
+ $gatewayParams = array('operation' => 'capture', 'amount' => $amount);
1352
+
1353
+ if (Mage::getStoreConfig('hipay/hipay_basket/activate_basket', Mage::app()->getStore())) {
1354
+ $gatewayParams['basket'] = Mage::helper('hipay')->getCartInformation($payment->getOrder(),Allopass_Hipay_Helper_Data::STATE_CAPTURE);
1355
+ }
1356
+
1357
+ $this->_debug($gatewayParams);
1358
+ /* @var $request Allopass_Hipay_Model_Api_Request */
1359
+ $request = Mage::getModel('hipay/api_request', array($this));
1360
+ $uri = Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_MAINTENANCE . $transactionId;
1361
+
1362
+ $gatewayResponse = $request->gatewayRequest($uri, $gatewayParams, $payment->getOrder()->getStoreId());
1363
+
1364
+ $this->_debug($gatewayResponse->debug());
1365
+
1366
+ switch ($gatewayResponse->getStatus()) {
1367
+ case "116":
1368
+ $this->addTransaction(
1369
+ $payment,
1370
+ $gatewayResponse->getTransactionReference(),
1371
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
1372
+ array('is_transaction_closed' => 0),
1373
+ array(),
1374
+ Mage::helper('hipay')->getTransactionMessage(
1375
+ $payment, self::OPERATION_MAINTENANCE_ACCEPT_CHALLENGE,
1376
+ $gatewayResponse->getTransactionReference(), $amount
1377
+ )
1378
+ );
1379
+ $payment->setIsTransactionPending(true);
1380
+ break;
1381
+ case "117": //Capture requested
1382
+ case "118": //Capture
1383
+ case "119": //Partially Capture
1384
+ $this->addTransaction(
1385
+ $payment,
1386
+ $gatewayResponse->getTransactionReference(),
1387
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
1388
+ array('is_transaction_closed' => 0),
1389
+ array(),
1390
+ Mage::helper('hipay')->getTransactionMessage(
1391
+ $payment, self::OPERATION_MAINTENANCE_CAPTURE, $gatewayResponse->getTransactionReference(),
1392
+ $amount
1393
+ )
1394
+ );
1395
+
1396
+ $payment->setIsTransactionPending(true);
1397
+ break;
1398
+ default:
1399
+ Mage::throwException($gatewayResponse->getStatus() . " ==> " . $gatewayResponse->getMessage() . " is not processed!");
1400
+ break;
1401
+ }
1402
+
1403
+ return $this;
1404
+ }
1405
+
1406
+
1407
+ /**
1408
+ * Add payment transaction
1409
+ *
1410
+ * @param Mage_Sales_Model_Order_Payment $payment
1411
+ * @param string $transactionId
1412
+ * @param string $transactionType
1413
+ * @param array $transactionDetails
1414
+ * @param array $transactionAdditionalInfo
1415
+ * @return null|Mage_Sales_Model_Order_Payment_Transaction
1416
+ */
1417
+ public function addTransaction(
1418
+ Mage_Sales_Model_Order_Payment $payment,
1419
+ $transactionId,
1420
+ $transactionType,
1421
+ array $transactionDetails = array(),
1422
+ array $transactionAdditionalInfo = array(),
1423
+ $message = false
1424
+ ) {
1425
+ $payment->setTransactionId($transactionId);
1426
+ if (method_exists($payment, "resetTransactionAdditionalInfo")) {
1427
+ $payment->resetTransactionAdditionalInfo();
1428
+ }
1429
+ foreach ($transactionDetails as $key => $value) {
1430
+ $payment->setData($key, $value);
1431
+ }
1432
+ foreach ($transactionAdditionalInfo as $key => $value) {
1433
+ $payment->setTransactionAdditionalInfo($key, $value);
1434
+ }
1435
+
1436
+ if (!class_exists("Mage_Sales_Model_Order_Payment_Transaction")) {
1437
+ return null;
1438
+ }
1439
+
1440
+ if (method_exists($payment, "addTransaction")) {
1441
+ $transaction = $payment->addTransaction($transactionType, null, false, $message);
1442
+ } else {
1443
+ $transaction = $this->_addTransaction($payment, $transactionType, null, false);
1444
+ }
1445
+
1446
+ /**
1447
+ * It for self using
1448
+ */
1449
+ $transaction->setMessage($message);
1450
+
1451
+ return $transaction;
1452
+ }
1453
+
1454
+ /**
1455
+ * Create transaction, prepare its insertion into hierarchy and add its information to payment and comments
1456
+ *
1457
+ * To add transactions and related information, the following information should be set to payment before processing:
1458
+ * - transaction_id
1459
+ * - is_transaction_closed (optional) - whether transaction should be closed or open (closed by default)
1460
+ * - parent_transaction_id (optional)
1461
+ * - should_close_parent_transaction (optional) - whether to close parent transaction (closed by default)
1462
+ *
1463
+ * If the sales document is specified, it will be linked to the transaction as related for future usage.
1464
+ * Currently transaction ID is set into the sales object
1465
+ * This method writes the added transaction ID into last_trans_id field of the payment object
1466
+ *
1467
+ * To make sure transaction object won't cause trouble before saving, use $failsafe = true
1468
+ *
1469
+ * @param Mage_Sales_Model_Order_Payment
1470
+ * @param string $type
1471
+ * @param Mage_Sales_Model_Abstract $salesDocument
1472
+ * @param bool $failsafe
1473
+ * @return null|Mage_Sales_Model_Order_Payment_Transaction
1474
+ */
1475
+ protected function _addTransaction($payment, $type, $salesDocument = null, $failsafe = false)
1476
+ {
1477
+ // look for set transaction ids
1478
+ $transactionId = $payment->getTransactionId();
1479
+ if (null !== $transactionId) {
1480
+ // set transaction parameters
1481
+ /*$transaction = Mage::getModel('sales/order_payment_transaction')
1482
+ ->setOrderPaymentObject($payment)
1483
+ ->setTxnType($type)
1484
+ ->setTxnId($transactionId)
1485
+ ->isFailsafe($failsafe)
1486
+ ;*/
1487
+
1488
+ // set transaction parameters
1489
+ //$transaction = false;
1490
+ $transaction = $this->_lookupTransaction($payment, $transactionId);
1491
+
1492
+ if (!$transaction) {
1493
+ $transaction = Mage::getModel('sales/order_payment_transaction')->setTxnId($transactionId);
1494
+ }
1495
+
1496
+ $transaction
1497
+ ->setOrderPaymentObject($payment)
1498
+ ->setTxnType($type)
1499
+ ->isFailsafe($failsafe);
1500
+
1501
+ if ($payment->hasIsTransactionClosed()) {
1502
+ $transaction->setIsClosed((int)$payment->getIsTransactionClosed());
1503
+ }
1504
+
1505
+ // link with sales entities
1506
+ $payment->setLastTransId($transactionId);
1507
+ $payment->setCreatedTransaction($transaction);
1508
+ $payment->getOrder()->addRelatedObject($transaction);
1509
+ if ($salesDocument && $salesDocument instanceof Mage_Sales_Model_Abstract) {
1510
+ $salesDocument->setTransactionId($transactionId);
1511
+ // TODO: linking transaction with the sales document
1512
+ }
1513
+
1514
+ // link with parent transaction Not used because transaction Id is the same
1515
+ $parentTransactionId = $payment->getParentTransactionId();
1516
+
1517
+ if ($parentTransactionId) {
1518
+ $transaction->setParentTxnId($parentTransactionId);
1519
+ if ($payment->getShouldCloseParentTransaction()) {
1520
+ $parentTransaction = $this->_lookupTransaction($payment, $parentTransactionId);//
1521
+ if ($parentTransaction) {
1522
+ $parentTransaction->isFailsafe($failsafe)->close(false);
1523
+ $payment->getOrder()->addRelatedObject($parentTransaction);
1524
+ }
1525
+ }
1526
+ }
1527
+ return $transaction;
1528
+ }
1529
+ }
1530
+
1531
+ /**
1532
+ * Find one transaction by ID or type
1533
+ * @param Mage_Sales_Model_Order_Payment
1534
+ * @param string $txnId
1535
+ * @param string $txnType
1536
+ * @return Mage_Sales_Model_Order_Payment_Transaction|false
1537
+ */
1538
+ protected function _lookupTransaction($payment, $txnId, $txnType = false)
1539
+ {
1540
+ $_transactionsLookup = array();
1541
+ if (!$txnId) {
1542
+ if ($txnType && $payment->getId()) {
1543
+ $collection = Mage::getModel('sales/order_payment_transaction')->getCollection()
1544
+ ->addPaymentIdFilter($payment->getId())
1545
+ ->addTxnTypeFilter($txnType);
1546
+ foreach ($collection as $txn) {
1547
+ $txn->setOrderPaymentObject($payment);
1548
+ $_transactionsLookup[$txn->getTxnId()] = $txn;
1549
+ return $txn;
1550
+ }
1551
+ }
1552
+ return false;
1553
+ }
1554
+ if (isset($_transactionsLookup[$txnId])) {
1555
+ return $_transactionsLookup[$txnId];
1556
+ }
1557
+ $txn = Mage::getModel('sales/order_payment_transaction')
1558
+ ->setOrderPaymentObject($payment)
1559
+ ->loadByTxnId($txnId);
1560
+ if ($txn->getId()) {
1561
+ $_transactionsLookup[$txnId] = $txn;
1562
+ } else {
1563
+ $_transactionsLookup[$txnId] = false;
1564
+ }
1565
+ return $_transactionsLookup[$txnId];
1566
+ }
1567
+
1568
+ /**
1569
  * Check method for processing with base currency
1570
  *
1571
  * @param string $currencyCode
1573
  */
1574
  public function canUseForCurrency($currencyCode)
1575
  {
1576
+ /* if (!in_array($currencyCode, $this->_allowCurrencyCode)) {
1577
+ return false;
1578
+ }*/
1579
  return true;
1580
  }
1581
+
1582
  /**
1583
  * Whether this method can accept or deny payment
1584
  *
1588
  */
1589
  public function canReviewPayment(Mage_Payment_Model_Info $payment)
1590
  {
1591
+ $fraud_type = $payment->getAdditionalInformation('fraud_type');
1592
+ $fraud_review = $payment->getAdditionalInformation('fraud_review');
1593
+ return parent::canReviewPayment($payment) && ($fraud_type == 'challenged' && $fraud_review != 'allowed');
1594
  }
1595
+
1596
  public function canRefund()
1597
  {
1598
+ return $this->_canRefund;
1599
+ }
1600
+
1601
+ protected function orderDue($order)
1602
+ {
1603
+ return $order->hasInvoices() && $order->getBaseTotalDue() > 0;
1604
+ }
1605
+
1606
+
1607
+ /**
1608
+ *
1609
+ * @return Mage_Checkout_Model_Session $checkout
1610
+ */
1611
+ protected function _getCheckout()
1612
+ {
1613
+ return Mage::getSingleton('checkout/session');
1614
+ }
1615
+
1616
+ /**
1617
+ * Log debug data to file
1618
+ *
1619
+ * @param mixed $debugData
1620
+ */
1621
+ protected function _debug($debugData)
1622
+ {
1623
+ if ($this->getDebugFlag()) {
1624
+ Mage::getModel('hipay/log_adapter', 'payment_' . $this->getCode() . '.log')
1625
+ ->setFilterDataKeys($this->_debugReplacePrivateDataKeys)
1626
+ ->log($debugData);
1627
+ }
1628
+ }
1629
+
1630
+ /**
1631
+ * Define if debugging is enabled
1632
+ *
1633
+ * @return bool
1634
+ */
1635
+ public function getDebugFlag()
1636
+ {
1637
+ return $this->getConfigData('debug');
1638
+ }
1639
+
1640
+ /**
1641
+ * Used to call debug method from not Payment Method context
1642
+ *
1643
+ * @param mixed $debugData
1644
+ */
1645
+ public function debugData($debugData)
1646
+ {
1647
+ $this->_debug($debugData);
1648
+ }
1649
+
1650
+ public function isAdmin()
1651
+ {
1652
+ return Mage::app()->getStore()->isAdmin();
1653
+ }
1654
+
1655
+ /**
1656
+ * With MOTO
1657
+ *
1658
+ * @return mixed
1659
+ */
1660
+ public function sendMailToCustomer()
1661
+ {
1662
+ return Mage::getStoreConfig('hipay/hipay_api_moto/moto_send_email', Mage::app()->getStore());
1663
+ }
1664
+
1665
+ /**
1666
+ * Return an id with informations to TPP
1667
+ *
1668
+ * @return string
1669
+ */
1670
+ public function generateSplitOrderId($splitPayment)
1671
+ {
1672
+ return "-split-" . $splitPayment->getSplitNumber() . "-" . $splitPayment->getAttempts() . "-" . $splitPayment->getId();
1673
  }
1674
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Allopass/Hipay/Model/Method/Cc.php CHANGED
@@ -500,11 +500,21 @@ class Allopass_Hipay_Model_Method_Cc extends Allopass_Hipay_Model_Method_Abstrac
500
  */
501
  private function _getAmount()
502
  {
 
 
503
  $info = $this->getInfoInstance();
504
  if ($this->_isPlaceOrder()) {
505
- return (double)$info->getOrder()->getQuoteBaseGrandTotal();
 
 
 
 
506
  } else {
507
- return (double)$info->getQuote()->getBaseGrandTotal();
 
 
 
 
508
  }
509
  }
510
 
@@ -516,12 +526,21 @@ class Allopass_Hipay_Model_Method_Cc extends Allopass_Hipay_Model_Method_Abstrac
516
  private function _getCurrencyCode()
517
  {
518
  $info = $this->getInfoInstance();
519
-
520
- if ($this->_isPlaceOrder()) {
521
- return $info->getOrder()->getBaseCurrencyCode();
522
- } else {
523
- return $info->getQuote()->getBaseCurrencyCode();
524
- }
 
 
 
 
 
 
 
 
 
525
  }
526
 
527
  /**
500
  */
501
  private function _getAmount()
502
  {
503
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
504
+
505
  $info = $this->getInfoInstance();
506
  if ($this->_isPlaceOrder()) {
507
+ if ($useOrderCurrency) {
508
+ return (double)$info->getOrder()->getQuoteGrandTotal();
509
+ } else {
510
+ return (double)$info->getOrder()->getQuoteBaseGrandTotal();
511
+ }
512
  } else {
513
+ if ($useOrderCurrency) {
514
+ return (double)$info->getQuote()->getGrandTotal();
515
+ } else {
516
+ return (double)$info->getQuote()->getBaseGrandTotal();
517
+ }
518
  }
519
  }
520
 
526
  private function _getCurrencyCode()
527
  {
528
  $info = $this->getInfoInstance();
529
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
530
+
531
+ if ($useOrderCurrency ){
532
+ if ($this->_isPlaceOrder()) {
533
+ return $info->getOrder()->getOrderCurrencyCode();
534
+ } else {
535
+ return $info->getQuote()->getOrderCurrencyCode();
536
+ }
537
+ }else{
538
+ if ($this->_isPlaceOrder()) {
539
+ return $info->getOrder()->getBaseCurrencyCode();
540
+ } else {
541
+ return $info->getQuote()->getBaseCurrencyCode();
542
+ }
543
+ }
544
  }
545
 
546
  /**
app/code/community/Allopass/Hipay/Model/Method/Hosted.php CHANGED
@@ -1,125 +1,145 @@
1
  <?php
2
  class Allopass_Hipay_Model_Method_Hosted extends Allopass_Hipay_Model_Method_Abstract
3
  {
4
-
5
- protected $_canReviewPayment = true;
6
-
7
- protected $_code = 'hipay_hosted';
8
-
9
- protected $_formBlockType = 'hipay/form_hosted';
10
- protected $_infoBlockType = 'hipay/info_hosted';
11
-
12
-
13
- public function getOrderPlaceRedirectUrl()
14
- {
15
-
16
- return Mage::getUrl(str_replace("_", "/", $this->getCode()).'/sendRequest',array('_secure' => true));
17
- }
18
-
19
- /**
20
- * Assign data to info model instance
21
- *
22
- * @param mixed $data
23
- * @return Mage_Payment_Model_Info
24
- */
25
- public function assignData($data)
26
- {
27
- if (!($data instanceof Varien_Object)) {
28
- $data = new Varien_Object($data);
29
- }
30
- $info = $this->getInfoInstance();
31
- $this->assignInfoData($info, $data);
32
-
33
- return $this;
34
- }
35
-
36
-
37
-
38
- /**
39
- * (non-PHPdoc)
40
- * @see Mage_Payment_Model_Method_Abstract::capture()
41
- */
42
- public function capture(Varien_Object $payment, $amount)
43
- {
44
- parent::capture($payment, $amount);
45
-
46
- if ($this->isPreauthorizeCapture($payment) /* || $this->orderDue($payment->getOrder())*/ )
47
- $this->_preauthorizeCapture($payment, $amount);
48
-
49
- $payment->setSkipTransactionCreation(true);
50
- return $this;
51
- }
52
-
53
-
54
- public function place($payment, $amount)
55
- {
56
- $order = $payment->getOrder();
57
- $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
58
-
59
- $request = Mage::getModel('hipay/api_request',array($this));
60
-
61
- $payment->setAmount($amount);
62
-
63
- $token = null;
64
- if($payment->getAdditionalInformation('use_oneclick'))
65
- {
66
- $cardId = $payment->getAdditionalInformation('selected_oneclick_card');
67
- $card = Mage::getModel('hipay/card')->load($cardId);
68
-
69
- if($card->getId() && $card->getCustomerId() == $customer->getId())
70
- $token = $card->getCcToken();
71
- else
72
- Mage::throwException(Mage::helper('hipay')->__("Error with your card!"));
73
-
74
- }
75
-
76
- $gatewayParams = $this->getGatewayParams($payment, $amount,$token);
77
-
78
- if(is_null($token))
79
- {
80
-
81
- $gatewayParams['payment_product'] = 'cb' ;
82
- $gatewayParams['operation'] = $this->getOperation();
83
- $gatewayParams['css'] = $this->getConfigData('css_url');
84
- $gatewayParams['template'] = $this->getConfigData('display_iframe') ? 'iframe' : $this->getConfigData('template');
85
- if ($this->getConfigData('template') == 'basic-js' && $gatewayParams['template'] == 'iframe') $gatewayParams['template'] .= '-js';
86
- $gatewayParams['display_selector'] = $this->getConfigData('display_selector');
87
- //$gatewayParams['payment_product_list'] = $this->getConfigData('cctypes');
88
-
89
- if ($gatewayParams['country'] == 'BE')
90
- $gatewayParams['payment_product_list'] = $this->getConfigData('cctypes');
91
- else
92
- $gatewayParams['payment_product_list'] = str_replace('bcmc', '', $this->getConfigData('cctypes'));
93
-
94
-
95
- $gatewayParams['payment_product_category_list'] = "credit-card";
96
-
97
- if(Mage::getStoreConfig('general/store_information/name') != "")
98
- $gatewayParams['merchant_display_name'] = Mage::getStoreConfig('general/store_information/name');
99
-
100
- $this->_debug($gatewayParams);
101
-
102
- $gatewayResponse = $request->gatewayRequest(Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_HOSTED,$gatewayParams,$payment->getOrder()->getStoreId());
103
-
104
- $this->_debug($gatewayResponse->debug());
105
-
106
- return $gatewayResponse->getForwardUrl();
107
- }
108
- else
109
- {
110
- $gatewayParams['operation'] = $this->getOperation();
111
- $gatewayParams['payment_product'] = Mage::getSingleton('customer/session')->getCustomer()->getHipayCcType();
112
-
113
- $this->_debug($gatewayParams);
114
-
115
- $gatewayResponse = $request->gatewayRequest(Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_ORDER,$gatewayParams,$payment->getOrder()->getStoreId());
116
-
117
- $this->_debug($gatewayResponse->debug());
118
-
119
- $redirectUrl = $this->processResponseToRedirect($gatewayResponse, $payment, $amount);
120
-
121
- return $redirectUrl;
122
- }
123
-
124
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
1
  <?php
2
  class Allopass_Hipay_Model_Method_Hosted extends Allopass_Hipay_Model_Method_Abstract
3
  {
4
+
5
+ protected $_canReviewPayment = true;
6
+
7
+ protected $_code = 'hipay_hosted';
8
+
9
+ protected $_formBlockType = 'hipay/form_hosted';
10
+ protected $_infoBlockType = 'hipay/info_hosted';
11
+
12
+
13
+ public function getOrderPlaceRedirectUrl()
14
+ {
15
+
16
+ return Mage::getUrl(str_replace("_", "/", $this->getCode()).'/sendRequest',array('_secure' => true));
17
+ }
18
+
19
+ /**
20
+ * Assign data to info model instance
21
+ *
22
+ * @param mixed $data
23
+ * @return Mage_Payment_Model_Info
24
+ */
25
+ public function assignData($data)
26
+ {
27
+ if (!($data instanceof Varien_Object)) {
28
+ $data = new Varien_Object($data);
29
+ }
30
+ $info = $this->getInfoInstance();
31
+ $this->assignInfoData($info, $data);
32
+
33
+ return $this;
34
+ }
35
+
36
+
37
+
38
+ /**
39
+ * (non-PHPdoc)
40
+ * @see Mage_Payment_Model_Method_Abstract::capture()
41
+ */
42
+ public function capture(Varien_Object $payment, $amount)
43
+ {
44
+ parent::capture($payment, $amount);
45
+
46
+ if ($this->isPreauthorizeCapture($payment) /* || $this->orderDue($payment->getOrder())*/ )
47
+ $this->_preauthorizeCapture($payment, $amount);
48
+
49
+ $payment->setSkipTransactionCreation(true);
50
+ return $this;
51
+ }
52
+
53
+
54
+ public function place($payment, $amount)
55
+ {
56
+ $order = $payment->getOrder();
57
+ $customer = Mage::getModel('customer/customer')->load($order->getCustomerId());
58
+
59
+ $request = Mage::getModel('hipay/api_request',array($this));
60
+
61
+ $payment->setAmount($amount);
62
+
63
+ $token = null;
64
+ if($payment->getAdditionalInformation('use_oneclick'))
65
+ {
66
+ $cardId = $payment->getAdditionalInformation('selected_oneclick_card');
67
+ $card = Mage::getModel('hipay/card')->load($cardId);
68
+
69
+ if($card->getId() && $card->getCustomerId() == $customer->getId())
70
+ $token = $card->getCcToken();
71
+ else
72
+ Mage::throwException(Mage::helper('hipay')->__("Error with your card!"));
73
+
74
+ }
75
+
76
+ $gatewayParams = $this->getGatewayParams($payment, $amount,$token);
77
+
78
+ if(is_null($token))
79
+ {
80
+ $gatewayParams['payment_product'] = 'cb' ;
81
+
82
+ $gatewayParams['operation'] = $this->getOperation();
83
+ $gatewayParams['css'] = $this->getConfigData('css_url');
84
+ $gatewayParams['template'] = $this->getConfigData('display_iframe') ? 'iframe' : $this->getConfigData('template');
85
+ if ($this->getConfigData('template') == 'basic-js' && $gatewayParams['template'] == 'iframe') $gatewayParams['template'] .= '-js';
86
+ $gatewayParams['display_selector'] = $this->getConfigData('display_selector');
87
+ //$gatewayParams['payment_product_list'] = $this->getConfigData('cctypes');
88
+
89
+ if ($gatewayParams['country'] == 'BE')
90
+ $gatewayParams['payment_product_list'] = $this->getConfigData('cctypes');
91
+ else
92
+ $gatewayParams['payment_product_list'] = str_replace('bcmc', '', $this->getConfigData('cctypes'));
93
+
94
+
95
+ $gatewayParams['payment_product_category_list'] = "credit-card";
96
+
97
+ if(Mage::getStoreConfig('general/store_information/name') != "")
98
+ $gatewayParams['merchant_display_name'] = Mage::getStoreConfig('general/store_information/name');
99
+
100
+ // Override params to gateaways
101
+ $gatewayParams = $this->getSpecificsParams($gatewayParams,$payment);
102
+
103
+ $this->_debug($gatewayParams);
104
+ $gatewayResponse = $request->gatewayRequest(Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_HOSTED,$gatewayParams,$payment->getOrder()->getStoreId(),$this->isAdmin());
105
+
106
+ $this->_debug($gatewayResponse->debug());
107
+
108
+ // MOTO Redirection
109
+ if ($gatewayParams['eci'] == '1' && $this->sendMailToCustomer() && strpos($order->getPayment()->getMethod(),'hipay_hosted') !== false){
110
+ $payment->setAdditionalInformation('redirectUrl', $gatewayResponse->getForwardUrl());
111
+
112
+ return $gatewayParams['moto_url_redirect'];
113
+ }else{
114
+ return $gatewayResponse->getForwardUrl();
115
+ }
116
+ }
117
+ else
118
+ {
119
+ $gatewayParams['operation'] = $this->getOperation();
120
+ $gatewayParams['payment_product'] = Mage::getSingleton('customer/session')->getCustomer()->getHipayCcType();
121
+
122
+ $this->_debug($gatewayParams);
123
+
124
+ $gatewayResponse = $request->gatewayRequest(Allopass_Hipay_Model_Api_Request::GATEWAY_ACTION_ORDER,$gatewayParams,$payment->getOrder()->getStoreId());
125
+
126
+ $this->_debug($gatewayResponse->debug());
127
+
128
+ $redirectUrl = $this->processResponseToRedirect($gatewayResponse, $payment, $amount);
129
+
130
+ return $redirectUrl;
131
+ }
132
+
133
+ }
134
+
135
+ /**
136
+ * Update or not default params
137
+ *
138
+ * @param $gatewayParams
139
+ * @return mixed
140
+ */
141
+ public function getSpecificsParams($gatewayParams)
142
+ {
143
+ return $gatewayParams;
144
+ }
145
  }
app/code/community/Allopass/Hipay/Model/Method/Klarna.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Allopass_Hipay_Model_Method_Klarna extends Allopass_Hipay_Model_Method_Hosted
3
+ {
4
+ protected $_code = 'hipay_klarna';
5
+ protected $_canRefund = false;
6
+ protected $_canRefundInvoicePartial = false;
7
+
8
+ const PAYMENT_PRODUCT = 'klarnainvoice';
9
+
10
+
11
+ /**
12
+ * Getting specifics params for payment method klarna
13
+ *
14
+ * @param $gatewayParams
15
+ * @return Array
16
+ */
17
+ public function getSpecificsParams($gatewayParams,$payment)
18
+ {
19
+ $gatewayParams['payment_product'] = Allopass_Hipay_Model_Method_Klarna::PAYMENT_PRODUCT;
20
+
21
+ $params['msisdn'] = $payment->getOrder()->getBillingAddress()->getTelephone();
22
+
23
+ // Fake data because it's not default information in MAGENTO
24
+ $gatewayParams['shipto_house_number'] = '999';
25
+ unset($gatewayParams['payment_product_category_list']);
26
+
27
+ return $gatewayParams;
28
+ }
29
+ }
app/code/community/Allopass/Hipay/Model/Observer.php CHANGED
@@ -1,236 +1,219 @@
1
  <?php
2
  class Allopass_Hipay_Model_Observer
3
  {
4
- /**
5
- * Cancel orders stayed in pending because customer not validated payment form
6
- */
7
- public function cancelOrdersInPending()
8
- {
9
- $methodCodes = array();
10
- //Select only method with cancel orders enabled
11
- foreach (Mage::helper('hipay')->getHipayMethods() as $code=>$model)
12
- {
13
- if(Mage::getStoreConfigFlag('payment/'.$code."/cancel_pending_order"))
14
- {
15
- $methodCodes[] = $code;
16
- }
17
- }
 
 
18
 
19
- if(count($methodCodes) < 1)
20
- return $this;
21
-
22
- //Limited time in minutes
23
- $limitedTime = 30;
24
-
25
- $date = new Zend_Date();
26
-
27
- /* @var $collection Mage_Sales_Model_Resource_Order_Collection */
28
- $collection = Mage::getResourceModel('sales/order_collection');
29
- $collection->addFieldToSelect(array('entity_id','increment_id','store_id','state'))
30
- ->addFieldToFilter('main_table.state',Mage_Sales_Model_Order::STATE_NEW)
31
- ->addFieldToFilter('op.method',array('in'=>array_values($methodCodes)))
32
- ->addAttributeToFilter('created_at', array('to' => ($date->subMinute($limitedTime)->toString('Y-MM-dd HH:mm:ss'))))
33
- ->join(array('op' => 'sales/order_payment'), 'main_table.entity_id=op.parent_id', array('method'));
34
-
35
- /* @var $order Mage_Sales_Model_Order */
36
- foreach ($collection as $order)
37
- {
38
- if($order->canCancel())
39
- {
40
- try {
41
 
42
- $order->cancel();
43
- $order
44
- ->addStatusToHistory($order->getStatus(),// keep order status/state
45
- Mage::helper('hipay')->__("Order canceled automatically by cron because order is pending since %d minutes",$limitedTime));
46
-
47
- $order->save();
48
-
49
- } catch (Exception $e) {
50
- Mage::logException($e);
51
- }
52
- }
53
-
54
- }
55
-
56
- return $this;
57
- }
58
-
59
- public function manageOrdersInPendingCapture()
60
- {
61
- $methods = array('hipay_cc','hipay_hosted');
62
- /* @var $collection Mage_Sales_Model_Resource_Order_Collection */
63
- $collection = Mage::getResourceModel('sales/order_collection');
64
- $collection->addFieldToFilter('status','pending_capture');
65
-
66
- /* @var $order Mage_Sales_Model_Order */
67
- foreach ($collection as $order)
68
- {
69
- if(!in_array($order->getPayment()->getMethod(), $methods))
70
- continue;
71
-
72
- $orderDate = "";
73
- }
74
-
75
- }
76
-
77
- public function displaySectionCheckoutIframe($observer)
78
- {
79
- $payment = Mage::getSingleton('checkout/session')->getQuote()->getPayment();
80
- if($payment->getAdditionalInformation('use_oneclick'))
81
- return $this;
82
- /* @var $controller Mage_Checkout_OnepageController */
83
- $controller = $observer->getControllerAction();
84
-
85
- $result = Mage::helper('core')->jsonDecode($controller->getResponse()->getBody());
86
-
87
- //TODO check if payment method is hosted and iframe active and is success
88
- $methodInstance = $payment->getMethodInstance();
89
- if($result['success']
90
- && ($methodInstance->getCode() == 'hipay_hosted' || $methodInstance->getCode() == 'hipay_hostedxtimes')
91
- && $methodInstance->getConfigData('display_iframe'))
92
- {
93
- $result['iframeUrl'] = $result['redirect'];
94
- }
95
-
96
- $controller->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
97
-
98
- return $this;
99
-
100
- }
101
-
102
- public function paySplitPayments()
103
- {
104
-
105
- $date = new Zend_Date();
106
-
107
- //TODO add filter for max attempts
108
- $splitPayments = Mage::getModel('hipay/splitPayment')->getCollection()
109
- ->addFieldToFilter('status',array('in'=>array(Allopass_Hipay_Model_SplitPayment::SPLIT_PAYMENT_STATUS_PENDING,
110
- Allopass_Hipay_Model_SplitPayment::SPLIT_PAYMENT_STATUS_FAILED)))
111
- ->addFieldTofilter('date_to_pay',array('to' => $date->toString('Y-MM-dd 00:00:00')))
112
- ->addFieldTofilter('attempts',array('lteq' => 3));
113
 
114
-
115
- foreach ($splitPayments as $splitPayment) {
116
- try {
117
- $splitPayment->pay();
118
- } catch (Exception $e) {
119
- $splitPayment->sendErrorEmail();
120
- Mage::logException($e);
121
- }
122
- }
123
- }
124
-
125
- public function arrangeOrderView($observer)
126
- {
127
- /* @var $block Mage_Adminhtml_Block_Sales_Order_View|Mage_Adminhtml_Block_Sales_Transactions_Detail */
128
- $block = $observer->getBlock();
129
-
130
- /* @var $order Mage_Sales_Model_Order */
131
- if($block instanceof Mage_Adminhtml_Block_Sales_Order_View)
132
- {
133
- $isAllowedAction = Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/review_payment');
134
- if(!$isAllowedAction)
135
- return $this;
136
-
137
- $order = $block->getOrder();
138
-
139
- if(strpos($order->getPayment()->getMethod(), "hipay") === false)
140
- return $this;
141
 
142
- if($order->canReviewPayment())
143
- {
144
- $url = $block->getUrl("*/payment/reviewCapturePayment");
145
- $message = Mage::helper('sales')->__('Are you sure you want to accept this payment?');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  $block->addButton('accept_capture_payment', array(
147
- 'label' => Mage::helper('hipay')->__('Accept and Capture Payment'),
148
- 'onclick' => "confirmSetLocation('{$message}', '{$url}')",
149
  ));
150
- }
151
-
152
-
153
- }
154
- elseif($block instanceof Mage_Adminhtml_Block_Sales_Transactions_Detail)
155
- {
156
- $txnId = $block->getTxnIdHtml();
157
- $orderIncrementId = $block->getOrderIncrementIdHtml();
158
-
159
-
160
- $order = Mage::getModel('sales/order')->loadByIncrementId(trim($orderIncrementId));
161
- if($order->getId() && strpos($order->getPayment()->getMethod(), 'hipay') !== false)
162
- {
163
- $link = '<a href="https://merchant.hipay-tpp.com//transaction/detail/index/trxid/'.$txnId.'" target="_blank">'.$txnId.'</a>';
164
- $block->setTxnIdHtml($link);
165
- }
166
-
167
-
168
-
169
- }
170
- }
171
- /**
172
- * Disallow refund action in some cases
173
- * Used only for layout render
174
- * @param Varien_Object $observer
175
- */
176
- public function orderCanRefund($observer)
177
- {
178
- /* @var $order Mage_Sales_Model_Order */
179
- $order = $observer->getOrder();
180
-
181
- if($order->getStatus() == Allopass_Hipay_Model_Method_Abstract::STATUS_CAPTURE_REQUESTED){
182
-
183
- $order->setForcedCanCreditmemo(false);
184
- $order->setForcedCanCreditmemoFromHipay(true);
185
- }
186
- elseif($order->getPayment()->getMethod() == 'hipay_cc' && strtolower($order->getPayment()->getCcType()) == 'bcmc')
187
- {
188
- $order->setForcedCanCreditmemo(false);
189
- $order->setForcedCanCreditmemoFromHipay(true);
190
- }
191
- elseif($order->getPayment() && strpos($order->getPayment()->getMethod(), 'hipay') !== false)
192
- {
193
-
194
- //If configuration validate order with status 117 (capture requested) and Notification 118 (Captured) is not received
195
- // we disallow refund
196
- if(((int)$order->getPayment()->getMethodInstance()->getConfigData('hipay_status_validate_order') == 117) === true ){
197
-
198
- $histories = Mage::getResourceModel('sales/order_status_history_collection')
199
- ->setOrderFilter($order)
200
- ->addFieldToFilter('comment',
201
- array(
202
- // for new order
203
- array('like'=>'%code-118%'),
204
- // for old order
205
- array('like'=>'%: 118 Message: %')
206
- ));
207
-
208
- if($histories->count() < 1){
209
-
210
- $order->setForcedCanCreditmemo(false);
211
- $order->setForcedCanCreditmemoFromHipay(true);
212
- }
213
- }
214
-
215
-
216
- }
217
-
218
- }
219
-
220
- /**
221
- * Used to unset ForcedCanCreditmemo attributs from the order
222
- * Without restore order status is set to "C"
223
- * @param Varien_Object $observer
224
- */
225
- public function unsetOrderCanRefund($observer){
226
- /* @var $order Mage_Sales_Model_Order */
227
- $order = $observer->getOrder();
228
 
229
- if($order->getForcedCanCreditmemoFromHipay()){
230
- $order->unsetData('forced_can_creditmemo');
231
- $order->unsetData('forced_can_creditmemo_from_hipay');
232
- }
233
-
234
-
235
- }
236
- }
1
  <?php
2
  class Allopass_Hipay_Model_Observer
3
  {
4
+ /**
5
+ * Cancel orders stayed in pending because customer not validated payment form
6
+ */
7
+ public function cancelOrdersInPending()
8
+ {
9
+ $methodCodes = array();
10
+ //Select only method with cancel orders enabled
11
+ foreach (Mage::helper('hipay')->getHipayMethods() as $code=>$model) {
12
+ if (Mage::getStoreConfigFlag('payment/'.$code."/cancel_pending_order")) {
13
+ $methods[$code] = Mage::getStoreConfig('payment/'.$code."/delay_cancel_pending_order");
14
+ }
15
+ }
16
+
17
+ if (count($methods) < 1) {
18
+ return $this;
19
+ }
20
 
21
+ /* @var $collection Mage_Sales_Model_Resource_Order_Collection */
22
+ foreach ($methods as $key => $delay) {
23
+ $date = new Zend_Date();
24
+ if (is_numeric($delay)) {
25
+ $delayMinutes = 60 * $delay;
26
+ } else {
27
+ $delayMinutes = 30;
28
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
+ $collection = Mage::getResourceModel('sales/order_collection');
31
+ $collection->addFieldToSelect(array('entity_id', 'increment_id', 'store_id', 'state'))
32
+ ->addFieldToFilter('main_table.state', Mage_Sales_Model_Order::STATE_NEW)
33
+ ->addFieldToFilter('op.method', array('eq' => $key))
34
+ ->addAttributeToFilter('created_at',
35
+ array('to' => ($date->subMinute($delayMinutes)->toString('Y-MM-dd HH:mm:ss'))))
36
+ ->join(array('op' => 'sales/order_payment'), 'main_table.entity_id=op.parent_id', array('method'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
+ /* @var $order Mage_Sales_Model_Order */
39
+ foreach ($collection as $order) {
40
+ if ($order->canCancel()) {
41
+ try {
42
+ $order->cancel();
43
+ $order
44
+ ->addStatusToHistory($order->getStatus(),// keep order status/state
45
+ Mage::helper('hipay')->__("Order canceled automatically by cron because order is pending since %d minutes",
46
+ $delayMinutes));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
+ $order->save();
49
+ } catch (Exception $e) {
50
+ Mage::logException($e);
51
+ }
52
+ }
53
+ }
54
+ }
55
+
56
+ return $this;
57
+ }
58
+
59
+ public function manageOrdersInPendingCapture()
60
+ {
61
+ $methods = array('hipay_cc','hipay_hosted');
62
+ /* @var $collection Mage_Sales_Model_Resource_Order_Collection */
63
+ $collection = Mage::getResourceModel('sales/order_collection');
64
+ $collection->addFieldToFilter('status', 'pending_capture');
65
+
66
+ /* @var $order Mage_Sales_Model_Order */
67
+ foreach ($collection as $order) {
68
+ if (!in_array($order->getPayment()->getMethod(), $methods)) {
69
+ continue;
70
+ }
71
+
72
+ $orderDate = "";
73
+ }
74
+ }
75
+
76
+ public function displaySectionCheckoutIframe($observer)
77
+ {
78
+ $payment = Mage::getSingleton('checkout/session')->getQuote()->getPayment();
79
+ if ($payment->getAdditionalInformation('use_oneclick')) {
80
+ return $this;
81
+ }
82
+ /* @var $controller Mage_Checkout_OnepageController */
83
+ $controller = $observer->getControllerAction();
84
+
85
+ $result = Mage::helper('core')->jsonDecode($controller->getResponse()->getBody());
86
+
87
+ //TODO check if payment method is hosted and iframe active and is success
88
+ $methodInstance = $payment->getMethodInstance();
89
+ if ($result['success']
90
+ && ($methodInstance->getCode() == 'hipay_hosted' || $methodInstance->getCode() == 'hipay_hostedxtimes')
91
+ && $methodInstance->getConfigData('display_iframe')) {
92
+ $result['iframeUrl'] = $result['redirect'];
93
+ }
94
+
95
+ $controller->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
96
+
97
+ return $this;
98
+ }
99
+
100
+ public function paySplitPayments()
101
+ {
102
+ $date = new Zend_Date();
103
+
104
+ //TODO add filter for max attempts
105
+ $splitPayments = Mage::getModel('hipay/splitPayment')->getCollection()
106
+ ->addFieldToFilter('status', array('in'=>array(Allopass_Hipay_Model_SplitPayment::SPLIT_PAYMENT_STATUS_PENDING,
107
+ Allopass_Hipay_Model_SplitPayment::SPLIT_PAYMENT_STATUS_FAILED)))
108
+ ->addFieldTofilter('date_to_pay', array('to' => $date->toString('Y-MM-dd 00:00:00')))
109
+ ->addFieldTofilter('attempts', array('lteq' => 3));
110
+
111
+
112
+ foreach ($splitPayments as $splitPayment) {
113
+ try {
114
+ $splitPayment->pay();
115
+ } catch (Exception $e) {
116
+ $splitPayment->sendErrorEmail();
117
+ Mage::logException($e);
118
+ }
119
+ }
120
+ }
121
+
122
+ public function arrangeOrderView($observer)
123
+ {
124
+ /* @var $block Mage_Adminhtml_Block_Sales_Order_View|Mage_Adminhtml_Block_Sales_Transactions_Detail */
125
+ $block = $observer->getBlock();
126
+
127
+ /* @var $order Mage_Sales_Model_Order */
128
+ if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View) {
129
+ $isAllowedAction = Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/review_payment');
130
+ if (!$isAllowedAction) {
131
+ return $this;
132
+ }
133
+
134
+ $order = $block->getOrder();
135
+
136
+ if (strpos($order->getPayment()->getMethod(), "hipay") === false) {
137
+ return $this;
138
+ }
139
+
140
+ if ($order->canReviewPayment()) {
141
+ $url = $block->getUrl("*/payment/reviewCapturePayment");
142
+ $message = Mage::helper('sales')->__('Are you sure you want to accept this payment?');
143
  $block->addButton('accept_capture_payment', array(
144
+ 'label' => Mage::helper('hipay')->__('Accept and Capture Payment'),
145
+ 'onclick' => "confirmSetLocation('{$message}', '{$url}')",
146
  ));
147
+ }
148
+ } elseif ($block instanceof Mage_Adminhtml_Block_Sales_Transactions_Detail) {
149
+ $txnId = $block->getTxnIdHtml();
150
+ $orderIncrementId = $block->getOrderIncrementIdHtml();
151
+
152
+
153
+ $order = Mage::getModel('sales/order')->loadByIncrementId(trim($orderIncrementId));
154
+ if ($order->getId() && strpos($order->getPayment()->getMethod(), 'hipay') !== false) {
155
+ $link = '<a href="https://merchant.hipay-tpp.com//transaction/detail/index/trxid/'.$txnId.'" target="_blank">'.$txnId.'</a>';
156
+ $block->setTxnIdHtml($link);
157
+ }
158
+ }
159
+ }
160
+ /**
161
+ * Disallow refund action in some cases
162
+ * Used only for layout render
163
+ * @param Varien_Object $observer
164
+ */
165
+ public function orderCanRefund($observer)
166
+ {
167
+ /* @var $order Mage_Sales_Model_Order */
168
+ $order = $observer->getOrder();
169
+
170
+ if ($order->getStatus() == Allopass_Hipay_Model_Method_Abstract::STATUS_CAPTURE_REQUESTED) {
171
+ $order->setForcedCanCreditmemo(false);
172
+ $order->setForcedCanCreditmemoFromHipay(true);
173
+ } elseif ($order->getPayment() && $order->getPayment()->getMethod() == 'hipay_cc' && strtolower($order->getPayment()->getCcType()) == 'bcmc') {
174
+ $order->setForcedCanCreditmemo(false);
175
+ $order->setForcedCanCreditmemoFromHipay(true);
176
+ } elseif ($order->getPayment() && strpos($order->getPayment()->getMethod(), 'hipay') !== false) {
177
+
178
+ //If configuration validate order with status 117 (capture requested) and Notification 118 (Captured) is not received
179
+ // we disallow refund
180
+ if (((int)$order->getPayment()->getMethodInstance()->getConfigData('hipay_status_validate_order') == 117) === true) {
181
+ $histories = Mage::getResourceModel('sales/order_status_history_collection')
182
+ ->setOrderFilter($order)
183
+ ->addFieldToFilter('comment',
184
+ array(
185
+ // for new order
186
+ array('like'=>'%code-118%'),
187
+ // for old order
188
+ array('like'=>'%: 118 Message: %')
189
+ ));
190
+
191
+ if ($histories->count() < 1) {
192
+ $order->setForcedCanCreditmemo(false);
193
+ $order->setForcedCanCreditmemoFromHipay(true);
194
+ }
195
+ }
196
+ }
197
+ }
198
+
199
+ /**
200
+ * Used to unset ForcedCanCreditmemo attributs from the order
201
+ * Without restore order status is set to "C"
202
+ * @param Varien_Object $observer
203
+ */
204
+ public function unsetOrderCanRefund($observer)
205
+ {
206
+ /* @var $order Mage_Sales_Model_Order */
207
+ $order = $observer->getOrder();
208
+
209
+ if ($order->getForcedCanCreditmemoFromHipay()) {
210
+ $order->unsetData('forced_can_creditmemo');
211
+ $order->unsetData('forced_can_creditmemo_from_hipay');
212
+ }
 
 
 
 
 
 
 
 
 
 
 
 
213
 
214
+ // Cancel transaction in TPP if state is cancel
215
+ if ($order->getStatus() == Mage_Sales_Model_Order::STATE_CANCELED) {
216
+ $order->getPayment()->getMethodInstance()->cancelTransaction($order->getPayment());
217
+ }
218
+ }
219
+ }
 
 
app/code/community/Allopass/Hipay/Model/PaymentProfile.php CHANGED
@@ -121,7 +121,7 @@ class Allopass_Hipay_Model_PaymentProfile extends Mage_Core_Model_Abstract
121
  case 'period_unit':
122
  return Mage::helper('payment')->__('Billing Period Unit');
123
  case 'period_frequency':
124
- return Mage::helper('payment')->__('Billing Frequency');
125
  case 'period_max_cycles':
126
  return Mage::helper('payment')->__('Maximum Billing Cycles');
127
  case 'billing_amount':
121
  case 'period_unit':
122
  return Mage::helper('payment')->__('Billing Period Unit');
123
  case 'period_frequency':
124
+ return Mage::helper('payment')->__('Billing delay');
125
  case 'period_max_cycles':
126
  return Mage::helper('payment')->__('Maximum Billing Cycles');
127
  case 'billing_amount':
app/code/community/Allopass/Hipay/Model/Rule/Condition/Address.php CHANGED
@@ -5,19 +5,37 @@ class Allopass_Hipay_Model_Rule_Condition_Address extends Mage_Rule_Model_Condit
5
  {
6
  public function loadAttributeOptions()
7
  {
8
- $attributes = array(
9
- 'base_subtotal' => Mage::helper('sales')->__('Subtotal'),
10
- 'base_grand_total' => Mage::helper('sales')->__('Grand Total'),
11
- 'base_currency_code' => Mage::helper('adminhtml')->__('Currency'),
12
- 'items_qty' => Mage::helper('salesrule')->__('Total Items Quantity'),
13
- 'weight' => Mage::helper('salesrule')->__('Total Weight'),
14
- 'created_at' => Mage::helper('hipay')->__("Order's time"),
15
- 'shipping_method' => Mage::helper('salesrule')->__('Shipping Method'),
16
- 'billing_postcode' => Mage::helper('hipay')->__('Billing Postcode'),
17
- 'billing_region' => Mage::helper('hipay')->__('Billing Region'),
18
- 'billing_region_id' => Mage::helper('hipay')->__('Billing State/Province'),
19
- 'billing_country_id' => Mage::helper('hipay')->__('Billing Country'),
20
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  $this->setAttributeOption($attributes);
23
 
@@ -26,27 +44,70 @@ class Allopass_Hipay_Model_Rule_Condition_Address extends Mage_Rule_Model_Condit
26
 
27
  public function getInputType()
28
  {
29
- switch ($this->getAttribute()) {
30
- case 'base_subtotal': case 'weight': case 'total_qty': case 'base_grandtotal':
31
- return 'numeric';
32
- case 'shipping_method': case 'billing_country_id': case 'billing_region_id': case 'base_currency_code':
33
- return 'select';
34
- case 'created_at':
35
- return 'boolean' ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
- return 'string';
38
  }
39
 
40
  public function getValueElementType()
41
  {
42
- switch ($this->getAttribute()) {
43
- case 'shipping_method': case 'billing_country_id': case 'billing_region_id': case 'base_currency_code': case 'created_at':
44
- return 'select';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
- return 'text';
47
  }
48
-
49
-
50
 
51
 
52
  public function getValueSelectOptions()
@@ -67,19 +128,19 @@ class Allopass_Hipay_Model_Rule_Condition_Address extends Mage_Rule_Model_Condit
67
  $options = Mage::getModel('adminhtml/system_config_source_shipping_allmethods')
68
  ->toOptionArray();
69
  break;
70
-
71
- case 'base_currency_code':
72
  $options = Mage::getModel('adminhtml/system_config_source_currency')
73
  ->toOptionArray(false);
74
  break;
75
- case 'created_at':
76
- $options = array(
77
- array("value"=>"00::8","label"=>Mage::helper('hipay')->__("Midnight - 8:00 a.m.")),
78
- array("value"=>"8::15","label"=>Mage::helper('hipay')->__("8:00 a.m. - 3:00 p.m.")),
79
- array("value"=>"15::20","label"=>Mage::helper('hipay')->__("3:00 pm. - 8:00 p.m.")),
80
- array("value"=>"20::23","label"=>Mage::helper('hipay')->__("8:00 p.m. - 11:59 p.m.")),
81
- );
82
- break;
83
 
84
  default:
85
  $options = array();
@@ -97,74 +158,86 @@ class Allopass_Hipay_Model_Rule_Condition_Address extends Mage_Rule_Model_Condit
97
  */
98
  public function validate(Varien_Object $object)
99
  {
100
- $quote = $object;
101
-
102
- if (!($object instanceof Mage_Sales_Model_Quote))
103
- $quote = Mage::getModel('sales/quote')->load($object->getQuoteId());
104
-
105
- $address = $quote->getBillingAddress();
106
-
107
- //Get infos from billing address
108
- $toValidate = new Varien_Object();
109
- $toValidate->setBillingPostcode($address->getPostcode());
110
- $toValidate->setBillingRegion($address->getRegion());
111
- $toValidate->setBillingRegionId($address->getRegionId());
112
- $toValidate->setBillingCountryId($address->getCountryId());
113
-
114
- if(!$quote->isVirtual()){//Get infos from shipping address
115
- $address = $quote->getShippingAddress();
116
- }
117
-
118
- $toValidate->setBaseSubtotal($address->getBaseSubtotal());
119
- $toValidate->setBaseGrandTotal($address->getBaseGrandTotal());
120
- $toValidate->setWeight($address->getWeight());
121
- $toValidate->setShippingMethod($address->getShippingMethod());
122
-
123
- $toValidate->setTotalQty($quote->getItemsQty());
124
- $toValidate->setBaseCurrencyCode($quote->getBaseCurrencyCode());
125
-
126
- $toValidate->setCreatedAt($this->_getFormatCreatedAt($object));
127
-
128
- return parent::validate($toValidate);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
 
 
 
 
130
  }
131
-
132
- protected function _getFormatCreatedAt($object)
133
- {
134
- $created_at = $object->getCreatedAt();
135
-
136
- if(!$created_at instanceof Zend_Date)
137
- $created_at = Mage::app()->getLocale()->storeDate($object->getStoreId(),$created_at,true);
138
-
139
- $hour = (int)$created_at->toString("H");
140
-
141
- switch (true) {
142
- case ($hour >= 0 && $hour <= 8):
143
- return '00::8';
144
- case ($hour > 8 && $hour <= 15):
145
- return '8::15';
146
- case ($hour > 15 && $hour <= 20):
147
- return '15::20';
148
- case ($hour > 20 && $hour <= 23):
149
- return '20::23';
150
-
151
- }
152
-
153
- return '';
154
- }
155
-
156
- public function getTypeElement()
157
  {
158
- return $this->getForm()->addField($this->getPrefix() . '__' . $this->getId() .'_'. $this->getPaymentMethodCode() . '__type', 'hidden', array(
159
- //'name' => 'rule_' . $this->getPaymentMethodCode() . '[' . $this->getPrefix() . '][' . $this->getId().'_'. $this->getPaymentMethodCode() . '][type]',
160
- 'name' => 'rule_' . $this->getPaymentMethodCode() . '[' . $this->getPrefix() . '][' . $this->getId() . '][type]',
161
- 'value' => $this->getType(),
162
- 'no_span' => true,
163
- 'class' => 'hidden',
164
- ));
 
165
  }
166
 
167
- public function getAttributeElement()
168
  {
169
  if (is_null($this->getAttribute())) {
170
  foreach ($this->getAttributeOption() as $k => $v) {
@@ -172,16 +245,17 @@ class Allopass_Hipay_Model_Rule_Condition_Address extends Mage_Rule_Model_Condit
172
  break;
173
  }
174
  }
175
- return $this->getForm()->addField($this->getPrefix().'__'.$this->getId().'_'. $this->getPaymentMethodCode().'__attribute', 'select', array(
176
- //'name'=>'rule_' . $this->getPaymentMethodCode() . '['.$this->getPrefix().']['.$this->getId().'_'. $this->getPaymentMethodCode().'][attribute]',
177
- 'name'=>'rule_' . $this->getPaymentMethodCode() . '['.$this->getPrefix().']['.$this->getId().'][attribute]',
178
- 'values'=>$this->getAttributeSelectOptions(),
179
- 'value'=>$this->getAttribute(),
180
- 'value_name'=>$this->getAttributeName(),
181
- ))->setRenderer(Mage::getBlockSingleton('rule/editable'));
 
182
  }
183
-
184
- /**
185
  * Retrieve Condition Operator element Instance
186
  * If the operator value is empty - define first available operator value as default
187
  *
@@ -197,37 +271,39 @@ class Allopass_Hipay_Model_Rule_Condition_Address extends Mage_Rule_Model_Condit
197
  }
198
  }
199
 
200
- $elementId = sprintf('%s__%s__operator', $this->getPrefix(), $this->getId().'_'. $this->getPaymentMethodCode());
 
201
  //$elementName = sprintf('rule_'.$this->getPaymentMethodCode().'[%s][%s][operator]', $this->getPrefix(), $this->getId().'_'. $this->getPaymentMethodCode());
202
- $elementName = sprintf('rule_'.$this->getPaymentMethodCode().'[%s][%s][operator]', $this->getPrefix(), $this->getId());
203
- $element = $this->getForm()->addField($elementId, 'select', array(
204
- 'name' => $elementName,
205
- 'values' => $options,
206
- 'value' => $this->getOperator(),
207
- 'value_name' => $this->getOperatorName(),
 
208
  ));
209
  $element->setRenderer(Mage::getBlockSingleton('rule/editable'));
210
 
211
  return $element;
212
  }
213
-
214
- public function getValueElement()
215
  {
216
  $elementParams = array(
217
  //'name' => 'rule_'.$this->getPaymentMethodCode().'['.$this->getPrefix().']['.$this->getId().'_'. $this->getPaymentMethodCode().'][value]',
218
- 'name' => 'rule_'.$this->getPaymentMethodCode().'['.$this->getPrefix().']['.$this->getId().'][value]',
219
- 'value' => $this->getValue(),
220
- 'values' => $this->getValueSelectOptions(),
221
- 'value_name' => $this->getValueName(),
222
  'after_element_html' => $this->getValueAfterElementHtml(),
223
- 'explicit_apply' => $this->getExplicitApply(),
224
  );
225
- if ($this->getInputType()=='date') {
226
  // date format intentionally hard-coded
227
  $elementParams['input_format'] = Varien_Date::DATE_INTERNAL_FORMAT;
228
- $elementParams['format'] = Varien_Date::DATE_INTERNAL_FORMAT;
229
  }
230
- return $this->getForm()->addField($this->getPrefix().'__'.$this->getId().'_'. $this->getPaymentMethodCode().'__value',
231
  $this->getValueElementType(),
232
  $elementParams
233
  )->setRenderer($this->getValueElementRenderer());
5
  {
6
  public function loadAttributeOptions()
7
  {
8
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
9
+
10
+ if ($useOrderCurrency) {
11
+ $attributes = array(
12
+ 'base_subtotal' => Mage::helper('sales')->__('Subtotal'),
13
+ 'grand_total' => Mage::helper('sales')->__('Grand Total'),
14
+ 'currency_code' => Mage::helper('adminhtml')->__('Currency'),
15
+ 'items_qty' => Mage::helper('salesrule')->__('Total Items Quantity'),
16
+ 'weight' => Mage::helper('salesrule')->__('Total Weight'),
17
+ 'created_at' => Mage::helper('hipay')->__("Order's time"),
18
+ 'shipping_method' => Mage::helper('salesrule')->__('Shipping Method'),
19
+ 'billing_postcode' => Mage::helper('hipay')->__('Billing Postcode'),
20
+ 'billing_region' => Mage::helper('hipay')->__('Billing Region'),
21
+ 'billing_region_id' => Mage::helper('hipay')->__('Billing State/Province'),
22
+ 'billing_country_id' => Mage::helper('hipay')->__('Billing Country'),
23
+ );
24
+ }else{
25
+ $attributes = array(
26
+ 'base_subtotal' => Mage::helper('sales')->__('Subtotal'),
27
+ 'base_grand_total' => Mage::helper('sales')->__('Grand Total'),
28
+ 'base_currency_code' => Mage::helper('adminhtml')->__('Currency'),
29
+ 'items_qty' => Mage::helper('salesrule')->__('Total Items Quantity'),
30
+ 'weight' => Mage::helper('salesrule')->__('Total Weight'),
31
+ 'created_at' => Mage::helper('hipay')->__("Order's time"),
32
+ 'shipping_method' => Mage::helper('salesrule')->__('Shipping Method'),
33
+ 'billing_postcode' => Mage::helper('hipay')->__('Billing Postcode'),
34
+ 'billing_region' => Mage::helper('hipay')->__('Billing Region'),
35
+ 'billing_region_id' => Mage::helper('hipay')->__('Billing State/Province'),
36
+ 'billing_country_id' => Mage::helper('hipay')->__('Billing Country'),
37
+ );
38
+ }
39
 
40
  $this->setAttributeOption($attributes);
41
 
44
 
45
  public function getInputType()
46
  {
47
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
48
+
49
+ if ($useOrderCurrency) {
50
+ switch ($this->getAttribute()) {
51
+ case 'subtotal':
52
+ case 'weight':
53
+ case 'total_qty':
54
+ case 'base_grandtotal':
55
+ return 'numeric';
56
+ case 'shipping_method':
57
+ case 'billing_country_id':
58
+ case 'billing_region_id':
59
+ case 'currency_code':
60
+ return 'select';
61
+ case 'created_at':
62
+ return 'boolean';
63
+ }
64
+
65
+ return 'string';
66
+ } else {
67
+ switch ($this->getAttribute()) {
68
+ case 'base_subtotal':
69
+ case 'weight':
70
+ case 'total_qty':
71
+ case 'base_grandtotal':
72
+ return 'numeric';
73
+ case 'shipping_method':
74
+ case 'billing_country_id':
75
+ case 'billing_region_id':
76
+ case 'base_currency_code':
77
+ return 'select';
78
+ case 'created_at':
79
+ return 'boolean';
80
+ }
81
+ return 'string';
82
  }
 
83
  }
84
 
85
  public function getValueElementType()
86
  {
87
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
88
+
89
+ if ($useOrderCurrency) {
90
+ switch ($this->getAttribute()) {
91
+ case 'shipping_method':
92
+ case 'billing_country_id':
93
+ case 'billing_region_id':
94
+ case 'currency_code':
95
+ case 'created_at':
96
+ return 'select';
97
+ }
98
+ return 'text';
99
+ } else {
100
+ switch ($this->getAttribute()) {
101
+ case 'shipping_method':
102
+ case 'billing_country_id':
103
+ case 'billing_region_id':
104
+ case 'base_currency_code':
105
+ case 'created_at':
106
+ return 'select';
107
+ }
108
+ return 'text';
109
  }
 
110
  }
 
 
111
 
112
 
113
  public function getValueSelectOptions()
128
  $options = Mage::getModel('adminhtml/system_config_source_shipping_allmethods')
129
  ->toOptionArray();
130
  break;
131
+
132
+ case 'currency_code':
133
  $options = Mage::getModel('adminhtml/system_config_source_currency')
134
  ->toOptionArray(false);
135
  break;
136
+ case 'created_at':
137
+ $options = array(
138
+ array("value" => "00::8", "label" => Mage::helper('hipay')->__("Midnight - 8:00 a.m.")),
139
+ array("value" => "8::15", "label" => Mage::helper('hipay')->__("8:00 a.m. - 3:00 p.m.")),
140
+ array("value" => "15::20", "label" => Mage::helper('hipay')->__("3:00 pm. - 8:00 p.m.")),
141
+ array("value" => "20::23", "label" => Mage::helper('hipay')->__("8:00 p.m. - 11:59 p.m.")),
142
+ );
143
+ break;
144
 
145
  default:
146
  $options = array();
158
  */
159
  public function validate(Varien_Object $object)
160
  {
161
+ $quote = $object;
162
+
163
+ if (!($object instanceof Mage_Sales_Model_Quote)) {
164
+ $quote = Mage::getModel('sales/quote')->load($object->getQuoteId());
165
+ }
166
+
167
+ $address = $quote->getBillingAddress();
168
+
169
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
170
+
171
+ //Get infos from billing address
172
+ $toValidate = new Varien_Object();
173
+
174
+ if ($useOrderCurrency) {
175
+ $toValidate->setSubtotal($address->getSubtotal());
176
+ $toValidate->setGrandTotal($address->getGrandTotal());
177
+ $toValidate->setCurrencyCode($quote->getCurrencyCode());
178
+ } else {
179
+ $toValidate->setBaseSubtotal($address->getBaseSubtotal());
180
+ $toValidate->setBaseGrandTotal($address->getBaseGrandTotal());
181
+ $toValidate->setBaseCurrencyCode($quote->getBaseCurrencyCode());
182
+ }
183
+ $toValidate->setBillingPostcode($address->getPostcode());
184
+ $toValidate->setBillingRegion($address->getRegion());
185
+ $toValidate->setBillingRegionId($address->getRegionId());
186
+ $toValidate->setBillingCountryId($address->getCountryId());
187
+
188
+ if (!$quote->isVirtual()) {//Get infos from shipping address
189
+ $address = $quote->getShippingAddress();
190
+ }
191
+
192
+ $toValidate->setWeight($address->getWeight());
193
+ $toValidate->setWeight($address->getWeight());
194
+ $toValidate->setShippingMethod($address->getShippingMethod());
195
+
196
+ $toValidate->setTotalQty($quote->getItemsQty());
197
+
198
+ $toValidate->setCreatedAt($this->_getFormatCreatedAt($object));
199
+
200
+ return parent::validate($toValidate);
201
+ }
202
+
203
+ protected function _getFormatCreatedAt($object)
204
+ {
205
+ $created_at = $object->getCreatedAt();
206
+
207
+ if (!$created_at instanceof Zend_Date) {
208
+ $created_at = Mage::app()->getLocale()->storeDate($object->getStoreId(), $created_at, true);
209
+ }
210
+
211
+ $hour = (int)$created_at->toString("H");
212
+
213
+ switch (true) {
214
+ case ($hour >= 0 && $hour <= 8):
215
+ return '00::8';
216
+ case ($hour > 8 && $hour <= 15):
217
+ return '8::15';
218
+ case ($hour > 15 && $hour <= 20):
219
+ return '15::20';
220
+ case ($hour > 20 && $hour <= 23):
221
+ return '20::23';
222
 
223
+ }
224
+
225
+ return '';
226
  }
227
+
228
+ public function getTypeElement()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  {
230
+ return $this->getForm()->addField($this->getPrefix() . '__' . $this->getId() . '_' . $this->getPaymentMethodCode() . '__type',
231
+ 'hidden', array(
232
+ //'name' => 'rule_' . $this->getPaymentMethodCode() . '[' . $this->getPrefix() . '][' . $this->getId().'_'. $this->getPaymentMethodCode() . '][type]',
233
+ 'name' => 'rule_' . $this->getPaymentMethodCode() . '[' . $this->getPrefix() . '][' . $this->getId() . '][type]',
234
+ 'value' => $this->getType(),
235
+ 'no_span' => true,
236
+ 'class' => 'hidden',
237
+ ));
238
  }
239
 
240
+ public function getAttributeElement()
241
  {
242
  if (is_null($this->getAttribute())) {
243
  foreach ($this->getAttributeOption() as $k => $v) {
245
  break;
246
  }
247
  }
248
+ return $this->getForm()->addField($this->getPrefix() . '__' . $this->getId() . '_' . $this->getPaymentMethodCode() . '__attribute',
249
+ 'select', array(
250
+ //'name'=>'rule_' . $this->getPaymentMethodCode() . '['.$this->getPrefix().']['.$this->getId().'_'. $this->getPaymentMethodCode().'][attribute]',
251
+ 'name' => 'rule_' . $this->getPaymentMethodCode() . '[' . $this->getPrefix() . '][' . $this->getId() . '][attribute]',
252
+ 'values' => $this->getAttributeSelectOptions(),
253
+ 'value' => $this->getAttribute(),
254
+ 'value_name' => $this->getAttributeName(),
255
+ ))->setRenderer(Mage::getBlockSingleton('rule/editable'));
256
  }
257
+
258
+ /**
259
  * Retrieve Condition Operator element Instance
260
  * If the operator value is empty - define first available operator value as default
261
  *
271
  }
272
  }
273
 
274
+ $elementId = sprintf('%s__%s__operator', $this->getPrefix(),
275
+ $this->getId() . '_' . $this->getPaymentMethodCode());
276
  //$elementName = sprintf('rule_'.$this->getPaymentMethodCode().'[%s][%s][operator]', $this->getPrefix(), $this->getId().'_'. $this->getPaymentMethodCode());
277
+ $elementName = sprintf('rule_' . $this->getPaymentMethodCode() . '[%s][%s][operator]', $this->getPrefix(),
278
+ $this->getId());
279
+ $element = $this->getForm()->addField($elementId, 'select', array(
280
+ 'name' => $elementName,
281
+ 'values' => $options,
282
+ 'value' => $this->getOperator(),
283
+ 'value_name' => $this->getOperatorName(),
284
  ));
285
  $element->setRenderer(Mage::getBlockSingleton('rule/editable'));
286
 
287
  return $element;
288
  }
289
+
290
+ public function getValueElement()
291
  {
292
  $elementParams = array(
293
  //'name' => 'rule_'.$this->getPaymentMethodCode().'['.$this->getPrefix().']['.$this->getId().'_'. $this->getPaymentMethodCode().'][value]',
294
+ 'name' => 'rule_' . $this->getPaymentMethodCode() . '[' . $this->getPrefix() . '][' . $this->getId() . '][value]',
295
+ 'value' => $this->getValue(),
296
+ 'values' => $this->getValueSelectOptions(),
297
+ 'value_name' => $this->getValueName(),
298
  'after_element_html' => $this->getValueAfterElementHtml(),
299
+ 'explicit_apply' => $this->getExplicitApply(),
300
  );
301
+ if ($this->getInputType() == 'date') {
302
  // date format intentionally hard-coded
303
  $elementParams['input_format'] = Varien_Date::DATE_INTERNAL_FORMAT;
304
+ $elementParams['format'] = Varien_Date::DATE_INTERNAL_FORMAT;
305
  }
306
+ return $this->getForm()->addField($this->getPrefix() . '__' . $this->getId() . '_' . $this->getPaymentMethodCode() . '__value',
307
  $this->getValueElementType(),
308
  $elementParams
309
  )->setRenderer($this->getValueElementRenderer());
app/code/community/Allopass/Hipay/Model/Source/Attributes.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ *
5
+ * Allopass Hipay Attributes EAN Dropdown
6
+ *
7
+ */
8
+ class Allopass_Hipay_Model_Source_Attributes
9
+ {
10
+
11
+ /**
12
+ * Options getter
13
+ *
14
+ * @return array
15
+ */
16
+ public function toOptionArray()
17
+ {
18
+ $attributes = Mage::getResourceModel('catalog/product_attribute_collection')->getItems();
19
+
20
+ $options = array();
21
+
22
+ $options[] = array(
23
+ 'value' => '',
24
+ 'label' => Mage::helper('adminhtml')->__('-- Please Select --')
25
+ );
26
+
27
+ foreach ($attributes as $attribute) {
28
+ $code = $attribute->getAttributecode() ;
29
+ $label = $attribute->getFrontendLabel();
30
+ if(!empty($code) && !empty($label)){
31
+ $options[] = array(
32
+ 'value' => $attribute->getAttributecode(),
33
+ 'label' => $attribute->getFrontendLabel(),
34
+ );
35
+ }
36
+ }
37
+
38
+ return $options;
39
+
40
+ }
41
+ }
app/code/community/Allopass/Hipay/controllers/Adminhtml/PaymentController.php CHANGED
@@ -1,294 +1,300 @@
1
  <?php
2
  class Allopass_Hipay_Adminhtml_PaymentController extends Mage_Adminhtml_Controller_Action
3
  {
4
- /**
5
- *
6
- * @var Mage_Sales_Model_Order $order
7
- */
8
- protected $_order = null;
9
-
10
-
11
- /**
12
- *
13
- * @return Allopass_Hipay_Model_Method_Abstract $methodInstance
14
- */
15
- protected function _getMethodInstance()
16
- {
17
- $modelName = Mage::getStoreConfig('payment/'.$this->getCheckout()->getMethod()."/model");
18
- return Mage::getSingleton($modelName);
19
-
20
- }
21
-
22
- public function reviewCapturePaymentAction()
23
- {
24
- /* @var $order Mage_Sales_Model_Order */
25
- $id = $this->getRequest()->getParam('order_id');
26
- $order = Mage::getModel('sales/order')->load($id);
27
-
28
- if (!$order->getId()) {
29
- $this->_getSession()->addError($this->__('This order no longer exists.'));
30
- $this->_redirect('*/*/');
31
- $this->setFlag('', self::FLAG_NO_DISPATCH, true);
32
- return false;
33
- }
34
- Mage::register('sales_order', $order);
35
- Mage::register('current_order', $order);
36
-
37
- try {
38
-
39
- $order->getPayment()->accept();
40
- $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING,Allopass_Hipay_Model_Method_Cc::STATUS_PENDING_CAPTURE);
41
- $message = $this->__('The payment has been accepted.');
42
- $order->save();
43
- $this->_getSession()->addSuccess($message);
44
-
45
- //Capture Payment
46
- /**
47
- * Check invoice create availability
48
- */
49
- if (!$order->canInvoice()) {
50
- $this->_getSession()->addError($this->__('The order does not allow creating an invoice.'));
51
- $this->_redirect('adminhtml/sales_order/view', array('order_id' => $order->getId()));
52
- return $this;
53
- }
54
-
55
- $invoice = $order->prepareInvoice();
56
- if (!$invoice->getTotalQty()) {
57
- Mage::throwException($this->__('Cannot create an invoice without products.'));
58
- }
59
-
60
- $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
61
-
62
- $invoice->register();
63
- $invoice->getOrder()->setIsInProcess(true);
64
-
65
- $transactionSave = Mage::getModel('core/resource_transaction')
66
- ->addObject($invoice)
67
- ->addObject($invoice->getOrder());
68
-
69
- $transactionSave->save();
70
-
71
- $message = $this->__('The Capture was requested.');
72
- $this->_getSession()->addSuccess($message);
73
-
74
- $message = $this->__('You must reload the page to see new status.');
75
- $this->_getSession()->addSuccess($message);
76
-
77
- } catch (Mage_Core_Exception $e) {
78
- $this->_getSession()->addError($e->getMessage());
79
- } catch (Exception $e) {
80
- $this->_getSession()->addError($this->__('Failed to update the payment.'));
81
- Mage::logException($e);
82
- }
83
- $this->_redirect('adminhtml/sales_order/view', array('order_id' => $order->getId()));
84
- }
85
-
86
- public function sendRequestAction()
87
- {
88
- $order = $this->getOrder();
89
- $payment = $order->getPayment();
90
-
91
- $methodInstance = $this->_getMethodInstance();
92
-
93
- try
94
- {
95
- $redirectUrl = $methodInstance->place($payment,$order->getBaseTotalDue());
96
- }
97
- catch (Exception $e)
98
- {
99
- Mage::logException($e);
100
- $this->_getSession()->addError($e->getMessage());
101
- $this->_redirect('adminhtml/sales_order/index');
102
- return $this;
103
- }
104
-
105
-
106
- $this->_redirectUrl($redirectUrl);
107
-
108
- return $this;
109
-
110
- }
111
-
112
-
113
- public function acceptAction()
114
- {
115
- if(($profileIds = Mage::getSingleton('checkout/session')->getLastRecurringProfileIds()))
116
- {
117
- if(is_array($profileIds))
118
- {
119
- /* @var $gatewayResponse Allopass_Hipay_Model_Api_Response_Gateway */
120
- $gatewayResponse = Mage::getSingleton('hipay/api_response_gateway',$this->getRequest()->getParams());
121
- $collection = Mage::getModel('sales/recurring_profile')->getCollection()
122
- ->addFieldToFilter('profile_id', array('in' => $profileIds))
123
- ;
124
- $profiles = array();
125
- foreach ($collection as $profile) {
126
-
127
- $additionalInfo = array();
128
- $additionalInfo['ccType'] = $gatewayResponse->getBrand();
129
- $additionalInfo['ccExpMonth'] = $gatewayResponse->getCardExpiryMonth() ;
130
- $additionalInfo['ccExpYear'] = $gatewayResponse->getCardExpiryYear();
131
- $additionalInfo['token'] = $gatewayResponse->getToken();
132
- $additionalInfo['transaction_id'] = $gatewayResponse->getTransactionReference();
133
- $profile->setAdditionalInfo($additionalInfo);
134
-
135
- $profile->setState(Mage_Sales_Model_Recurring_Profile::STATE_ACTIVE);
136
-
137
- $profile->save();
138
- }
139
- }
140
- }
141
-
142
- $this->processResponse();
143
-
144
- if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
145
- $this->_redirect('adminhtml/sales_order/view', array('order_id' => $this->getOrder()->getId()));
 
 
 
 
 
 
146
  } else {
147
- $this->_redirect('adminhtml/sales_order/index');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
149
 
150
-
151
- return $this;
152
- }
153
-
154
- public function pendingAction()
155
- {
156
- $this->processResponse();
157
- $this->_redirect($this->_getMethodInstance()->getConfigData('pending_redirect_page'));
158
-
159
- return $this;
160
- }
161
-
162
- public function declineAction()
163
- {
164
- $this->processResponse();
165
- $this->_redirect('adminhtml/sales_order_create/');
166
- //$this->_redirect('checkout/onepage/failure');
167
- return $this;
168
- }
169
-
170
-
171
- public function exceptionAction()
172
- {
173
- //$this->_redirect('checkout/onepage/failure');
174
- $this->_redirect('adminhtml/sales_order_create/');
175
- return $this;
176
- }
177
-
178
-
179
- public function cancelAction()
180
- {
181
- $this->processResponse();
182
- //$this->_redirect('checkout/cart');
183
- $this->_redirect('adminhtml/sales_order_create/');
184
- return $this;
185
- }
186
-
187
- protected function processResponse()
188
- {
189
- $order = $this->getOrder();
190
- $payment = $order->getPayment();
191
-
192
- /* @var $gatewayResponse Allopass_Hipay_Model_Api_Response_Gateway */
193
- $gatewayResponse = Mage::getSingleton('hipay/api_response_gateway',$this->getRequest()->getParams());
194
-
195
- $this->_getMethodInstance()->processResponseToRedirect($gatewayResponse, $payment, $order->getBaseTotalDue());
196
- }
197
-
198
-
199
-
200
- /**
201
- *
202
- * @return Mage_Sales_Model_Order
203
- */
204
- protected function getOrder()
205
- {
206
- if(is_null($this->_order))
207
- {
208
-
209
- if(($profileIds = $this->getCheckout()->getLastRecurringProfileIds()))
210
- {
211
-
212
- if (is_array($profileIds)) {
213
-
214
- foreach ($profileIds as $profileId)
215
- {
216
- /* @var $profile Mage_Sales_Model_Recurring_Profile */
217
- $profile = Mage::getModel('sales/recurring_profile')->load($profileId);
218
- /* @var $_helperRecurring Allopass_Hipayrecurring_Helper_Data */
219
- $_helperRecurring = Mage::helper('hipayrecurring');
220
-
221
- if($_helperRecurring->isInitialProfileOrder($profile))
222
- $this->_order = $_helperRecurring->createOrderFromProfile($profile);
223
- else
224
- {
225
- $orderId = current($profile->getChildOrderIds());
226
- $this->_order = Mage::getModel('sales/order')->load($orderId);
227
-
228
- $additionalInfo = $profile->getAdditionalInfo();
229
-
230
- $this->_order->getPayment()->setCcType(isset($additionalInfo['ccType']) ? $additionalInfo['ccType'] : "");
231
- $this->_order->getPayment()->setCcExpMonth(isset($additionalInfo['ccExpMonth']) ? $additionalInfo['ccExpMonth'] : "");
232
- $this->_order->getPayment()->setCcExpYear(isset($additionalInfo['ccExpYear']) ? $additionalInfo['ccExpYear'] : "");
233
- $this->_order->getPayment()->setAdditionalInformation('token',isset($additionalInfo['token']) ? $additionalInfo['token'] : "");
234
- $this->_order->getPayment()->setAdditionalInformation('create_oneclick',isset($additionalInfo['create_oneclick']) ? $additionalInfo['create_oneclick'] : 1);
235
- $this->_order->getPayment()->setAdditionalInformation('use_oneclick',isset($additionalInfo['use_oneclick']) ? $additionalInfo['use_oneclick'] : 0);
236
- $this->_order->getPayment()->setAdditionalInformation('selected_oneclick_card',isset($additionalInfo['selected_oneclick_card']) ? $additionalInfo['selected_oneclick_card'] : 0);
237
- }
238
-
239
-
240
-
241
- return $this->_order; //because only one nominal item in cart is authorized and Hipay not manage many profiles
242
- }
243
-
244
-
245
- }
246
-
247
- Mage::throwException("An error occured. Profile Ids not present!");
248
-
249
-
250
-
251
- }
252
- else
253
- {
254
- $this->_order = Mage::getModel('sales/order')->load($this->getCheckout()->getLastOrderId());
255
-
256
- }
257
- }
258
-
259
- return $this->_order;
260
- }
261
-
262
- /**
263
- * Add method to calculate amount from recurring profile
264
- * @param Mage_Sales_Model_Recurring_Profile $profile
265
- * @return int $amount
266
- **/
267
- public function getAmountFromProfile(Mage_Sales_Model_Recurring_Profile $profile) {
268
- $amount = $profile->getBillingAmount() + $profile->getTaxAmount() + $profile->getShippingAmount();
269
-
270
- if($this->isInitialProfileOrder($profile))
271
- $amount += $profile->getInitAmount() ;
272
-
273
- return $amount;
274
- }
275
-
276
- protected function isInitialProfileOrder(Mage_Sales_Model_Recurring_Profile $profile)
277
- {
278
- if(count($profile->getChildOrderIds()) && current($profile->getChildOrderIds()) == "-1")
279
- return true;
280
-
281
- return false;
282
- }
283
-
284
-
285
- /**
286
- *
287
- * @return Mage_Checkout_Model_Session
288
- */
289
- protected function getCheckout()
290
- {
291
- return Mage::getSingleton('checkout/session');
292
- }
293
-
294
  }
1
  <?php
2
  class Allopass_Hipay_Adminhtml_PaymentController extends Mage_Adminhtml_Controller_Action
3
  {
4
+ /**
5
+ *
6
+ * @var Mage_Sales_Model_Order $order
7
+ */
8
+ protected $_order = null;
9
+
10
+
11
+ /**
12
+ *
13
+ * @return Allopass_Hipay_Model_Method_Abstract $methodInstance
14
+ */
15
+ protected function _getMethodInstance()
16
+ {
17
+ $modelName = Mage::getStoreConfig('payment/'.$this->getCheckout()->getMethod()."/model");
18
+ return Mage::getSingleton($modelName);
19
+
20
+ }
21
+
22
+ public function reviewCapturePaymentAction()
23
+ {
24
+ /* @var $order Mage_Sales_Model_Order */
25
+ $id = $this->getRequest()->getParam('order_id');
26
+ $order = Mage::getModel('sales/order')->load($id);
27
+
28
+ if (!$order->getId()) {
29
+ $this->_getSession()->addError($this->__('This order no longer exists.'));
30
+ $this->_redirect('*/*/');
31
+ $this->setFlag('', self::FLAG_NO_DISPATCH, true);
32
+ return false;
33
+ }
34
+ Mage::register('sales_order', $order);
35
+ Mage::register('current_order', $order);
36
+
37
+ try {
38
+
39
+ $order->getPayment()->accept();
40
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING,Allopass_Hipay_Model_Method_Cc::STATUS_PENDING_CAPTURE);
41
+ $message = $this->__('The payment has been accepted.');
42
+ $order->save();
43
+ $this->_getSession()->addSuccess($message);
44
+
45
+ //Capture Payment
46
+ /**
47
+ * Check invoice create availability
48
+ */
49
+ if (!$order->canInvoice()) {
50
+ $this->_getSession()->addError($this->__('The order does not allow creating an invoice.'));
51
+ $this->_redirect('adminhtml/sales_order/view', array('order_id' => $order->getId()));
52
+ return $this;
53
+ }
54
+
55
+ $invoice = $order->prepareInvoice();
56
+ if (!$invoice->getTotalQty()) {
57
+ Mage::throwException($this->__('Cannot create an invoice without products.'));
58
+ }
59
+
60
+ $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
61
+
62
+ $invoice->register();
63
+ $invoice->getOrder()->setIsInProcess(true);
64
+
65
+ $transactionSave = Mage::getModel('core/resource_transaction')
66
+ ->addObject($invoice)
67
+ ->addObject($invoice->getOrder());
68
+
69
+ $transactionSave->save();
70
+
71
+ $message = $this->__('The Capture was requested.');
72
+ $this->_getSession()->addSuccess($message);
73
+
74
+ $message = $this->__('You must reload the page to see new status.');
75
+ $this->_getSession()->addSuccess($message);
76
+
77
+ } catch (Mage_Core_Exception $e) {
78
+ $this->_getSession()->addError($e->getMessage());
79
+ } catch (Exception $e) {
80
+ $this->_getSession()->addError($this->__('Failed to update the payment.'));
81
+ Mage::logException($e);
82
+ }
83
+ $this->_redirect('adminhtml/sales_order/view', array('order_id' => $order->getId()));
84
+ }
85
+
86
+ public function sendRequestAction()
87
+ {
88
+ $order = $this->getOrder();
89
+ $payment = $order->getPayment();
90
+
91
+ $methodInstance = $this->_getMethodInstance();
92
+
93
+ try
94
+ {
95
+ $redirectUrl = $methodInstance->place($payment,$order->getBaseTotalDue());
96
+ }
97
+ catch (Exception $e)
98
+ {
99
+ Mage::logException($e);
100
+ $this->_getSession()->addError($e->getMessage());
101
+ $this->_redirect('adminhtml/sales_order/index');
102
+ return $this;
103
+ }
104
+
105
+ // Send Mail to customer with payment information
106
+ $url = $payment ->getAdditionalInformation('redirectUrl');
107
+ if($url && (strpos($order->getPayment()->getMethod(),'hipay_hosted') !== false)){
108
+ $receiver = Mage::getModel('customer/customer')->load($payment->getOrder()->getCustomerId());
109
+ Mage::helper('hipay')->sendLinkPaymentEmail($receiver, $payment->getOrder());
110
+ }
111
+
112
+ $this->_redirectUrl($redirectUrl);
113
+
114
+ return $this;
115
+
116
+ }
117
+
118
+
119
+ public function acceptAction()
120
+ {
121
+ if(($profileIds = Mage::getSingleton('checkout/session')->getLastRecurringProfileIds()))
122
+ {
123
+ if(is_array($profileIds))
124
+ {
125
+ /* @var $gatewayResponse Allopass_Hipay_Model_Api_Response_Gateway */
126
+ $gatewayResponse = Mage::getSingleton('hipay/api_response_gateway',$this->getRequest()->getParams());
127
+ $collection = Mage::getModel('sales/recurring_profile')->getCollection()
128
+ ->addFieldToFilter('profile_id', array('in' => $profileIds))
129
+ ;
130
+ $profiles = array();
131
+ foreach ($collection as $profile) {
132
+
133
+ $additionalInfo = array();
134
+ $additionalInfo['ccType'] = $gatewayResponse->getBrand();
135
+ $additionalInfo['ccExpMonth'] = $gatewayResponse->getCardExpiryMonth() ;
136
+ $additionalInfo['ccExpYear'] = $gatewayResponse->getCardExpiryYear();
137
+ $additionalInfo['token'] = $gatewayResponse->getToken();
138
+ $additionalInfo['transaction_id'] = $gatewayResponse->getTransactionReference();
139
+ $profile->setAdditionalInfo($additionalInfo);
140
+
141
+ $profile->setState(Mage_Sales_Model_Recurring_Profile::STATE_ACTIVE);
142
+
143
+ $profile->save();
144
+ }
145
+ }
146
+ }
147
+
148
+ $this->processResponse();
149
+
150
+ if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
151
+ $this->_redirect('adminhtml/sales_order/view', array('order_id' => $this->getOrder()->getId()));
152
  } else {
153
+ $this->_redirect('adminhtml/sales_order/index');
154
+ }
155
+
156
+
157
+ return $this;
158
+ }
159
+
160
+ public function pendingAction()
161
+ {
162
+ $this->processResponse();
163
+ $this->_redirect($this->_getMethodInstance()->getConfigData('pending_redirect_page'));
164
+
165
+ return $this;
166
+ }
167
+
168
+ public function declineAction()
169
+ {
170
+ $this->processResponse();
171
+ $this->_redirect('adminhtml/sales_order_create/');
172
+ //$this->_redirect('checkout/onepage/failure');
173
+ return $this;
174
+ }
175
+
176
+
177
+ public function exceptionAction()
178
+ {
179
+ //$this->_redirect('checkout/onepage/failure');
180
+ $this->_redirect('adminhtml/sales_order_create/');
181
+ return $this;
182
+ }
183
+
184
+
185
+ public function cancelAction()
186
+ {
187
+ $this->processResponse();
188
+ //$this->_redirect('checkout/cart');
189
+ $this->_redirect('adminhtml/sales_order_create/');
190
+ return $this;
191
+ }
192
+
193
+ protected function processResponse()
194
+ {
195
+ $order = $this->getOrder();
196
+ $payment = $order->getPayment();
197
+
198
+ /* @var $gatewayResponse Allopass_Hipay_Model_Api_Response_Gateway */
199
+ $gatewayResponse = Mage::getSingleton('hipay/api_response_gateway',$this->getRequest()->getParams());
200
+
201
+ $this->_getMethodInstance()->processResponseToRedirect($gatewayResponse, $payment, $order->getBaseTotalDue());
202
+ }
203
+
204
+
205
+
206
+ /**
207
+ *
208
+ * @return Mage_Sales_Model_Order
209
+ */
210
+ protected function getOrder()
211
+ {
212
+ if(is_null($this->_order))
213
+ {
214
+
215
+ if(($profileIds = $this->getCheckout()->getLastRecurringProfileIds()))
216
+ {
217
+
218
+ if (is_array($profileIds)) {
219
+
220
+ foreach ($profileIds as $profileId)
221
+ {
222
+ /* @var $profile Mage_Sales_Model_Recurring_Profile */
223
+ $profile = Mage::getModel('sales/recurring_profile')->load($profileId);
224
+ /* @var $_helperRecurring Allopass_Hipayrecurring_Helper_Data */
225
+ $_helperRecurring = Mage::helper('hipayrecurring');
226
+
227
+ if($_helperRecurring->isInitialProfileOrder($profile))
228
+ $this->_order = $_helperRecurring->createOrderFromProfile($profile);
229
+ else
230
+ {
231
+ $orderId = current($profile->getChildOrderIds());
232
+ $this->_order = Mage::getModel('sales/order')->load($orderId);
233
+
234
+ $additionalInfo = $profile->getAdditionalInfo();
235
+
236
+ $this->_order->getPayment()->setCcType(isset($additionalInfo['ccType']) ? $additionalInfo['ccType'] : "");
237
+ $this->_order->getPayment()->setCcExpMonth(isset($additionalInfo['ccExpMonth']) ? $additionalInfo['ccExpMonth'] : "");
238
+ $this->_order->getPayment()->setCcExpYear(isset($additionalInfo['ccExpYear']) ? $additionalInfo['ccExpYear'] : "");
239
+ $this->_order->getPayment()->setAdditionalInformation('token',isset($additionalInfo['token']) ? $additionalInfo['token'] : "");
240
+ $this->_order->getPayment()->setAdditionalInformation('create_oneclick',isset($additionalInfo['create_oneclick']) ? $additionalInfo['create_oneclick'] : 1);
241
+ $this->_order->getPayment()->setAdditionalInformation('use_oneclick',isset($additionalInfo['use_oneclick']) ? $additionalInfo['use_oneclick'] : 0);
242
+ $this->_order->getPayment()->setAdditionalInformation('selected_oneclick_card',isset($additionalInfo['selected_oneclick_card']) ? $additionalInfo['selected_oneclick_card'] : 0);
243
+ }
244
+
245
+
246
+
247
+ return $this->_order; //because only one nominal item in cart is authorized and Hipay not manage many profiles
248
+ }
249
+
250
+
251
+ }
252
+
253
+ Mage::throwException("An error occured. Profile Ids not present!");
254
+
255
+
256
+
257
+ }
258
+ else
259
+ {
260
+ $this->_order = Mage::getModel('sales/order')->load($this->getCheckout()->getLastOrderId());
261
+
262
+ }
263
  }
264
 
265
+ return $this->_order;
266
+ }
267
+
268
+ /**
269
+ * Add method to calculate amount from recurring profile
270
+ * @param Mage_Sales_Model_Recurring_Profile $profile
271
+ * @return int $amount
272
+ **/
273
+ public function getAmountFromProfile(Mage_Sales_Model_Recurring_Profile $profile) {
274
+ $amount = $profile->getBillingAmount() + $profile->getTaxAmount() + $profile->getShippingAmount();
275
+
276
+ if($this->isInitialProfileOrder($profile))
277
+ $amount += $profile->getInitAmount() ;
278
+
279
+ return $amount;
280
+ }
281
+
282
+ protected function isInitialProfileOrder(Mage_Sales_Model_Recurring_Profile $profile)
283
+ {
284
+ if(count($profile->getChildOrderIds()) && current($profile->getChildOrderIds()) == "-1")
285
+ return true;
286
+
287
+ return false;
288
+ }
289
+
290
+
291
+ /**
292
+ *
293
+ * @return Mage_Checkout_Model_Session
294
+ */
295
+ protected function getCheckout()
296
+ {
297
+ return Mage::getSingleton('checkout/session');
298
+ }
299
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  }
app/code/community/Allopass/Hipay/controllers/KlarnaController.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Allopass_Hipay_KlarnaController extends Allopass_Hipay_Controller_Payment
3
+ {
4
+ /**
5
+ * Instantiate KLARNA controller
6
+ *
7
+ * @return Mage_Core_Model_Abstract
8
+ */
9
+ protected function _getMethodInstance()
10
+ {
11
+ return Mage::getSingleton('hipay/method_klarna');
12
+ }
13
+ }
app/code/community/Allopass/Hipay/etc/config.xml CHANGED
@@ -1,7 +1,7 @@
1
  <config>
2
  <modules>
3
  <Allopass_Hipay>
4
- <version>1.5.1</version>
5
  </Allopass_Hipay>
6
  </modules>
7
  <global>
@@ -9,6 +9,11 @@
9
  <hipay>
10
  <class>Allopass_Hipay_Block</class>
11
  </hipay>
 
 
 
 
 
12
  </blocks>
13
  <helpers>
14
  <hipay>
@@ -20,185 +25,190 @@
20
  <class>Allopass_Hipay_Model</class>
21
  <resourceModel>hipay_resource</resourceModel>
22
  </hipay>
23
- <hipay_resource>
24
- <class>Allopass_Hipay_Model_Resource</class>
25
- <!-- <deprecatedNode>hipay_mysql4</deprecatedNode> -->
26
- <entities>
27
- <rule>
28
- <table>hipay_rule</table>
29
- </rule>
30
- <paymentProfile>
31
- <table>hipay_payment_profile</table>
32
- </paymentProfile>
33
- <splitPayment>
34
- <table>hipay_split_payment</table>
35
- </splitPayment>
36
- <card>
37
- <table>hipay_customer_card</table>
38
- </card>
39
- </entities>
40
- </hipay_resource>
41
  </models>
42
  <resources>
43
- <allopass_hipay_setup>
44
- <setup>
45
- <module>Allopass_Hipay</module>
46
- </setup>
47
- </allopass_hipay_setup>
48
- </resources>
49
- <template>
50
- <email>
51
- <hipay_fraud_payment_template translate="label" module="hipay">
52
- <label>Fraud Payment</label>
53
- <file>hipay_fraud_payment.html</file>
54
- <type>html</type>
55
- </hipay_fraud_payment_template>
56
- <hipay_fraud_payment_accept_template translate="label" module="hipay">
57
- <label>Fraud Payment Accepted</label>
58
- <file>hipay_fraud_payment_accept.html</file>
59
- <type>html</type>
60
- </hipay_fraud_payment_accept_template>
61
- <hipay_fraud_payment_deny_template translate="label" module="hipay">
62
- <label>Fraud Payment Deny</label>
63
- <file>hipay_fraud_payment_deny.html</file>
64
- <type>html</type>
65
- </hipay_fraud_payment_deny_template>
66
- </email>
67
- </template>
68
- <template_hipay>
69
- <hosted>
70
- <basicjs>
71
- <label>Basic-js</label>
72
- <value>basic-js</value>
73
- </basicjs>
74
- </hosted>
75
- </template_hipay>
76
- <payment_hipay>
77
- <cc>
78
- <types>
79
- <AE>
80
- <code>AE</code>
81
- <code_hipay>american-express</code_hipay>
82
- <name>American Express</name>
83
- <order>50</order>
84
- </AE>
85
- <VI>
86
- <code>VI</code>
87
- <code_hipay>visa</code_hipay>
88
- <name>Visa</name>
89
- <order>10</order>
90
- </VI>
91
- <MC>
92
- <code>MC</code>
93
- <code_hipay>mastercard</code_hipay>
94
- <name>MasterCard</name>
95
- <order>20</order>
96
- </MC>
97
- <SM>
98
- <code>SM</code>
99
- <code_hipay>maestro</code_hipay>
100
- <name>Maestro</name>
101
- <order>40</order>
102
- </SM>
103
- <BCMC>
104
- <code>BCMC</code>
105
- <code_hipay>bcmc</code_hipay>
106
- <name>Bancontact / Mister Cash</name>
107
- <order>60</order>
108
- </BCMC>
109
- <CB>
110
- <code>CB</code>
111
- <code_hipay>cb</code_hipay>
112
- <name>Carte Bancaire</name>
113
- <order>0</order>
114
- </CB>
115
- <SDD>
116
- <code>SDD</code>
117
- <code_hipay>sdd</code_hipay>
118
- <name>SEPA Direct Debit</name>
119
- <order>70</order>
120
- </SDD>
121
- </types>
122
- </cc>
123
- <hosted>
124
- <types>
125
- <AE>
126
- <code>AE</code>
127
- <code_hipay>american-express</code_hipay>
128
- <name>American Express</name>
129
- <order>50</order>
130
- </AE>
131
- <VI>
132
- <code>VI</code>
133
- <code_hipay>visa</code_hipay>
134
- <name>Visa</name>
135
- <order>10</order>
136
- </VI>
137
- <MC>
138
- <code>MC</code>
139
- <code_hipay>mastercard</code_hipay>
140
- <name>MasterCard</name>
141
- <order>20</order>
142
- </MC>
143
- <SM>
144
- <code>SM</code>
145
- <code_hipay>maestro</code_hipay>
146
- <name>Maestro</name>
147
- <order>30</order>
148
- </SM>
149
- <BCMC>
150
- <code>BCMC</code>
151
- <code_hipay>bcmc</code_hipay>
152
- <name>Bancontact / Mister Cash</name>
153
- <order>60</order>
154
- </BCMC>
155
- <CB>
156
- <code>CB</code>
157
- <code_hipay>cb</code_hipay>
158
- <name>Carte Bancaire</name>
159
- <order>0</order>
160
- </CB>
161
- </types>
162
- </hosted>
163
- </payment_hipay>
164
- <sales>
165
- <order>
166
- <statuses>
167
- <!-- retained for backwards compatibility, not used after version 1.4.2 -->
168
- <pending_capture translate="label"><label>Pending Capture</label></pending_capture>
169
- <capture_requested translate="label"><label>Capture Requested</label></capture_requested>
170
- <refund_requested translate="label"><label>Refund Requested</label></refund_requested>
171
- <authorization_requested translate="label"><label>Authorization Requested</label></authorization_requested>
172
- <expired translate="label"><label>Transaction Expired</label></expired>
173
- <partial_refund translate="label"><label>Partial Refund</label></partial_refund>
174
- <partial_capture translate="label"><label>Partial capture</label></partial_capture>
175
- </statuses>
176
- </order>
177
- </sales>
 
 
 
 
 
178
  </global>
179
  <frontend>
180
  <secure_url>
181
- <hipay_payment>/hipay/payment</hipay_payment>
182
- </secure_url>
183
- <routers>
184
- <hipay>
185
- <use>standard</use>
186
- <args>
187
- <module>Allopass_Hipay</module>
188
- <frontName>hipay</frontName>
189
- </args>
190
- </hipay>
191
- </routers>
192
- <translate>
193
- <modules>
194
- <Allopass_Hipay>
195
- <files>
196
- <default>Allopass_Hipay.csv</default>
197
- </files>
198
- </Allopass_Hipay>
199
- </modules>
200
- </translate>
201
- <layout>
202
  <updates>
203
  <hipay>
204
  <file>hipay.xml</file>
@@ -209,98 +219,98 @@
209
  <controller_action_postdispatch_checkout_onepage_saveOrder>
210
  <observers>
211
  <displaySectionCheckoutIframe>
212
- <class>hipay/observer</class>
213
- <method>displaySectionCheckoutIframe</method>
214
- </displaySectionCheckoutIframe>
215
  </observers>
216
  </controller_action_postdispatch_checkout_onepage_saveOrder>
217
  </events>
218
  </frontend>
219
  <admin>
220
- <routers>
221
- <adminhtml>
222
- <args>
223
- <modules>
224
- <allopass_hipay before="Mage_Adminhtml">Allopass_Hipay_Adminhtml</allopass_hipay>
225
- </modules>
226
- </args>
227
- </adminhtml>
228
- </routers>
229
- </admin>
230
  <adminhtml>
231
- <translate>
232
- <modules>
233
- <Allopass_Hipay>
234
- <files>
235
- <default>Allopass_Hipay.csv</default>
236
- </files>
237
- </Allopass_Hipay>
238
- </modules>
239
- </translate>
240
- <menu>
241
- <sales>
242
- <children>
243
- <hipay_payment translate="title" module="hipay">
244
- <title>Hipay</title>
245
- <sort_order>200</sort_order>
246
- <children>
247
- <payment_profile translate="title" module="hipay">
248
- <title>Split Payment Profiles</title>
249
- <action>adminhtml/paymentProfile</action>
250
- <sort_order>10</sort_order>
251
- </payment_profile>
252
- <split_payment translate="title" module="hipay">
253
- <title>Split payments</title>
254
- <action>adminhtml/splitPayment</action>
255
- <sort_order>20</sort_order>
256
- </split_payment>
257
- </children>
258
- </hipay_payment>
259
- </children>
260
- </sales>
261
- </menu>
262
- <acl>
263
- <resources>
264
- <admin>
265
- <children>
266
- <system>
267
- <children>
268
- <config>
269
- <children>
270
- <hipay>
271
- <title>Hipay API Configuration</title>
272
- </hipay>
273
- <payment>
274
- <children>
275
- <hipay_cc translate="title">
276
- <title>Hipay Credit Card</title>
277
- </hipay_cc>
278
- </children>
279
- </payment>
280
- </children>
281
- </config>
282
- </children>
283
- </system>
284
- <sales>
285
  <children>
286
  <hipay_payment translate="title" module="hipay">
287
- <title>Hipay Payment</title>
288
- <children>
289
- <payment_profile translate="title" module="hipay">
290
- <title>Split Payment Profile</title>
291
- </payment_profile>
292
- <split_payment translate="title" module="hipay">
293
- <title>Split payments</title>
294
- </split_payment>
295
- </children>
296
  </hipay_payment>
297
- </children>
298
- </sales>
299
- </children>
300
- </admin>
301
- </resources>
302
- </acl>
303
- <layout>
304
  <updates>
305
  <hipay>
306
  <file>hipay.xml</file>
@@ -308,30 +318,30 @@
308
  </updates>
309
  </layout>
310
  <events>
311
- <adminhtml_widget_container_html_before>
312
- <observers>
313
- <arrange_order_view>
314
- <class>hipay/observer</class>
315
- <method>arrangeOrderView</method>
316
- </arrange_order_view>
317
- </observers>
318
- </adminhtml_widget_container_html_before>
319
- <sales_order_load_after>
320
- <observers>
321
- <order_can_refund>
322
- <class>hipay/observer</class>
323
- <method>orderCanRefund</method>
324
- </order_can_refund>
325
- </observers>
326
- </sales_order_load_after>
327
- <sales_order_save_before>
328
- <observers>
329
- <order_unset_can_refund>
330
- <class>hipay/observer</class>
331
- <method>unsetOrderCanRefund</method>
332
- </order_unset_can_refund>
333
- </observers>
334
- </sales_order_save_before>
335
  </events>
336
  </adminhtml>
337
  <default>
@@ -340,24 +350,36 @@
340
  <api_password backend_model="adminhtml/system_config_backend_encrypted"/>
341
  <api_password_test backend_model="adminhtml/system_config_backend_encrypted"/>
342
  <secret_passphrase backend_model="adminhtml/system_config_backend_encrypted"/>
343
- <vault_endpoint_stage>https://stage-secure-vault.hipay-tpp.com/rest/v1/token/</vault_endpoint_stage>
344
- <vault_endpoint_production>https://secure-vault.hipay-tpp.com/rest/v1/token/</vault_endpoint_production>
345
- <gateway_endpoint_stage>https://stage-secure-gateway.hipay-tpp.com/rest/v1/</gateway_endpoint_stage>
346
- <gateway_endpoint_production>https://secure-gateway.hipay-tpp.com/rest/v1/</gateway_endpoint_production>
 
347
  <fingerprint>1</fingerprint>
348
  </hipay_api>
 
 
 
 
 
 
 
 
 
 
 
349
  <fraud_payment>
350
- <identity>general</identity>
351
- <template>hipay_fraud_payment_template</template>
352
- </fraud_payment>
353
- <fraud_payment_accept>
354
- <identity>general</identity>
355
- <template>hipay_fraud_payment_accept_template</template>
356
- </fraud_payment_accept>
357
- <fraud_payment_deny>
358
- <identity>general</identity>
359
- <template>hipay_fraud_payment_deny_template</template>
360
- </fraud_payment_deny>
361
  </hipay>
362
  <payment>
363
  <hipay_cc>
@@ -378,6 +400,7 @@
378
  <cancel_pending_order>1</cancel_pending_order>
379
  <is_test_mode>0</is_test_mode>
380
  <debug>0</debug>
 
381
  <model>hipay/method_cc</model>
382
  <accept_url>hipay/cc/accept</accept_url>
383
  <pending_url>hipay/cc/pending</pending_url>
@@ -403,6 +426,7 @@
403
  <invoice_create>1</invoice_create>
404
  <re_add_to_cart>0</re_add_to_cart>
405
  <cancel_pending_order>1</cancel_pending_order>
 
406
  <is_test_mode>0</is_test_mode>
407
  <debug>0</debug>
408
  <model>hipay/method_ccXtimes</model>
@@ -430,6 +454,7 @@
430
  <invoice_create>1</invoice_create>
431
  <re_add_to_cart>0</re_add_to_cart>
432
  <cancel_pending_order>1</cancel_pending_order>
 
433
  <display_iframe>0</display_iframe>
434
  <iframe_width>485px</iframe_width>
435
  <iframe_height>450px</iframe_height>
@@ -462,6 +487,7 @@
462
  <invoice_create>1</invoice_create>
463
  <re_add_to_cart>0</re_add_to_cart>
464
  <cancel_pending_order>1</cancel_pending_order>
 
465
  <display_iframe>0</display_iframe>
466
  <iframe_width>485px</iframe_width>
467
  <iframe_height>450px</iframe_height>
@@ -493,6 +519,7 @@
493
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
494
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
495
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
496
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
497
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
498
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -522,6 +549,7 @@
522
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
523
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
524
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
525
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
526
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
527
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -551,6 +579,7 @@
551
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
552
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
553
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
554
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
555
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
556
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -580,6 +609,7 @@
580
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
581
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
582
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
583
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
584
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
585
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -592,64 +622,64 @@
592
  <use_3d_secure>0</use_3d_secure><!-- valeur par défaut pour activer le 3ds -->
593
  <send_fraud_payment_email>0</send_fraud_payment_email> <!-- Envoi le mail de fraud au client final -->
594
  </hipay_dexia>
595
- <!-- <hipay_cbc> -->
596
- <!-- <active>0</active> Activé ou non -->
597
- <!-- <title>HiPay CBC Online</title> Titre par défaut modifiable en admin -->
598
- <!-- <payment_action>authorize_capture</payment_action> Type d'action de paiement (authorize_capture ou authorize) -->
599
- <!-- <cctypes>cbc-online</cctypes> Types de carte disponibles (valeur Hipay pour le mode hosted, valeur Magento pour le mode API) -->
600
- <!-- <useccv>1</useccv> permet de rendre obligatoire la saisie du CCV (uniquement en mode API) -->
601
- <!-- <order_status_payment_accepted>processing</order_status_payment_accepted>valeur par défaut du statut quand le paiement est accepté -->
602
- <!-- <order_status_payment_refused>canceled</order_status_payment_refused>valeur par défaut du statut quand le paiement est refusé -->
603
- <!-- <order_status_payment_canceled>canceled</order_status_payment_canceled>valeur par défaut du statut quand le paiement est annulé -->
604
- <!-- <hipay_status_validate_order>118</hipay_status_validate_order>valeur par défaut du statut hipay qui valide la commande (118 ou 117) -->
605
- <!-- <pending_redirect_page>hipay/checkout/pending</pending_redirect_page>valeur par défaut pour la page de redirection en cas de state "pending" -->
606
- <!-- <display_selector>0</display_selector>valeur par défaut l'affichage du selecteur de carte (uniquement en mode Hosted) -->
607
- <!-- <template>basic</template>valeur par défaut du template de la page hénergé (uniquement en mode Hosted) -->
608
- <!-- <allow_use_oneclick>0</allow_use_oneclick>valeur par défaut de l'utilisation du oneclick -->
609
- <!-- <invoice_create>1</invoice_create>valeur par défaut de la création de la facture -->
610
- <!-- <re_add_to_cart>0</re_add_to_cart>valeur par défaut du re-remplissage du panier -->
611
- <!-- <cancel_pending_order>1</cancel_pending_order>valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
612
- <!-- <display_iframe>0</display_iframe>valeur par défaut mode Iframe (uniquement en mode Hosted) -->
613
- <!-- <is_test_mode>0</is_test_mode>valeur par défaut du mode test -->
614
- <!-- <debug>0</debug>valeur par défaut du mode debug -->
615
- <!-- <model>hipay/method_cbc</model>Classe model de la méthode -->
616
- <!-- <accept_url>hipay/cbc/accept</accept_url>Url accept de la méthode -->
617
- <!-- <pending_url>hipay/cbc/pending</pending_url>Url pending de la méthode -->
618
- <!-- <decline_url>hipay/cbc/decline</decline_url>Url decline de la méthode -->
619
- <!-- <exception_url>hipay/cbc/exception</exception_url>Url execption de la méthode -->
620
- <!-- <cancel_url>hipay/cbc/cancel</cancel_url>Url cancel de la méthode -->
621
- <!-- <use_3d_secure>0</use_3d_secure>valeur par défaut pour activer le 3ds -->
622
- <!-- <send_fraud_payment_email>0</send_fraud_payment_email> Envoi le mail de fraud au client final -->
623
- <!-- </hipay_cbc> -->
624
- <!-- <hipay_kbc> -->
625
- <!-- <active>0</active> Activé ou non -->
626
- <!-- <title>HiPay KBC Online</title> Titre par défaut modifiable en admin -->
627
- <!-- <payment_action>authorize_capture</payment_action> Type d'action de paiement (authorize_capture ou authorize) -->
628
- <!-- <cctypes>kbc-online</cctypes> Types de carte disponibles (valeur Hipay pour le mode hosted, valeur Magento pour le mode API) -->
629
- <!-- <useccv>1</useccv> permet de rendre obligatoire la saisie du CCV (uniquement en mode API) -->
630
- <!-- <order_status_payment_accepted>processing</order_status_payment_accepted>valeur par défaut du statut quand le paiement est accepté -->
631
- <!-- <order_status_payment_refused>canceled</order_status_payment_refused>valeur par défaut du statut quand le paiement est refusé -->
632
- <!-- <order_status_payment_canceled>canceled</order_status_payment_canceled>valeur par défaut du statut quand le paiement est annulé -->
633
- <!-- <hipay_status_validate_order>118</hipay_status_validate_order>valeur par défaut du statut hipay qui valide la commande (118 ou 117) -->
634
- <!-- <pending_redirect_page>hipay/checkout/pending</pending_redirect_page>valeur par défaut pour la page de redirection en cas de state "pending" -->
635
- <!-- <display_selector>0</display_selector>valeur par défaut l'affichage du selecteur de carte (uniquement en mode Hosted) -->
636
- <!-- <template>basic</template>valeur par défaut du template de la page hénergé (uniquement en mode Hosted) -->
637
- <!-- <allow_use_oneclick>0</allow_use_oneclick>valeur par défaut de l'utilisation du oneclick -->
638
- <!-- <invoice_create>1</invoice_create>valeur par défaut de la création de la facture -->
639
- <!-- <re_add_to_cart>0</re_add_to_cart>valeur par défaut du re-remplissage du panier -->
640
- <!-- <cancel_pending_order>1</cancel_pending_order>valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
641
- <!-- <display_iframe>0</display_iframe>valeur par défaut mode Iframe (uniquement en mode Hosted) -->
642
- <!-- <is_test_mode>0</is_test_mode>valeur par défaut du mode test -->
643
- <!-- <debug>0</debug>valeur par défaut du mode debug -->
644
- <!-- <model>hipay/method_kbc</model>Classe model de la méthode -->
645
- <!-- <accept_url>hipay/kbc/accept</accept_url>Url accept de la méthode -->
646
- <!-- <pending_url>hipay/kbc/pending</pending_url>Url pending de la méthode -->
647
- <!-- <decline_url>hipay/kbc/decline</decline_url>Url decline de la méthode -->
648
- <!-- <exception_url>hipay/kbc/exception</exception_url>Url execption de la méthode -->
649
- <!-- <cancel_url>hipay/kbc/cancel</cancel_url>Url cancel de la méthode -->
650
- <!-- <use_3d_secure>0</use_3d_secure>valeur par défaut pour activer le 3ds -->
651
- <!-- <send_fraud_payment_email>0</send_fraud_payment_email> Envoi le mail de fraud au client final -->
652
- <!-- </hipay_kbc> -->
653
  <hipay_giropay>
654
  <active>0</active> <!-- Activé ou non -->
655
  <title>HiPay Giropay</title> <!-- Titre par défaut modifiable en admin -->
@@ -667,6 +697,7 @@
667
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
668
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
669
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
670
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
671
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
672
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -696,6 +727,7 @@
696
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
697
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
698
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
699
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
700
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
701
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -723,6 +755,7 @@
723
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
724
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
725
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
726
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
727
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
728
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -752,6 +785,7 @@
752
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
753
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
754
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
755
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
756
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
757
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -781,6 +815,7 @@
781
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
782
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
783
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
784
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
785
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
786
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -810,6 +845,7 @@
810
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
811
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
812
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
813
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
814
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
815
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -837,6 +873,7 @@
837
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
838
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
839
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
840
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
841
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
842
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -849,33 +886,34 @@
849
  <use_3d_secure>0</use_3d_secure><!-- valeur par défaut pour activer le 3ds -->
850
  <send_fraud_payment_email>0</send_fraud_payment_email> <!-- Envoi le mail de fraud au client final -->
851
  </hipay_paypalapi>
852
- <hipay_sdd>
853
- <active>0</active>
854
- <title>HiPay SEPA Direct Debit</title>
855
- <payment_action>authorize_capture</payment_action>
856
- <cctypes>SDD</cctypes>
857
- <order_status_payment_accepted>processing</order_status_payment_accepted>
858
- <order_status_payment_refused>canceled</order_status_payment_refused>
859
- <order_status_payment_canceled>canceled</order_status_payment_canceled>
860
- <hipay_status_validate_order>118</hipay_status_validate_order>
861
- <pending_redirect_page>hipay/checkout/pending</pending_redirect_page>
862
- <allow_split_payment>0</allow_split_payment>
863
- <allow_use_oneclick>0</allow_use_oneclick>
864
- <invoice_create>1</invoice_create>
865
- <re_add_to_cart>0</re_add_to_cart>
866
- <cancel_pending_order>1</cancel_pending_order>
867
- <is_test_mode>0</is_test_mode>
868
- <debug>0</debug>
869
- <model>hipay/method_sdd</model>
870
- <accept_url>hipay/sdd/accept</accept_url>
871
- <pending_url>hipay/sdd/pending</pending_url>
872
- <decline_url>hipay/sdd/decline</decline_url>
873
- <exception_url>hipay/sdd/exception</exception_url>
874
- <cancel_url>hipay/sdd/cancel</cancel_url>
875
- <electronic_signature>1</electronic_signature>
876
- <send_fraud_payment_email>0</send_fraud_payment_email>
877
- </hipay_sdd>
878
- <hipay_postfinancecardapi>
 
879
  <active>0</active> <!-- Activé ou non -->
880
  <title>HiPay PostFinance Card</title> <!-- Titre par défaut modifiable en admin -->
881
  <payment_action>authorize_capture</payment_action> <!-- Type d'action de paiement (authorize_capture ou authorize) -->
@@ -890,6 +928,7 @@
890
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
891
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
892
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
893
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
894
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
895
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -902,7 +941,7 @@
902
  <use_3d_secure>0</use_3d_secure><!-- valeur par défaut pour activer le 3ds -->
903
  <send_fraud_payment_email>0</send_fraud_payment_email> <!-- Envoi le mail de fraud au client final -->
904
  </hipay_postfinancecardapi>
905
- <hipay_postfinanceefinanceapi>
906
  <active>0</active> <!-- Activé ou non -->
907
  <title>HiPay PostFinance E-Finance</title> <!-- Titre par défaut modifiable en admin -->
908
  <payment_action>authorize_capture</payment_action> <!-- Type d'action de paiement (authorize_capture ou authorize) -->
@@ -917,6 +956,7 @@
917
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
918
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
919
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
 
920
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
921
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
922
  <debug>0</debug><!-- valeur par défaut du mode debug -->
@@ -929,6 +969,37 @@
929
  <use_3d_secure>0</use_3d_secure><!-- valeur par défaut pour activer le 3ds -->
930
  <send_fraud_payment_email>0</send_fraud_payment_email> <!-- Envoi le mail de fraud au client final -->
931
  </hipay_postfinanceefinanceapi>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
932
  </payment>
933
  </default>
934
  <crontab>
1
  <config>
2
  <modules>
3
  <Allopass_Hipay>
4
+ <version>1.6.0</version>
5
  </Allopass_Hipay>
6
  </modules>
7
  <global>
9
  <hipay>
10
  <class>Allopass_Hipay_Block</class>
11
  </hipay>
12
+ <checkout>
13
+ <rewrite>
14
+ <cart_totals>Allopass_Hipay_Block_Checkout_Cart_Totals</cart_totals>
15
+ </rewrite>
16
+ </checkout>
17
  </blocks>
18
  <helpers>
19
  <hipay>
25
  <class>Allopass_Hipay_Model</class>
26
  <resourceModel>hipay_resource</resourceModel>
27
  </hipay>
28
+ <hipay_resource>
29
+ <class>Allopass_Hipay_Model_Resource</class>
30
+ <!-- <deprecatedNode>hipay_mysql4</deprecatedNode> -->
31
+ <entities>
32
+ <rule>
33
+ <table>hipay_rule</table>
34
+ </rule>
35
+ <paymentProfile>
36
+ <table>hipay_payment_profile</table>
37
+ </paymentProfile>
38
+ <splitPayment>
39
+ <table>hipay_split_payment</table>
40
+ </splitPayment>
41
+ <card>
42
+ <table>hipay_customer_card</table>
43
+ </card>
44
+ </entities>
45
+ </hipay_resource>
46
  </models>
47
  <resources>
48
+ <allopass_hipay_setup>
49
+ <setup>
50
+ <module>Allopass_Hipay</module>
51
+ </setup>
52
+ </allopass_hipay_setup>
53
+ </resources>
54
+ <template>
55
+ <email>
56
+ <hipay_fraud_payment_template translate="label" module="hipay">
57
+ <label>Fraud Payment</label>
58
+ <file>hipay_fraud_payment.html</file>
59
+ <type>html</type>
60
+ </hipay_fraud_payment_template>
61
+ <hipay_fraud_payment_accept_template translate="label" module="hipay">
62
+ <label>Fraud Payment Accepted</label>
63
+ <file>hipay_fraud_payment_accept.html</file>
64
+ <type>html</type>
65
+ </hipay_fraud_payment_accept_template>
66
+ <hipay_fraud_payment_deny_template translate="label" module="hipay">
67
+ <label>Fraud Payment Deny</label>
68
+ <file>hipay_fraud_payment_deny.html</file>
69
+ <type>html</type>
70
+ </hipay_fraud_payment_deny_template>
71
+ <hipay_hipay_api_moto_template translate="label" module="hipay">
72
+ <label>Payment link</label>
73
+ <file>hipay_hipay_api_moto.html</file>
74
+ <type>html</type>
75
+ </hipay_hipay_api_moto_template>
76
+ </email>
77
+ </template>
78
+ <template_hipay>
79
+ <hosted>
80
+ <basicjs>
81
+ <label>Basic-js</label>
82
+ <value>basic-js</value>
83
+ </basicjs>
84
+ </hosted>
85
+ </template_hipay>
86
+ <payment_hipay>
87
+ <cc>
88
+ <types>
89
+ <AE>
90
+ <code>AE</code>
91
+ <code_hipay>american-express</code_hipay>
92
+ <name>American Express</name>
93
+ <order>50</order>
94
+ </AE>
95
+ <VI>
96
+ <code>VI</code>
97
+ <code_hipay>visa</code_hipay>
98
+ <name>Visa</name>
99
+ <order>10</order>
100
+ </VI>
101
+ <MC>
102
+ <code>MC</code>
103
+ <code_hipay>mastercard</code_hipay>
104
+ <name>MasterCard</name>
105
+ <order>20</order>
106
+ </MC>
107
+ <SM>
108
+ <code>SM</code>
109
+ <code_hipay>maestro</code_hipay>
110
+ <name>Maestro</name>
111
+ <order>40</order>
112
+ </SM>
113
+ <BCMC>
114
+ <code>BCMC</code>
115
+ <code_hipay>bcmc</code_hipay>
116
+ <name>Bancontact / Mister Cash</name>
117
+ <order>60</order>
118
+ </BCMC>
119
+ <CB>
120
+ <code>CB</code>
121
+ <code_hipay>cb</code_hipay>
122
+ <name>Carte Bancaire</name>
123
+ <order>0</order>
124
+ </CB>
125
+ <SDD>
126
+ <code>SDD</code>
127
+ <code_hipay>sdd</code_hipay>
128
+ <name>SEPA Direct Debit</name>
129
+ <order>70</order>
130
+ </SDD>
131
+ </types>
132
+ </cc>
133
+ <hosted>
134
+ <types>
135
+ <AE>
136
+ <code>AE</code>
137
+ <code_hipay>american-express</code_hipay>
138
+ <name>American Express</name>
139
+ <order>50</order>
140
+ </AE>
141
+ <VI>
142
+ <code>VI</code>
143
+ <code_hipay>visa</code_hipay>
144
+ <name>Visa</name>
145
+ <order>10</order>
146
+ </VI>
147
+ <MC>
148
+ <code>MC</code>
149
+ <code_hipay>mastercard</code_hipay>
150
+ <name>MasterCard</name>
151
+ <order>20</order>
152
+ </MC>
153
+ <SM>
154
+ <code>SM</code>
155
+ <code_hipay>maestro</code_hipay>
156
+ <name>Maestro</name>
157
+ <order>30</order>
158
+ </SM>
159
+ <BCMC>
160
+ <code>BCMC</code>
161
+ <code_hipay>bcmc</code_hipay>
162
+ <name>Bancontact / Mister Cash</name>
163
+ <order>60</order>
164
+ </BCMC>
165
+ <CB>
166
+ <code>CB</code>
167
+ <code_hipay>cb</code_hipay>
168
+ <name>Carte Bancaire</name>
169
+ <order>0</order>
170
+ </CB>
171
+ </types>
172
+ </hosted>
173
+ </payment_hipay>
174
+ <sales>
175
+ <order>
176
+ <statuses>
177
+ <!-- retained for backwards compatibility, not used after version 1.4.2 -->
178
+ <pending_capture translate="label"><label>Pending Capture</label></pending_capture>
179
+ <capture_requested translate="label"><label>Capture Requested</label></capture_requested>
180
+ <refund_requested translate="label"><label>Refund Requested</label></refund_requested>
181
+ <authorization_requested translate="label"><label>Authorization Requested</label></authorization_requested>
182
+ <expired translate="label"><label>Transaction Expired</label></expired>
183
+ <partial_refund translate="label"><label>Partial Refund</label></partial_refund>
184
+ <partial_capture translate="label"><label>Partial capture</label></partial_capture>
185
+ </statuses>
186
+ </order>
187
+ </sales>
188
  </global>
189
  <frontend>
190
  <secure_url>
191
+ <hipay_payment>/hipay/payment</hipay_payment>
192
+ </secure_url>
193
+ <routers>
194
+ <hipay>
195
+ <use>standard</use>
196
+ <args>
197
+ <module>Allopass_Hipay</module>
198
+ <frontName>hipay</frontName>
199
+ </args>
200
+ </hipay>
201
+ </routers>
202
+ <translate>
203
+ <modules>
204
+ <Allopass_Hipay>
205
+ <files>
206
+ <default>Allopass_Hipay.csv</default>
207
+ </files>
208
+ </Allopass_Hipay>
209
+ </modules>
210
+ </translate>
211
+ <layout>
212
  <updates>
213
  <hipay>
214
  <file>hipay.xml</file>
219
  <controller_action_postdispatch_checkout_onepage_saveOrder>
220
  <observers>
221
  <displaySectionCheckoutIframe>
222
+ <class>hipay/observer</class>
223
+ <method>displaySectionCheckoutIframe</method>
224
+ </displaySectionCheckoutIframe>
225
  </observers>
226
  </controller_action_postdispatch_checkout_onepage_saveOrder>
227
  </events>
228
  </frontend>
229
  <admin>
230
+ <routers>
231
+ <adminhtml>
232
+ <args>
233
+ <modules>
234
+ <allopass_hipay before="Mage_Adminhtml">Allopass_Hipay_Adminhtml</allopass_hipay>
235
+ </modules>
236
+ </args>
237
+ </adminhtml>
238
+ </routers>
239
+ </admin>
240
  <adminhtml>
241
+ <translate>
242
+ <modules>
243
+ <Allopass_Hipay>
244
+ <files>
245
+ <default>Allopass_Hipay.csv</default>
246
+ </files>
247
+ </Allopass_Hipay>
248
+ </modules>
249
+ </translate>
250
+ <menu>
251
+ <sales>
252
+ <children>
253
+ <hipay_payment translate="title" module="hipay">
254
+ <title>Hipay</title>
255
+ <sort_order>200</sort_order>
256
+ <children>
257
+ <payment_profile translate="title" module="hipay">
258
+ <title>Split Payment Profiles</title>
259
+ <action>adminhtml/paymentProfile</action>
260
+ <sort_order>10</sort_order>
261
+ </payment_profile>
262
+ <split_payment translate="title" module="hipay">
263
+ <title>Split payments</title>
264
+ <action>adminhtml/splitPayment</action>
265
+ <sort_order>20</sort_order>
266
+ </split_payment>
267
+ </children>
268
+ </hipay_payment>
269
+ </children>
270
+ </sales>
271
+ </menu>
272
+ <acl>
273
+ <resources>
274
+ <admin>
275
+ <children>
276
+ <system>
277
+ <children>
278
+ <config>
279
+ <children>
280
+ <hipay>
281
+ <title>Hipay API Configuration</title>
282
+ </hipay>
283
+ <payment>
284
+ <children>
285
+ <hipay_cc translate="title">
286
+ <title>Hipay Credit Card</title>
287
+ </hipay_cc>
288
+ </children>
289
+ </payment>
290
+ </children>
291
+ </config>
292
+ </children>
293
+ </system>
294
+ <sales>
295
  <children>
296
  <hipay_payment translate="title" module="hipay">
297
+ <title>Hipay Payment</title>
298
+ <children>
299
+ <payment_profile translate="title" module="hipay">
300
+ <title>Split Payment Profile</title>
301
+ </payment_profile>
302
+ <split_payment translate="title" module="hipay">
303
+ <title>Split payments</title>
304
+ </split_payment>
305
+ </children>
306
  </hipay_payment>
307
+ </children>
308
+ </sales>
309
+ </children>
310
+ </admin>
311
+ </resources>
312
+ </acl>
313
+ <layout>
314
  <updates>
315
  <hipay>
316
  <file>hipay.xml</file>
318
  </updates>
319
  </layout>
320
  <events>
321
+ <adminhtml_widget_container_html_before>
322
+ <observers>
323
+ <arrange_order_view>
324
+ <class>hipay/observer</class>
325
+ <method>arrangeOrderView</method>
326
+ </arrange_order_view>
327
+ </observers>
328
+ </adminhtml_widget_container_html_before>
329
+ <sales_order_load_after>
330
+ <observers>
331
+ <order_can_refund>
332
+ <class>hipay/observer</class>
333
+ <method>orderCanRefund</method>
334
+ </order_can_refund>
335
+ </observers>
336
+ </sales_order_load_after>
337
+ <sales_order_save_before>
338
+ <observers>
339
+ <order_unset_can_refund>
340
+ <class>hipay/observer</class>
341
+ <method>unsetOrderCanRefund</method>
342
+ </order_unset_can_refund>
343
+ </observers>
344
+ </sales_order_save_before>
345
  </events>
346
  </adminhtml>
347
  <default>
350
  <api_password backend_model="adminhtml/system_config_backend_encrypted"/>
351
  <api_password_test backend_model="adminhtml/system_config_backend_encrypted"/>
352
  <secret_passphrase backend_model="adminhtml/system_config_backend_encrypted"/>
353
+ <vault_endpoint_stage>https://stage-secure-vault.hipay-tpp.com/rest/v1/token/</vault_endpoint_stage>
354
+ <vault_endpoint_production>https://secure-vault.hipay-tpp.com/rest/v1/token/</vault_endpoint_production>
355
+ <gateway_endpoint_stage>https://stage-secure-gateway.hipay-tpp.com/rest/v1/</gateway_endpoint_stage>
356
+ <gateway_endpoint_production>https://secure-gateway.hipay-tpp.com/rest/v1/</gateway_endpoint_production>
357
+ <currency_transaction>0</currency_transaction>
358
  <fingerprint>1</fingerprint>
359
  </hipay_api>
360
+ <hipay_api_moto>
361
+ <api_password backend_model="adminhtml/system_config_backend_encrypted"/>
362
+ <api_password_test backend_model="adminhtml/system_config_backend_encrypted"/>
363
+ <secret_passphrase backend_model="adminhtml/system_config_backend_encrypted"/>
364
+ <identity>general</identity>
365
+ <template>hipay_link_payment_moto_template</template>
366
+ <moto_send_email>0</moto_send_email>
367
+ </hipay_api_moto>
368
+ <hipay_basket>
369
+ <activate_basket>0</activate_basket>
370
+ </hipay_basket>
371
  <fraud_payment>
372
+ <identity>general</identity>
373
+ <template>hipay_fraud_payment_template</template>
374
+ </fraud_payment>
375
+ <fraud_payment_accept>
376
+ <identity>general</identity>
377
+ <template>hipay_fraud_payment_accept_template</template>
378
+ </fraud_payment_accept>
379
+ <fraud_payment_deny>
380
+ <identity>general</identity>
381
+ <template>fraud_payment_deny_template</template>
382
+ </fraud_payment_deny>
383
  </hipay>
384
  <payment>
385
  <hipay_cc>
400
  <cancel_pending_order>1</cancel_pending_order>
401
  <is_test_mode>0</is_test_mode>
402
  <debug>0</debug>
403
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
404
  <model>hipay/method_cc</model>
405
  <accept_url>hipay/cc/accept</accept_url>
406
  <pending_url>hipay/cc/pending</pending_url>
426
  <invoice_create>1</invoice_create>
427
  <re_add_to_cart>0</re_add_to_cart>
428
  <cancel_pending_order>1</cancel_pending_order>
429
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
430
  <is_test_mode>0</is_test_mode>
431
  <debug>0</debug>
432
  <model>hipay/method_ccXtimes</model>
454
  <invoice_create>1</invoice_create>
455
  <re_add_to_cart>0</re_add_to_cart>
456
  <cancel_pending_order>1</cancel_pending_order>
457
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
458
  <display_iframe>0</display_iframe>
459
  <iframe_width>485px</iframe_width>
460
  <iframe_height>450px</iframe_height>
487
  <invoice_create>1</invoice_create>
488
  <re_add_to_cart>0</re_add_to_cart>
489
  <cancel_pending_order>1</cancel_pending_order>
490
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
491
  <display_iframe>0</display_iframe>
492
  <iframe_width>485px</iframe_width>
493
  <iframe_height>450px</iframe_height>
519
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
520
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
521
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
522
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
523
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
524
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
525
  <debug>0</debug><!-- valeur par défaut du mode debug -->
549
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
550
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
551
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
552
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
553
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
554
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
555
  <debug>0</debug><!-- valeur par défaut du mode debug -->
579
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
580
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
581
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
582
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
583
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
584
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
585
  <debug>0</debug><!-- valeur par défaut du mode debug -->
609
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
610
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
611
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
612
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
613
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
614
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
615
  <debug>0</debug><!-- valeur par défaut du mode debug -->
622
  <use_3d_secure>0</use_3d_secure><!-- valeur par défaut pour activer le 3ds -->
623
  <send_fraud_payment_email>0</send_fraud_payment_email> <!-- Envoi le mail de fraud au client final -->
624
  </hipay_dexia>
625
+ <!-- <hipay_cbc> -->
626
+ <!-- <active>0</active> Activé ou non -->
627
+ <!-- <title>HiPay CBC Online</title> Titre par défaut modifiable en admin -->
628
+ <!-- <payment_action>authorize_capture</payment_action> Type d'action de paiement (authorize_capture ou authorize) -->
629
+ <!-- <cctypes>cbc-online</cctypes> Types de carte disponibles (valeur Hipay pour le mode hosted, valeur Magento pour le mode API) -->
630
+ <!-- <useccv>1</useccv> permet de rendre obligatoire la saisie du CCV (uniquement en mode API) -->
631
+ <!-- <order_status_payment_accepted>processing</order_status_payment_accepted>valeur par défaut du statut quand le paiement est accepté -->
632
+ <!-- <order_status_payment_refused>canceled</order_status_payment_refused>valeur par défaut du statut quand le paiement est refusé -->
633
+ <!-- <order_status_payment_canceled>canceled</order_status_payment_canceled>valeur par défaut du statut quand le paiement est annulé -->
634
+ <!-- <hipay_status_validate_order>118</hipay_status_validate_order>valeur par défaut du statut hipay qui valide la commande (118 ou 117) -->
635
+ <!-- <pending_redirect_page>hipay/checkout/pending</pending_redirect_page>valeur par défaut pour la page de redirection en cas de state "pending" -->
636
+ <!-- <display_selector>0</display_selector>valeur par défaut l'affichage du selecteur de carte (uniquement en mode Hosted) -->
637
+ <!-- <template>basic</template>valeur par défaut du template de la page hénergé (uniquement en mode Hosted) -->
638
+ <!-- <allow_use_oneclick>0</allow_use_oneclick>valeur par défaut de l'utilisation du oneclick -->
639
+ <!-- <invoice_create>1</invoice_create>valeur par défaut de la création de la facture -->
640
+ <!-- <re_add_to_cart>0</re_add_to_cart>valeur par défaut du re-remplissage du panier -->
641
+ <!-- <cancel_pending_order>1</cancel_pending_order>valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
642
+ <!-- <display_iframe>0</display_iframe>valeur par défaut mode Iframe (uniquement en mode Hosted) -->
643
+ <!-- <is_test_mode>0</is_test_mode>valeur par défaut du mode test -->
644
+ <!-- <debug>0</debug>valeur par défaut du mode debug -->
645
+ <!-- <model>hipay/method_cbc</model>Classe model de la méthode -->
646
+ <!-- <accept_url>hipay/cbc/accept</accept_url>Url accept de la méthode -->
647
+ <!-- <pending_url>hipay/cbc/pending</pending_url>Url pending de la méthode -->
648
+ <!-- <decline_url>hipay/cbc/decline</decline_url>Url decline de la méthode -->
649
+ <!-- <exception_url>hipay/cbc/exception</exception_url>Url execption de la méthode -->
650
+ <!-- <cancel_url>hipay/cbc/cancel</cancel_url>Url cancel de la méthode -->
651
+ <!-- <use_3d_secure>0</use_3d_secure>valeur par défaut pour activer le 3ds -->
652
+ <!-- <send_fraud_payment_email>0</send_fraud_payment_email> Envoi le mail de fraud au client final -->
653
+ <!-- </hipay_cbc> -->
654
+ <!-- <hipay_kbc> -->
655
+ <!-- <active>0</active> Activé ou non -->
656
+ <!-- <title>HiPay KBC Online</title> Titre par défaut modifiable en admin -->
657
+ <!-- <payment_action>authorize_capture</payment_action> Type d'action de paiement (authorize_capture ou authorize) -->
658
+ <!-- <cctypes>kbc-online</cctypes> Types de carte disponibles (valeur Hipay pour le mode hosted, valeur Magento pour le mode API) -->
659
+ <!-- <useccv>1</useccv> permet de rendre obligatoire la saisie du CCV (uniquement en mode API) -->
660
+ <!-- <order_status_payment_accepted>processing</order_status_payment_accepted>valeur par défaut du statut quand le paiement est accepté -->
661
+ <!-- <order_status_payment_refused>canceled</order_status_payment_refused>valeur par défaut du statut quand le paiement est refusé -->
662
+ <!-- <order_status_payment_canceled>canceled</order_status_payment_canceled>valeur par défaut du statut quand le paiement est annulé -->
663
+ <!-- <hipay_status_validate_order>118</hipay_status_validate_order>valeur par défaut du statut hipay qui valide la commande (118 ou 117) -->
664
+ <!-- <pending_redirect_page>hipay/checkout/pending</pending_redirect_page>valeur par défaut pour la page de redirection en cas de state "pending" -->
665
+ <!-- <display_selector>0</display_selector>valeur par défaut l'affichage du selecteur de carte (uniquement en mode Hosted) -->
666
+ <!-- <template>basic</template>valeur par défaut du template de la page hénergé (uniquement en mode Hosted) -->
667
+ <!-- <allow_use_oneclick>0</allow_use_oneclick>valeur par défaut de l'utilisation du oneclick -->
668
+ <!-- <invoice_create>1</invoice_create>valeur par défaut de la création de la facture -->
669
+ <!-- <re_add_to_cart>0</re_add_to_cart>valeur par défaut du re-remplissage du panier -->
670
+ <!-- <cancel_pending_order>1</cancel_pending_order>valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
671
+ <!-- <display_iframe>0</display_iframe>valeur par défaut mode Iframe (uniquement en mode Hosted) -->
672
+ <!-- <is_test_mode>0</is_test_mode>valeur par défaut du mode test -->
673
+ <!-- <debug>0</debug>valeur par défaut du mode debug -->
674
+ <!-- <model>hipay/method_kbc</model>Classe model de la méthode -->
675
+ <!-- <accept_url>hipay/kbc/accept</accept_url>Url accept de la méthode -->
676
+ <!-- <pending_url>hipay/kbc/pending</pending_url>Url pending de la méthode -->
677
+ <!-- <decline_url>hipay/kbc/decline</decline_url>Url decline de la méthode -->
678
+ <!-- <exception_url>hipay/kbc/exception</exception_url>Url execption de la méthode -->
679
+ <!-- <cancel_url>hipay/kbc/cancel</cancel_url>Url cancel de la méthode -->
680
+ <!-- <use_3d_secure>0</use_3d_secure>valeur par défaut pour activer le 3ds -->
681
+ <!-- <send_fraud_payment_email>0</send_fraud_payment_email> Envoi le mail de fraud au client final -->
682
+ <!-- </hipay_kbc> -->
683
  <hipay_giropay>
684
  <active>0</active> <!-- Activé ou non -->
685
  <title>HiPay Giropay</title> <!-- Titre par défaut modifiable en admin -->
697
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
698
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
699
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
700
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
701
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
702
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
703
  <debug>0</debug><!-- valeur par défaut du mode debug -->
727
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
728
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
729
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
730
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
731
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
732
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
733
  <debug>0</debug><!-- valeur par défaut du mode debug -->
755
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
756
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
757
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
758
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
759
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
760
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
761
  <debug>0</debug><!-- valeur par défaut du mode debug -->
785
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
786
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
787
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
788
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
789
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
790
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
791
  <debug>0</debug><!-- valeur par défaut du mode debug -->
815
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
816
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
817
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
818
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
819
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
820
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
821
  <debug>0</debug><!-- valeur par défaut du mode debug -->
845
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
846
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
847
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
848
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
849
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
850
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
851
  <debug>0</debug><!-- valeur par défaut du mode debug -->
873
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
874
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
875
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
876
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
877
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
878
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
879
  <debug>0</debug><!-- valeur par défaut du mode debug -->
886
  <use_3d_secure>0</use_3d_secure><!-- valeur par défaut pour activer le 3ds -->
887
  <send_fraud_payment_email>0</send_fraud_payment_email> <!-- Envoi le mail de fraud au client final -->
888
  </hipay_paypalapi>
889
+ <hipay_sdd>
890
+ <active>0</active>
891
+ <title>HiPay SEPA Direct Debit</title>
892
+ <payment_action>authorize_capture</payment_action>
893
+ <cctypes>SDD</cctypes>
894
+ <order_status_payment_accepted>processing</order_status_payment_accepted>
895
+ <order_status_payment_refused>canceled</order_status_payment_refused>
896
+ <order_status_payment_canceled>canceled</order_status_payment_canceled>
897
+ <hipay_status_validate_order>118</hipay_status_validate_order>
898
+ <pending_redirect_page>hipay/checkout/pending</pending_redirect_page>
899
+ <allow_split_payment>0</allow_split_payment>
900
+ <allow_use_oneclick>0</allow_use_oneclick>
901
+ <invoice_create>1</invoice_create>
902
+ <re_add_to_cart>0</re_add_to_cart>
903
+ <cancel_pending_order>1</cancel_pending_order>
904
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
905
+ <is_test_mode>0</is_test_mode>
906
+ <debug>0</debug>
907
+ <model>hipay/method_sdd</model>
908
+ <accept_url>hipay/sdd/accept</accept_url>
909
+ <pending_url>hipay/sdd/pending</pending_url>
910
+ <decline_url>hipay/sdd/decline</decline_url>
911
+ <exception_url>hipay/sdd/exception</exception_url>
912
+ <cancel_url>hipay/sdd/cancel</cancel_url>
913
+ <electronic_signature>1</electronic_signature>
914
+ <send_fraud_payment_email>0</send_fraud_payment_email>
915
+ </hipay_sdd>
916
+ <hipay_postfinancecardapi>
917
  <active>0</active> <!-- Activé ou non -->
918
  <title>HiPay PostFinance Card</title> <!-- Titre par défaut modifiable en admin -->
919
  <payment_action>authorize_capture</payment_action> <!-- Type d'action de paiement (authorize_capture ou authorize) -->
928
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
929
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
930
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
931
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
932
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
933
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
934
  <debug>0</debug><!-- valeur par défaut du mode debug -->
941
  <use_3d_secure>0</use_3d_secure><!-- valeur par défaut pour activer le 3ds -->
942
  <send_fraud_payment_email>0</send_fraud_payment_email> <!-- Envoi le mail de fraud au client final -->
943
  </hipay_postfinancecardapi>
944
+ <hipay_postfinanceefinanceapi>
945
  <active>0</active> <!-- Activé ou non -->
946
  <title>HiPay PostFinance E-Finance</title> <!-- Titre par défaut modifiable en admin -->
947
  <payment_action>authorize_capture</payment_action> <!-- Type d'action de paiement (authorize_capture ou authorize) -->
956
  <invoice_create>1</invoice_create><!-- valeur par défaut de la création de la facture -->
957
  <re_add_to_cart>0</re_add_to_cart><!-- valeur par défaut du re-remplissage du panier -->
958
  <cancel_pending_order>1</cancel_pending_order><!-- valeur par défaut des annulation de commande "en attente" depuis 30 minutes -->
959
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
960
  <display_iframe>0</display_iframe><!-- valeur par défaut mode Iframe (uniquement en mode Hosted)-->
961
  <is_test_mode>0</is_test_mode><!-- valeur par défaut du mode test -->
962
  <debug>0</debug><!-- valeur par défaut du mode debug -->
969
  <use_3d_secure>0</use_3d_secure><!-- valeur par défaut pour activer le 3ds -->
970
  <send_fraud_payment_email>0</send_fraud_payment_email> <!-- Envoi le mail de fraud au client final -->
971
  </hipay_postfinanceefinanceapi>
972
+ <hipay_klarna>
973
+ <active>0</active>
974
+ <title>Klarna invoice</title>
975
+ <payment_action>authorize_capture</payment_action>
976
+ <cctypes>klarnainvoice</cctypes>
977
+ <order_status_payment_accepted>processing</order_status_payment_accepted>
978
+ <order_status_payment_refused>canceled</order_status_payment_refused>
979
+ <order_status_payment_canceled>canceled</order_status_payment_canceled>
980
+ <hipay_status_validate_order>118</hipay_status_validate_order>
981
+ <pending_redirect_page>hipay/checkout/pending</pending_redirect_page>
982
+ <display_selector>1</display_selector>
983
+ <template>basic</template>
984
+ <allow_use_oneclick>0</allow_use_oneclick>
985
+ <invoice_create>1</invoice_create>
986
+ <re_add_to_cart>0</re_add_to_cart>
987
+ <cancel_pending_order>1</cancel_pending_order>
988
+ <delay_cancel_pending_order>0.5</delay_cancel_pending_order>
989
+ <is_test_mode>0</is_test_mode>
990
+ <debug>0</debug>
991
+ <model>hipay/method_klarna</model>
992
+ <accept_url>hipay/klarna/accept</accept_url>
993
+ <pending_url>hipay/klarna/pending</pending_url>
994
+ <decline_url>hipay/klarna/decline</decline_url>
995
+ <exception_url>hipay/klarna/exception</exception_url>
996
+ <cancel_url>hipay/klarna/cancel</cancel_url>
997
+ <use_3d_secure>1</use_3d_secure>
998
+ <send_fraud_payment_email>0</send_fraud_payment_email>
999
+ <allowspecific>1</allowspecific>
1000
+ <specificcountry>DE</specificcountry>
1001
+ <currency>EUR</currency>
1002
+ </hipay_klarna>
1003
  </payment>
1004
  </default>
1005
  <crontab>
app/code/community/Allopass/Hipay/etc/system.xml CHANGED
@@ -1,8 +1,8 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <config>
3
- <sections>
4
- <hipay translate="label" module="hipay">
5
- <label>HiPay Fullservice</label>
6
  <tab>sales</tab>
7
  <frontend_type>text</frontend_type>
8
  <sort_order>398</sort_order>
@@ -10,35 +10,35 @@
10
  <show_in_website>1</show_in_website>
11
  <show_in_store>1</show_in_store>
12
  <groups>
13
- <hipay_api>
14
- <label>HiPay Fullservice credentials configuration</label>
15
- <frontend_type>text</frontend_type>
16
- <comment></comment>
17
- <sort_order>10</sort_order>
18
  <show_in_default>1</show_in_default>
19
  <show_in_website>1</show_in_website>
20
  <show_in_store>1</show_in_store>
21
  <fields>
22
- <api_username translate="label">
23
- <label>Api username (production account)</label>
24
  <frontend_type>text</frontend_type>
25
  <sort_order>10</sort_order>
26
  <show_in_default>1</show_in_default>
27
  <show_in_website>1</show_in_website>
28
  <show_in_store>1</show_in_store>
29
- </api_username>
30
- <api_password translate="label">
31
  <label>Api password (production account)</label>
32
- <frontend_type>obscure</frontend_type>
33
  <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
34
  <sort_order>20</sort_order>
35
  <show_in_default>1</show_in_default>
36
  <show_in_website>1</show_in_website>
37
  <show_in_store>1</show_in_store>
38
  </api_password>
39
- <api_tokenjs_username translate="label">
40
  <label>Api TokenJS Username (production account)</label>
41
- <frontend_type>text</frontend_type>
42
  <sort_order>22</sort_order>
43
  <show_in_default>1</show_in_default>
44
  <show_in_website>1</show_in_website>
@@ -46,42 +46,42 @@
46
  </api_tokenjs_username>
47
  <api_tokenjs_publickey translate="label">
48
  <label>Api TokenJS Password/Public Key (production account)</label>
49
- <frontend_type>text</frontend_type>
50
  <sort_order>23</sort_order>
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
53
  <show_in_store>1</show_in_store>
54
  </api_tokenjs_publickey>
55
  <secret_passphrase translate="label comment">
56
- <label>Secret passphrase (production account)</label>
57
- <comment>The same of your HiPay Fullservice production account</comment>
58
- <frontend_type>obscure</frontend_type>
59
  <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
60
  <sort_order>25</sort_order>
61
  <show_in_default>1</show_in_default>
62
  <show_in_website>1</show_in_website>
63
  <show_in_store>1</show_in_store>
64
  </secret_passphrase>
65
- <api_username_test translate="label">
66
- <label>Api username (test account)</label>
67
  <frontend_type>text</frontend_type>
68
  <sort_order>30</sort_order>
69
  <show_in_default>1</show_in_default>
70
  <show_in_website>1</show_in_website>
71
  <show_in_store>1</show_in_store>
72
- </api_username_test>
73
- <api_password_test translate="label">
74
  <label>Api password (test account)</label>
75
- <frontend_type>obscure</frontend_type>
76
  <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
77
  <sort_order>40</sort_order>
78
  <show_in_default>1</show_in_default>
79
  <show_in_website>1</show_in_website>
80
  <show_in_store>1</show_in_store>
81
  </api_password_test>
82
- <api_tokenjs_username_test translate="label">
83
  <label>Api TokenJS Username (test account)</label>
84
- <frontend_type>text</frontend_type>
85
  <sort_order>45</sort_order>
86
  <show_in_default>1</show_in_default>
87
  <show_in_website>1</show_in_website>
@@ -89,16 +89,16 @@
89
  </api_tokenjs_username_test>
90
  <api_tokenjs_publickey_test translate="label">
91
  <label>Api TokenJS Password/Public Key (test account)</label>
92
- <frontend_type>text</frontend_type>
93
  <sort_order>46</sort_order>
94
  <show_in_default>1</show_in_default>
95
  <show_in_website>1</show_in_website>
96
  <show_in_store>1</show_in_store>
97
  </api_tokenjs_publickey_test>
98
- <secret_passphrase_test translate="label comment">
99
- <label>Secret passphrase (test account)</label>
100
- <comment>The same of your HiPay Fullservice test account</comment>
101
- <frontend_type>obscure</frontend_type>
102
  <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
103
  <sort_order>50</sort_order>
104
  <show_in_default>1</show_in_default>
@@ -142,6 +142,16 @@
142
  <show_in_website>1</show_in_website>
143
  <show_in_store>1</show_in_store>
144
  </proxy_pass>
 
 
 
 
 
 
 
 
 
 
145
  <fingerprint translate="label comment">
146
  <label>Device fingerprint</label>
147
  <frontend_type>select</frontend_type>
@@ -152,12 +162,146 @@
152
  <show_in_store>1</show_in_store>
153
  </fingerprint>
154
  </fields>
155
- </hipay_api>
156
- <fraud_payment translate="label">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  <label>Fraud Payment Review Email</label>
158
- <comment>This email is sended to customer, if his payment is in fraud state</comment>
159
  <frontend_type>text</frontend_type>
160
  <sort_order>20</sort_order>
 
161
  <show_in_default>1</show_in_default>
162
  <show_in_website>1</show_in_website>
163
  <show_in_store>1</show_in_store>
@@ -202,7 +346,7 @@
202
  </fraud_payment>
203
  <fraud_payment_accept translate="label">
204
  <label>Fraud Payment Accept Email</label>
205
- <comment>This email is sended to customer, if his payment is validated by merchant</comment>
206
  <frontend_type>text</frontend_type>
207
  <sort_order>30</sort_order>
208
  <show_in_default>1</show_in_default>
@@ -249,7 +393,7 @@
249
  </fraud_payment_accept>
250
  <fraud_payment_deny translate="label">
251
  <label>Fraud Payment Deny Email</label>
252
- <comment>This email is sended to customer, if his payment is denied by merchant</comment>
253
  <frontend_type>text</frontend_type>
254
  <sort_order>40</sort_order>
255
  <show_in_default>1</show_in_default>
@@ -294,35 +438,35 @@
294
  </copy_method>
295
  </fields>
296
  </fraud_payment_deny>
297
- </groups>
298
- </hipay>
299
- <payment>
300
  <groups>
301
- <hipay_cc translate="label" module="hipay">
302
- <label>HiPay Fullservice Credit Card</label>
303
  <frontend_type>text</frontend_type>
304
  <sort_order>200</sort_order>
305
  <show_in_default>1</show_in_default>
306
  <show_in_website>1</show_in_website>
307
  <show_in_store>1</show_in_store>
308
  <fields>
309
- <active translate="label">
310
- <label>Enabled</label>
311
- <frontend_type>select</frontend_type>
312
- <source_model>adminhtml/system_config_source_yesno</source_model>
313
- <sort_order>10</sort_order>
314
- <show_in_default>1</show_in_default>
315
- <show_in_website>1</show_in_website>
316
- <show_in_store>1</show_in_store>
317
- </active>
318
- <title translate="label">
319
- <label>Title</label>
320
- <frontend_type>text</frontend_type>
321
- <sort_order>20</sort_order>
322
- <show_in_default>1</show_in_default>
323
- <show_in_website>1</show_in_website>
324
- <show_in_store>1</show_in_store>
325
- </title>
326
  <order_status_payment_accepted translate="label">
327
  <label>Order status when payment accepted</label>
328
  <frontend_type>select</frontend_type>
@@ -361,39 +505,52 @@
361
  </hipay_status_validate_order>
362
  <success_redirect_page translate="label">
363
  <label>Redirect page success</label>
364
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
365
  <frontend_type>text</frontend_type>
366
- <sort_order>26</sort_order>
367
  <show_in_default>1</show_in_default>
368
  <show_in_website>1</show_in_website>
369
  <show_in_store>0</show_in_store>
370
  </success_redirect_page>
 
 
 
 
 
 
 
 
 
 
371
  <pending_redirect_page translate="label">
372
  <label>Redirect page pending status</label>
373
  <comment>Page to redirect when transaction is in pending status</comment>
374
  <frontend_type>select</frontend_type>
375
  <source_model>hipay/source_pendingredirect</source_model>
376
- <sort_order>27</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
  </pending_redirect_page>
381
- <payment_action translate="label">
382
- <label>Payment Action</label>
383
- <frontend_type>select</frontend_type>
384
- <source_model>hipay/source_paymentAction</source_model>
385
- <sort_order>30</sort_order>
386
- <show_in_default>1</show_in_default>
387
- <show_in_website>1</show_in_website>
388
- <show_in_store>0</show_in_store>
389
- </payment_action>
390
- <cctypes translate="label">
391
  <label>Credit Card Types</label>
392
  <comment>Sort the list by drag'n/drop credit card type</comment>
393
  <frontend_type>checkboxes</frontend_type>
394
- <frontend_model>hipay/adminhtml_system_config_form_field_multiselectSortable</frontend_model>
 
395
  <backend_model>hipay/system_config_backend_ccTypes</backend_model>
396
- <source_model>hipay/source_ccType::toConfigOption</source_model>
397
  <sort_order>40</sort_order>
398
  <show_in_default>1</show_in_default>
399
  <show_in_website>1</show_in_website>
@@ -419,7 +576,7 @@
419
  <show_in_store>0</show_in_store>
420
  </useccv>
421
  <use_3d_secure translate="label">
422
- <label>Use 3D Secure</label>
423
  <frontend_type>select</frontend_type>
424
  <source_model>hipay/source_3ds</source_model>
425
  <sort_order>60</sort_order>
@@ -428,8 +585,8 @@
428
  <show_in_store>0</show_in_store>
429
  </use_3d_secure>
430
  <config_3ds_rules translate="label comment">
431
- <label>Rules 3D Secure</label>
432
- <comment>Configure Rules to activate 3D Secure</comment>
433
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
434
  <backend_model>hipay/rule_config</backend_model>
435
  <sort_order>61</sort_order>
@@ -438,44 +595,44 @@
438
  <show_in_store>0</show_in_store>
439
  </config_3ds_rules>
440
  <send_fraud_payment_email translate="label">
441
- <label>Send fraud payment email</label>
442
- <frontend_type>select</frontend_type>
443
- <source_model>adminhtml/system_config_source_yesno</source_model>
444
- <sort_order>63</sort_order>
445
- <show_in_default>1</show_in_default>
446
- <show_in_website>1</show_in_website>
447
- <show_in_store>1</show_in_store>
448
- </send_fraud_payment_email>
449
- <!-- @deprecated since version 1.2.6 -->
450
- <!-- <allow_split_payment translate="label">
451
- <label>Use Split Payment</label>
452
  <frontend_type>select</frontend_type>
453
- <frontend_model>hipay/adminhtml_system_config_form_field_allowsplitpayment</frontend_model>
454
  <source_model>adminhtml/system_config_source_yesno</source_model>
455
- <sort_order>65</sort_order>
456
- <show_in_default>1</show_in_default>
457
- <show_in_website>1</show_in_website>
458
- <show_in_store>0</show_in_store>
459
- </allow_split_payment>
460
- <split_payment_profile translate="label">
461
- <label>Payment Profile</label>
462
- <frontend_type>multiselect</frontend_type>
463
- <source_model>hipay/source_paymentProfile::splitPaymentsToOptionArray</source_model>
464
- <sort_order>66</sort_order>
465
- <show_in_default>1</show_in_default>
466
- <show_in_website>1</show_in_website>
467
- <show_in_store>0</show_in_store>
468
- </split_payment_profile>
469
- <min_order_total_split_payment translate="label">
470
- <label>Minimum Order Total for Split Payment</label>
471
- <frontend_type>text</frontend_type>
472
- <sort_order>68</sort_order>
473
  <show_in_default>1</show_in_default>
474
  <show_in_website>1</show_in_website>
475
  <show_in_store>1</show_in_store>
476
- </min_order_total_split_payment> -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
477
  <allow_use_oneclick translate="label">
478
- <label>Use Oneclick</label>
479
  <frontend_type>select</frontend_type>
480
  <source_model>adminhtml/system_config_source_yesno</source_model>
481
  <sort_order>70</sort_order>
@@ -483,9 +640,9 @@
483
  <show_in_website>1</show_in_website>
484
  <show_in_store>0</show_in_store>
485
  </allow_use_oneclick>
486
- <filter_oneclick translate="label comment">
487
- <label>Rules Oneclick</label>
488
- <comment>Configure Rules to activate oneclick</comment>
489
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
490
  <backend_model>hipay/rule_config</backend_model>
491
  <sort_order>80</sort_order>
@@ -493,36 +650,45 @@
493
  <show_in_website>1</show_in_website>
494
  <show_in_store>0</show_in_store>
495
  </filter_oneclick>
496
- <re_add_to_cart translate="label comment">
497
- <label>Add product to cart</label>
498
- <comment>Fill cart when payment canceled or refused</comment>
499
  <frontend_type>select</frontend_type>
500
  <source_model>adminhtml/system_config_source_yesno</source_model>
501
  <sort_order>95</sort_order>
502
  <show_in_default>1</show_in_default>
503
  <show_in_website>1</show_in_website>
504
  <show_in_store>0</show_in_store>
505
- </re_add_to_cart>
506
- <cancel_pending_order translate="label comment">
507
- <label>Cancel pending order</label>
508
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
509
  <frontend_type>select</frontend_type>
510
  <source_model>adminhtml/system_config_source_yesno</source_model>
511
  <sort_order>97</sort_order>
512
  <show_in_default>1</show_in_default>
513
  <show_in_website>1</show_in_website>
514
  <show_in_store>0</show_in_store>
515
- </cancel_pending_order>
516
- <send_fraud_payment_email translate="label">
517
- <label>Send fraud payment email</label>
518
- <frontend_type>select</frontend_type>
519
- <source_model>adminhtml/system_config_source_yesno</source_model>
520
- <sort_order>99</sort_order>
521
- <show_in_default>1</show_in_default>
522
- <show_in_website>1</show_in_website>
523
- <show_in_store>1</show_in_store>
524
- </send_fraud_payment_email>
525
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
526
  <label>Payment from applicable countries</label>
527
  <frontend_type>allowspecific</frontend_type>
528
  <sort_order>100</sort_order>
@@ -565,8 +731,8 @@
565
  <show_in_store>1</show_in_store>
566
  </sort_order>
567
  <debug>
568
- <label>Enable debug log</label>
569
- <comment></comment>
570
  <frontend_type>select</frontend_type>
571
  <source_model>adminhtml/system_config_source_yesno</source_model>
572
  <sort_order>150</sort_order>
@@ -574,9 +740,9 @@
574
  <show_in_website>1</show_in_website>
575
  <show_in_store>0</show_in_store>
576
  </debug>
577
- <is_test_mode translate="label comment">
578
- <label>Enable test mode</label>
579
- <comment></comment>
580
  <frontend_type>select</frontend_type>
581
  <source_model>adminhtml/system_config_source_yesno</source_model>
582
  <sort_order>200</sort_order>
@@ -584,42 +750,42 @@
584
  <show_in_website>1</show_in_website>
585
  <show_in_store>1</show_in_store>
586
  </is_test_mode>
587
- </fields>
588
- </hipay_cc>
589
- <hipay_ccxtimes translate="label" module="hipay">
590
- <label>HiPay Fullservice Credit Card Split Payment</label>
591
  <frontend_type>text</frontend_type>
592
  <sort_order>205</sort_order>
593
  <show_in_default>1</show_in_default>
594
  <show_in_website>1</show_in_website>
595
  <show_in_store>1</show_in_store>
596
  <fields>
597
- <active translate="label">
598
- <label>Enabled</label>
599
- <frontend_type>select</frontend_type>
600
- <source_model>adminhtml/system_config_source_yesno</source_model>
601
- <sort_order>10</sort_order>
602
- <show_in_default>1</show_in_default>
603
- <show_in_website>1</show_in_website>
604
- <show_in_store>1</show_in_store>
605
- </active>
606
- <title translate="label">
607
- <label>Title</label>
608
- <frontend_type>text</frontend_type>
609
- <sort_order>15</sort_order>
610
- <show_in_default>1</show_in_default>
611
- <show_in_website>1</show_in_website>
612
- <show_in_store>1</show_in_store>
613
- </title>
614
- <split_payment_profile translate="label">
615
- <label>Payment Profile</label>
616
- <frontend_type>multiselect</frontend_type>
617
- <source_model>hipay/source_paymentProfile::splitPaymentsToOptionArray</source_model>
618
- <sort_order>20</sort_order>
619
- <show_in_default>1</show_in_default>
620
- <show_in_website>1</show_in_website>
621
- <show_in_store>0</show_in_store>
622
- </split_payment_profile>
623
  <order_status_payment_accepted translate="label">
624
  <label>Order status when payment accepted</label>
625
  <frontend_type>select</frontend_type>
@@ -658,39 +824,52 @@
658
  </hipay_status_validate_order>
659
  <success_redirect_page translate="label">
660
  <label>Redirect page success</label>
661
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
662
  <frontend_type>text</frontend_type>
663
- <sort_order>26</sort_order>
664
  <show_in_default>1</show_in_default>
665
  <show_in_website>1</show_in_website>
666
  <show_in_store>0</show_in_store>
667
  </success_redirect_page>
 
 
 
 
 
 
 
 
 
 
668
  <pending_redirect_page translate="label">
669
  <label>Redirect page pending status</label>
670
  <comment>Page to redirect when transaction is in pending status</comment>
671
  <frontend_type>select</frontend_type>
672
  <source_model>hipay/source_pendingredirect</source_model>
673
- <sort_order>27</sort_order>
674
  <show_in_default>1</show_in_default>
675
  <show_in_website>1</show_in_website>
676
  <show_in_store>0</show_in_store>
677
  </pending_redirect_page>
678
- <payment_action translate="label">
679
- <label>Payment Action</label>
680
- <frontend_type>select</frontend_type>
681
- <source_model>hipay/source_paymentAction</source_model>
682
- <sort_order>30</sort_order>
683
- <show_in_default>1</show_in_default>
684
- <show_in_website>1</show_in_website>
685
- <show_in_store>0</show_in_store>
686
- </payment_action>
687
- <cctypes translate="label">
688
  <label>Credit Card Types</label>
689
  <comment>Sort the list by drag'n/drop credit card type</comment>
690
  <frontend_type>checkboxes</frontend_type>
691
- <frontend_model>hipay/adminhtml_system_config_form_field_multiselectSortable</frontend_model>
 
692
  <backend_model>hipay/system_config_backend_ccTypes</backend_model>
693
- <source_model>hipay/source_ccType::toConfigOption</source_model>
694
  <sort_order>40</sort_order>
695
  <show_in_default>1</show_in_default>
696
  <show_in_website>1</show_in_website>
@@ -716,7 +895,7 @@
716
  <show_in_store>0</show_in_store>
717
  </useccv>
718
  <use_3d_secure translate="label">
719
- <label>Use 3D Secure</label>
720
  <frontend_type>select</frontend_type>
721
  <source_model>hipay/source_3ds</source_model>
722
  <sort_order>60</sort_order>
@@ -725,8 +904,8 @@
725
  <show_in_store>0</show_in_store>
726
  </use_3d_secure>
727
  <config_3ds_rules translate="label comment">
728
- <label>Rules 3D Secure</label>
729
- <comment>Configure Rules to activate 3D Secure</comment>
730
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
731
  <backend_model>hipay/rule_config</backend_model>
732
  <sort_order>61</sort_order>
@@ -735,16 +914,16 @@
735
  <show_in_store>0</show_in_store>
736
  </config_3ds_rules>
737
  <send_fraud_payment_email translate="label">
738
- <label>Send fraud payment email</label>
739
- <frontend_type>select</frontend_type>
740
- <source_model>adminhtml/system_config_source_yesno</source_model>
741
- <sort_order>63</sort_order>
742
- <show_in_default>1</show_in_default>
743
- <show_in_website>1</show_in_website>
744
- <show_in_store>1</show_in_store>
745
- </send_fraud_payment_email>
746
  <allow_use_oneclick translate="label">
747
- <label>Use Oneclick</label>
748
  <frontend_type>select</frontend_type>
749
  <source_model>adminhtml/system_config_source_yesno</source_model>
750
  <sort_order>70</sort_order>
@@ -752,9 +931,9 @@
752
  <show_in_website>1</show_in_website>
753
  <show_in_store>0</show_in_store>
754
  </allow_use_oneclick>
755
- <filter_oneclick translate="label comment">
756
- <label>Rules Oneclick</label>
757
- <comment>Configure Rules to activate oneclick</comment>
758
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
759
  <backend_model>hipay/rule_config</backend_model>
760
  <sort_order>80</sort_order>
@@ -762,36 +941,45 @@
762
  <show_in_website>1</show_in_website>
763
  <show_in_store>0</show_in_store>
764
  </filter_oneclick>
765
- <re_add_to_cart translate="label comment">
766
- <label>Add product to cart</label>
767
- <comment>Fill cart when payment canceled or refused</comment>
768
  <frontend_type>select</frontend_type>
769
  <source_model>adminhtml/system_config_source_yesno</source_model>
770
  <sort_order>95</sort_order>
771
  <show_in_default>1</show_in_default>
772
  <show_in_website>1</show_in_website>
773
  <show_in_store>0</show_in_store>
774
- </re_add_to_cart>
775
- <cancel_pending_order translate="label comment">
776
- <label>Cancel pending order</label>
777
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
778
  <frontend_type>select</frontend_type>
779
  <source_model>adminhtml/system_config_source_yesno</source_model>
780
  <sort_order>97</sort_order>
781
  <show_in_default>1</show_in_default>
782
  <show_in_website>1</show_in_website>
783
  <show_in_store>0</show_in_store>
784
- </cancel_pending_order>
785
- <send_fraud_payment_email translate="label">
786
- <label>Send fraud payment email</label>
787
- <frontend_type>select</frontend_type>
788
- <source_model>adminhtml/system_config_source_yesno</source_model>
789
- <sort_order>99</sort_order>
790
- <show_in_default>1</show_in_default>
791
- <show_in_website>1</show_in_website>
792
- <show_in_store>1</show_in_store>
793
- </send_fraud_payment_email>
794
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
795
  <label>Payment from applicable countries</label>
796
  <frontend_type>allowspecific</frontend_type>
797
  <sort_order>100</sort_order>
@@ -834,8 +1022,8 @@
834
  <show_in_store>1</show_in_store>
835
  </sort_order>
836
  <debug>
837
- <label>Enable debug log</label>
838
- <comment></comment>
839
  <frontend_type>select</frontend_type>
840
  <source_model>adminhtml/system_config_source_yesno</source_model>
841
  <sort_order>150</sort_order>
@@ -843,43 +1031,43 @@
843
  <show_in_website>1</show_in_website>
844
  <show_in_store>0</show_in_store>
845
  </debug>
846
- <is_test_mode translate="label comment">
847
- <label>Enable test mode</label>
848
- <comment></comment>
849
- <frontend_type>select</frontend_type>
850
- <source_model>adminhtml/system_config_source_yesno</source_model>
851
  <sort_order>200</sort_order>
852
  <show_in_default>1</show_in_default>
853
  <show_in_website>1</show_in_website>
854
  <show_in_store>1</show_in_store>
855
  </is_test_mode>
856
- </fields>
857
- </hipay_ccxtimes>
858
- <hipay_hosted translate="label" module="hipay">
859
- <label>HiPay Fullservice Hosted Page</label>
860
  <frontend_type>text</frontend_type>
861
  <sort_order>210</sort_order>
862
  <show_in_default>1</show_in_default>
863
  <show_in_website>1</show_in_website>
864
  <show_in_store>1</show_in_store>
865
  <fields>
866
- <active translate="label">
867
- <label>Enabled</label>
868
- <frontend_type>select</frontend_type>
869
- <source_model>adminhtml/system_config_source_yesno</source_model>
870
- <sort_order>10</sort_order>
871
- <show_in_default>1</show_in_default>
872
- <show_in_website>1</show_in_website>
873
- <show_in_store>1</show_in_store>
874
- </active>
875
- <title translate="label">
876
- <label>Title</label>
877
- <frontend_type>text</frontend_type>
878
- <sort_order>20</sort_order>
879
- <show_in_default>1</show_in_default>
880
- <show_in_website>1</show_in_website>
881
- <show_in_store>1</show_in_store>
882
- </title>
883
  <order_status_payment_accepted translate="label">
884
  <label>Order status when payment accepted</label>
885
  <frontend_type>select</frontend_type>
@@ -907,7 +1095,7 @@
907
  <show_in_website>1</show_in_website>
908
  <show_in_store>0</show_in_store>
909
  </order_status_payment_canceled>
910
- <hipay_status_validate_order translate="label">
911
  <label>Hipay status to validate order</label>
912
  <frontend_type>select</frontend_type>
913
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -918,64 +1106,77 @@
918
  </hipay_status_validate_order>
919
  <success_redirect_page translate="label">
920
  <label>Redirect page success</label>
921
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
922
  <frontend_type>text</frontend_type>
923
- <sort_order>26</sort_order>
924
  <show_in_default>1</show_in_default>
925
  <show_in_website>1</show_in_website>
926
  <show_in_store>0</show_in_store>
927
  </success_redirect_page>
928
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
929
  <label>Redirect page pending status</label>
930
  <comment>Page to redirect when transaction is in pending status</comment>
931
  <frontend_type>select</frontend_type>
932
  <source_model>hipay/source_pendingredirect</source_model>
933
- <sort_order>27</sort_order>
934
  <show_in_default>1</show_in_default>
935
  <show_in_website>1</show_in_website>
936
  <show_in_store>0</show_in_store>
937
  </pending_redirect_page>
938
- <payment_action translate="label">
939
- <label>Payment Action</label>
940
- <frontend_type>select</frontend_type>
941
- <source_model>hipay/source_paymentAction</source_model>
942
- <sort_order>28</sort_order>
943
- <show_in_default>1</show_in_default>
944
- <show_in_website>1</show_in_website>
945
- <show_in_store>0</show_in_store>
946
- </payment_action>
947
- <cctypes translate="label">
948
  <label>Credit Card Types</label>
949
  <comment>Sort the list by drag'n/drop credit card type</comment>
950
  <frontend_type>checkboxes</frontend_type>
951
- <frontend_model>hipay/adminhtml_system_config_form_field_multiselectSortable</frontend_model>
 
952
  <backend_model>hipay/system_config_backend_ccTypes</backend_model>
953
- <source_model>hipay/source_ccTypeHosted::toConfigOption</source_model>
954
- <sort_order>29</sort_order>
955
  <show_in_default>1</show_in_default>
956
  <show_in_website>1</show_in_website>
957
  <show_in_store>0</show_in_store>
958
  </cctypes>
959
  <css_url translate="label coment">
960
- <label>Css Url</label>
961
- <comment>Important, HTTPS protocol is required</comment>
962
- <frontend_type>text</frontend_type>
963
- <sort_order>30</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
  </css_url>
968
  <template translate="label">
969
- <label>Page payment template</label>
970
  <frontend_type>select</frontend_type>
971
  <source_model>hipay/source_template</source_model>
972
  <sort_order>35</sort_order>
973
  <show_in_default>1</show_in_default>
974
  <show_in_website>1</show_in_website>
975
- <show_in_store>0</show_in_store>
976
  </template>
977
- <display_iframe translate="label">
978
- <label>Display hosted page in Iframe</label>
979
  <frontend_type>select</frontend_type>
980
  <source_model>adminhtml/system_config_source_yesno</source_model>
981
  <sort_order>36</sort_order>
@@ -984,39 +1185,39 @@
984
  <show_in_store>0</show_in_store>
985
  </display_iframe>
986
  <iframe_width translate="label">
987
- <label>iFrame Width</label>
988
- <frontend_type>text</frontend_type>
989
- <sort_order>37</sort_order>
990
- <show_in_default>1</show_in_default>
991
- <show_in_website>1</show_in_website>
992
- <show_in_store>1</show_in_store>
993
  </iframe_width>
994
  <iframe_height translate="label">
995
- <label>iFrame Height</label>
996
- <frontend_type>text</frontend_type>
997
- <sort_order>38</sort_order>
998
- <show_in_default>1</show_in_default>
999
- <show_in_website>1</show_in_website>
1000
- <show_in_store>1</show_in_store>
1001
  </iframe_height>
1002
  <iframe_style translate="label">
1003
- <label>iFrame Style</label>
1004
- <frontend_type>text</frontend_type>
1005
- <sort_order>39</sort_order>
1006
- <show_in_default>1</show_in_default>
1007
- <show_in_website>1</show_in_website>
1008
- <show_in_store>1</show_in_store>
1009
  </iframe_style>
1010
  <iframe_wrapper_style translate="label">
1011
- <label>Wrapper iFrame Style</label>
1012
- <frontend_type>text</frontend_type>
1013
- <sort_order>39</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
  </iframe_wrapper_style>
1018
  <display_selector translate="label">
1019
- <label>Display card selector</label>
1020
  <frontend_type>select</frontend_type>
1021
  <source_model>adminhtml/system_config_source_yesno</source_model>
1022
  <sort_order>40</sort_order>
@@ -1025,7 +1226,7 @@
1025
  <show_in_store>0</show_in_store>
1026
  </display_selector>
1027
  <use_3d_secure translate="label">
1028
- <label>Use 3D Secure</label>
1029
  <frontend_type>select</frontend_type>
1030
  <source_model>hipay/source_3ds</source_model>
1031
  <sort_order>60</sort_order>
@@ -1034,8 +1235,8 @@
1034
  <show_in_store>0</show_in_store>
1035
  </use_3d_secure>
1036
  <config_3ds_rules translate="label comment">
1037
- <label>Rules 3D Secure</label>
1038
- <comment>Configure Rules to activate 3D Secure</comment>
1039
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
1040
  <backend_model>hipay/rule_config</backend_model>
1041
  <sort_order>61</sort_order>
@@ -1044,44 +1245,44 @@
1044
  <show_in_store>0</show_in_store>
1045
  </config_3ds_rules>
1046
  <send_fraud_payment_email translate="label">
1047
- <label>Send fraud payment email</label>
1048
- <frontend_type>select</frontend_type>
1049
- <source_model>adminhtml/system_config_source_yesno</source_model>
1050
- <sort_order>63</sort_order>
1051
- <show_in_default>1</show_in_default>
1052
- <show_in_website>1</show_in_website>
1053
- <show_in_store>1</show_in_store>
1054
- </send_fraud_payment_email>
1055
- <!-- @deprecated since version 1.2.6 -->
1056
- <!-- <allow_split_payment translate="label">
1057
- <label>Use Split Payment</label>
1058
  <frontend_type>select</frontend_type>
1059
- <frontend_model>hipay/adminhtml_system_config_form_field_allowsplitpayment</frontend_model>
1060
  <source_model>adminhtml/system_config_source_yesno</source_model>
1061
- <sort_order>65</sort_order>
1062
- <show_in_default>1</show_in_default>
1063
- <show_in_website>1</show_in_website>
1064
- <show_in_store>0</show_in_store>
1065
- </allow_split_payment>
1066
- <split_payment_profile translate="label">
1067
- <label>Payment Profile</label>
1068
- <frontend_type>multiselect</frontend_type>
1069
- <source_model>hipay/source_paymentProfile::splitPaymentsToOptionArray</source_model>
1070
- <sort_order>66</sort_order>
1071
- <show_in_default>1</show_in_default>
1072
- <show_in_website>1</show_in_website>
1073
- <show_in_store>0</show_in_store>
1074
- </split_payment_profile>
1075
- <min_order_total_split_payment translate="label">
1076
- <label>Minimum Order Total for Split Payment</label>
1077
- <frontend_type>text</frontend_type>
1078
- <sort_order>68</sort_order>
1079
  <show_in_default>1</show_in_default>
1080
  <show_in_website>1</show_in_website>
1081
  <show_in_store>1</show_in_store>
1082
- </min_order_total_split_payment> -->
1083
- <allow_use_oneclick translate="label">
1084
- <label>Use Oneclick</label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1085
  <frontend_type>select</frontend_type>
1086
  <source_model>adminhtml/system_config_source_yesno</source_model>
1087
  <sort_order>70</sort_order>
@@ -1090,8 +1291,8 @@
1090
  <show_in_store>0</show_in_store>
1091
  </allow_use_oneclick>
1092
  <filter_oneclick translate="label comment">
1093
- <label>Rules Oneclick</label>
1094
- <comment>Configure Rules to activate oneclick</comment>
1095
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
1096
  <backend_model>hipay/rule_config</backend_model>
1097
  <sort_order>80</sort_order>
@@ -1099,9 +1300,9 @@
1099
  <show_in_website>1</show_in_website>
1100
  <show_in_store>0</show_in_store>
1101
  </filter_oneclick>
1102
- <re_add_to_cart translate="label comment">
1103
- <label>Add product to cart</label>
1104
- <comment>Fill cart when payment canceled or refused</comment>
1105
  <frontend_type>select</frontend_type>
1106
  <source_model>adminhtml/system_config_source_yesno</source_model>
1107
  <sort_order>95</sort_order>
@@ -1110,25 +1311,34 @@
1110
  <show_in_store>0</show_in_store>
1111
  </re_add_to_cart>
1112
  <cancel_pending_order translate="label comment">
1113
- <label>Cancel pending order</label>
1114
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
1115
  <frontend_type>select</frontend_type>
1116
  <source_model>adminhtml/system_config_source_yesno</source_model>
1117
  <sort_order>97</sort_order>
1118
  <show_in_default>1</show_in_default>
1119
  <show_in_website>1</show_in_website>
1120
  <show_in_store>0</show_in_store>
1121
- </cancel_pending_order>
1122
- <send_fraud_payment_email translate="label">
1123
- <label>Send fraud payment email</label>
1124
- <frontend_type>select</frontend_type>
1125
- <source_model>adminhtml/system_config_source_yesno</source_model>
1126
- <sort_order>99</sort_order>
1127
- <show_in_default>1</show_in_default>
1128
- <show_in_website>1</show_in_website>
1129
- <show_in_store>1</show_in_store>
1130
- </send_fraud_payment_email>
1131
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
1132
  <label>Payment from applicable countries</label>
1133
  <frontend_type>allowspecific</frontend_type>
1134
  <sort_order>100</sort_order>
@@ -1171,8 +1381,8 @@
1171
  <show_in_store>1</show_in_store>
1172
  </sort_order>
1173
  <debug translate="label">
1174
- <label>Enable debug log</label>
1175
- <comment></comment>
1176
  <frontend_type>select</frontend_type>
1177
  <source_model>adminhtml/system_config_source_yesno</source_model>
1178
  <sort_order>150</sort_order>
@@ -1180,9 +1390,9 @@
1180
  <show_in_website>1</show_in_website>
1181
  <show_in_store>0</show_in_store>
1182
  </debug>
1183
- <is_test_mode translate="label comment">
1184
- <label>Enable test mode</label>
1185
- <comment></comment>
1186
  <frontend_type>select</frontend_type>
1187
  <source_model>adminhtml/system_config_source_yesno</source_model>
1188
  <sort_order>200</sort_order>
@@ -1190,42 +1400,42 @@
1190
  <show_in_website>1</show_in_website>
1191
  <show_in_store>1</show_in_store>
1192
  </is_test_mode>
1193
- </fields>
1194
- </hipay_hosted>
1195
- <hipay_hostedxtimes translate="label" module="hipay">
1196
- <label>HiPay Fullservice Hosted Page Split Payment</label>
1197
  <frontend_type>text</frontend_type>
1198
  <sort_order>215</sort_order>
1199
  <show_in_default>1</show_in_default>
1200
  <show_in_website>1</show_in_website>
1201
  <show_in_store>1</show_in_store>
1202
  <fields>
1203
- <active translate="label">
1204
- <label>Enabled</label>
1205
- <frontend_type>select</frontend_type>
1206
- <source_model>adminhtml/system_config_source_yesno</source_model>
1207
- <sort_order>10</sort_order>
1208
- <show_in_default>1</show_in_default>
1209
- <show_in_website>1</show_in_website>
1210
- <show_in_store>1</show_in_store>
1211
- </active>
1212
- <title translate="label">
1213
- <label>Title</label>
1214
- <frontend_type>text</frontend_type>
1215
- <sort_order>15</sort_order>
1216
- <show_in_default>1</show_in_default>
1217
- <show_in_website>1</show_in_website>
1218
- <show_in_store>1</show_in_store>
1219
- </title>
1220
- <split_payment_profile translate="label">
1221
- <label>Payment Profile</label>
1222
- <frontend_type>multiselect</frontend_type>
1223
- <source_model>hipay/source_paymentProfile::splitPaymentsToOptionArray</source_model>
1224
- <sort_order>20</sort_order>
1225
- <show_in_default>1</show_in_default>
1226
- <show_in_website>1</show_in_website>
1227
- <show_in_store>0</show_in_store>
1228
- </split_payment_profile>
1229
  <order_status_payment_accepted translate="label">
1230
  <label>Order status when payment accepted</label>
1231
  <frontend_type>select</frontend_type>
@@ -1253,7 +1463,7 @@
1253
  <show_in_website>1</show_in_website>
1254
  <show_in_store>0</show_in_store>
1255
  </order_status_payment_canceled>
1256
- <hipay_status_validate_order translate="label">
1257
  <label>Hipay status to validate order</label>
1258
  <frontend_type>select</frontend_type>
1259
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -1264,64 +1474,77 @@
1264
  </hipay_status_validate_order>
1265
  <success_redirect_page translate="label">
1266
  <label>Redirect page success</label>
1267
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
1268
  <frontend_type>text</frontend_type>
1269
- <sort_order>26</sort_order>
1270
  <show_in_default>1</show_in_default>
1271
  <show_in_website>1</show_in_website>
1272
  <show_in_store>0</show_in_store>
1273
  </success_redirect_page>
1274
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
1275
  <label>Redirect page pending status</label>
1276
  <comment>Page to redirect when transaction is in pending status</comment>
1277
  <frontend_type>select</frontend_type>
1278
  <source_model>hipay/source_pendingredirect</source_model>
1279
- <sort_order>27</sort_order>
1280
  <show_in_default>1</show_in_default>
1281
  <show_in_website>1</show_in_website>
1282
  <show_in_store>0</show_in_store>
1283
  </pending_redirect_page>
1284
- <payment_action translate="label">
1285
- <label>Payment Action</label>
1286
- <frontend_type>select</frontend_type>
1287
- <source_model>hipay/source_paymentAction</source_model>
1288
- <sort_order>28</sort_order>
1289
- <show_in_default>1</show_in_default>
1290
- <show_in_website>1</show_in_website>
1291
- <show_in_store>0</show_in_store>
1292
- </payment_action>
1293
- <cctypes translate="label">
1294
  <label>Credit Card Types</label>
1295
  <comment>Sort the list by drag'n/drop credit card type</comment>
1296
  <frontend_type>checkboxes</frontend_type>
1297
- <frontend_model>hipay/adminhtml_system_config_form_field_multiselectSortable</frontend_model>
 
1298
  <backend_model>hipay/system_config_backend_ccTypes</backend_model>
1299
- <source_model>hipay/source_ccTypeHosted::toConfigOption</source_model>
1300
- <sort_order>29</sort_order>
1301
  <show_in_default>1</show_in_default>
1302
  <show_in_website>1</show_in_website>
1303
  <show_in_store>0</show_in_store>
1304
  </cctypes>
1305
  <css_url translate="label coment">
1306
- <label>Css Url</label>
1307
- <comment>Important, HTTPS protocol is required</comment>
1308
- <frontend_type>text</frontend_type>
1309
- <sort_order>30</sort_order>
1310
- <show_in_default>1</show_in_default>
1311
- <show_in_website>1</show_in_website>
1312
- <show_in_store>1</show_in_store>
1313
  </css_url>
1314
  <template translate="label">
1315
- <label>Page payment template</label>
1316
  <frontend_type>select</frontend_type>
1317
  <source_model>hipay/source_template</source_model>
1318
  <sort_order>35</sort_order>
1319
  <show_in_default>1</show_in_default>
1320
  <show_in_website>1</show_in_website>
1321
- <show_in_store>0</show_in_store>
1322
  </template>
1323
- <display_iframe translate="label">
1324
- <label>Display hosted page in Iframe</label>
1325
  <frontend_type>select</frontend_type>
1326
  <source_model>adminhtml/system_config_source_yesno</source_model>
1327
  <sort_order>36</sort_order>
@@ -1330,39 +1553,39 @@
1330
  <show_in_store>0</show_in_store>
1331
  </display_iframe>
1332
  <iframe_width translate="label">
1333
- <label>iFrame Width</label>
1334
- <frontend_type>text</frontend_type>
1335
- <sort_order>37</sort_order>
1336
- <show_in_default>1</show_in_default>
1337
- <show_in_website>1</show_in_website>
1338
- <show_in_store>1</show_in_store>
1339
  </iframe_width>
1340
  <iframe_height translate="label">
1341
- <label>iFrame Height</label>
1342
- <frontend_type>text</frontend_type>
1343
- <sort_order>38</sort_order>
1344
- <show_in_default>1</show_in_default>
1345
- <show_in_website>1</show_in_website>
1346
- <show_in_store>1</show_in_store>
1347
  </iframe_height>
1348
  <iframe_style translate="label">
1349
- <label>iFrame Style</label>
1350
- <frontend_type>text</frontend_type>
1351
- <sort_order>39</sort_order>
1352
- <show_in_default>1</show_in_default>
1353
- <show_in_website>1</show_in_website>
1354
- <show_in_store>1</show_in_store>
1355
  </iframe_style>
1356
  <iframe_wrapper_style translate="label">
1357
- <label>Wrapper iFrame Style</label>
1358
- <frontend_type>text</frontend_type>
1359
- <sort_order>39</sort_order>
1360
- <show_in_default>1</show_in_default>
1361
- <show_in_website>1</show_in_website>
1362
- <show_in_store>1</show_in_store>
1363
  </iframe_wrapper_style>
1364
  <display_selector translate="label">
1365
- <label>Display card selector</label>
1366
  <frontend_type>select</frontend_type>
1367
  <source_model>adminhtml/system_config_source_yesno</source_model>
1368
  <sort_order>40</sort_order>
@@ -1371,7 +1594,7 @@
1371
  <show_in_store>0</show_in_store>
1372
  </display_selector>
1373
  <use_3d_secure translate="label">
1374
- <label>Use 3D Secure</label>
1375
  <frontend_type>select</frontend_type>
1376
  <source_model>hipay/source_3ds</source_model>
1377
  <sort_order>60</sort_order>
@@ -1380,8 +1603,8 @@
1380
  <show_in_store>0</show_in_store>
1381
  </use_3d_secure>
1382
  <config_3ds_rules translate="label comment">
1383
- <label>Rules 3D Secure</label>
1384
- <comment>Configure Rules to activate 3D Secure</comment>
1385
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
1386
  <backend_model>hipay/rule_config</backend_model>
1387
  <sort_order>61</sort_order>
@@ -1390,16 +1613,16 @@
1390
  <show_in_store>0</show_in_store>
1391
  </config_3ds_rules>
1392
  <send_fraud_payment_email translate="label">
1393
- <label>Send fraud payment email</label>
1394
- <frontend_type>select</frontend_type>
1395
- <source_model>adminhtml/system_config_source_yesno</source_model>
1396
- <sort_order>63</sort_order>
1397
- <show_in_default>1</show_in_default>
1398
- <show_in_website>1</show_in_website>
1399
- <show_in_store>1</show_in_store>
1400
- </send_fraud_payment_email>
1401
- <allow_use_oneclick translate="label">
1402
- <label>Use Oneclick</label>
1403
  <frontend_type>select</frontend_type>
1404
  <source_model>adminhtml/system_config_source_yesno</source_model>
1405
  <sort_order>70</sort_order>
@@ -1408,8 +1631,8 @@
1408
  <show_in_store>0</show_in_store>
1409
  </allow_use_oneclick>
1410
  <filter_oneclick translate="label comment">
1411
- <label>Rules Oneclick</label>
1412
- <comment>Configure Rules to activate oneclick</comment>
1413
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
1414
  <backend_model>hipay/rule_config</backend_model>
1415
  <sort_order>80</sort_order>
@@ -1417,9 +1640,9 @@
1417
  <show_in_website>1</show_in_website>
1418
  <show_in_store>0</show_in_store>
1419
  </filter_oneclick>
1420
- <re_add_to_cart translate="label comment">
1421
- <label>Add product to cart</label>
1422
- <comment>Fill cart when payment canceled or refused</comment>
1423
  <frontend_type>select</frontend_type>
1424
  <source_model>adminhtml/system_config_source_yesno</source_model>
1425
  <sort_order>95</sort_order>
@@ -1428,25 +1651,34 @@
1428
  <show_in_store>0</show_in_store>
1429
  </re_add_to_cart>
1430
  <cancel_pending_order translate="label comment">
1431
- <label>Cancel pending order</label>
1432
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
1433
  <frontend_type>select</frontend_type>
1434
  <source_model>adminhtml/system_config_source_yesno</source_model>
1435
  <sort_order>97</sort_order>
1436
  <show_in_default>1</show_in_default>
1437
  <show_in_website>1</show_in_website>
1438
  <show_in_store>0</show_in_store>
1439
- </cancel_pending_order>
1440
- <send_fraud_payment_email translate="label">
1441
- <label>Send fraud payment email</label>
1442
- <frontend_type>select</frontend_type>
1443
- <source_model>adminhtml/system_config_source_yesno</source_model>
1444
- <sort_order>99</sort_order>
1445
- <show_in_default>1</show_in_default>
1446
- <show_in_website>1</show_in_website>
1447
- <show_in_store>1</show_in_store>
1448
- </send_fraud_payment_email>
1449
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
1450
  <label>Payment from applicable countries</label>
1451
  <frontend_type>allowspecific</frontend_type>
1452
  <sort_order>100</sort_order>
@@ -1489,8 +1721,8 @@
1489
  <show_in_store>1</show_in_store>
1490
  </sort_order>
1491
  <debug translate="label">
1492
- <label>Enable debug log</label>
1493
- <comment></comment>
1494
  <frontend_type>select</frontend_type>
1495
  <source_model>adminhtml/system_config_source_yesno</source_model>
1496
  <sort_order>150</sort_order>
@@ -1498,9 +1730,9 @@
1498
  <show_in_website>1</show_in_website>
1499
  <show_in_store>0</show_in_store>
1500
  </debug>
1501
- <is_test_mode translate="label comment">
1502
- <label>Enable test mode</label>
1503
- <comment></comment>
1504
  <frontend_type>select</frontend_type>
1505
  <source_model>adminhtml/system_config_source_yesno</source_model>
1506
  <sort_order>200</sort_order>
@@ -1508,33 +1740,33 @@
1508
  <show_in_website>1</show_in_website>
1509
  <show_in_store>1</show_in_store>
1510
  </is_test_mode>
1511
- </fields>
1512
- </hipay_hostedxtimes>
1513
- <hipay_ideal translate="label" module="hipay">
1514
- <label>HiPay Fullservice iDeal</label>
1515
  <frontend_type>text</frontend_type>
1516
  <sort_order>220</sort_order>
1517
  <show_in_default>1</show_in_default>
1518
  <show_in_website>1</show_in_website>
1519
  <show_in_store>1</show_in_store>
1520
  <fields>
1521
- <active translate="label">
1522
- <label>Enabled</label>
1523
- <frontend_type>select</frontend_type>
1524
- <source_model>adminhtml/system_config_source_yesno</source_model>
1525
- <sort_order>10</sort_order>
1526
- <show_in_default>1</show_in_default>
1527
- <show_in_website>1</show_in_website>
1528
- <show_in_store>1</show_in_store>
1529
- </active>
1530
- <title translate="label">
1531
- <label>Title</label>
1532
- <frontend_type>text</frontend_type>
1533
- <sort_order>20</sort_order>
1534
- <show_in_default>1</show_in_default>
1535
- <show_in_website>1</show_in_website>
1536
- <show_in_store>1</show_in_store>
1537
- </title>
1538
  <order_status_payment_accepted translate="label">
1539
  <label>Order status when payment accepted</label>
1540
  <frontend_type>select</frontend_type>
@@ -1562,7 +1794,7 @@
1562
  <show_in_website>1</show_in_website>
1563
  <show_in_store>0</show_in_store>
1564
  </order_status_payment_canceled>
1565
- <hipay_status_validate_order translate="label">
1566
  <label>Hipay status to validate order</label>
1567
  <frontend_type>select</frontend_type>
1568
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -1573,44 +1805,56 @@
1573
  </hipay_status_validate_order>
1574
  <success_redirect_page translate="label">
1575
  <label>Redirect page success</label>
1576
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
1577
  <frontend_type>text</frontend_type>
1578
- <sort_order>26</sort_order>
1579
  <show_in_default>1</show_in_default>
1580
  <show_in_website>1</show_in_website>
1581
  <show_in_store>0</show_in_store>
1582
  </success_redirect_page>
1583
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
1584
  <label>Redirect page pending status</label>
1585
  <comment>Page to redirect when transaction is in pending status</comment>
1586
  <frontend_type>select</frontend_type>
1587
  <source_model>hipay/source_pendingredirect</source_model>
1588
- <sort_order>27</sort_order>
1589
  <show_in_default>1</show_in_default>
1590
  <show_in_website>1</show_in_website>
1591
  <show_in_store>0</show_in_store>
1592
  </pending_redirect_page>
1593
  <css_url translate="label coment">
1594
- <label>Css Url</label>
1595
- <comment>Important, HTTPS protocol is required</comment>
1596
- <frontend_type>text</frontend_type>
1597
- <sort_order>30</sort_order>
1598
- <show_in_default>1</show_in_default>
1599
- <show_in_website>1</show_in_website>
1600
- <show_in_store>1</show_in_store>
1601
  </css_url>
1602
  <template translate="label">
1603
- <label>Page payment template</label>
1604
  <frontend_type>select</frontend_type>
1605
  <source_model>hipay/source_template</source_model>
1606
  <sort_order>35</sort_order>
1607
  <show_in_default>1</show_in_default>
1608
  <show_in_website>1</show_in_website>
1609
- <show_in_store>0</show_in_store>
1610
  </template>
1611
- <re_add_to_cart translate="label comment">
1612
- <label>Add product to cart</label>
1613
- <comment>Fill cart when payment canceled or refused</comment>
1614
  <frontend_type>select</frontend_type>
1615
  <source_model>adminhtml/system_config_source_yesno</source_model>
1616
  <sort_order>95</sort_order>
@@ -1619,38 +1863,47 @@
1619
  <show_in_store>0</show_in_store>
1620
  </re_add_to_cart>
1621
  <cancel_pending_order translate="label comment">
1622
- <label>Cancel pending order</label>
1623
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
1624
  <frontend_type>select</frontend_type>
1625
  <source_model>adminhtml/system_config_source_yesno</source_model>
1626
  <sort_order>97</sort_order>
1627
  <show_in_default>1</show_in_default>
1628
  <show_in_website>1</show_in_website>
1629
  <show_in_store>0</show_in_store>
1630
- </cancel_pending_order>
1631
- <send_fraud_payment_email translate="label">
1632
- <label>Send fraud payment email</label>
1633
- <frontend_type>select</frontend_type>
1634
- <source_model>adminhtml/system_config_source_yesno</source_model>
1635
- <sort_order>99</sort_order>
1636
- <show_in_default>1</show_in_default>
1637
- <show_in_website>1</show_in_website>
1638
- <show_in_store>1</show_in_store>
1639
- </send_fraud_payment_email>
1640
- <allowspecific translate="label">
1641
- <label>Payment from applicable countries</label>
1642
- <frontend_type>allowspecific</frontend_type>
1643
- <sort_order>100</sort_order>
1644
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1645
  <show_in_default>1</show_in_default>
1646
  <show_in_website>1</show_in_website>
1647
  <show_in_store>1</show_in_store>
1648
- </allowspecific>
1649
- <specificcountry translate="label">
1650
- <label>Payment from Specific countries</label>
1651
- <frontend_type>multiselect</frontend_type>
1652
- <sort_order>110</sort_order>
1653
- <source_model>adminhtml/system_config_source_country</source_model>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1654
  <show_in_default>1</show_in_default>
1655
  <show_in_website>1</show_in_website>
1656
  <show_in_store>1</show_in_store>
@@ -1680,8 +1933,8 @@
1680
  <show_in_store>1</show_in_store>
1681
  </sort_order>
1682
  <debug translate="label">
1683
- <label>Enable debug log</label>
1684
- <comment></comment>
1685
  <frontend_type>select</frontend_type>
1686
  <source_model>adminhtml/system_config_source_yesno</source_model>
1687
  <sort_order>150</sort_order>
@@ -1689,9 +1942,9 @@
1689
  <show_in_website>1</show_in_website>
1690
  <show_in_store>0</show_in_store>
1691
  </debug>
1692
- <is_test_mode translate="label comment">
1693
- <label>Enable test mode</label>
1694
- <comment></comment>
1695
  <frontend_type>select</frontend_type>
1696
  <source_model>adminhtml/system_config_source_yesno</source_model>
1697
  <sort_order>200</sort_order>
@@ -1699,33 +1952,33 @@
1699
  <show_in_website>1</show_in_website>
1700
  <show_in_store>1</show_in_store>
1701
  </is_test_mode>
1702
- </fields>
1703
- </hipay_ideal>
1704
- <hipay_ing translate="label" module="hipay">
1705
- <label>HiPay Fullservice ING Home'Pay</label>
1706
  <frontend_type>text</frontend_type>
1707
  <sort_order>220</sort_order>
1708
  <show_in_default>1</show_in_default>
1709
  <show_in_website>1</show_in_website>
1710
  <show_in_store>1</show_in_store>
1711
  <fields>
1712
- <active translate="label">
1713
- <label>Enabled</label>
1714
- <frontend_type>select</frontend_type>
1715
- <source_model>adminhtml/system_config_source_yesno</source_model>
1716
- <sort_order>10</sort_order>
1717
- <show_in_default>1</show_in_default>
1718
- <show_in_website>1</show_in_website>
1719
- <show_in_store>1</show_in_store>
1720
- </active>
1721
- <title translate="label">
1722
- <label>Title</label>
1723
- <frontend_type>text</frontend_type>
1724
- <sort_order>20</sort_order>
1725
- <show_in_default>1</show_in_default>
1726
- <show_in_website>1</show_in_website>
1727
- <show_in_store>1</show_in_store>
1728
- </title>
1729
  <order_status_payment_accepted translate="label">
1730
  <label>Order status when payment accepted</label>
1731
  <frontend_type>select</frontend_type>
@@ -1753,7 +2006,7 @@
1753
  <show_in_website>1</show_in_website>
1754
  <show_in_store>0</show_in_store>
1755
  </order_status_payment_canceled>
1756
- <hipay_status_validate_order translate="label">
1757
  <label>Hipay status to validate order</label>
1758
  <frontend_type>select</frontend_type>
1759
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -1764,44 +2017,56 @@
1764
  </hipay_status_validate_order>
1765
  <success_redirect_page translate="label">
1766
  <label>Redirect page success</label>
1767
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
1768
  <frontend_type>text</frontend_type>
1769
- <sort_order>26</sort_order>
1770
  <show_in_default>1</show_in_default>
1771
  <show_in_website>1</show_in_website>
1772
  <show_in_store>0</show_in_store>
1773
  </success_redirect_page>
1774
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
1775
  <label>Redirect page pending status</label>
1776
  <comment>Page to redirect when transaction is in pending status</comment>
1777
  <frontend_type>select</frontend_type>
1778
  <source_model>hipay/source_pendingredirect</source_model>
1779
- <sort_order>27</sort_order>
1780
  <show_in_default>1</show_in_default>
1781
  <show_in_website>1</show_in_website>
1782
  <show_in_store>0</show_in_store>
1783
  </pending_redirect_page>
1784
  <css_url translate="label coment">
1785
- <label>Css Url</label>
1786
- <comment>Important, HTTPS protocol is required</comment>
1787
- <frontend_type>text</frontend_type>
1788
- <sort_order>30</sort_order>
1789
- <show_in_default>1</show_in_default>
1790
- <show_in_website>1</show_in_website>
1791
- <show_in_store>1</show_in_store>
1792
  </css_url>
1793
  <template translate="label">
1794
- <label>Page payment template</label>
1795
  <frontend_type>select</frontend_type>
1796
  <source_model>hipay/source_template</source_model>
1797
  <sort_order>35</sort_order>
1798
  <show_in_default>1</show_in_default>
1799
  <show_in_website>1</show_in_website>
1800
- <show_in_store>0</show_in_store>
1801
  </template>
1802
- <re_add_to_cart translate="label comment">
1803
- <label>Add product to cart</label>
1804
- <comment>Fill cart when payment canceled or refused</comment>
1805
  <frontend_type>select</frontend_type>
1806
  <source_model>adminhtml/system_config_source_yesno</source_model>
1807
  <sort_order>95</sort_order>
@@ -1810,25 +2075,34 @@
1810
  <show_in_store>0</show_in_store>
1811
  </re_add_to_cart>
1812
  <cancel_pending_order translate="label comment">
1813
- <label>Cancel pending order</label>
1814
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
1815
  <frontend_type>select</frontend_type>
1816
  <source_model>adminhtml/system_config_source_yesno</source_model>
1817
  <sort_order>97</sort_order>
1818
  <show_in_default>1</show_in_default>
1819
  <show_in_website>1</show_in_website>
1820
  <show_in_store>0</show_in_store>
1821
- </cancel_pending_order>
1822
- <send_fraud_payment_email translate="label">
1823
- <label>Send fraud payment email</label>
1824
- <frontend_type>select</frontend_type>
1825
- <source_model>adminhtml/system_config_source_yesno</source_model>
1826
- <sort_order>99</sort_order>
1827
- <show_in_default>1</show_in_default>
1828
- <show_in_website>1</show_in_website>
1829
- <show_in_store>1</show_in_store>
1830
- </send_fraud_payment_email>
1831
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
1832
  <label>Payment from applicable countries</label>
1833
  <frontend_type>allowspecific</frontend_type>
1834
  <sort_order>100</sort_order>
@@ -1871,8 +2145,8 @@
1871
  <show_in_store>1</show_in_store>
1872
  </sort_order>
1873
  <debug translate="label">
1874
- <label>Enable debug log</label>
1875
- <comment></comment>
1876
  <frontend_type>select</frontend_type>
1877
  <source_model>adminhtml/system_config_source_yesno</source_model>
1878
  <sort_order>150</sort_order>
@@ -1880,9 +2154,9 @@
1880
  <show_in_website>1</show_in_website>
1881
  <show_in_store>0</show_in_store>
1882
  </debug>
1883
- <is_test_mode translate="label comment">
1884
- <label>Enable test mode</label>
1885
- <comment></comment>
1886
  <frontend_type>select</frontend_type>
1887
  <source_model>adminhtml/system_config_source_yesno</source_model>
1888
  <sort_order>200</sort_order>
@@ -1890,33 +2164,33 @@
1890
  <show_in_website>1</show_in_website>
1891
  <show_in_store>1</show_in_store>
1892
  </is_test_mode>
1893
- </fields>
1894
- </hipay_ing>
1895
- <hipay_dexia translate="label" module="hipay">
1896
- <label>HiPay Fullservice Belfius / Dexia Direct Net</label>
1897
  <frontend_type>text</frontend_type>
1898
  <sort_order>220</sort_order>
1899
  <show_in_default>1</show_in_default>
1900
  <show_in_website>1</show_in_website>
1901
  <show_in_store>1</show_in_store>
1902
  <fields>
1903
- <active translate="label">
1904
- <label>Enabled</label>
1905
- <frontend_type>select</frontend_type>
1906
- <source_model>adminhtml/system_config_source_yesno</source_model>
1907
- <sort_order>10</sort_order>
1908
- <show_in_default>1</show_in_default>
1909
- <show_in_website>1</show_in_website>
1910
- <show_in_store>1</show_in_store>
1911
- </active>
1912
- <title translate="label">
1913
- <label>Title</label>
1914
- <frontend_type>text</frontend_type>
1915
- <sort_order>20</sort_order>
1916
- <show_in_default>1</show_in_default>
1917
- <show_in_website>1</show_in_website>
1918
- <show_in_store>1</show_in_store>
1919
- </title>
1920
  <order_status_payment_accepted translate="label">
1921
  <label>Order status when payment accepted</label>
1922
  <frontend_type>select</frontend_type>
@@ -1944,7 +2218,7 @@
1944
  <show_in_website>1</show_in_website>
1945
  <show_in_store>0</show_in_store>
1946
  </order_status_payment_canceled>
1947
- <hipay_status_validate_order translate="label">
1948
  <label>Hipay status to validate order</label>
1949
  <frontend_type>select</frontend_type>
1950
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -1955,44 +2229,56 @@
1955
  </hipay_status_validate_order>
1956
  <success_redirect_page translate="label">
1957
  <label>Redirect page success</label>
1958
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
1959
  <frontend_type>text</frontend_type>
1960
- <sort_order>26</sort_order>
1961
  <show_in_default>1</show_in_default>
1962
  <show_in_website>1</show_in_website>
1963
  <show_in_store>0</show_in_store>
1964
  </success_redirect_page>
1965
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
1966
  <label>Redirect page pending status</label>
1967
  <comment>Page to redirect when transaction is in pending status</comment>
1968
  <frontend_type>select</frontend_type>
1969
  <source_model>hipay/source_pendingredirect</source_model>
1970
- <sort_order>27</sort_order>
1971
  <show_in_default>1</show_in_default>
1972
  <show_in_website>1</show_in_website>
1973
  <show_in_store>0</show_in_store>
1974
  </pending_redirect_page>
1975
  <css_url translate="label coment">
1976
- <label>Css Url</label>
1977
- <comment>Important, HTTPS protocol is required</comment>
1978
- <frontend_type>text</frontend_type>
1979
- <sort_order>30</sort_order>
1980
- <show_in_default>1</show_in_default>
1981
- <show_in_website>1</show_in_website>
1982
- <show_in_store>1</show_in_store>
1983
  </css_url>
1984
  <template translate="label">
1985
- <label>Page payment template</label>
1986
  <frontend_type>select</frontend_type>
1987
  <source_model>hipay/source_template</source_model>
1988
  <sort_order>35</sort_order>
1989
  <show_in_default>1</show_in_default>
1990
  <show_in_website>1</show_in_website>
1991
- <show_in_store>0</show_in_store>
1992
  </template>
1993
- <re_add_to_cart translate="label comment">
1994
- <label>Add product to cart</label>
1995
- <comment>Fill cart when payment canceled or refused</comment>
1996
  <frontend_type>select</frontend_type>
1997
  <source_model>adminhtml/system_config_source_yesno</source_model>
1998
  <sort_order>95</sort_order>
@@ -2001,25 +2287,34 @@
2001
  <show_in_store>0</show_in_store>
2002
  </re_add_to_cart>
2003
  <cancel_pending_order translate="label comment">
2004
- <label>Cancel pending order</label>
2005
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
2006
  <frontend_type>select</frontend_type>
2007
  <source_model>adminhtml/system_config_source_yesno</source_model>
2008
  <sort_order>97</sort_order>
2009
  <show_in_default>1</show_in_default>
2010
  <show_in_website>1</show_in_website>
2011
  <show_in_store>0</show_in_store>
2012
- </cancel_pending_order>
2013
- <send_fraud_payment_email translate="label">
2014
- <label>Send fraud payment email</label>
2015
- <frontend_type>select</frontend_type>
2016
- <source_model>adminhtml/system_config_source_yesno</source_model>
2017
- <sort_order>99</sort_order>
2018
- <show_in_default>1</show_in_default>
2019
- <show_in_website>1</show_in_website>
2020
- <show_in_store>1</show_in_store>
2021
- </send_fraud_payment_email>
2022
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
2023
  <label>Payment from applicable countries</label>
2024
  <frontend_type>allowspecific</frontend_type>
2025
  <sort_order>100</sort_order>
@@ -2062,8 +2357,8 @@
2062
  <show_in_store>1</show_in_store>
2063
  </sort_order>
2064
  <debug translate="label">
2065
- <label>Enable debug log</label>
2066
- <comment></comment>
2067
  <frontend_type>select</frontend_type>
2068
  <source_model>adminhtml/system_config_source_yesno</source_model>
2069
  <sort_order>150</sort_order>
@@ -2071,9 +2366,9 @@
2071
  <show_in_website>1</show_in_website>
2072
  <show_in_store>0</show_in_store>
2073
  </debug>
2074
- <is_test_mode translate="label comment">
2075
- <label>Enable test mode</label>
2076
- <comment></comment>
2077
  <frontend_type>select</frontend_type>
2078
  <source_model>adminhtml/system_config_source_yesno</source_model>
2079
  <sort_order>200</sort_order>
@@ -2081,397 +2376,397 @@
2081
  <show_in_website>1</show_in_website>
2082
  <show_in_store>1</show_in_store>
2083
  </is_test_mode>
2084
- </fields>
2085
- </hipay_dexia>
2086
- <!-- <hipay_cbc translate="label" module="hipay"> -->
2087
- <!-- <label>HiPay Fullservice CBC Online</label> -->
2088
- <!-- <frontend_type>text</frontend_type> -->
2089
- <!-- <sort_order>220</sort_order> -->
2090
- <!-- <show_in_default>1</show_in_default> -->
2091
- <!-- <show_in_website>1</show_in_website> -->
2092
- <!-- <show_in_store>1</show_in_store> -->
2093
- <!-- <fields> -->
2094
- <!-- <active translate="label"> -->
2095
- <!-- <label>Enabled</label> -->
2096
- <!-- <frontend_type>select</frontend_type> -->
2097
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2098
- <!-- <sort_order>10</sort_order> -->
2099
- <!-- <show_in_default>1</show_in_default> -->
2100
- <!-- <show_in_website>1</show_in_website> -->
2101
- <!-- <show_in_store>1</show_in_store> -->
2102
- <!-- </active> -->
2103
- <!-- <title translate="label"> -->
2104
- <!-- <label>Title</label> -->
2105
- <!-- <frontend_type>text</frontend_type> -->
2106
- <!-- <sort_order>20</sort_order> -->
2107
- <!-- <show_in_default>1</show_in_default> -->
2108
- <!-- <show_in_website>1</show_in_website> -->
2109
- <!-- <show_in_store>1</show_in_store> -->
2110
- <!-- </title> -->
2111
- <!-- <order_status_payment_accepted translate="label"> -->
2112
- <!-- <label>Order status when payment accepted</label> -->
2113
- <!-- <frontend_type>select</frontend_type> -->
2114
- <!-- <source_model>hipay/source_order_status_accepted</source_model> -->
2115
- <!-- <sort_order>23</sort_order> -->
2116
- <!-- <show_in_default>1</show_in_default> -->
2117
- <!-- <show_in_website>1</show_in_website> -->
2118
- <!-- <show_in_store>0</show_in_store> -->
2119
- <!-- </order_status_payment_accepted> -->
2120
- <!-- <order_status_payment_refused translate="label"> -->
2121
- <!-- <label>Order status when payment refused</label> -->
2122
- <!-- <frontend_type>select</frontend_type> -->
2123
- <!-- <source_model>hipay/source_order_status_refused</source_model> -->
2124
- <!-- <sort_order>24</sort_order> -->
2125
- <!-- <show_in_default>1</show_in_default> -->
2126
- <!-- <show_in_website>1</show_in_website> -->
2127
- <!-- <show_in_store>0</show_in_store> -->
2128
- <!-- </order_status_payment_refused> -->
2129
- <!-- <order_status_payment_canceled translate="label"> -->
2130
- <!-- <label>Order status when payment canceled by customer</label> -->
2131
- <!-- <frontend_type>select</frontend_type> -->
2132
- <!-- <source_model>hipay/source_order_status_canceled</source_model> -->
2133
- <!-- <sort_order>25</sort_order> -->
2134
- <!-- <show_in_default>1</show_in_default> -->
2135
- <!-- <show_in_website>1</show_in_website> -->
2136
- <!-- <show_in_store>0</show_in_store> -->
2137
- <!-- </order_status_payment_canceled> -->
2138
- <!-- <hipay_status_validate_order translate="label"> -->
2139
- <!-- <label>Hipay status to validate order</label> -->
2140
- <!-- <frontend_type>select</frontend_type> -->
2141
- <!-- <source_model>hipay/source_order_hipayStatusValidate</source_model> -->
2142
- <!-- <sort_order>26</sort_order> -->
2143
- <!-- <show_in_default>1</show_in_default> -->
2144
- <!-- <show_in_website>1</show_in_website> -->
2145
- <!-- <show_in_store>0</show_in_store> -->
2146
- <!-- </hipay_status_validate_order> -->
2147
- <!-- <pending_redirect_page translate="label"> -->
2148
- <!-- <label>Redirect page pending status</label> -->
2149
- <!-- <comment>Page to redirect when transaction is in pending status</comment> -->
2150
- <!-- <frontend_type>select</frontend_type> -->
2151
- <!-- <source_model>hipay/source_pendingredirect</source_model> -->
2152
- <!-- <sort_order>27</sort_order> -->
2153
- <!-- <show_in_default>1</show_in_default> -->
2154
- <!-- <show_in_website>1</show_in_website> -->
2155
- <!-- <show_in_store>0</show_in_store> -->
2156
- <!-- </pending_redirect_page> -->
2157
- <!-- <css_url translate="label coment"> -->
2158
- <!-- <label>Css Url</label> -->
2159
- <!-- <comment>Important, HTTPS protocol is required</comment> -->
2160
- <!-- <frontend_type>text</frontend_type> -->
2161
- <!-- <sort_order>30</sort_order> -->
2162
- <!-- <show_in_default>1</show_in_default> -->
2163
- <!-- <show_in_website>1</show_in_website> -->
2164
- <!-- <show_in_store>1</show_in_store> -->
2165
- <!-- </css_url> -->
2166
- <!-- <template translate="label"> -->
2167
- <!-- <label>Page payment template</label> -->
2168
- <!-- <frontend_type>select</frontend_type> -->
2169
- <!-- <source_model>hipay/source_template</source_model> -->
2170
- <!-- <sort_order>35</sort_order> -->
2171
- <!-- <show_in_default>1</show_in_default> -->
2172
- <!-- <show_in_website>1</show_in_website> -->
2173
- <!-- <show_in_store>0</show_in_store> -->
2174
- <!-- </template> -->
2175
- <!-- <re_add_to_cart translate="label comment"> -->
2176
- <!-- <label>Add product to cart</label> -->
2177
- <!-- <comment>Fill cart when payment canceled or refused</comment> -->
2178
- <!-- <frontend_type>select</frontend_type> -->
2179
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2180
- <!-- <sort_order>95</sort_order> -->
2181
- <!-- <show_in_default>1</show_in_default> -->
2182
- <!-- <show_in_website>1</show_in_website> -->
2183
- <!-- <show_in_store>0</show_in_store> -->
2184
- <!-- </re_add_to_cart> -->
2185
- <!-- <cancel_pending_order translate="label comment"> -->
2186
- <!-- <label>Cancel pending order</label> -->
2187
- <!-- <comment>Cancel orders stayed in pending because customer not validated payment</comment> -->
2188
- <!-- <frontend_type>select</frontend_type> -->
2189
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2190
- <!-- <sort_order>97</sort_order> -->
2191
- <!-- <show_in_default>1</show_in_default> -->
2192
- <!-- <show_in_website>1</show_in_website> -->
2193
- <!-- <show_in_store>0</show_in_store> -->
2194
- <!-- </cancel_pending_order> -->
2195
- <!-- <send_fraud_payment_email translate="label"> -->
2196
- <!-- <label>Send fraud payment email</label> -->
2197
- <!-- <frontend_type>select</frontend_type> -->
2198
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2199
- <!-- <sort_order>99</sort_order> -->
2200
- <!-- <show_in_default>1</show_in_default> -->
2201
- <!-- <show_in_website>1</show_in_website> -->
2202
- <!-- <show_in_store>1</show_in_store> -->
2203
- <!-- </send_fraud_payment_email> -->
2204
- <!-- <allowspecific translate="label"> -->
2205
- <!-- <label>Payment from applicable countries</label> -->
2206
- <!-- <frontend_type>allowspecific</frontend_type> -->
2207
- <!-- <sort_order>100</sort_order> -->
2208
- <!-- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model> -->
2209
- <!-- <show_in_default>1</show_in_default> -->
2210
- <!-- <show_in_website>1</show_in_website> -->
2211
- <!-- <show_in_store>1</show_in_store> -->
2212
- <!-- </allowspecific> -->
2213
- <!-- <specificcountry translate="label"> -->
2214
- <!-- <label>Payment from Specific countries</label> -->
2215
- <!-- <frontend_type>multiselect</frontend_type> -->
2216
- <!-- <sort_order>110</sort_order> -->
2217
- <!-- <source_model>adminhtml/system_config_source_country</source_model> -->
2218
- <!-- <show_in_default>1</show_in_default> -->
2219
- <!-- <show_in_website>1</show_in_website> -->
2220
- <!-- <show_in_store>1</show_in_store> -->
2221
- <!-- </specificcountry> -->
2222
- <!-- <min_order_total translate="label"> -->
2223
- <!-- <label>Minimum Order Total</label> -->
2224
- <!-- <frontend_type>text</frontend_type> -->
2225
- <!-- <sort_order>120</sort_order> -->
2226
- <!-- <show_in_default>1</show_in_default> -->
2227
- <!-- <show_in_website>1</show_in_website> -->
2228
- <!-- <show_in_store>1</show_in_store> -->
2229
- <!-- </min_order_total> -->
2230
- <!-- <max_order_total translate="label"> -->
2231
- <!-- <label>Maximum Order Total</label> -->
2232
- <!-- <frontend_type>text</frontend_type> -->
2233
- <!-- <sort_order>121</sort_order> -->
2234
- <!-- <show_in_default>1</show_in_default> -->
2235
- <!-- <show_in_website>1</show_in_website> -->
2236
- <!-- <show_in_store>1</show_in_store> -->
2237
- <!-- </max_order_total> -->
2238
- <!-- <sort_order translate="label"> -->
2239
- <!-- <label>Sort Order</label> -->
2240
- <!-- <frontend_type>text</frontend_type> -->
2241
- <!-- <sort_order>130</sort_order> -->
2242
- <!-- <show_in_default>1</show_in_default> -->
2243
- <!-- <show_in_website>1</show_in_website> -->
2244
- <!-- <show_in_store>1</show_in_store> -->
2245
- <!-- </sort_order> -->
2246
- <!-- <debug translate="label"> -->
2247
- <!-- <label>Enable debug log</label> -->
2248
- <!-- <comment></comment> -->
2249
- <!-- <frontend_type>select</frontend_type> -->
2250
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2251
- <!-- <sort_order>150</sort_order> -->
2252
- <!-- <show_in_default>1</show_in_default> -->
2253
- <!-- <show_in_website>1</show_in_website> -->
2254
- <!-- <show_in_store>0</show_in_store> -->
2255
- <!-- </debug> -->
2256
- <!-- <is_test_mode translate="label comment"> -->
2257
- <!-- <label>Enable test mode</label> -->
2258
- <!-- <comment></comment> -->
2259
- <!-- <frontend_type>select</frontend_type> -->
2260
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2261
- <!-- <sort_order>200</sort_order> -->
2262
- <!-- <show_in_default>1</show_in_default> -->
2263
- <!-- <show_in_website>1</show_in_website> -->
2264
- <!-- <show_in_store>1</show_in_store> -->
2265
- <!-- </is_test_mode> -->
2266
- <!-- </fields> -->
2267
- <!-- </hipay_cbc> -->
2268
- <!-- <hipay_kbc translate="label" module="hipay"> -->
2269
- <!-- <label>HiPay Fullservice KBC Online</label> -->
2270
- <!-- <frontend_type>text</frontend_type> -->
2271
- <!-- <sort_order>220</sort_order> -->
2272
- <!-- <show_in_default>1</show_in_default> -->
2273
- <!-- <show_in_website>1</show_in_website> -->
2274
- <!-- <show_in_store>1</show_in_store> -->
2275
- <!-- <fields> -->
2276
- <!-- <active translate="label"> -->
2277
- <!-- <label>Enabled</label> -->
2278
- <!-- <frontend_type>select</frontend_type> -->
2279
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2280
- <!-- <sort_order>10</sort_order> -->
2281
- <!-- <show_in_default>1</show_in_default> -->
2282
- <!-- <show_in_website>1</show_in_website> -->
2283
- <!-- <show_in_store>1</show_in_store> -->
2284
- <!-- </active> -->
2285
- <!-- <title translate="label"> -->
2286
- <!-- <label>Title</label> -->
2287
- <!-- <frontend_type>text</frontend_type> -->
2288
- <!-- <sort_order>20</sort_order> -->
2289
- <!-- <show_in_default>1</show_in_default> -->
2290
- <!-- <show_in_website>1</show_in_website> -->
2291
- <!-- <show_in_store>1</show_in_store> -->
2292
- <!-- </title> -->
2293
- <!-- <order_status_payment_accepted translate="label"> -->
2294
- <!-- <label>Order status when payment accepted</label> -->
2295
- <!-- <frontend_type>select</frontend_type> -->
2296
- <!-- <source_model>hipay/source_order_status_accepted</source_model> -->
2297
- <!-- <sort_order>23</sort_order> -->
2298
- <!-- <show_in_default>1</show_in_default> -->
2299
- <!-- <show_in_website>1</show_in_website> -->
2300
- <!-- <show_in_store>0</show_in_store> -->
2301
- <!-- </order_status_payment_accepted> -->
2302
- <!-- <order_status_payment_refused translate="label"> -->
2303
- <!-- <label>Order status when payment refused</label> -->
2304
- <!-- <frontend_type>select</frontend_type> -->
2305
- <!-- <source_model>hipay/source_order_status_refused</source_model> -->
2306
- <!-- <sort_order>24</sort_order> -->
2307
- <!-- <show_in_default>1</show_in_default> -->
2308
- <!-- <show_in_website>1</show_in_website> -->
2309
- <!-- <show_in_store>0</show_in_store> -->
2310
- <!-- </order_status_payment_refused> -->
2311
- <!-- <order_status_payment_canceled translate="label"> -->
2312
- <!-- <label>Order status when payment canceled by customer</label> -->
2313
- <!-- <frontend_type>select</frontend_type> -->
2314
- <!-- <source_model>hipay/source_order_status_canceled</source_model> -->
2315
- <!-- <sort_order>25</sort_order> -->
2316
- <!-- <show_in_default>1</show_in_default> -->
2317
- <!-- <show_in_website>1</show_in_website> -->
2318
- <!-- <show_in_store>0</show_in_store> -->
2319
- <!-- </order_status_payment_canceled> -->
2320
- <!-- <hipay_status_validate_order translate="label"> -->
2321
- <!-- <label>Hipay status to validate order</label> -->
2322
- <!-- <frontend_type>select</frontend_type> -->
2323
- <!-- <source_model>hipay/source_order_hipayStatusValidate</source_model> -->
2324
- <!-- <sort_order>26</sort_order> -->
2325
- <!-- <show_in_default>1</show_in_default> -->
2326
- <!-- <show_in_website>1</show_in_website> -->
2327
- <!-- <show_in_store>0</show_in_store> -->
2328
- <!-- </hipay_status_validate_order> -->
2329
- <!-- <pending_redirect_page translate="label"> -->
2330
- <!-- <label>Redirect page pending status</label> -->
2331
- <!-- <comment>Page to redirect when transaction is in pending status</comment> -->
2332
- <!-- <frontend_type>select</frontend_type> -->
2333
- <!-- <source_model>hipay/source_pendingredirect</source_model> -->
2334
- <!-- <sort_order>27</sort_order> -->
2335
- <!-- <show_in_default>1</show_in_default> -->
2336
- <!-- <show_in_website>1</show_in_website> -->
2337
- <!-- <show_in_store>0</show_in_store> -->
2338
- <!-- </pending_redirect_page> -->
2339
- <!-- <css_url translate="label coment"> -->
2340
- <!-- <label>Css Url</label> -->
2341
- <!-- <comment>Important, HTTPS protocol is required</comment> -->
2342
- <!-- <frontend_type>text</frontend_type> -->
2343
- <!-- <sort_order>30</sort_order> -->
2344
- <!-- <show_in_default>1</show_in_default> -->
2345
- <!-- <show_in_website>1</show_in_website> -->
2346
- <!-- <show_in_store>1</show_in_store> -->
2347
- <!-- </css_url> -->
2348
- <!-- <template translate="label"> -->
2349
- <!-- <label>Page payment template</label> -->
2350
- <!-- <frontend_type>select</frontend_type> -->
2351
- <!-- <source_model>hipay/source_template</source_model> -->
2352
- <!-- <sort_order>35</sort_order> -->
2353
- <!-- <show_in_default>1</show_in_default> -->
2354
- <!-- <show_in_website>1</show_in_website> -->
2355
- <!-- <show_in_store>0</show_in_store> -->
2356
- <!-- </template> -->
2357
- <!-- <re_add_to_cart translate="label comment"> -->
2358
- <!-- <label>Add product to cart</label> -->
2359
- <!-- <comment>Fill cart when payment canceled or refused</comment> -->
2360
- <!-- <frontend_type>select</frontend_type> -->
2361
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2362
- <!-- <sort_order>95</sort_order> -->
2363
- <!-- <show_in_default>1</show_in_default> -->
2364
- <!-- <show_in_website>1</show_in_website> -->
2365
- <!-- <show_in_store>0</show_in_store> -->
2366
- <!-- </re_add_to_cart> -->
2367
- <!-- <cancel_pending_order translate="label comment"> -->
2368
- <!-- <label>Cancel pending order</label> -->
2369
- <!-- <comment>Cancel orders stayed in pending because customer not validated payment</comment> -->
2370
- <!-- <frontend_type>select</frontend_type> -->
2371
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2372
- <!-- <sort_order>97</sort_order> -->
2373
- <!-- <show_in_default>1</show_in_default> -->
2374
- <!-- <show_in_website>1</show_in_website> -->
2375
- <!-- <show_in_store>0</show_in_store> -->
2376
- <!-- </cancel_pending_order> -->
2377
- <!-- <send_fraud_payment_email translate="label"> -->
2378
- <!-- <label>Send fraud payment email</label> -->
2379
- <!-- <frontend_type>select</frontend_type> -->
2380
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2381
- <!-- <sort_order>99</sort_order> -->
2382
- <!-- <show_in_default>1</show_in_default> -->
2383
- <!-- <show_in_website>1</show_in_website> -->
2384
- <!-- <show_in_store>1</show_in_store> -->
2385
- <!-- </send_fraud_payment_email> -->
2386
- <!-- <allowspecific translate="label"> -->
2387
- <!-- <label>Payment from applicable countries</label> -->
2388
- <!-- <frontend_type>allowspecific</frontend_type> -->
2389
- <!-- <sort_order>100</sort_order> -->
2390
- <!-- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model> -->
2391
- <!-- <show_in_default>1</show_in_default> -->
2392
- <!-- <show_in_website>1</show_in_website> -->
2393
- <!-- <show_in_store>1</show_in_store> -->
2394
- <!-- </allowspecific> -->
2395
- <!-- <specificcountry translate="label"> -->
2396
- <!-- <label>Payment from Specific countries</label> -->
2397
- <!-- <frontend_type>multiselect</frontend_type> -->
2398
- <!-- <sort_order>110</sort_order> -->
2399
- <!-- <source_model>adminhtml/system_config_source_country</source_model> -->
2400
- <!-- <show_in_default>1</show_in_default> -->
2401
- <!-- <show_in_website>1</show_in_website> -->
2402
- <!-- <show_in_store>1</show_in_store> -->
2403
- <!-- </specificcountry> -->
2404
- <!-- <min_order_total translate="label"> -->
2405
- <!-- <label>Minimum Order Total</label> -->
2406
- <!-- <frontend_type>text</frontend_type> -->
2407
- <!-- <sort_order>120</sort_order> -->
2408
- <!-- <show_in_default>1</show_in_default> -->
2409
- <!-- <show_in_website>1</show_in_website> -->
2410
- <!-- <show_in_store>1</show_in_store> -->
2411
- <!-- </min_order_total> -->
2412
- <!-- <max_order_total translate="label"> -->
2413
- <!-- <label>Maximum Order Total</label> -->
2414
- <!-- <frontend_type>text</frontend_type> -->
2415
- <!-- <sort_order>121</sort_order> -->
2416
- <!-- <show_in_default>1</show_in_default> -->
2417
- <!-- <show_in_website>1</show_in_website> -->
2418
- <!-- <show_in_store>1</show_in_store> -->
2419
- <!-- </max_order_total> -->
2420
- <!-- <sort_order translate="label"> -->
2421
- <!-- <label>Sort Order</label> -->
2422
- <!-- <frontend_type>text</frontend_type> -->
2423
- <!-- <sort_order>130</sort_order> -->
2424
- <!-- <show_in_default>1</show_in_default> -->
2425
- <!-- <show_in_website>1</show_in_website> -->
2426
- <!-- <show_in_store>1</show_in_store> -->
2427
- <!-- </sort_order> -->
2428
- <!-- <debug translate="label"> -->
2429
- <!-- <label>Enable debug log</label> -->
2430
- <!-- <comment></comment> -->
2431
- <!-- <frontend_type>select</frontend_type> -->
2432
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2433
- <!-- <sort_order>150</sort_order> -->
2434
- <!-- <show_in_default>1</show_in_default> -->
2435
- <!-- <show_in_website>1</show_in_website> -->
2436
- <!-- <show_in_store>0</show_in_store> -->
2437
- <!-- </debug> -->
2438
- <!-- <is_test_mode translate="label comment"> -->
2439
- <!-- <label>Enable test mode</label> -->
2440
- <!-- <comment></comment> -->
2441
- <!-- <frontend_type>select</frontend_type> -->
2442
- <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2443
- <!-- <sort_order>200</sort_order> -->
2444
- <!-- <show_in_default>1</show_in_default> -->
2445
- <!-- <show_in_website>1</show_in_website> -->
2446
- <!-- <show_in_store>1</show_in_store> -->
2447
- <!-- </is_test_mode> -->
2448
- <!-- </fields> -->
2449
- <!-- </hipay_kbc> -->
2450
- <hipay_giropay translate="label" module="hipay">
2451
- <label>HiPay Fullservice Giropay</label>
2452
  <frontend_type>text</frontend_type>
2453
  <sort_order>220</sort_order>
2454
  <show_in_default>1</show_in_default>
2455
  <show_in_website>1</show_in_website>
2456
  <show_in_store>1</show_in_store>
2457
  <fields>
2458
- <active translate="label">
2459
- <label>Enabled</label>
2460
- <frontend_type>select</frontend_type>
2461
- <source_model>adminhtml/system_config_source_yesno</source_model>
2462
- <sort_order>10</sort_order>
2463
- <show_in_default>1</show_in_default>
2464
- <show_in_website>1</show_in_website>
2465
- <show_in_store>1</show_in_store>
2466
- </active>
2467
- <title translate="label">
2468
- <label>Title</label>
2469
- <frontend_type>text</frontend_type>
2470
- <sort_order>20</sort_order>
2471
- <show_in_default>1</show_in_default>
2472
- <show_in_website>1</show_in_website>
2473
- <show_in_store>1</show_in_store>
2474
- </title>
2475
  <order_status_payment_accepted translate="label">
2476
  <label>Order status when payment accepted</label>
2477
  <frontend_type>select</frontend_type>
@@ -2499,7 +2794,7 @@
2499
  <show_in_website>1</show_in_website>
2500
  <show_in_store>0</show_in_store>
2501
  </order_status_payment_canceled>
2502
- <hipay_status_validate_order translate="label">
2503
  <label>Hipay status to validate order</label>
2504
  <frontend_type>select</frontend_type>
2505
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -2510,44 +2805,56 @@
2510
  </hipay_status_validate_order>
2511
  <success_redirect_page translate="label">
2512
  <label>Redirect page success</label>
2513
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
2514
  <frontend_type>text</frontend_type>
2515
- <sort_order>26</sort_order>
2516
  <show_in_default>1</show_in_default>
2517
  <show_in_website>1</show_in_website>
2518
  <show_in_store>0</show_in_store>
2519
  </success_redirect_page>
2520
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
2521
  <label>Redirect page pending status</label>
2522
  <comment>Page to redirect when transaction is in pending status</comment>
2523
  <frontend_type>select</frontend_type>
2524
  <source_model>hipay/source_pendingredirect</source_model>
2525
- <sort_order>27</sort_order>
2526
  <show_in_default>1</show_in_default>
2527
  <show_in_website>1</show_in_website>
2528
  <show_in_store>0</show_in_store>
2529
  </pending_redirect_page>
2530
  <css_url translate="label coment">
2531
- <label>Css Url</label>
2532
- <comment>Important, HTTPS protocol is required</comment>
2533
- <frontend_type>text</frontend_type>
2534
- <sort_order>30</sort_order>
2535
- <show_in_default>1</show_in_default>
2536
- <show_in_website>1</show_in_website>
2537
- <show_in_store>1</show_in_store>
2538
  </css_url>
2539
  <template translate="label">
2540
- <label>Page payment template</label>
2541
  <frontend_type>select</frontend_type>
2542
  <source_model>hipay/source_template</source_model>
2543
  <sort_order>35</sort_order>
2544
  <show_in_default>1</show_in_default>
2545
  <show_in_website>1</show_in_website>
2546
- <show_in_store>0</show_in_store>
2547
  </template>
2548
- <re_add_to_cart translate="label comment">
2549
- <label>Add product to cart</label>
2550
- <comment>Fill cart when payment canceled or refused</comment>
2551
  <frontend_type>select</frontend_type>
2552
  <source_model>adminhtml/system_config_source_yesno</source_model>
2553
  <sort_order>95</sort_order>
@@ -2556,25 +2863,34 @@
2556
  <show_in_store>0</show_in_store>
2557
  </re_add_to_cart>
2558
  <cancel_pending_order translate="label comment">
2559
- <label>Cancel pending order</label>
2560
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
2561
  <frontend_type>select</frontend_type>
2562
  <source_model>adminhtml/system_config_source_yesno</source_model>
2563
  <sort_order>97</sort_order>
2564
  <show_in_default>1</show_in_default>
2565
  <show_in_website>1</show_in_website>
2566
  <show_in_store>0</show_in_store>
2567
- </cancel_pending_order>
2568
- <send_fraud_payment_email translate="label">
2569
- <label>Send fraud payment email</label>
2570
- <frontend_type>select</frontend_type>
2571
- <source_model>adminhtml/system_config_source_yesno</source_model>
2572
- <sort_order>99</sort_order>
2573
- <show_in_default>1</show_in_default>
2574
- <show_in_website>1</show_in_website>
2575
- <show_in_store>1</show_in_store>
2576
- </send_fraud_payment_email>
2577
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
2578
  <label>Payment from applicable countries</label>
2579
  <frontend_type>allowspecific</frontend_type>
2580
  <sort_order>100</sort_order>
@@ -2617,8 +2933,8 @@
2617
  <show_in_store>1</show_in_store>
2618
  </sort_order>
2619
  <debug translate="label">
2620
- <label>Enable debug log</label>
2621
- <comment></comment>
2622
  <frontend_type>select</frontend_type>
2623
  <source_model>adminhtml/system_config_source_yesno</source_model>
2624
  <sort_order>150</sort_order>
@@ -2626,9 +2942,9 @@
2626
  <show_in_website>1</show_in_website>
2627
  <show_in_store>0</show_in_store>
2628
  </debug>
2629
- <is_test_mode translate="label comment">
2630
- <label>Enable test mode</label>
2631
- <comment></comment>
2632
  <frontend_type>select</frontend_type>
2633
  <source_model>adminhtml/system_config_source_yesno</source_model>
2634
  <sort_order>200</sort_order>
@@ -2636,33 +2952,33 @@
2636
  <show_in_website>1</show_in_website>
2637
  <show_in_store>1</show_in_store>
2638
  </is_test_mode>
2639
- </fields>
2640
- </hipay_giropay>
2641
- <hipay_przelewy24api translate="label" module="hipay">
2642
- <label>HiPay Fullservice Przelewy24</label>
2643
  <frontend_type>text</frontend_type>
2644
  <sort_order>220</sort_order>
2645
  <show_in_default>1</show_in_default>
2646
  <show_in_website>1</show_in_website>
2647
  <show_in_store>1</show_in_store>
2648
  <fields>
2649
- <active translate="label">
2650
- <label>Enabled</label>
2651
- <frontend_type>select</frontend_type>
2652
- <source_model>adminhtml/system_config_source_yesno</source_model>
2653
- <sort_order>10</sort_order>
2654
- <show_in_default>1</show_in_default>
2655
- <show_in_website>1</show_in_website>
2656
- <show_in_store>1</show_in_store>
2657
- </active>
2658
- <title translate="label">
2659
- <label>Title</label>
2660
- <frontend_type>text</frontend_type>
2661
- <sort_order>20</sort_order>
2662
- <show_in_default>1</show_in_default>
2663
- <show_in_website>1</show_in_website>
2664
- <show_in_store>1</show_in_store>
2665
- </title>
2666
  <order_status_payment_accepted translate="label">
2667
  <label>Order status when payment accepted</label>
2668
  <frontend_type>select</frontend_type>
@@ -2690,7 +3006,7 @@
2690
  <show_in_website>1</show_in_website>
2691
  <show_in_store>0</show_in_store>
2692
  </order_status_payment_canceled>
2693
- <hipay_status_validate_order translate="label">
2694
  <label>Hipay status to validate order</label>
2695
  <frontend_type>select</frontend_type>
2696
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -2701,44 +3017,56 @@
2701
  </hipay_status_validate_order>
2702
  <success_redirect_page translate="label">
2703
  <label>Redirect page success</label>
2704
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
2705
  <frontend_type>text</frontend_type>
2706
- <sort_order>26</sort_order>
2707
  <show_in_default>1</show_in_default>
2708
  <show_in_website>1</show_in_website>
2709
  <show_in_store>0</show_in_store>
2710
  </success_redirect_page>
2711
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
2712
  <label>Redirect page pending status</label>
2713
  <comment>Page to redirect when transaction is in pending status</comment>
2714
  <frontend_type>select</frontend_type>
2715
  <source_model>hipay/source_pendingredirect</source_model>
2716
- <sort_order>27</sort_order>
2717
  <show_in_default>1</show_in_default>
2718
  <show_in_website>1</show_in_website>
2719
  <show_in_store>0</show_in_store>
2720
  </pending_redirect_page>
2721
  <css_url translate="label coment">
2722
- <label>Css Url</label>
2723
- <comment>Important, HTTPS protocol is required</comment>
2724
- <frontend_type>text</frontend_type>
2725
- <sort_order>30</sort_order>
2726
- <show_in_default>1</show_in_default>
2727
- <show_in_website>1</show_in_website>
2728
- <show_in_store>1</show_in_store>
2729
  </css_url>
2730
  <template translate="label">
2731
- <label>Page payment template</label>
2732
  <frontend_type>select</frontend_type>
2733
  <source_model>hipay/source_template</source_model>
2734
  <sort_order>35</sort_order>
2735
  <show_in_default>1</show_in_default>
2736
  <show_in_website>1</show_in_website>
2737
- <show_in_store>0</show_in_store>
2738
  </template>
2739
- <re_add_to_cart translate="label comment">
2740
- <label>Add product to cart</label>
2741
- <comment>Fill cart when payment canceled or refused</comment>
2742
  <frontend_type>select</frontend_type>
2743
  <source_model>adminhtml/system_config_source_yesno</source_model>
2744
  <sort_order>95</sort_order>
@@ -2747,25 +3075,34 @@
2747
  <show_in_store>0</show_in_store>
2748
  </re_add_to_cart>
2749
  <cancel_pending_order translate="label comment">
2750
- <label>Cancel pending order</label>
2751
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
2752
  <frontend_type>select</frontend_type>
2753
  <source_model>adminhtml/system_config_source_yesno</source_model>
2754
  <sort_order>97</sort_order>
2755
  <show_in_default>1</show_in_default>
2756
  <show_in_website>1</show_in_website>
2757
  <show_in_store>0</show_in_store>
2758
- </cancel_pending_order>
2759
- <send_fraud_payment_email translate="label">
2760
- <label>Send fraud payment email</label>
2761
- <frontend_type>select</frontend_type>
2762
- <source_model>adminhtml/system_config_source_yesno</source_model>
2763
- <sort_order>99</sort_order>
2764
- <show_in_default>1</show_in_default>
2765
- <show_in_website>1</show_in_website>
2766
- <show_in_store>1</show_in_store>
2767
- </send_fraud_payment_email>
2768
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
2769
  <label>Payment from applicable countries</label>
2770
  <frontend_type>allowspecific</frontend_type>
2771
  <sort_order>100</sort_order>
@@ -2808,8 +3145,8 @@
2808
  <show_in_store>1</show_in_store>
2809
  </sort_order>
2810
  <debug translate="label">
2811
- <label>Enable debug log</label>
2812
- <comment></comment>
2813
  <frontend_type>select</frontend_type>
2814
  <source_model>adminhtml/system_config_source_yesno</source_model>
2815
  <sort_order>150</sort_order>
@@ -2817,9 +3154,9 @@
2817
  <show_in_website>1</show_in_website>
2818
  <show_in_store>0</show_in_store>
2819
  </debug>
2820
- <is_test_mode translate="label comment">
2821
- <label>Enable test mode</label>
2822
- <comment></comment>
2823
  <frontend_type>select</frontend_type>
2824
  <source_model>adminhtml/system_config_source_yesno</source_model>
2825
  <sort_order>200</sort_order>
@@ -2827,33 +3164,33 @@
2827
  <show_in_website>1</show_in_website>
2828
  <show_in_store>1</show_in_store>
2829
  </is_test_mode>
2830
- </fields>
2831
- </hipay_przelewy24api>
2832
- <hipay_qiwi translate="label" module="hipay">
2833
- <label>HiPay Fullservice Visa Qiwi Wallet</label>
2834
  <frontend_type>text</frontend_type>
2835
  <sort_order>220</sort_order>
2836
  <show_in_default>1</show_in_default>
2837
  <show_in_website>1</show_in_website>
2838
  <show_in_store>1</show_in_store>
2839
  <fields>
2840
- <active translate="label">
2841
- <label>Enabled</label>
2842
- <frontend_type>select</frontend_type>
2843
- <source_model>adminhtml/system_config_source_yesno</source_model>
2844
- <sort_order>10</sort_order>
2845
- <show_in_default>1</show_in_default>
2846
- <show_in_website>1</show_in_website>
2847
- <show_in_store>1</show_in_store>
2848
- </active>
2849
- <title translate="label">
2850
- <label>Title</label>
2851
- <frontend_type>text</frontend_type>
2852
- <sort_order>20</sort_order>
2853
- <show_in_default>1</show_in_default>
2854
- <show_in_website>1</show_in_website>
2855
- <show_in_store>1</show_in_store>
2856
- </title>
2857
  <order_status_payment_accepted translate="label">
2858
  <label>Order status when payment accepted</label>
2859
  <frontend_type>select</frontend_type>
@@ -2881,7 +3218,7 @@
2881
  <show_in_website>1</show_in_website>
2882
  <show_in_store>0</show_in_store>
2883
  </order_status_payment_canceled>
2884
- <hipay_status_validate_order translate="label">
2885
  <label>Hipay status to validate order</label>
2886
  <frontend_type>select</frontend_type>
2887
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -2892,44 +3229,56 @@
2892
  </hipay_status_validate_order>
2893
  <success_redirect_page translate="label">
2894
  <label>Redirect page success</label>
2895
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
2896
  <frontend_type>text</frontend_type>
2897
- <sort_order>26</sort_order>
2898
  <show_in_default>1</show_in_default>
2899
  <show_in_website>1</show_in_website>
2900
  <show_in_store>0</show_in_store>
2901
  </success_redirect_page>
2902
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
2903
  <label>Redirect page pending status</label>
2904
  <comment>Page to redirect when transaction is in pending status</comment>
2905
  <frontend_type>select</frontend_type>
2906
  <source_model>hipay/source_pendingredirect</source_model>
2907
- <sort_order>27</sort_order>
2908
  <show_in_default>1</show_in_default>
2909
  <show_in_website>1</show_in_website>
2910
  <show_in_store>0</show_in_store>
2911
  </pending_redirect_page>
2912
  <css_url translate="label coment">
2913
- <label>Css Url</label>
2914
- <comment>Important, HTTPS protocol is required</comment>
2915
- <frontend_type>text</frontend_type>
2916
- <sort_order>30</sort_order>
2917
- <show_in_default>1</show_in_default>
2918
- <show_in_website>1</show_in_website>
2919
- <show_in_store>1</show_in_store>
2920
  </css_url>
2921
  <template translate="label">
2922
- <label>Page payment template</label>
2923
  <frontend_type>select</frontend_type>
2924
  <source_model>hipay/source_template</source_model>
2925
  <sort_order>35</sort_order>
2926
  <show_in_default>1</show_in_default>
2927
  <show_in_website>1</show_in_website>
2928
- <show_in_store>0</show_in_store>
2929
  </template>
2930
- <re_add_to_cart translate="label comment">
2931
- <label>Add product to cart</label>
2932
- <comment>Fill cart when payment canceled or refused</comment>
2933
  <frontend_type>select</frontend_type>
2934
  <source_model>adminhtml/system_config_source_yesno</source_model>
2935
  <sort_order>95</sort_order>
@@ -2938,25 +3287,34 @@
2938
  <show_in_store>0</show_in_store>
2939
  </re_add_to_cart>
2940
  <cancel_pending_order translate="label comment">
2941
- <label>Cancel pending order</label>
2942
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
2943
  <frontend_type>select</frontend_type>
2944
  <source_model>adminhtml/system_config_source_yesno</source_model>
2945
  <sort_order>97</sort_order>
2946
  <show_in_default>1</show_in_default>
2947
  <show_in_website>1</show_in_website>
2948
  <show_in_store>0</show_in_store>
2949
- </cancel_pending_order>
2950
- <send_fraud_payment_email translate="label">
2951
- <label>Send fraud payment email</label>
2952
- <frontend_type>select</frontend_type>
2953
- <source_model>adminhtml/system_config_source_yesno</source_model>
2954
- <sort_order>99</sort_order>
2955
- <show_in_default>1</show_in_default>
2956
- <show_in_website>1</show_in_website>
2957
- <show_in_store>1</show_in_store>
2958
- </send_fraud_payment_email>
2959
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
2960
  <label>Payment from applicable countries</label>
2961
  <frontend_type>allowspecific</frontend_type>
2962
  <sort_order>100</sort_order>
@@ -2999,8 +3357,8 @@
2999
  <show_in_store>1</show_in_store>
3000
  </sort_order>
3001
  <debug translate="label">
3002
- <label>Enable debug log</label>
3003
- <comment></comment>
3004
  <frontend_type>select</frontend_type>
3005
  <source_model>adminhtml/system_config_source_yesno</source_model>
3006
  <sort_order>150</sort_order>
@@ -3008,9 +3366,9 @@
3008
  <show_in_website>1</show_in_website>
3009
  <show_in_store>0</show_in_store>
3010
  </debug>
3011
- <is_test_mode translate="label comment">
3012
- <label>Enable test mode</label>
3013
- <comment></comment>
3014
  <frontend_type>select</frontend_type>
3015
  <source_model>adminhtml/system_config_source_yesno</source_model>
3016
  <sort_order>200</sort_order>
@@ -3018,33 +3376,33 @@
3018
  <show_in_website>1</show_in_website>
3019
  <show_in_store>1</show_in_store>
3020
  </is_test_mode>
3021
- </fields>
3022
- </hipay_qiwi>
3023
- <hipay_webmoneyapi translate="label" module="hipay">
3024
- <label>HiPay Fullservice WebMoney Transfer</label>
3025
  <frontend_type>text</frontend_type>
3026
  <sort_order>220</sort_order>
3027
  <show_in_default>1</show_in_default>
3028
  <show_in_website>1</show_in_website>
3029
  <show_in_store>1</show_in_store>
3030
  <fields>
3031
- <active translate="label">
3032
- <label>Enabled</label>
3033
- <frontend_type>select</frontend_type>
3034
- <source_model>adminhtml/system_config_source_yesno</source_model>
3035
- <sort_order>10</sort_order>
3036
- <show_in_default>1</show_in_default>
3037
- <show_in_website>1</show_in_website>
3038
- <show_in_store>1</show_in_store>
3039
- </active>
3040
- <title translate="label">
3041
- <label>Title</label>
3042
- <frontend_type>text</frontend_type>
3043
- <sort_order>20</sort_order>
3044
- <show_in_default>1</show_in_default>
3045
- <show_in_website>1</show_in_website>
3046
- <show_in_store>1</show_in_store>
3047
- </title>
3048
  <order_status_payment_accepted translate="label">
3049
  <label>Order status when payment accepted</label>
3050
  <frontend_type>select</frontend_type>
@@ -3072,7 +3430,7 @@
3072
  <show_in_website>1</show_in_website>
3073
  <show_in_store>0</show_in_store>
3074
  </order_status_payment_canceled>
3075
- <hipay_status_validate_order translate="label">
3076
  <label>Hipay status to validate order</label>
3077
  <frontend_type>select</frontend_type>
3078
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -3083,44 +3441,56 @@
3083
  </hipay_status_validate_order>
3084
  <success_redirect_page translate="label">
3085
  <label>Redirect page success</label>
3086
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
3087
  <frontend_type>text</frontend_type>
3088
- <sort_order>26</sort_order>
3089
  <show_in_default>1</show_in_default>
3090
  <show_in_website>1</show_in_website>
3091
  <show_in_store>0</show_in_store>
3092
  </success_redirect_page>
3093
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
3094
  <label>Redirect page pending status</label>
3095
  <comment>Page to redirect when transaction is in pending status</comment>
3096
  <frontend_type>select</frontend_type>
3097
  <source_model>hipay/source_pendingredirect</source_model>
3098
- <sort_order>27</sort_order>
3099
  <show_in_default>1</show_in_default>
3100
  <show_in_website>1</show_in_website>
3101
  <show_in_store>0</show_in_store>
3102
  </pending_redirect_page>
3103
  <css_url translate="label coment">
3104
- <label>Css Url</label>
3105
- <comment>Important, HTTPS protocol is required</comment>
3106
- <frontend_type>text</frontend_type>
3107
- <sort_order>30</sort_order>
3108
- <show_in_default>1</show_in_default>
3109
- <show_in_website>1</show_in_website>
3110
- <show_in_store>1</show_in_store>
3111
  </css_url>
3112
  <template translate="label">
3113
- <label>Page payment template</label>
3114
  <frontend_type>select</frontend_type>
3115
  <source_model>hipay/source_template</source_model>
3116
  <sort_order>35</sort_order>
3117
  <show_in_default>1</show_in_default>
3118
  <show_in_website>1</show_in_website>
3119
- <show_in_store>0</show_in_store>
3120
  </template>
3121
- <re_add_to_cart translate="label comment">
3122
- <label>Add product to cart</label>
3123
- <comment>Fill cart when payment canceled or refused</comment>
3124
  <frontend_type>select</frontend_type>
3125
  <source_model>adminhtml/system_config_source_yesno</source_model>
3126
  <sort_order>95</sort_order>
@@ -3129,25 +3499,34 @@
3129
  <show_in_store>0</show_in_store>
3130
  </re_add_to_cart>
3131
  <cancel_pending_order translate="label comment">
3132
- <label>Cancel pending order</label>
3133
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3134
  <frontend_type>select</frontend_type>
3135
  <source_model>adminhtml/system_config_source_yesno</source_model>
3136
  <sort_order>97</sort_order>
3137
  <show_in_default>1</show_in_default>
3138
  <show_in_website>1</show_in_website>
3139
  <show_in_store>0</show_in_store>
3140
- </cancel_pending_order>
3141
- <send_fraud_payment_email translate="label">
3142
- <label>Send fraud payment email</label>
3143
- <frontend_type>select</frontend_type>
3144
- <source_model>adminhtml/system_config_source_yesno</source_model>
3145
- <sort_order>99</sort_order>
3146
- <show_in_default>1</show_in_default>
3147
- <show_in_website>1</show_in_website>
3148
- <show_in_store>1</show_in_store>
3149
- </send_fraud_payment_email>
3150
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
3151
  <label>Payment from applicable countries</label>
3152
  <frontend_type>allowspecific</frontend_type>
3153
  <sort_order>100</sort_order>
@@ -3190,8 +3569,8 @@
3190
  <show_in_store>1</show_in_store>
3191
  </sort_order>
3192
  <debug translate="label">
3193
- <label>Enable debug log</label>
3194
- <comment></comment>
3195
  <frontend_type>select</frontend_type>
3196
  <source_model>adminhtml/system_config_source_yesno</source_model>
3197
  <sort_order>150</sort_order>
@@ -3199,9 +3578,9 @@
3199
  <show_in_website>1</show_in_website>
3200
  <show_in_store>0</show_in_store>
3201
  </debug>
3202
- <is_test_mode translate="label comment">
3203
- <label>Enable test mode</label>
3204
- <comment></comment>
3205
  <frontend_type>select</frontend_type>
3206
  <source_model>adminhtml/system_config_source_yesno</source_model>
3207
  <sort_order>200</sort_order>
@@ -3209,33 +3588,33 @@
3209
  <show_in_website>1</show_in_website>
3210
  <show_in_store>1</show_in_store>
3211
  </is_test_mode>
3212
- </fields>
3213
- </hipay_webmoneyapi>
3214
- <hipay_yandexapi translate="label" module="hipay">
3215
- <label>HiPay Fullservice Yandex.Money</label>
3216
  <frontend_type>text</frontend_type>
3217
  <sort_order>220</sort_order>
3218
  <show_in_default>1</show_in_default>
3219
  <show_in_website>1</show_in_website>
3220
  <show_in_store>1</show_in_store>
3221
  <fields>
3222
- <active translate="label">
3223
- <label>Enabled</label>
3224
- <frontend_type>select</frontend_type>
3225
- <source_model>adminhtml/system_config_source_yesno</source_model>
3226
- <sort_order>10</sort_order>
3227
- <show_in_default>1</show_in_default>
3228
- <show_in_website>1</show_in_website>
3229
- <show_in_store>1</show_in_store>
3230
- </active>
3231
- <title translate="label">
3232
- <label>Title</label>
3233
- <frontend_type>text</frontend_type>
3234
- <sort_order>20</sort_order>
3235
- <show_in_default>1</show_in_default>
3236
- <show_in_website>1</show_in_website>
3237
- <show_in_store>1</show_in_store>
3238
- </title>
3239
  <order_status_payment_accepted translate="label">
3240
  <label>Order status when payment accepted</label>
3241
  <frontend_type>select</frontend_type>
@@ -3263,7 +3642,7 @@
3263
  <show_in_website>1</show_in_website>
3264
  <show_in_store>0</show_in_store>
3265
  </order_status_payment_canceled>
3266
- <hipay_status_validate_order translate="label">
3267
  <label>Hipay status to validate order</label>
3268
  <frontend_type>select</frontend_type>
3269
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -3274,71 +3653,92 @@
3274
  </hipay_status_validate_order>
3275
  <success_redirect_page translate="label">
3276
  <label>Redirect page success</label>
3277
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
3278
  <frontend_type>text</frontend_type>
3279
- <sort_order>26</sort_order>
3280
  <show_in_default>1</show_in_default>
3281
  <show_in_website>1</show_in_website>
3282
  <show_in_store>0</show_in_store>
3283
  </success_redirect_page>
3284
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
3285
  <label>Redirect page pending status</label>
3286
  <comment>Page to redirect when transaction is in pending status</comment>
3287
  <frontend_type>select</frontend_type>
3288
  <source_model>hipay/source_pendingredirect</source_model>
3289
- <sort_order>27</sort_order>
3290
  <show_in_default>1</show_in_default>
3291
  <show_in_website>1</show_in_website>
3292
  <show_in_store>0</show_in_store>
3293
  </pending_redirect_page>
3294
  <css_url translate="label coment">
3295
- <label>Css Url</label>
3296
- <comment>Important, HTTPS protocol is required</comment>
3297
- <frontend_type>text</frontend_type>
3298
- <sort_order>30</sort_order>
3299
- <show_in_default>1</show_in_default>
3300
- <show_in_website>1</show_in_website>
3301
- <show_in_store>1</show_in_store>
3302
  </css_url>
3303
  <template translate="label">
3304
- <label>Page payment template</label>
3305
  <frontend_type>select</frontend_type>
3306
  <source_model>hipay/source_template</source_model>
3307
  <sort_order>35</sort_order>
3308
  <show_in_default>1</show_in_default>
3309
  <show_in_website>1</show_in_website>
3310
- <show_in_store>0</show_in_store>
3311
  </template>
3312
- <re_add_to_cart translate="label comment">
3313
- <label>Add product to cart</label>
3314
- <comment>Fill cart when payment canceled or refused</comment>
3315
  <frontend_type>select</frontend_type>
3316
  <source_model>adminhtml/system_config_source_yesno</source_model>
3317
  <sort_order>95</sort_order>
3318
  <show_in_default>1</show_in_default>
3319
  <show_in_website>1</show_in_website>
3320
- <show_in_store>0</show_in_store>
3321
  </re_add_to_cart>
3322
  <cancel_pending_order translate="label comment">
3323
- <label>Cancel pending order</label>
3324
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3325
  <frontend_type>select</frontend_type>
3326
  <source_model>adminhtml/system_config_source_yesno</source_model>
3327
  <sort_order>97</sort_order>
3328
  <show_in_default>1</show_in_default>
3329
  <show_in_website>1</show_in_website>
3330
  <show_in_store>0</show_in_store>
3331
- </cancel_pending_order>
3332
- <send_fraud_payment_email translate="label">
3333
- <label>Send fraud payment email</label>
3334
- <frontend_type>select</frontend_type>
3335
- <source_model>adminhtml/system_config_source_yesno</source_model>
3336
- <sort_order>99</sort_order>
3337
- <show_in_default>1</show_in_default>
3338
- <show_in_website>1</show_in_website>
3339
- <show_in_store>1</show_in_store>
3340
- </send_fraud_payment_email>
3341
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
3342
  <label>Payment from applicable countries</label>
3343
  <frontend_type>allowspecific</frontend_type>
3344
  <sort_order>100</sort_order>
@@ -3381,8 +3781,8 @@
3381
  <show_in_store>1</show_in_store>
3382
  </sort_order>
3383
  <debug translate="label">
3384
- <label>Enable debug log</label>
3385
- <comment></comment>
3386
  <frontend_type>select</frontend_type>
3387
  <source_model>adminhtml/system_config_source_yesno</source_model>
3388
  <sort_order>150</sort_order>
@@ -3390,9 +3790,9 @@
3390
  <show_in_website>1</show_in_website>
3391
  <show_in_store>0</show_in_store>
3392
  </debug>
3393
- <is_test_mode translate="label comment">
3394
- <label>Enable test mode</label>
3395
- <comment></comment>
3396
  <frontend_type>select</frontend_type>
3397
  <source_model>adminhtml/system_config_source_yesno</source_model>
3398
  <sort_order>200</sort_order>
@@ -3400,33 +3800,33 @@
3400
  <show_in_website>1</show_in_website>
3401
  <show_in_store>1</show_in_store>
3402
  </is_test_mode>
3403
- </fields>
3404
- </hipay_yandexapi>
3405
- <hipay_sofortapi translate="label" module="hipay">
3406
- <label>HiPay Fullservice Sofort Überweisung</label>
3407
  <frontend_type>text</frontend_type>
3408
  <sort_order>225</sort_order>
3409
  <show_in_default>1</show_in_default>
3410
  <show_in_website>1</show_in_website>
3411
  <show_in_store>1</show_in_store>
3412
  <fields>
3413
- <active translate="label">
3414
- <label>Enabled</label>
3415
- <frontend_type>select</frontend_type>
3416
- <source_model>adminhtml/system_config_source_yesno</source_model>
3417
- <sort_order>10</sort_order>
3418
- <show_in_default>1</show_in_default>
3419
- <show_in_website>1</show_in_website>
3420
- <show_in_store>1</show_in_store>
3421
- </active>
3422
- <title translate="label">
3423
- <label>Title</label>
3424
- <frontend_type>text</frontend_type>
3425
- <sort_order>20</sort_order>
3426
- <show_in_default>1</show_in_default>
3427
- <show_in_website>1</show_in_website>
3428
- <show_in_store>1</show_in_store>
3429
- </title>
3430
  <order_status_payment_accepted translate="label">
3431
  <label>Order status when payment accepted</label>
3432
  <frontend_type>select</frontend_type>
@@ -3454,7 +3854,7 @@
3454
  <show_in_website>1</show_in_website>
3455
  <show_in_store>0</show_in_store>
3456
  </order_status_payment_canceled>
3457
- <hipay_status_validate_order translate="label">
3458
  <label>Hipay status to validate order</label>
3459
  <frontend_type>select</frontend_type>
3460
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -3465,26 +3865,38 @@
3465
  </hipay_status_validate_order>
3466
  <success_redirect_page translate="label">
3467
  <label>Redirect page success</label>
3468
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
3469
  <frontend_type>text</frontend_type>
3470
- <sort_order>26</sort_order>
3471
  <show_in_default>1</show_in_default>
3472
  <show_in_website>1</show_in_website>
3473
  <show_in_store>0</show_in_store>
3474
  </success_redirect_page>
3475
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
3476
  <label>Redirect page pending status</label>
3477
  <comment>Page to redirect when transaction is in pending status</comment>
3478
  <frontend_type>select</frontend_type>
3479
  <source_model>hipay/source_pendingredirect</source_model>
3480
- <sort_order>27</sort_order>
3481
  <show_in_default>1</show_in_default>
3482
  <show_in_website>1</show_in_website>
3483
  <show_in_store>0</show_in_store>
3484
  </pending_redirect_page>
3485
- <re_add_to_cart translate="label comment">
3486
- <label>Add product to cart</label>
3487
- <comment>Fill cart when payment canceled or refused</comment>
3488
  <frontend_type>select</frontend_type>
3489
  <source_model>adminhtml/system_config_source_yesno</source_model>
3490
  <sort_order>95</sort_order>
@@ -3493,25 +3905,36 @@
3493
  <show_in_store>0</show_in_store>
3494
  </re_add_to_cart>
3495
  <cancel_pending_order translate="label comment">
3496
- <label>Cancel pending order</label>
3497
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3498
  <frontend_type>select</frontend_type>
3499
  <source_model>adminhtml/system_config_source_yesno</source_model>
3500
  <sort_order>97</sort_order>
3501
  <show_in_default>1</show_in_default>
3502
  <show_in_website>1</show_in_website>
3503
  <show_in_store>0</show_in_store>
3504
- </cancel_pending_order>
3505
- <send_fraud_payment_email translate="label">
3506
- <label>Send fraud payment email</label>
3507
- <frontend_type>select</frontend_type>
3508
- <source_model>adminhtml/system_config_source_yesno</source_model>
3509
- <sort_order>99</sort_order>
3510
- <show_in_default>1</show_in_default>
3511
- <show_in_website>1</show_in_website>
3512
- <show_in_store>1</show_in_store>
3513
- </send_fraud_payment_email>
3514
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
 
 
3515
  <label>Payment from applicable countries</label>
3516
  <frontend_type>allowspecific</frontend_type>
3517
  <sort_order>100</sort_order>
@@ -3554,8 +3977,8 @@
3554
  <show_in_store>1</show_in_store>
3555
  </sort_order>
3556
  <debug translate="label">
3557
- <label>Enable debug log</label>
3558
- <comment></comment>
3559
  <frontend_type>select</frontend_type>
3560
  <source_model>adminhtml/system_config_source_yesno</source_model>
3561
  <sort_order>150</sort_order>
@@ -3563,9 +3986,9 @@
3563
  <show_in_website>1</show_in_website>
3564
  <show_in_store>0</show_in_store>
3565
  </debug>
3566
- <is_test_mode translate="label comment">
3567
- <label>Enable test mode</label>
3568
- <comment></comment>
3569
  <frontend_type>select</frontend_type>
3570
  <source_model>adminhtml/system_config_source_yesno</source_model>
3571
  <sort_order>200</sort_order>
@@ -3573,33 +3996,33 @@
3573
  <show_in_website>1</show_in_website>
3574
  <show_in_store>1</show_in_store>
3575
  </is_test_mode>
3576
- </fields>
3577
- </hipay_sofortapi>
3578
- <hipay_sisalapi translate="label" module="hipay">
3579
- <label>HiPay Fullservice Sisal</label>
3580
  <frontend_type>text</frontend_type>
3581
  <sort_order>225</sort_order>
3582
  <show_in_default>1</show_in_default>
3583
  <show_in_website>1</show_in_website>
3584
  <show_in_store>1</show_in_store>
3585
  <fields>
3586
- <active translate="label">
3587
- <label>Enabled</label>
3588
- <frontend_type>select</frontend_type>
3589
- <source_model>adminhtml/system_config_source_yesno</source_model>
3590
- <sort_order>10</sort_order>
3591
- <show_in_default>1</show_in_default>
3592
- <show_in_website>1</show_in_website>
3593
- <show_in_store>1</show_in_store>
3594
- </active>
3595
- <title translate="label">
3596
- <label>Title</label>
3597
- <frontend_type>text</frontend_type>
3598
- <sort_order>20</sort_order>
3599
- <show_in_default>1</show_in_default>
3600
- <show_in_website>1</show_in_website>
3601
- <show_in_store>1</show_in_store>
3602
- </title>
3603
  <order_status_payment_accepted translate="label">
3604
  <label>Order status when payment accepted</label>
3605
  <frontend_type>select</frontend_type>
@@ -3627,7 +4050,7 @@
3627
  <show_in_website>1</show_in_website>
3628
  <show_in_store>0</show_in_store>
3629
  </order_status_payment_canceled>
3630
- <hipay_status_validate_order translate="label">
3631
  <label>Hipay status to validate order</label>
3632
  <frontend_type>select</frontend_type>
3633
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -3638,26 +4061,38 @@
3638
  </hipay_status_validate_order>
3639
  <success_redirect_page translate="label">
3640
  <label>Redirect page success</label>
3641
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
3642
  <frontend_type>text</frontend_type>
3643
- <sort_order>26</sort_order>
3644
  <show_in_default>1</show_in_default>
3645
  <show_in_website>1</show_in_website>
3646
  <show_in_store>0</show_in_store>
3647
  </success_redirect_page>
 
 
 
 
 
 
 
 
 
 
3648
  <pending_redirect_page translate="label">
3649
  <label>Redirect page pending status</label>
3650
  <comment>Page to redirect when transaction is in pending status</comment>
3651
  <frontend_type>select</frontend_type>
3652
  <source_model>hipay/source_pendingredirect</source_model>
3653
- <sort_order>27</sort_order>
3654
  <show_in_default>1</show_in_default>
3655
  <show_in_website>1</show_in_website>
3656
  <show_in_store>0</show_in_store>
3657
  </pending_redirect_page>
3658
- <re_add_to_cart translate="label comment">
3659
- <label>Add product to cart</label>
3660
- <comment>Fill cart when payment canceled or refused</comment>
3661
  <frontend_type>select</frontend_type>
3662
  <source_model>adminhtml/system_config_source_yesno</source_model>
3663
  <sort_order>95</sort_order>
@@ -3666,28 +4101,37 @@
3666
  <show_in_store>0</show_in_store>
3667
  </re_add_to_cart>
3668
  <cancel_pending_order translate="label comment">
3669
- <label>Cancel pending order</label>
3670
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3671
  <frontend_type>select</frontend_type>
3672
  <source_model>adminhtml/system_config_source_yesno</source_model>
3673
  <sort_order>97</sort_order>
3674
  <show_in_default>1</show_in_default>
3675
  <show_in_website>1</show_in_website>
3676
  <show_in_store>0</show_in_store>
3677
- </cancel_pending_order>
3678
- <send_fraud_payment_email translate="label">
3679
- <label>Send fraud payment email</label>
3680
- <frontend_type>select</frontend_type>
3681
- <source_model>adminhtml/system_config_source_yesno</source_model>
3682
- <sort_order>99</sort_order>
3683
- <show_in_default>1</show_in_default>
3684
- <show_in_website>1</show_in_website>
3685
- <show_in_store>1</show_in_store>
3686
- </send_fraud_payment_email>
3687
- <allowspecific translate="label">
3688
- <label>Payment from applicable countries</label>
3689
- <frontend_type>allowspecific</frontend_type>
3690
- <sort_order>100</sort_order>
 
 
 
 
 
 
 
 
 
3691
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
3692
  <show_in_default>1</show_in_default>
3693
  <show_in_website>1</show_in_website>
@@ -3727,8 +4171,8 @@
3727
  <show_in_store>1</show_in_store>
3728
  </sort_order>
3729
  <debug translate="label">
3730
- <label>Enable debug log</label>
3731
- <comment></comment>
3732
  <frontend_type>select</frontend_type>
3733
  <source_model>adminhtml/system_config_source_yesno</source_model>
3734
  <sort_order>150</sort_order>
@@ -3736,9 +4180,9 @@
3736
  <show_in_website>1</show_in_website>
3737
  <show_in_store>0</show_in_store>
3738
  </debug>
3739
- <is_test_mode translate="label comment">
3740
- <label>Enable test mode</label>
3741
- <comment></comment>
3742
  <frontend_type>select</frontend_type>
3743
  <source_model>adminhtml/system_config_source_yesno</source_model>
3744
  <sort_order>200</sort_order>
@@ -3746,33 +4190,33 @@
3746
  <show_in_website>1</show_in_website>
3747
  <show_in_store>1</show_in_store>
3748
  </is_test_mode>
3749
- </fields>
3750
- </hipay_sisalapi>
3751
- <hipay_paypalapi translate="label" module="hipay">
3752
- <label>HiPay Fullservice PayPal</label>
3753
  <frontend_type>text</frontend_type>
3754
  <sort_order>225</sort_order>
3755
  <show_in_default>1</show_in_default>
3756
  <show_in_website>1</show_in_website>
3757
  <show_in_store>1</show_in_store>
3758
  <fields>
3759
- <active translate="label">
3760
- <label>Enabled</label>
3761
- <frontend_type>select</frontend_type>
3762
- <source_model>adminhtml/system_config_source_yesno</source_model>
3763
- <sort_order>10</sort_order>
3764
- <show_in_default>1</show_in_default>
3765
- <show_in_website>1</show_in_website>
3766
- <show_in_store>1</show_in_store>
3767
- </active>
3768
- <title translate="label">
3769
- <label>Title</label>
3770
- <frontend_type>text</frontend_type>
3771
- <sort_order>20</sort_order>
3772
- <show_in_default>1</show_in_default>
3773
- <show_in_website>1</show_in_website>
3774
- <show_in_store>1</show_in_store>
3775
- </title>
3776
  <order_status_payment_accepted translate="label">
3777
  <label>Order status when payment accepted</label>
3778
  <frontend_type>select</frontend_type>
@@ -3800,7 +4244,7 @@
3800
  <show_in_website>1</show_in_website>
3801
  <show_in_store>0</show_in_store>
3802
  </order_status_payment_canceled>
3803
- <hipay_status_validate_order translate="label">
3804
  <label>Hipay status to validate order</label>
3805
  <frontend_type>select</frontend_type>
3806
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -3811,26 +4255,38 @@
3811
  </hipay_status_validate_order>
3812
  <success_redirect_page translate="label">
3813
  <label>Redirect page success</label>
3814
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
3815
  <frontend_type>text</frontend_type>
3816
- <sort_order>26</sort_order>
3817
  <show_in_default>1</show_in_default>
3818
  <show_in_website>1</show_in_website>
3819
  <show_in_store>0</show_in_store>
3820
  </success_redirect_page>
3821
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
3822
  <label>Redirect page pending status</label>
3823
  <comment>Page to redirect when transaction is in pending status</comment>
3824
  <frontend_type>select</frontend_type>
3825
  <source_model>hipay/source_pendingredirect</source_model>
3826
- <sort_order>27</sort_order>
3827
  <show_in_default>1</show_in_default>
3828
  <show_in_website>1</show_in_website>
3829
  <show_in_store>0</show_in_store>
3830
  </pending_redirect_page>
3831
- <re_add_to_cart translate="label comment">
3832
- <label>Add product to cart</label>
3833
- <comment>Fill cart when payment canceled or refused</comment>
3834
  <frontend_type>select</frontend_type>
3835
  <source_model>adminhtml/system_config_source_yesno</source_model>
3836
  <sort_order>95</sort_order>
@@ -3839,25 +4295,34 @@
3839
  <show_in_store>0</show_in_store>
3840
  </re_add_to_cart>
3841
  <cancel_pending_order translate="label comment">
3842
- <label>Cancel pending order</label>
3843
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3844
  <frontend_type>select</frontend_type>
3845
  <source_model>adminhtml/system_config_source_yesno</source_model>
3846
  <sort_order>97</sort_order>
3847
  <show_in_default>1</show_in_default>
3848
  <show_in_website>1</show_in_website>
3849
  <show_in_store>0</show_in_store>
3850
- </cancel_pending_order>
3851
- <send_fraud_payment_email translate="label">
3852
- <label>Send fraud payment email</label>
3853
- <frontend_type>select</frontend_type>
3854
- <source_model>adminhtml/system_config_source_yesno</source_model>
3855
- <sort_order>99</sort_order>
3856
- <show_in_default>1</show_in_default>
3857
- <show_in_website>1</show_in_website>
3858
- <show_in_store>1</show_in_store>
3859
- </send_fraud_payment_email>
3860
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
3861
  <label>Payment from applicable countries</label>
3862
  <frontend_type>allowspecific</frontend_type>
3863
  <sort_order>100</sort_order>
@@ -3900,8 +4365,8 @@
3900
  <show_in_store>1</show_in_store>
3901
  </sort_order>
3902
  <debug translate="label">
3903
- <label>Enable debug log</label>
3904
- <comment></comment>
3905
  <frontend_type>select</frontend_type>
3906
  <source_model>adminhtml/system_config_source_yesno</source_model>
3907
  <sort_order>150</sort_order>
@@ -3909,9 +4374,9 @@
3909
  <show_in_website>1</show_in_website>
3910
  <show_in_store>0</show_in_store>
3911
  </debug>
3912
- <is_test_mode translate="label comment">
3913
- <label>Enable test mode</label>
3914
- <comment></comment>
3915
  <frontend_type>select</frontend_type>
3916
  <source_model>adminhtml/system_config_source_yesno</source_model>
3917
  <sort_order>200</sort_order>
@@ -3919,10 +4384,10 @@
3919
  <show_in_website>1</show_in_website>
3920
  <show_in_store>1</show_in_store>
3921
  </is_test_mode>
3922
- </fields>
3923
- </hipay_paypalapi>
3924
  <hipay_sdd translate="label" module="hipay">
3925
- <label>HiPay Fullservice SEPA Direct Debit</label>
3926
  <frontend_type>text</frontend_type>
3927
  <sort_order>200</sort_order>
3928
  <show_in_default>1</show_in_default>
@@ -3945,7 +4410,7 @@
3945
  <show_in_default>1</show_in_default>
3946
  <show_in_website>1</show_in_website>
3947
  <show_in_store>1</show_in_store>
3948
- </title>
3949
  <order_status_payment_accepted translate="label">
3950
  <label>Order status when payment accepted</label>
3951
  <frontend_type>select</frontend_type>
@@ -3984,19 +4449,31 @@
3984
  </hipay_status_validate_order>
3985
  <success_redirect_page translate="label">
3986
  <label>Redirect page success</label>
3987
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
3988
  <frontend_type>text</frontend_type>
3989
- <sort_order>26</sort_order>
3990
  <show_in_default>1</show_in_default>
3991
  <show_in_website>1</show_in_website>
3992
  <show_in_store>0</show_in_store>
3993
  </success_redirect_page>
 
 
 
 
 
 
 
 
 
 
3994
  <pending_redirect_page translate="label">
3995
  <label>Redirect page pending status</label>
3996
  <comment>Page to redirect when transaction is in pending status</comment>
3997
  <frontend_type>select</frontend_type>
3998
  <source_model>hipay/source_pendingredirect</source_model>
3999
- <sort_order>27</sort_order>
4000
  <show_in_default>1</show_in_default>
4001
  <show_in_website>1</show_in_website>
4002
  <show_in_store>0</show_in_store>
@@ -4028,8 +4505,8 @@
4028
  <show_in_default>1</show_in_default>
4029
  <show_in_website>1</show_in_website>
4030
  <show_in_store>0</show_in_store>
4031
- </re_add_to_cart>
4032
- <cancel_pending_order translate="label comment">
4033
  <label>Cancel pending order</label>
4034
  <comment>Cancel orders stayed in pending because customer not validated payment</comment>
4035
  <frontend_type>select</frontend_type>
@@ -4038,8 +4515,17 @@
4038
  <show_in_default>1</show_in_default>
4039
  <show_in_website>1</show_in_website>
4040
  <show_in_store>0</show_in_store>
4041
- </cancel_pending_order>
4042
- <send_fraud_payment_email translate="label">
 
 
 
 
 
 
 
 
 
4043
  <label>Send fraud payment email</label>
4044
  <frontend_type>select</frontend_type>
4045
  <source_model>adminhtml/system_config_source_yesno</source_model>
@@ -4048,7 +4534,7 @@
4048
  <show_in_website>1</show_in_website>
4049
  <show_in_store>1</show_in_store>
4050
  </send_fraud_payment_email>
4051
- <allowspecific translate="label">
4052
  <label>Payment from applicable countries</label>
4053
  <frontend_type>allowspecific</frontend_type>
4054
  <sort_order>100</sort_order>
@@ -4110,33 +4596,33 @@
4110
  <show_in_website>1</show_in_website>
4111
  <show_in_store>1</show_in_store>
4112
  </is_test_mode>
4113
- </fields>
4114
  </hipay_sdd>
4115
  <hipay_postfinancecardapi translate="label" module="hipay">
4116
- <label>HiPay Fullservice PostFinance Card</label>
4117
  <frontend_type>text</frontend_type>
4118
  <sort_order>225</sort_order>
4119
  <show_in_default>1</show_in_default>
4120
  <show_in_website>1</show_in_website>
4121
  <show_in_store>1</show_in_store>
4122
  <fields>
4123
- <active translate="label">
4124
- <label>Enabled</label>
4125
- <frontend_type>select</frontend_type>
4126
- <source_model>adminhtml/system_config_source_yesno</source_model>
4127
- <sort_order>10</sort_order>
4128
- <show_in_default>1</show_in_default>
4129
- <show_in_website>1</show_in_website>
4130
- <show_in_store>1</show_in_store>
4131
- </active>
4132
- <title translate="label">
4133
- <label>Title</label>
4134
- <frontend_type>text</frontend_type>
4135
- <sort_order>20</sort_order>
4136
- <show_in_default>1</show_in_default>
4137
- <show_in_website>1</show_in_website>
4138
- <show_in_store>1</show_in_store>
4139
- </title>
4140
  <order_status_payment_accepted translate="label">
4141
  <label>Order status when payment accepted</label>
4142
  <frontend_type>select</frontend_type>
@@ -4164,7 +4650,7 @@
4164
  <show_in_website>1</show_in_website>
4165
  <show_in_store>0</show_in_store>
4166
  </order_status_payment_canceled>
4167
- <hipay_status_validate_order translate="label">
4168
  <label>Hipay status to validate order</label>
4169
  <frontend_type>select</frontend_type>
4170
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -4175,26 +4661,38 @@
4175
  </hipay_status_validate_order>
4176
  <success_redirect_page translate="label">
4177
  <label>Redirect page success</label>
4178
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
4179
  <frontend_type>text</frontend_type>
4180
- <sort_order>26</sort_order>
4181
  <show_in_default>1</show_in_default>
4182
  <show_in_website>1</show_in_website>
4183
  <show_in_store>0</show_in_store>
4184
  </success_redirect_page>
4185
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
4186
  <label>Redirect page pending status</label>
4187
  <comment>Page to redirect when transaction is in pending status</comment>
4188
  <frontend_type>select</frontend_type>
4189
  <source_model>hipay/source_pendingredirect</source_model>
4190
- <sort_order>27</sort_order>
4191
  <show_in_default>1</show_in_default>
4192
  <show_in_website>1</show_in_website>
4193
  <show_in_store>0</show_in_store>
4194
  </pending_redirect_page>
4195
- <re_add_to_cart translate="label comment">
4196
- <label>Add product to cart</label>
4197
- <comment>Fill cart when payment canceled or refused</comment>
4198
  <frontend_type>select</frontend_type>
4199
  <source_model>adminhtml/system_config_source_yesno</source_model>
4200
  <sort_order>95</sort_order>
@@ -4203,25 +4701,43 @@
4203
  <show_in_store>0</show_in_store>
4204
  </re_add_to_cart>
4205
  <cancel_pending_order translate="label comment">
4206
- <label>Cancel pending order</label>
4207
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
4208
  <frontend_type>select</frontend_type>
4209
  <source_model>adminhtml/system_config_source_yesno</source_model>
4210
  <sort_order>97</sort_order>
4211
  <show_in_default>1</show_in_default>
4212
  <show_in_website>1</show_in_website>
4213
  <show_in_store>0</show_in_store>
4214
- </cancel_pending_order>
4215
- <send_fraud_payment_email translate="label">
4216
- <label>Send fraud payment email</label>
4217
- <frontend_type>select</frontend_type>
4218
- <source_model>adminhtml/system_config_source_yesno</source_model>
4219
- <sort_order>99</sort_order>
4220
- <show_in_default>1</show_in_default>
4221
- <show_in_website>1</show_in_website>
4222
- <show_in_store>1</show_in_store>
4223
- </send_fraud_payment_email>
4224
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4225
  <label>Payment from applicable countries</label>
4226
  <frontend_type>allowspecific</frontend_type>
4227
  <sort_order>100</sort_order>
@@ -4264,8 +4780,8 @@
4264
  <show_in_store>1</show_in_store>
4265
  </sort_order>
4266
  <debug translate="label">
4267
- <label>Enable debug log</label>
4268
- <comment></comment>
4269
  <frontend_type>select</frontend_type>
4270
  <source_model>adminhtml/system_config_source_yesno</source_model>
4271
  <sort_order>150</sort_order>
@@ -4273,9 +4789,9 @@
4273
  <show_in_website>1</show_in_website>
4274
  <show_in_store>0</show_in_store>
4275
  </debug>
4276
- <is_test_mode translate="label comment">
4277
- <label>Enable test mode</label>
4278
- <comment></comment>
4279
  <frontend_type>select</frontend_type>
4280
  <source_model>adminhtml/system_config_source_yesno</source_model>
4281
  <sort_order>200</sort_order>
@@ -4283,33 +4799,33 @@
4283
  <show_in_website>1</show_in_website>
4284
  <show_in_store>1</show_in_store>
4285
  </is_test_mode>
4286
- </fields>
4287
- </hipay_postfinancecardapi>
4288
- <hipay_postfinanceefinanceapi translate="label" module="hipay">
4289
- <label>HiPay Fullservice PostFinance E-Finance</label>
4290
  <frontend_type>text</frontend_type>
4291
  <sort_order>225</sort_order>
4292
  <show_in_default>1</show_in_default>
4293
  <show_in_website>1</show_in_website>
4294
  <show_in_store>1</show_in_store>
4295
  <fields>
4296
- <active translate="label">
4297
- <label>Enabled</label>
4298
- <frontend_type>select</frontend_type>
4299
- <source_model>adminhtml/system_config_source_yesno</source_model>
4300
- <sort_order>10</sort_order>
4301
- <show_in_default>1</show_in_default>
4302
- <show_in_website>1</show_in_website>
4303
- <show_in_store>1</show_in_store>
4304
- </active>
4305
- <title translate="label">
4306
- <label>Title</label>
4307
- <frontend_type>text</frontend_type>
4308
- <sort_order>20</sort_order>
4309
- <show_in_default>1</show_in_default>
4310
- <show_in_website>1</show_in_website>
4311
- <show_in_store>1</show_in_store>
4312
- </title>
4313
  <order_status_payment_accepted translate="label">
4314
  <label>Order status when payment accepted</label>
4315
  <frontend_type>select</frontend_type>
@@ -4337,7 +4853,7 @@
4337
  <show_in_website>1</show_in_website>
4338
  <show_in_store>0</show_in_store>
4339
  </order_status_payment_canceled>
4340
- <hipay_status_validate_order translate="label">
4341
  <label>Hipay status to validate order</label>
4342
  <frontend_type>select</frontend_type>
4343
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
@@ -4348,26 +4864,38 @@
4348
  </hipay_status_validate_order>
4349
  <success_redirect_page translate="label">
4350
  <label>Redirect page success</label>
4351
- <comment>Page to redirect when transaction is successful, leave empty for checkout/onepage/success</comment>
 
 
4352
  <frontend_type>text</frontend_type>
4353
- <sort_order>26</sort_order>
4354
  <show_in_default>1</show_in_default>
4355
  <show_in_website>1</show_in_website>
4356
  <show_in_store>0</show_in_store>
4357
  </success_redirect_page>
4358
- <pending_redirect_page translate="label">
 
 
 
 
 
 
 
 
 
 
4359
  <label>Redirect page pending status</label>
4360
  <comment>Page to redirect when transaction is in pending status</comment>
4361
  <frontend_type>select</frontend_type>
4362
  <source_model>hipay/source_pendingredirect</source_model>
4363
- <sort_order>27</sort_order>
4364
  <show_in_default>1</show_in_default>
4365
  <show_in_website>1</show_in_website>
4366
  <show_in_store>0</show_in_store>
4367
  </pending_redirect_page>
4368
- <re_add_to_cart translate="label comment">
4369
- <label>Add product to cart</label>
4370
- <comment>Fill cart when payment canceled or refused</comment>
4371
  <frontend_type>select</frontend_type>
4372
  <source_model>adminhtml/system_config_source_yesno</source_model>
4373
  <sort_order>95</sort_order>
@@ -4376,25 +4904,34 @@
4376
  <show_in_store>0</show_in_store>
4377
  </re_add_to_cart>
4378
  <cancel_pending_order translate="label comment">
4379
- <label>Cancel pending order</label>
4380
- <comment>Cancel orders stayed in pending because customer not validated payment</comment>
4381
  <frontend_type>select</frontend_type>
4382
  <source_model>adminhtml/system_config_source_yesno</source_model>
4383
  <sort_order>97</sort_order>
4384
  <show_in_default>1</show_in_default>
4385
  <show_in_website>1</show_in_website>
4386
  <show_in_store>0</show_in_store>
4387
- </cancel_pending_order>
4388
- <send_fraud_payment_email translate="label">
4389
- <label>Send fraud payment email</label>
4390
- <frontend_type>select</frontend_type>
4391
- <source_model>adminhtml/system_config_source_yesno</source_model>
4392
- <sort_order>99</sort_order>
4393
- <show_in_default>1</show_in_default>
4394
- <show_in_website>1</show_in_website>
4395
- <show_in_store>1</show_in_store>
4396
- </send_fraud_payment_email>
4397
- <allowspecific translate="label">
 
 
 
 
 
 
 
 
 
4398
  <label>Payment from applicable countries</label>
4399
  <frontend_type>allowspecific</frontend_type>
4400
  <sort_order>100</sort_order>
@@ -4437,8 +4974,274 @@
4437
  <show_in_store>1</show_in_store>
4438
  </sort_order>
4439
  <debug translate="label">
4440
- <label>Enable debug log</label>
4441
- <comment></comment>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4442
  <frontend_type>select</frontend_type>
4443
  <source_model>adminhtml/system_config_source_yesno</source_model>
4444
  <sort_order>150</sort_order>
@@ -4446,9 +5249,9 @@
4446
  <show_in_website>1</show_in_website>
4447
  <show_in_store>0</show_in_store>
4448
  </debug>
4449
- <is_test_mode translate="label comment">
4450
- <label>Enable test mode</label>
4451
- <comment></comment>
4452
  <frontend_type>select</frontend_type>
4453
  <source_model>adminhtml/system_config_source_yesno</source_model>
4454
  <sort_order>200</sort_order>
@@ -4456,9 +5259,9 @@
4456
  <show_in_website>1</show_in_website>
4457
  <show_in_store>1</show_in_store>
4458
  </is_test_mode>
4459
- </fields>
4460
- </hipay_postfinanceefinanceapi>
4461
- </groups>
4462
- </payment>
4463
- </sections>
4464
- </config>
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <config>
3
+ <sections>
4
+ <hipay translate="label" module="hipay">
5
+ <label>HiPay Enterprise</label>
6
  <tab>sales</tab>
7
  <frontend_type>text</frontend_type>
8
  <sort_order>398</sort_order>
10
  <show_in_website>1</show_in_website>
11
  <show_in_store>1</show_in_store>
12
  <groups>
13
+ <hipay_api>
14
+ <label>HiPay Enterprise credentials configuration</label>
15
+ <frontend_type>text</frontend_type>
16
+ <comment></comment>
17
+ <sort_order>10</sort_order>
18
  <show_in_default>1</show_in_default>
19
  <show_in_website>1</show_in_website>
20
  <show_in_store>1</show_in_store>
21
  <fields>
22
+ <api_username translate="label">
23
+ <label>Api username (production account)</label>
24
  <frontend_type>text</frontend_type>
25
  <sort_order>10</sort_order>
26
  <show_in_default>1</show_in_default>
27
  <show_in_website>1</show_in_website>
28
  <show_in_store>1</show_in_store>
29
+ </api_username>
30
+ <api_password translate="label">
31
  <label>Api password (production account)</label>
32
+ <frontend_type>obscure</frontend_type>
33
  <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
34
  <sort_order>20</sort_order>
35
  <show_in_default>1</show_in_default>
36
  <show_in_website>1</show_in_website>
37
  <show_in_store>1</show_in_store>
38
  </api_password>
39
+ <api_tokenjs_username translate="label">
40
  <label>Api TokenJS Username (production account)</label>
41
+ <frontend_type>text</frontend_type>
42
  <sort_order>22</sort_order>
43
  <show_in_default>1</show_in_default>
44
  <show_in_website>1</show_in_website>
46
  </api_tokenjs_username>
47
  <api_tokenjs_publickey translate="label">
48
  <label>Api TokenJS Password/Public Key (production account)</label>
49
+ <frontend_type>text</frontend_type>
50
  <sort_order>23</sort_order>
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
53
  <show_in_store>1</show_in_store>
54
  </api_tokenjs_publickey>
55
  <secret_passphrase translate="label comment">
56
+ <label>Secret passphrase (production account)</label>
57
+ <comment>The same of your HiPay Enterprise production account</comment>
58
+ <frontend_type>obscure</frontend_type>
59
  <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
60
  <sort_order>25</sort_order>
61
  <show_in_default>1</show_in_default>
62
  <show_in_website>1</show_in_website>
63
  <show_in_store>1</show_in_store>
64
  </secret_passphrase>
65
+ <api_username_test translate="label">
66
+ <label>Api username (test account)</label>
67
  <frontend_type>text</frontend_type>
68
  <sort_order>30</sort_order>
69
  <show_in_default>1</show_in_default>
70
  <show_in_website>1</show_in_website>
71
  <show_in_store>1</show_in_store>
72
+ </api_username_test>
73
+ <api_password_test translate="label">
74
  <label>Api password (test account)</label>
75
+ <frontend_type>obscure</frontend_type>
76
  <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
77
  <sort_order>40</sort_order>
78
  <show_in_default>1</show_in_default>
79
  <show_in_website>1</show_in_website>
80
  <show_in_store>1</show_in_store>
81
  </api_password_test>
82
+ <api_tokenjs_username_test translate="label">
83
  <label>Api TokenJS Username (test account)</label>
84
+ <frontend_type>text</frontend_type>
85
  <sort_order>45</sort_order>
86
  <show_in_default>1</show_in_default>
87
  <show_in_website>1</show_in_website>
89
  </api_tokenjs_username_test>
90
  <api_tokenjs_publickey_test translate="label">
91
  <label>Api TokenJS Password/Public Key (test account)</label>
92
+ <frontend_type>text</frontend_type>
93
  <sort_order>46</sort_order>
94
  <show_in_default>1</show_in_default>
95
  <show_in_website>1</show_in_website>
96
  <show_in_store>1</show_in_store>
97
  </api_tokenjs_publickey_test>
98
+ <secret_passphrase_test translate="label comment">
99
+ <label>Secret passphrase (test account)</label>
100
+ <comment>The same of your HiPay Enterprise test account</comment>
101
+ <frontend_type>obscure</frontend_type>
102
  <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
103
  <sort_order>50</sort_order>
104
  <show_in_default>1</show_in_default>
142
  <show_in_website>1</show_in_website>
143
  <show_in_store>1</show_in_store>
144
  </proxy_pass>
145
+ <currency_transaction translate="label comment">
146
+ <label>Use order currency for transaction</label>
147
+ <comment>Only if payment method is in "Sale" mode.</comment>
148
+ <frontend_type>select</frontend_type>
149
+ <source_model>adminhtml/system_config_source_yesno</source_model>
150
+ <sort_order>100</sort_order>
151
+ <show_in_default>1</show_in_default>
152
+ <show_in_website>1</show_in_website>
153
+ <show_in_store>1</show_in_store>
154
+ </currency_transaction>
155
  <fingerprint translate="label comment">
156
  <label>Device fingerprint</label>
157
  <frontend_type>select</frontend_type>
162
  <show_in_store>1</show_in_store>
163
  </fingerprint>
164
  </fields>
165
+ </hipay_api>
166
+ <hipay_api_moto>
167
+ <label>HiPay Enterprise credentials MO/TO configuration</label>
168
+ <frontend_type>text</frontend_type>
169
+ <comment></comment>
170
+ <sort_order>11</sort_order>
171
+ <show_in_default>1</show_in_default>
172
+ <show_in_website>1</show_in_website>
173
+ <show_in_store>1</show_in_store>
174
+ <fields>
175
+ <api_username translate="label">
176
+ <label>Api username (production account)</label>
177
+ <frontend_type>text</frontend_type>
178
+ <sort_order>10</sort_order>
179
+ <show_in_default>1</show_in_default>
180
+ <show_in_website>1</show_in_website>
181
+ <show_in_store>1</show_in_store>
182
+ </api_username>
183
+ <api_password translate="label">
184
+ <label>Api password (production account)</label>
185
+ <frontend_type>obscure</frontend_type>
186
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
187
+ <sort_order>20</sort_order>
188
+ <show_in_default>1</show_in_default>
189
+ <show_in_website>1</show_in_website>
190
+ <show_in_store>1</show_in_store>
191
+ </api_password>
192
+ <secret_passphrase translate="label comment">
193
+ <label>Secret passphrase (production account)</label>
194
+ <comment>The same of your HiPay Enterprise production account</comment>
195
+ <frontend_type>obscure</frontend_type>
196
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
197
+ <sort_order>25</sort_order>
198
+ <show_in_default>1</show_in_default>
199
+ <show_in_website>1</show_in_website>
200
+ <show_in_store>1</show_in_store>
201
+ </secret_passphrase>
202
+ <api_username_test translate="label">
203
+ <label>Api username (test account)</label>
204
+ <frontend_type>text</frontend_type>
205
+ <sort_order>30</sort_order>
206
+ <show_in_default>1</show_in_default>
207
+ <show_in_website>1</show_in_website>
208
+ <show_in_store>1</show_in_store>
209
+ </api_username_test>
210
+ <api_password_test translate="label">
211
+ <label>Api password (test account)</label>
212
+ <frontend_type>obscure</frontend_type>
213
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
214
+ <sort_order>40</sort_order>
215
+ <show_in_default>1</show_in_default>
216
+ <show_in_website>1</show_in_website>
217
+ <show_in_store>1</show_in_store>
218
+ </api_password_test>
219
+ <secret_passphrase_test translate="label comment">
220
+ <label>Secret passphrase (test account)</label>
221
+ <comment>The same of your HiPay Enterprise test account</comment>
222
+ <frontend_type>obscure</frontend_type>
223
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
224
+ <sort_order>50</sort_order>
225
+ <show_in_default>1</show_in_default>
226
+ <show_in_website>1</show_in_website>
227
+ <show_in_store>1</show_in_store>
228
+ </secret_passphrase_test>
229
+ <moto_send_email translate="label">
230
+ <label>Send an email to customer to pay</label>
231
+ <frontend_type>select</frontend_type>
232
+ <source_model>adminhtml/system_config_source_yesno</source_model>
233
+ <sort_order>51</sort_order>
234
+ <show_in_default>1</show_in_default>
235
+ <show_in_website>1</show_in_website>
236
+ <show_in_store>1</show_in_store>
237
+ </moto_send_email>
238
+ <identity translate="label">
239
+ <label>Payment Email Sender</label>
240
+ <frontend_type>select</frontend_type>
241
+ <source_model>adminhtml/system_config_source_email_identity</source_model>
242
+ <sort_order>52</sort_order>
243
+ <show_in_default>1</show_in_default>
244
+ <show_in_website>1</show_in_website>
245
+ <show_in_store>1</show_in_store>
246
+ </identity>
247
+ <template translate="label">
248
+ <label>Payment Template</label>
249
+ <frontend_type>select</frontend_type>
250
+ <source_model>adminhtml/system_config_source_email_template</source_model>
251
+ <sort_order>53</sort_order>
252
+ <show_in_default>1</show_in_default>
253
+ <show_in_website>1</show_in_website>
254
+ <show_in_store>1</show_in_store>
255
+ </template>
256
+ </fields>
257
+ </hipay_api_moto>
258
+ <hipay_basket>
259
+ <label>Basket configuration</label>
260
+ <frontend_type>text</frontend_type>
261
+ <comment></comment>
262
+ <sort_order>12</sort_order>
263
+ <show_in_default>1</show_in_default>
264
+ <show_in_website>1</show_in_website>
265
+ <show_in_store>1</show_in_store>
266
+ <fields>
267
+ <activate_basket translate="label comment">
268
+ <label>Activate basket</label>
269
+ <frontend_type>select</frontend_type>
270
+ <comment>Activate the basket sending to HIPAY</comment>
271
+ <source_model>adminhtml/system_config_source_yesno</source_model>
272
+ <sort_order>110</sort_order>
273
+ <show_in_default>1</show_in_default>
274
+ <show_in_website>1</show_in_website>
275
+ <show_in_store>1</show_in_store>
276
+ </activate_basket>
277
+ <attribute_ean translate="label comment">
278
+ <label>Attribute ean</label>
279
+ <frontend_type>select</frontend_type>
280
+ <comment>If you store support ean, indicate the field name </comment>
281
+ <source_model>hipay/source_attributes</source_model>
282
+ <sort_order>120</sort_order>
283
+ <show_in_default>1</show_in_default>
284
+ <show_in_website>1</show_in_website>
285
+ <show_in_store>1</show_in_store>
286
+ </attribute_ean>
287
+ <load_product_ean translate="label comment">
288
+ <label>Load attribute</label>
289
+ <frontend_type>select</frontend_type>
290
+ <comment>If you activate this option, a product loading is carried out to get ean (Please see documentation ) </comment>
291
+ <source_model>adminhtml/system_config_source_yesno</source_model>
292
+ <sort_order>130</sort_order>
293
+ <show_in_default>1</show_in_default>
294
+ <show_in_website>1</show_in_website>
295
+ <show_in_store>1</show_in_store>
296
+ </load_product_ean>
297
+ </fields>
298
+ </hipay_basket>
299
+ <fraud_payment translate="label">
300
  <label>Fraud Payment Review Email</label>
301
+ <comment>This email is sended to customer, if his payment is in fraud state</comment>
302
  <frontend_type>text</frontend_type>
303
  <sort_order>20</sort_order>
304
+
305
  <show_in_default>1</show_in_default>
306
  <show_in_website>1</show_in_website>
307
  <show_in_store>1</show_in_store>
346
  </fraud_payment>
347
  <fraud_payment_accept translate="label">
348
  <label>Fraud Payment Accept Email</label>
349
+ <comment>This email is sended to customer, if his payment is validated by merchant</comment>
350
  <frontend_type>text</frontend_type>
351
  <sort_order>30</sort_order>
352
  <show_in_default>1</show_in_default>
393
  </fraud_payment_accept>
394
  <fraud_payment_deny translate="label">
395
  <label>Fraud Payment Deny Email</label>
396
+ <comment>This email is sended to customer, if his payment is denied by merchant</comment>
397
  <frontend_type>text</frontend_type>
398
  <sort_order>40</sort_order>
399
  <show_in_default>1</show_in_default>
438
  </copy_method>
439
  </fields>
440
  </fraud_payment_deny>
441
+ </groups>
442
+ </hipay>
443
+ <payment>
444
  <groups>
445
+ <hipay_cc translate="label" module="hipay">
446
+ <label>HiPay Enterprise Credit Card</label>
447
  <frontend_type>text</frontend_type>
448
  <sort_order>200</sort_order>
449
  <show_in_default>1</show_in_default>
450
  <show_in_website>1</show_in_website>
451
  <show_in_store>1</show_in_store>
452
  <fields>
453
+ <active translate="label">
454
+ <label>Enabled</label>
455
+ <frontend_type>select</frontend_type>
456
+ <source_model>adminhtml/system_config_source_yesno</source_model>
457
+ <sort_order>10</sort_order>
458
+ <show_in_default>1</show_in_default>
459
+ <show_in_website>1</show_in_website>
460
+ <show_in_store>1</show_in_store>
461
+ </active>
462
+ <title translate="label">
463
+ <label>Title</label>
464
+ <frontend_type>text</frontend_type>
465
+ <sort_order>20</sort_order>
466
+ <show_in_default>1</show_in_default>
467
+ <show_in_website>1</show_in_website>
468
+ <show_in_store>1</show_in_store>
469
+ </title>
470
  <order_status_payment_accepted translate="label">
471
  <label>Order status when payment accepted</label>
472
  <frontend_type>select</frontend_type>
505
  </hipay_status_validate_order>
506
  <success_redirect_page translate="label">
507
  <label>Redirect page success</label>
508
+ <comment>Page to redirect when transaction is successful, leave empty for
509
+ checkout/onepage/success
510
+ </comment>
511
  <frontend_type>text</frontend_type>
512
+ <sort_order>27</sort_order>
513
  <show_in_default>1</show_in_default>
514
  <show_in_website>1</show_in_website>
515
  <show_in_store>0</show_in_store>
516
  </success_redirect_page>
517
+ <failure_redirect_page translate="label">
518
+ <label>Redirect page failure</label>
519
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
520
+ </comment>
521
+ <frontend_type>text</frontend_type>
522
+ <sort_order>28</sort_order>
523
+ <show_in_default>1</show_in_default>
524
+ <show_in_website>1</show_in_website>
525
+ <show_in_store>0</show_in_store>
526
+ </failure_redirect_page>
527
  <pending_redirect_page translate="label">
528
  <label>Redirect page pending status</label>
529
  <comment>Page to redirect when transaction is in pending status</comment>
530
  <frontend_type>select</frontend_type>
531
  <source_model>hipay/source_pendingredirect</source_model>
532
+ <sort_order>29</sort_order>
533
  <show_in_default>1</show_in_default>
534
  <show_in_website>1</show_in_website>
535
  <show_in_store>0</show_in_store>
536
  </pending_redirect_page>
537
+ <payment_action translate="label">
538
+ <label>Payment Action</label>
539
+ <frontend_type>select</frontend_type>
540
+ <source_model>hipay/source_paymentAction</source_model>
541
+ <sort_order>30</sort_order>
542
+ <show_in_default>1</show_in_default>
543
+ <show_in_website>1</show_in_website>
544
+ <show_in_store>0</show_in_store>
545
+ </payment_action>
546
+ <cctypes translate="label">
547
  <label>Credit Card Types</label>
548
  <comment>Sort the list by drag'n/drop credit card type</comment>
549
  <frontend_type>checkboxes</frontend_type>
550
+ <frontend_model>hipay/adminhtml_system_config_form_field_multiselectSortable
551
+ </frontend_model>
552
  <backend_model>hipay/system_config_backend_ccTypes</backend_model>
553
+ <source_model>hipay/source_ccType::toConfigOption</source_model>
554
  <sort_order>40</sort_order>
555
  <show_in_default>1</show_in_default>
556
  <show_in_website>1</show_in_website>
576
  <show_in_store>0</show_in_store>
577
  </useccv>
578
  <use_3d_secure translate="label">
579
+ <label>Use 3D Secure</label>
580
  <frontend_type>select</frontend_type>
581
  <source_model>hipay/source_3ds</source_model>
582
  <sort_order>60</sort_order>
585
  <show_in_store>0</show_in_store>
586
  </use_3d_secure>
587
  <config_3ds_rules translate="label comment">
588
+ <label>Rules 3D Secure</label>
589
+ <comment>Configure Rules to activate 3D Secure</comment>
590
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
591
  <backend_model>hipay/rule_config</backend_model>
592
  <sort_order>61</sort_order>
595
  <show_in_store>0</show_in_store>
596
  </config_3ds_rules>
597
  <send_fraud_payment_email translate="label">
598
+ <label>Send fraud payment email</label>
 
 
 
 
 
 
 
 
 
 
599
  <frontend_type>select</frontend_type>
 
600
  <source_model>adminhtml/system_config_source_yesno</source_model>
601
+ <sort_order>63</sort_order>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
602
  <show_in_default>1</show_in_default>
603
  <show_in_website>1</show_in_website>
604
  <show_in_store>1</show_in_store>
605
+ </send_fraud_payment_email>
606
+ <!-- @deprecated since version 1.2.6 -->
607
+ <!-- <allow_split_payment translate="label">
608
+ <label>Use Split Payment</label>
609
+ <frontend_type>select</frontend_type>
610
+ <frontend_model>hipay/adminhtml_system_config_form_field_allowsplitpayment</frontend_model>
611
+ <source_model>adminhtml/system_config_source_yesno</source_model>
612
+ <sort_order>65</sort_order>
613
+ <show_in_default>1</show_in_default>
614
+ <show_in_website>1</show_in_website>
615
+ <show_in_store>0</show_in_store>
616
+ </allow_split_payment>
617
+ <split_payment_profile translate="label">
618
+ <label>Payment Profile</label>
619
+ <frontend_type>multiselect</frontend_type>
620
+ <source_model>hipay/source_paymentProfile::splitPaymentsToOptionArray</source_model>
621
+ <sort_order>66</sort_order>
622
+ <show_in_default>1</show_in_default>
623
+ <show_in_website>1</show_in_website>
624
+ <show_in_store>0</show_in_store>
625
+ </split_payment_profile>
626
+ <min_order_total_split_payment translate="label">
627
+ <label>Minimum Order Total for Split Payment</label>
628
+ <frontend_type>text</frontend_type>
629
+ <sort_order>68</sort_order>
630
+ <show_in_default>1</show_in_default>
631
+ <show_in_website>1</show_in_website>
632
+ <show_in_store>1</show_in_store>
633
+ </min_order_total_split_payment> -->
634
  <allow_use_oneclick translate="label">
635
+ <label>Use Oneclick</label>
636
  <frontend_type>select</frontend_type>
637
  <source_model>adminhtml/system_config_source_yesno</source_model>
638
  <sort_order>70</sort_order>
640
  <show_in_website>1</show_in_website>
641
  <show_in_store>0</show_in_store>
642
  </allow_use_oneclick>
643
+ <filter_oneclick translate="label comment">
644
+ <label>Rules Oneclick</label>
645
+ <comment>Configure Rules to activate oneclick</comment>
646
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
647
  <backend_model>hipay/rule_config</backend_model>
648
  <sort_order>80</sort_order>
650
  <show_in_website>1</show_in_website>
651
  <show_in_store>0</show_in_store>
652
  </filter_oneclick>
653
+ <re_add_to_cart translate="label comment">
654
+ <label>Add product to cart</label>
655
+ <comment>Fill cart when payment canceled or refused</comment>
656
  <frontend_type>select</frontend_type>
657
  <source_model>adminhtml/system_config_source_yesno</source_model>
658
  <sort_order>95</sort_order>
659
  <show_in_default>1</show_in_default>
660
  <show_in_website>1</show_in_website>
661
  <show_in_store>0</show_in_store>
662
+ </re_add_to_cart>
663
+ <cancel_pending_order translate="label comment">
664
+ <label>Cancel pending order</label>
665
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
666
  <frontend_type>select</frontend_type>
667
  <source_model>adminhtml/system_config_source_yesno</source_model>
668
  <sort_order>97</sort_order>
669
  <show_in_default>1</show_in_default>
670
  <show_in_website>1</show_in_website>
671
  <show_in_store>0</show_in_store>
672
+ </cancel_pending_order>
673
+ <delay_cancel_pending_order translate="label">
674
+ <label>Delay before cancel order</label>
675
+ <comment>In Hours</comment>
676
+ <frontend_type>text</frontend_type>
677
+ <sort_order>98</sort_order>
678
+ <show_in_default>1</show_in_default>
679
+ <show_in_website>1</show_in_website>
680
+ <show_in_store>1</show_in_store>
681
+ </delay_cancel_pending_order>
682
+ <send_fraud_payment_email translate="label">
683
+ <label>Send fraud payment email</label>
684
+ <frontend_type>select</frontend_type>
685
+ <source_model>adminhtml/system_config_source_yesno</source_model>
686
+ <sort_order>99</sort_order>
687
+ <show_in_default>1</show_in_default>
688
+ <show_in_website>1</show_in_website>
689
+ <show_in_store>1</show_in_store>
690
+ </send_fraud_payment_email>
691
+ <allowspecific translate="label">
692
  <label>Payment from applicable countries</label>
693
  <frontend_type>allowspecific</frontend_type>
694
  <sort_order>100</sort_order>
731
  <show_in_store>1</show_in_store>
732
  </sort_order>
733
  <debug>
734
+ <label>Enable debug log</label>
735
+ <comment></comment>
736
  <frontend_type>select</frontend_type>
737
  <source_model>adminhtml/system_config_source_yesno</source_model>
738
  <sort_order>150</sort_order>
740
  <show_in_website>1</show_in_website>
741
  <show_in_store>0</show_in_store>
742
  </debug>
743
+ <is_test_mode translate="label comment">
744
+ <label>Enable test mode</label>
745
+ <comment></comment>
746
  <frontend_type>select</frontend_type>
747
  <source_model>adminhtml/system_config_source_yesno</source_model>
748
  <sort_order>200</sort_order>
750
  <show_in_website>1</show_in_website>
751
  <show_in_store>1</show_in_store>
752
  </is_test_mode>
753
+ </fields>
754
+ </hipay_cc>
755
+ <hipay_ccxtimes translate="label" module="hipay">
756
+ <label>HiPay Enterprise Credit Card Split Payment</label>
757
  <frontend_type>text</frontend_type>
758
  <sort_order>205</sort_order>
759
  <show_in_default>1</show_in_default>
760
  <show_in_website>1</show_in_website>
761
  <show_in_store>1</show_in_store>
762
  <fields>
763
+ <active translate="label">
764
+ <label>Enabled</label>
765
+ <frontend_type>select</frontend_type>
766
+ <source_model>adminhtml/system_config_source_yesno</source_model>
767
+ <sort_order>10</sort_order>
768
+ <show_in_default>1</show_in_default>
769
+ <show_in_website>1</show_in_website>
770
+ <show_in_store>1</show_in_store>
771
+ </active>
772
+ <title translate="label">
773
+ <label>Title</label>
774
+ <frontend_type>text</frontend_type>
775
+ <sort_order>15</sort_order>
776
+ <show_in_default>1</show_in_default>
777
+ <show_in_website>1</show_in_website>
778
+ <show_in_store>1</show_in_store>
779
+ </title>
780
+ <split_payment_profile translate="label">
781
+ <label>Payment Profile</label>
782
+ <frontend_type>multiselect</frontend_type>
783
+ <source_model>hipay/source_paymentProfile::splitPaymentsToOptionArray</source_model>
784
+ <sort_order>20</sort_order>
785
+ <show_in_default>1</show_in_default>
786
+ <show_in_website>1</show_in_website>
787
+ <show_in_store>0</show_in_store>
788
+ </split_payment_profile>
789
  <order_status_payment_accepted translate="label">
790
  <label>Order status when payment accepted</label>
791
  <frontend_type>select</frontend_type>
824
  </hipay_status_validate_order>
825
  <success_redirect_page translate="label">
826
  <label>Redirect page success</label>
827
+ <comment>Page to redirect when transaction is successful, leave empty for
828
+ checkout/onepage/success
829
+ </comment>
830
  <frontend_type>text</frontend_type>
831
+ <sort_order>27</sort_order>
832
  <show_in_default>1</show_in_default>
833
  <show_in_website>1</show_in_website>
834
  <show_in_store>0</show_in_store>
835
  </success_redirect_page>
836
+ <failure_redirect_page translate="label">
837
+ <label>Redirect page failure</label>
838
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
839
+ </comment>
840
+ <frontend_type>text</frontend_type>
841
+ <sort_order>28</sort_order>
842
+ <show_in_default>1</show_in_default>
843
+ <show_in_website>1</show_in_website>
844
+ <show_in_store>0</show_in_store>
845
+ </failure_redirect_page>
846
  <pending_redirect_page translate="label">
847
  <label>Redirect page pending status</label>
848
  <comment>Page to redirect when transaction is in pending status</comment>
849
  <frontend_type>select</frontend_type>
850
  <source_model>hipay/source_pendingredirect</source_model>
851
+ <sort_order>29</sort_order>
852
  <show_in_default>1</show_in_default>
853
  <show_in_website>1</show_in_website>
854
  <show_in_store>0</show_in_store>
855
  </pending_redirect_page>
856
+ <payment_action translate="label">
857
+ <label>Payment Action</label>
858
+ <frontend_type>select</frontend_type>
859
+ <source_model>hipay/source_paymentAction</source_model>
860
+ <sort_order>30</sort_order>
861
+ <show_in_default>1</show_in_default>
862
+ <show_in_website>1</show_in_website>
863
+ <show_in_store>0</show_in_store>
864
+ </payment_action>
865
+ <cctypes translate="label">
866
  <label>Credit Card Types</label>
867
  <comment>Sort the list by drag'n/drop credit card type</comment>
868
  <frontend_type>checkboxes</frontend_type>
869
+ <frontend_model>hipay/adminhtml_system_config_form_field_multiselectSortable
870
+ </frontend_model>
871
  <backend_model>hipay/system_config_backend_ccTypes</backend_model>
872
+ <source_model>hipay/source_ccType::toConfigOption</source_model>
873
  <sort_order>40</sort_order>
874
  <show_in_default>1</show_in_default>
875
  <show_in_website>1</show_in_website>
895
  <show_in_store>0</show_in_store>
896
  </useccv>
897
  <use_3d_secure translate="label">
898
+ <label>Use 3D Secure</label>
899
  <frontend_type>select</frontend_type>
900
  <source_model>hipay/source_3ds</source_model>
901
  <sort_order>60</sort_order>
904
  <show_in_store>0</show_in_store>
905
  </use_3d_secure>
906
  <config_3ds_rules translate="label comment">
907
+ <label>Rules 3D Secure</label>
908
+ <comment>Configure Rules to activate 3D Secure</comment>
909
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
910
  <backend_model>hipay/rule_config</backend_model>
911
  <sort_order>61</sort_order>
914
  <show_in_store>0</show_in_store>
915
  </config_3ds_rules>
916
  <send_fraud_payment_email translate="label">
917
+ <label>Send fraud payment email</label>
918
+ <frontend_type>select</frontend_type>
919
+ <source_model>adminhtml/system_config_source_yesno</source_model>
920
+ <sort_order>63</sort_order>
921
+ <show_in_default>1</show_in_default>
922
+ <show_in_website>1</show_in_website>
923
+ <show_in_store>1</show_in_store>
924
+ </send_fraud_payment_email>
925
  <allow_use_oneclick translate="label">
926
+ <label>Use Oneclick</label>
927
  <frontend_type>select</frontend_type>
928
  <source_model>adminhtml/system_config_source_yesno</source_model>
929
  <sort_order>70</sort_order>
931
  <show_in_website>1</show_in_website>
932
  <show_in_store>0</show_in_store>
933
  </allow_use_oneclick>
934
+ <filter_oneclick translate="label comment">
935
+ <label>Rules Oneclick</label>
936
+ <comment>Configure Rules to activate oneclick</comment>
937
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
938
  <backend_model>hipay/rule_config</backend_model>
939
  <sort_order>80</sort_order>
941
  <show_in_website>1</show_in_website>
942
  <show_in_store>0</show_in_store>
943
  </filter_oneclick>
944
+ <re_add_to_cart translate="label comment">
945
+ <label>Add product to cart</label>
946
+ <comment>Fill cart when payment canceled or refused</comment>
947
  <frontend_type>select</frontend_type>
948
  <source_model>adminhtml/system_config_source_yesno</source_model>
949
  <sort_order>95</sort_order>
950
  <show_in_default>1</show_in_default>
951
  <show_in_website>1</show_in_website>
952
  <show_in_store>0</show_in_store>
953
+ </re_add_to_cart>
954
+ <cancel_pending_order translate="label comment">
955
+ <label>Cancel pending order</label>
956
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
957
  <frontend_type>select</frontend_type>
958
  <source_model>adminhtml/system_config_source_yesno</source_model>
959
  <sort_order>97</sort_order>
960
  <show_in_default>1</show_in_default>
961
  <show_in_website>1</show_in_website>
962
  <show_in_store>0</show_in_store>
963
+ </cancel_pending_order>
964
+ <delay_cancel_pending_order translate="label">
965
+ <label>Delay before cancel order</label>
966
+ <comment>In Hours</comment>
967
+ <frontend_type>text</frontend_type>
968
+ <sort_order>98</sort_order>
969
+ <show_in_default>1</show_in_default>
970
+ <show_in_website>1</show_in_website>
971
+ <show_in_store>1</show_in_store>
972
+ </delay_cancel_pending_order>
973
+ <send_fraud_payment_email translate="label">
974
+ <label>Send fraud payment email</label>
975
+ <frontend_type>select</frontend_type>
976
+ <source_model>adminhtml/system_config_source_yesno</source_model>
977
+ <sort_order>99</sort_order>
978
+ <show_in_default>1</show_in_default>
979
+ <show_in_website>1</show_in_website>
980
+ <show_in_store>1</show_in_store>
981
+ </send_fraud_payment_email>
982
+ <allowspecific translate="label">
983
  <label>Payment from applicable countries</label>
984
  <frontend_type>allowspecific</frontend_type>
985
  <sort_order>100</sort_order>
1022
  <show_in_store>1</show_in_store>
1023
  </sort_order>
1024
  <debug>
1025
+ <label>Enable debug log</label>
1026
+ <comment></comment>
1027
  <frontend_type>select</frontend_type>
1028
  <source_model>adminhtml/system_config_source_yesno</source_model>
1029
  <sort_order>150</sort_order>
1031
  <show_in_website>1</show_in_website>
1032
  <show_in_store>0</show_in_store>
1033
  </debug>
1034
+ <is_test_mode translate="label comment">
1035
+ <label>Enable test mode</label>
1036
+ <comment></comment>
1037
+ <frontend_type>select</frontend_type>
1038
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1039
  <sort_order>200</sort_order>
1040
  <show_in_default>1</show_in_default>
1041
  <show_in_website>1</show_in_website>
1042
  <show_in_store>1</show_in_store>
1043
  </is_test_mode>
1044
+ </fields>
1045
+ </hipay_ccxtimes>
1046
+ <hipay_hosted translate="label" module="hipay">
1047
+ <label>HiPay Enterprise Hosted Page</label>
1048
  <frontend_type>text</frontend_type>
1049
  <sort_order>210</sort_order>
1050
  <show_in_default>1</show_in_default>
1051
  <show_in_website>1</show_in_website>
1052
  <show_in_store>1</show_in_store>
1053
  <fields>
1054
+ <active translate="label">
1055
+ <label>Enabled</label>
1056
+ <frontend_type>select</frontend_type>
1057
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1058
+ <sort_order>10</sort_order>
1059
+ <show_in_default>1</show_in_default>
1060
+ <show_in_website>1</show_in_website>
1061
+ <show_in_store>1</show_in_store>
1062
+ </active>
1063
+ <title translate="label">
1064
+ <label>Title</label>
1065
+ <frontend_type>text</frontend_type>
1066
+ <sort_order>20</sort_order>
1067
+ <show_in_default>1</show_in_default>
1068
+ <show_in_website>1</show_in_website>
1069
+ <show_in_store>1</show_in_store>
1070
+ </title>
1071
  <order_status_payment_accepted translate="label">
1072
  <label>Order status when payment accepted</label>
1073
  <frontend_type>select</frontend_type>
1095
  <show_in_website>1</show_in_website>
1096
  <show_in_store>0</show_in_store>
1097
  </order_status_payment_canceled>
1098
+ <hipay_status_validate_order translate="label">
1099
  <label>Hipay status to validate order</label>
1100
  <frontend_type>select</frontend_type>
1101
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
1106
  </hipay_status_validate_order>
1107
  <success_redirect_page translate="label">
1108
  <label>Redirect page success</label>
1109
+ <comment>Page to redirect when transaction is successful, leave empty for
1110
+ checkout/onepage/success
1111
+ </comment>
1112
  <frontend_type>text</frontend_type>
1113
+ <sort_order>27</sort_order>
1114
  <show_in_default>1</show_in_default>
1115
  <show_in_website>1</show_in_website>
1116
  <show_in_store>0</show_in_store>
1117
  </success_redirect_page>
1118
+ <failure_redirect_page translate="label">
1119
+ <label>Redirect page failure</label>
1120
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
1121
+ </comment>
1122
+ <frontend_type>text</frontend_type>
1123
+ <sort_order>28</sort_order>
1124
+ <show_in_default>1</show_in_default>
1125
+ <show_in_website>1</show_in_website>
1126
+ <show_in_store>0</show_in_store>
1127
+ </failure_redirect_page>
1128
+ <pending_redirect_page translate="label">
1129
  <label>Redirect page pending status</label>
1130
  <comment>Page to redirect when transaction is in pending status</comment>
1131
  <frontend_type>select</frontend_type>
1132
  <source_model>hipay/source_pendingredirect</source_model>
1133
+ <sort_order>29</sort_order>
1134
  <show_in_default>1</show_in_default>
1135
  <show_in_website>1</show_in_website>
1136
  <show_in_store>0</show_in_store>
1137
  </pending_redirect_page>
1138
+ <payment_action translate="label">
1139
+ <label>Payment Action</label>
1140
+ <frontend_type>select</frontend_type>
1141
+ <source_model>hipay/source_paymentAction</source_model>
1142
+ <sort_order>30</sort_order>
1143
+ <show_in_default>1</show_in_default>
1144
+ <show_in_website>1</show_in_website>
1145
+ <show_in_store>0</show_in_store>
1146
+ </payment_action>
1147
+ <cctypes translate="label">
1148
  <label>Credit Card Types</label>
1149
  <comment>Sort the list by drag'n/drop credit card type</comment>
1150
  <frontend_type>checkboxes</frontend_type>
1151
+ <frontend_model>hipay/adminhtml_system_config_form_field_multiselectSortable
1152
+ </frontend_model>
1153
  <backend_model>hipay/system_config_backend_ccTypes</backend_model>
1154
+ <source_model>hipay/source_ccTypeHosted::toConfigOption</source_model>
1155
+ <sort_order>31</sort_order>
1156
  <show_in_default>1</show_in_default>
1157
  <show_in_website>1</show_in_website>
1158
  <show_in_store>0</show_in_store>
1159
  </cctypes>
1160
  <css_url translate="label coment">
1161
+ <label>Css Url</label>
1162
+ <comment>Important, HTTPS protocol is required</comment>
1163
+ <frontend_type>text</frontend_type>
1164
+ <sort_order>32</sort_order>
1165
+ <show_in_default>1</show_in_default>
1166
+ <show_in_website>1</show_in_website>
1167
+ <show_in_store>1</show_in_store>
1168
  </css_url>
1169
  <template translate="label">
1170
+ <label>Page payment template</label>
1171
  <frontend_type>select</frontend_type>
1172
  <source_model>hipay/source_template</source_model>
1173
  <sort_order>35</sort_order>
1174
  <show_in_default>1</show_in_default>
1175
  <show_in_website>1</show_in_website>
1176
+ <show_in_store>1</show_in_store>
1177
  </template>
1178
+ <display_iframe translate="label">
1179
+ <label>Display hosted page in Iframe</label>
1180
  <frontend_type>select</frontend_type>
1181
  <source_model>adminhtml/system_config_source_yesno</source_model>
1182
  <sort_order>36</sort_order>
1185
  <show_in_store>0</show_in_store>
1186
  </display_iframe>
1187
  <iframe_width translate="label">
1188
+ <label>iFrame Width</label>
1189
+ <frontend_type>text</frontend_type>
1190
+ <sort_order>37</sort_order>
1191
+ <show_in_default>1</show_in_default>
1192
+ <show_in_website>1</show_in_website>
1193
+ <show_in_store>1</show_in_store>
1194
  </iframe_width>
1195
  <iframe_height translate="label">
1196
+ <label>iFrame Height</label>
1197
+ <frontend_type>text</frontend_type>
1198
+ <sort_order>38</sort_order>
1199
+ <show_in_default>1</show_in_default>
1200
+ <show_in_website>1</show_in_website>
1201
+ <show_in_store>1</show_in_store>
1202
  </iframe_height>
1203
  <iframe_style translate="label">
1204
+ <label>iFrame Style</label>
1205
+ <frontend_type>text</frontend_type>
1206
+ <sort_order>39</sort_order>
1207
+ <show_in_default>1</show_in_default>
1208
+ <show_in_website>1</show_in_website>
1209
+ <show_in_store>1</show_in_store>
1210
  </iframe_style>
1211
  <iframe_wrapper_style translate="label">
1212
+ <label>Wrapper iFrame Style</label>
1213
+ <frontend_type>text</frontend_type>
1214
+ <sort_order>39</sort_order>
1215
+ <show_in_default>1</show_in_default>
1216
+ <show_in_website>1</show_in_website>
1217
+ <show_in_store>1</show_in_store>
1218
  </iframe_wrapper_style>
1219
  <display_selector translate="label">
1220
+ <label>Display card selector</label>
1221
  <frontend_type>select</frontend_type>
1222
  <source_model>adminhtml/system_config_source_yesno</source_model>
1223
  <sort_order>40</sort_order>
1226
  <show_in_store>0</show_in_store>
1227
  </display_selector>
1228
  <use_3d_secure translate="label">
1229
+ <label>Use 3D Secure</label>
1230
  <frontend_type>select</frontend_type>
1231
  <source_model>hipay/source_3ds</source_model>
1232
  <sort_order>60</sort_order>
1235
  <show_in_store>0</show_in_store>
1236
  </use_3d_secure>
1237
  <config_3ds_rules translate="label comment">
1238
+ <label>Rules 3D Secure</label>
1239
+ <comment>Configure Rules to activate 3D Secure</comment>
1240
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
1241
  <backend_model>hipay/rule_config</backend_model>
1242
  <sort_order>61</sort_order>
1245
  <show_in_store>0</show_in_store>
1246
  </config_3ds_rules>
1247
  <send_fraud_payment_email translate="label">
1248
+ <label>Send fraud payment email</label>
 
 
 
 
 
 
 
 
 
 
1249
  <frontend_type>select</frontend_type>
 
1250
  <source_model>adminhtml/system_config_source_yesno</source_model>
1251
+ <sort_order>63</sort_order>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1252
  <show_in_default>1</show_in_default>
1253
  <show_in_website>1</show_in_website>
1254
  <show_in_store>1</show_in_store>
1255
+ </send_fraud_payment_email>
1256
+ <!-- @deprecated since version 1.2.6 -->
1257
+ <!-- <allow_split_payment translate="label">
1258
+ <label>Use Split Payment</label>
1259
+ <frontend_type>select</frontend_type>
1260
+ <frontend_model>hipay/adminhtml_system_config_form_field_allowsplitpayment</frontend_model>
1261
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1262
+ <sort_order>65</sort_order>
1263
+ <show_in_default>1</show_in_default>
1264
+ <show_in_website>1</show_in_website>
1265
+ <show_in_store>0</show_in_store>
1266
+ </allow_split_payment>
1267
+ <split_payment_profile translate="label">
1268
+ <label>Payment Profile</label>
1269
+ <frontend_type>multiselect</frontend_type>
1270
+ <source_model>hipay/source_paymentProfile::splitPaymentsToOptionArray</source_model>
1271
+ <sort_order>66</sort_order>
1272
+ <show_in_default>1</show_in_default>
1273
+ <show_in_website>1</show_in_website>
1274
+ <show_in_store>0</show_in_store>
1275
+ </split_payment_profile>
1276
+ <min_order_total_split_payment translate="label">
1277
+ <label>Minimum Order Total for Split Payment</label>
1278
+ <frontend_type>text</frontend_type>
1279
+ <sort_order>68</sort_order>
1280
+ <show_in_default>1</show_in_default>
1281
+ <show_in_website>1</show_in_website>
1282
+ <show_in_store>1</show_in_store>
1283
+ </min_order_total_split_payment> -->
1284
+ <allow_use_oneclick translate="label">
1285
+ <label>Use Oneclick</label>
1286
  <frontend_type>select</frontend_type>
1287
  <source_model>adminhtml/system_config_source_yesno</source_model>
1288
  <sort_order>70</sort_order>
1291
  <show_in_store>0</show_in_store>
1292
  </allow_use_oneclick>
1293
  <filter_oneclick translate="label comment">
1294
+ <label>Rules Oneclick</label>
1295
+ <comment>Configure Rules to activate oneclick</comment>
1296
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
1297
  <backend_model>hipay/rule_config</backend_model>
1298
  <sort_order>80</sort_order>
1300
  <show_in_website>1</show_in_website>
1301
  <show_in_store>0</show_in_store>
1302
  </filter_oneclick>
1303
+ <re_add_to_cart translate="label comment">
1304
+ <label>Add product to cart</label>
1305
+ <comment>Fill cart when payment canceled or refused</comment>
1306
  <frontend_type>select</frontend_type>
1307
  <source_model>adminhtml/system_config_source_yesno</source_model>
1308
  <sort_order>95</sort_order>
1311
  <show_in_store>0</show_in_store>
1312
  </re_add_to_cart>
1313
  <cancel_pending_order translate="label comment">
1314
+ <label>Cancel pending order</label>
1315
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
1316
  <frontend_type>select</frontend_type>
1317
  <source_model>adminhtml/system_config_source_yesno</source_model>
1318
  <sort_order>97</sort_order>
1319
  <show_in_default>1</show_in_default>
1320
  <show_in_website>1</show_in_website>
1321
  <show_in_store>0</show_in_store>
1322
+ </cancel_pending_order>
1323
+ <delay_cancel_pending_order translate="label">
1324
+ <label>Delay before cancel order</label>
1325
+ <comment>In Hours</comment>
1326
+ <frontend_type>text</frontend_type>
1327
+ <sort_order>98</sort_order>
1328
+ <show_in_default>1</show_in_default>
1329
+ <show_in_website>1</show_in_website>
1330
+ <show_in_store>1</show_in_store>
1331
+ </delay_cancel_pending_order>
1332
+ <send_fraud_payment_email translate="label">
1333
+ <label>Send fraud payment email</label>
1334
+ <frontend_type>select</frontend_type>
1335
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1336
+ <sort_order>99</sort_order>
1337
+ <show_in_default>1</show_in_default>
1338
+ <show_in_website>1</show_in_website>
1339
+ <show_in_store>1</show_in_store>
1340
+ </send_fraud_payment_email>
1341
+ <allowspecific translate="label">
1342
  <label>Payment from applicable countries</label>
1343
  <frontend_type>allowspecific</frontend_type>
1344
  <sort_order>100</sort_order>
1381
  <show_in_store>1</show_in_store>
1382
  </sort_order>
1383
  <debug translate="label">
1384
+ <label>Enable debug log</label>
1385
+ <comment></comment>
1386
  <frontend_type>select</frontend_type>
1387
  <source_model>adminhtml/system_config_source_yesno</source_model>
1388
  <sort_order>150</sort_order>
1390
  <show_in_website>1</show_in_website>
1391
  <show_in_store>0</show_in_store>
1392
  </debug>
1393
+ <is_test_mode translate="label comment">
1394
+ <label>Enable test mode</label>
1395
+ <comment></comment>
1396
  <frontend_type>select</frontend_type>
1397
  <source_model>adminhtml/system_config_source_yesno</source_model>
1398
  <sort_order>200</sort_order>
1400
  <show_in_website>1</show_in_website>
1401
  <show_in_store>1</show_in_store>
1402
  </is_test_mode>
1403
+ </fields>
1404
+ </hipay_hosted>
1405
+ <hipay_hostedxtimes translate="label" module="hipay">
1406
+ <label>HiPay Enterprise Hosted Page Split Payment</label>
1407
  <frontend_type>text</frontend_type>
1408
  <sort_order>215</sort_order>
1409
  <show_in_default>1</show_in_default>
1410
  <show_in_website>1</show_in_website>
1411
  <show_in_store>1</show_in_store>
1412
  <fields>
1413
+ <active translate="label">
1414
+ <label>Enabled</label>
1415
+ <frontend_type>select</frontend_type>
1416
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1417
+ <sort_order>10</sort_order>
1418
+ <show_in_default>1</show_in_default>
1419
+ <show_in_website>1</show_in_website>
1420
+ <show_in_store>1</show_in_store>
1421
+ </active>
1422
+ <title translate="label">
1423
+ <label>Title</label>
1424
+ <frontend_type>text</frontend_type>
1425
+ <sort_order>15</sort_order>
1426
+ <show_in_default>1</show_in_default>
1427
+ <show_in_website>1</show_in_website>
1428
+ <show_in_store>1</show_in_store>
1429
+ </title>
1430
+ <split_payment_profile translate="label">
1431
+ <label>Payment Profile</label>
1432
+ <frontend_type>multiselect</frontend_type>
1433
+ <source_model>hipay/source_paymentProfile::splitPaymentsToOptionArray</source_model>
1434
+ <sort_order>20</sort_order>
1435
+ <show_in_default>1</show_in_default>
1436
+ <show_in_website>1</show_in_website>
1437
+ <show_in_store>0</show_in_store>
1438
+ </split_payment_profile>
1439
  <order_status_payment_accepted translate="label">
1440
  <label>Order status when payment accepted</label>
1441
  <frontend_type>select</frontend_type>
1463
  <show_in_website>1</show_in_website>
1464
  <show_in_store>0</show_in_store>
1465
  </order_status_payment_canceled>
1466
+ <hipay_status_validate_order translate="label">
1467
  <label>Hipay status to validate order</label>
1468
  <frontend_type>select</frontend_type>
1469
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
1474
  </hipay_status_validate_order>
1475
  <success_redirect_page translate="label">
1476
  <label>Redirect page success</label>
1477
+ <comment>Page to redirect when transaction is successful, leave empty for
1478
+ checkout/onepage/success
1479
+ </comment>
1480
  <frontend_type>text</frontend_type>
1481
+ <sort_order>27</sort_order>
1482
  <show_in_default>1</show_in_default>
1483
  <show_in_website>1</show_in_website>
1484
  <show_in_store>0</show_in_store>
1485
  </success_redirect_page>
1486
+ <failure_redirect_page translate="label">
1487
+ <label>Redirect page failure</label>
1488
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
1489
+ </comment>
1490
+ <frontend_type>text</frontend_type>
1491
+ <sort_order>28</sort_order>
1492
+ <show_in_default>1</show_in_default>
1493
+ <show_in_website>1</show_in_website>
1494
+ <show_in_store>0</show_in_store>
1495
+ </failure_redirect_page>
1496
+ <pending_redirect_page translate="label">
1497
  <label>Redirect page pending status</label>
1498
  <comment>Page to redirect when transaction is in pending status</comment>
1499
  <frontend_type>select</frontend_type>
1500
  <source_model>hipay/source_pendingredirect</source_model>
1501
+ <sort_order>29</sort_order>
1502
  <show_in_default>1</show_in_default>
1503
  <show_in_website>1</show_in_website>
1504
  <show_in_store>0</show_in_store>
1505
  </pending_redirect_page>
1506
+ <payment_action translate="label">
1507
+ <label>Payment Action</label>
1508
+ <frontend_type>select</frontend_type>
1509
+ <source_model>hipay/source_paymentAction</source_model>
1510
+ <sort_order>30</sort_order>
1511
+ <show_in_default>1</show_in_default>
1512
+ <show_in_website>1</show_in_website>
1513
+ <show_in_store>0</show_in_store>
1514
+ </payment_action>
1515
+ <cctypes translate="label">
1516
  <label>Credit Card Types</label>
1517
  <comment>Sort the list by drag'n/drop credit card type</comment>
1518
  <frontend_type>checkboxes</frontend_type>
1519
+ <frontend_model>hipay/adminhtml_system_config_form_field_multiselectSortable
1520
+ </frontend_model>
1521
  <backend_model>hipay/system_config_backend_ccTypes</backend_model>
1522
+ <source_model>hipay/source_ccTypeHosted::toConfigOption</source_model>
1523
+ <sort_order>31</sort_order>
1524
  <show_in_default>1</show_in_default>
1525
  <show_in_website>1</show_in_website>
1526
  <show_in_store>0</show_in_store>
1527
  </cctypes>
1528
  <css_url translate="label coment">
1529
+ <label>Css Url</label>
1530
+ <comment>Important, HTTPS protocol is required</comment>
1531
+ <frontend_type>text</frontend_type>
1532
+ <sort_order>32</sort_order>
1533
+ <show_in_default>1</show_in_default>
1534
+ <show_in_website>1</show_in_website>
1535
+ <show_in_store>1</show_in_store>
1536
  </css_url>
1537
  <template translate="label">
1538
+ <label>Page payment template</label>
1539
  <frontend_type>select</frontend_type>
1540
  <source_model>hipay/source_template</source_model>
1541
  <sort_order>35</sort_order>
1542
  <show_in_default>1</show_in_default>
1543
  <show_in_website>1</show_in_website>
1544
+ <show_in_store>1</show_in_store>
1545
  </template>
1546
+ <display_iframe translate="label">
1547
+ <label>Display hosted page in Iframe</label>
1548
  <frontend_type>select</frontend_type>
1549
  <source_model>adminhtml/system_config_source_yesno</source_model>
1550
  <sort_order>36</sort_order>
1553
  <show_in_store>0</show_in_store>
1554
  </display_iframe>
1555
  <iframe_width translate="label">
1556
+ <label>iFrame Width</label>
1557
+ <frontend_type>text</frontend_type>
1558
+ <sort_order>37</sort_order>
1559
+ <show_in_default>1</show_in_default>
1560
+ <show_in_website>1</show_in_website>
1561
+ <show_in_store>1</show_in_store>
1562
  </iframe_width>
1563
  <iframe_height translate="label">
1564
+ <label>iFrame Height</label>
1565
+ <frontend_type>text</frontend_type>
1566
+ <sort_order>38</sort_order>
1567
+ <show_in_default>1</show_in_default>
1568
+ <show_in_website>1</show_in_website>
1569
+ <show_in_store>1</show_in_store>
1570
  </iframe_height>
1571
  <iframe_style translate="label">
1572
+ <label>iFrame Style</label>
1573
+ <frontend_type>text</frontend_type>
1574
+ <sort_order>39</sort_order>
1575
+ <show_in_default>1</show_in_default>
1576
+ <show_in_website>1</show_in_website>
1577
+ <show_in_store>1</show_in_store>
1578
  </iframe_style>
1579
  <iframe_wrapper_style translate="label">
1580
+ <label>Wrapper iFrame Style</label>
1581
+ <frontend_type>text</frontend_type>
1582
+ <sort_order>39</sort_order>
1583
+ <show_in_default>1</show_in_default>
1584
+ <show_in_website>1</show_in_website>
1585
+ <show_in_store>1</show_in_store>
1586
  </iframe_wrapper_style>
1587
  <display_selector translate="label">
1588
+ <label>Display card selector</label>
1589
  <frontend_type>select</frontend_type>
1590
  <source_model>adminhtml/system_config_source_yesno</source_model>
1591
  <sort_order>40</sort_order>
1594
  <show_in_store>0</show_in_store>
1595
  </display_selector>
1596
  <use_3d_secure translate="label">
1597
+ <label>Use 3D Secure</label>
1598
  <frontend_type>select</frontend_type>
1599
  <source_model>hipay/source_3ds</source_model>
1600
  <sort_order>60</sort_order>
1603
  <show_in_store>0</show_in_store>
1604
  </use_3d_secure>
1605
  <config_3ds_rules translate="label comment">
1606
+ <label>Rules 3D Secure</label>
1607
+ <comment>Configure Rules to activate 3D Secure</comment>
1608
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
1609
  <backend_model>hipay/rule_config</backend_model>
1610
  <sort_order>61</sort_order>
1613
  <show_in_store>0</show_in_store>
1614
  </config_3ds_rules>
1615
  <send_fraud_payment_email translate="label">
1616
+ <label>Send fraud payment email</label>
1617
+ <frontend_type>select</frontend_type>
1618
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1619
+ <sort_order>63</sort_order>
1620
+ <show_in_default>1</show_in_default>
1621
+ <show_in_website>1</show_in_website>
1622
+ <show_in_store>1</show_in_store>
1623
+ </send_fraud_payment_email>
1624
+ <allow_use_oneclick translate="label">
1625
+ <label>Use Oneclick</label>
1626
  <frontend_type>select</frontend_type>
1627
  <source_model>adminhtml/system_config_source_yesno</source_model>
1628
  <sort_order>70</sort_order>
1631
  <show_in_store>0</show_in_store>
1632
  </allow_use_oneclick>
1633
  <filter_oneclick translate="label comment">
1634
+ <label>Rules Oneclick</label>
1635
+ <comment>Configure Rules to activate oneclick</comment>
1636
  <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
1637
  <backend_model>hipay/rule_config</backend_model>
1638
  <sort_order>80</sort_order>
1640
  <show_in_website>1</show_in_website>
1641
  <show_in_store>0</show_in_store>
1642
  </filter_oneclick>
1643
+ <re_add_to_cart translate="label comment">
1644
+ <label>Add product to cart</label>
1645
+ <comment>Fill cart when payment canceled or refused</comment>
1646
  <frontend_type>select</frontend_type>
1647
  <source_model>adminhtml/system_config_source_yesno</source_model>
1648
  <sort_order>95</sort_order>
1651
  <show_in_store>0</show_in_store>
1652
  </re_add_to_cart>
1653
  <cancel_pending_order translate="label comment">
1654
+ <label>Cancel pending order</label>
1655
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
1656
  <frontend_type>select</frontend_type>
1657
  <source_model>adminhtml/system_config_source_yesno</source_model>
1658
  <sort_order>97</sort_order>
1659
  <show_in_default>1</show_in_default>
1660
  <show_in_website>1</show_in_website>
1661
  <show_in_store>0</show_in_store>
1662
+ </cancel_pending_order>
1663
+ <delay_cancel_pending_order translate="label">
1664
+ <label>Delay before cancel order</label>
1665
+ <comment>In Hours</comment>
1666
+ <frontend_type>text</frontend_type>
1667
+ <sort_order>98</sort_order>
1668
+ <show_in_default>1</show_in_default>
1669
+ <show_in_website>1</show_in_website>
1670
+ <show_in_store>1</show_in_store>
1671
+ </delay_cancel_pending_order>
1672
+ <send_fraud_payment_email translate="label">
1673
+ <label>Send fraud payment email</label>
1674
+ <frontend_type>select</frontend_type>
1675
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1676
+ <sort_order>99</sort_order>
1677
+ <show_in_default>1</show_in_default>
1678
+ <show_in_website>1</show_in_website>
1679
+ <show_in_store>1</show_in_store>
1680
+ </send_fraud_payment_email>
1681
+ <allowspecific translate="label">
1682
  <label>Payment from applicable countries</label>
1683
  <frontend_type>allowspecific</frontend_type>
1684
  <sort_order>100</sort_order>
1721
  <show_in_store>1</show_in_store>
1722
  </sort_order>
1723
  <debug translate="label">
1724
+ <label>Enable debug log</label>
1725
+ <comment></comment>
1726
  <frontend_type>select</frontend_type>
1727
  <source_model>adminhtml/system_config_source_yesno</source_model>
1728
  <sort_order>150</sort_order>
1730
  <show_in_website>1</show_in_website>
1731
  <show_in_store>0</show_in_store>
1732
  </debug>
1733
+ <is_test_mode translate="label comment">
1734
+ <label>Enable test mode</label>
1735
+ <comment></comment>
1736
  <frontend_type>select</frontend_type>
1737
  <source_model>adminhtml/system_config_source_yesno</source_model>
1738
  <sort_order>200</sort_order>
1740
  <show_in_website>1</show_in_website>
1741
  <show_in_store>1</show_in_store>
1742
  </is_test_mode>
1743
+ </fields>
1744
+ </hipay_hostedxtimes>
1745
+ <hipay_ideal translate="label" module="hipay">
1746
+ <label>HiPay Enterprise iDeal</label>
1747
  <frontend_type>text</frontend_type>
1748
  <sort_order>220</sort_order>
1749
  <show_in_default>1</show_in_default>
1750
  <show_in_website>1</show_in_website>
1751
  <show_in_store>1</show_in_store>
1752
  <fields>
1753
+ <active translate="label">
1754
+ <label>Enabled</label>
1755
+ <frontend_type>select</frontend_type>
1756
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1757
+ <sort_order>10</sort_order>
1758
+ <show_in_default>1</show_in_default>
1759
+ <show_in_website>1</show_in_website>
1760
+ <show_in_store>1</show_in_store>
1761
+ </active>
1762
+ <title translate="label">
1763
+ <label>Title</label>
1764
+ <frontend_type>text</frontend_type>
1765
+ <sort_order>20</sort_order>
1766
+ <show_in_default>1</show_in_default>
1767
+ <show_in_website>1</show_in_website>
1768
+ <show_in_store>1</show_in_store>
1769
+ </title>
1770
  <order_status_payment_accepted translate="label">
1771
  <label>Order status when payment accepted</label>
1772
  <frontend_type>select</frontend_type>
1794
  <show_in_website>1</show_in_website>
1795
  <show_in_store>0</show_in_store>
1796
  </order_status_payment_canceled>
1797
+ <hipay_status_validate_order translate="label">
1798
  <label>Hipay status to validate order</label>
1799
  <frontend_type>select</frontend_type>
1800
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
1805
  </hipay_status_validate_order>
1806
  <success_redirect_page translate="label">
1807
  <label>Redirect page success</label>
1808
+ <comment>Page to redirect when transaction is successful, leave empty for
1809
+ checkout/onepage/success
1810
+ </comment>
1811
  <frontend_type>text</frontend_type>
1812
+ <sort_order>27</sort_order>
1813
  <show_in_default>1</show_in_default>
1814
  <show_in_website>1</show_in_website>
1815
  <show_in_store>0</show_in_store>
1816
  </success_redirect_page>
1817
+ <failure_redirect_page translate="label">
1818
+ <label>Redirect page failure</label>
1819
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
1820
+ </comment>
1821
+ <frontend_type>text</frontend_type>
1822
+ <sort_order>28</sort_order>
1823
+ <show_in_default>1</show_in_default>
1824
+ <show_in_website>1</show_in_website>
1825
+ <show_in_store>0</show_in_store>
1826
+ </failure_redirect_page>
1827
+ <pending_redirect_page translate="label">
1828
  <label>Redirect page pending status</label>
1829
  <comment>Page to redirect when transaction is in pending status</comment>
1830
  <frontend_type>select</frontend_type>
1831
  <source_model>hipay/source_pendingredirect</source_model>
1832
+ <sort_order>29</sort_order>
1833
  <show_in_default>1</show_in_default>
1834
  <show_in_website>1</show_in_website>
1835
  <show_in_store>0</show_in_store>
1836
  </pending_redirect_page>
1837
  <css_url translate="label coment">
1838
+ <label>Css Url</label>
1839
+ <comment>Important, HTTPS protocol is required</comment>
1840
+ <frontend_type>text</frontend_type>
1841
+ <sort_order>30</sort_order>
1842
+ <show_in_default>1</show_in_default>
1843
+ <show_in_website>1</show_in_website>
1844
+ <show_in_store>1</show_in_store>
1845
  </css_url>
1846
  <template translate="label">
1847
+ <label>Page payment template</label>
1848
  <frontend_type>select</frontend_type>
1849
  <source_model>hipay/source_template</source_model>
1850
  <sort_order>35</sort_order>
1851
  <show_in_default>1</show_in_default>
1852
  <show_in_website>1</show_in_website>
1853
+ <show_in_store>1</show_in_store>
1854
  </template>
1855
+ <re_add_to_cart translate="label comment">
1856
+ <label>Add product to cart</label>
1857
+ <comment>Fill cart when payment canceled or refused</comment>
1858
  <frontend_type>select</frontend_type>
1859
  <source_model>adminhtml/system_config_source_yesno</source_model>
1860
  <sort_order>95</sort_order>
1863
  <show_in_store>0</show_in_store>
1864
  </re_add_to_cart>
1865
  <cancel_pending_order translate="label comment">
1866
+ <label>Cancel pending order</label>
1867
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
1868
  <frontend_type>select</frontend_type>
1869
  <source_model>adminhtml/system_config_source_yesno</source_model>
1870
  <sort_order>97</sort_order>
1871
  <show_in_default>1</show_in_default>
1872
  <show_in_website>1</show_in_website>
1873
  <show_in_store>0</show_in_store>
1874
+ </cancel_pending_order>
1875
+ <delay_cancel_pending_order translate="label">
1876
+ <label>Delay before cancel order</label>
1877
+ <comment>In Hours</comment>
1878
+ <frontend_type>text</frontend_type>
1879
+ <sort_order>98</sort_order>
 
 
 
 
 
 
 
 
 
1880
  <show_in_default>1</show_in_default>
1881
  <show_in_website>1</show_in_website>
1882
  <show_in_store>1</show_in_store>
1883
+ </delay_cancel_pending_order>
1884
+ <send_fraud_payment_email translate="label">
1885
+ <label>Send fraud payment email</label>
1886
+ <frontend_type>select</frontend_type>
1887
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1888
+ <sort_order>99</sort_order>
1889
+ <show_in_default>1</show_in_default>
1890
+ <show_in_website>1</show_in_website>
1891
+ <show_in_store>1</show_in_store>
1892
+ </send_fraud_payment_email>
1893
+ <allowspecific translate="label">
1894
+ <label>Payment from applicable countries</label>
1895
+ <frontend_type>allowspecific</frontend_type>
1896
+ <sort_order>100</sort_order>
1897
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1898
+ <show_in_default>1</show_in_default>
1899
+ <show_in_website>1</show_in_website>
1900
+ <show_in_store>1</show_in_store>
1901
+ </allowspecific>
1902
+ <specificcountry translate="label">
1903
+ <label>Payment from Specific countries</label>
1904
+ <frontend_type>multiselect</frontend_type>
1905
+ <sort_order>110</sort_order>
1906
+ <source_model>adminhtml/system_config_source_country</source_model>
1907
  <show_in_default>1</show_in_default>
1908
  <show_in_website>1</show_in_website>
1909
  <show_in_store>1</show_in_store>
1933
  <show_in_store>1</show_in_store>
1934
  </sort_order>
1935
  <debug translate="label">
1936
+ <label>Enable debug log</label>
1937
+ <comment></comment>
1938
  <frontend_type>select</frontend_type>
1939
  <source_model>adminhtml/system_config_source_yesno</source_model>
1940
  <sort_order>150</sort_order>
1942
  <show_in_website>1</show_in_website>
1943
  <show_in_store>0</show_in_store>
1944
  </debug>
1945
+ <is_test_mode translate="label comment">
1946
+ <label>Enable test mode</label>
1947
+ <comment></comment>
1948
  <frontend_type>select</frontend_type>
1949
  <source_model>adminhtml/system_config_source_yesno</source_model>
1950
  <sort_order>200</sort_order>
1952
  <show_in_website>1</show_in_website>
1953
  <show_in_store>1</show_in_store>
1954
  </is_test_mode>
1955
+ </fields>
1956
+ </hipay_ideal>
1957
+ <hipay_ing translate="label" module="hipay">
1958
+ <label>HiPay Enterprise ING Home'Pay</label>
1959
  <frontend_type>text</frontend_type>
1960
  <sort_order>220</sort_order>
1961
  <show_in_default>1</show_in_default>
1962
  <show_in_website>1</show_in_website>
1963
  <show_in_store>1</show_in_store>
1964
  <fields>
1965
+ <active translate="label">
1966
+ <label>Enabled</label>
1967
+ <frontend_type>select</frontend_type>
1968
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1969
+ <sort_order>10</sort_order>
1970
+ <show_in_default>1</show_in_default>
1971
+ <show_in_website>1</show_in_website>
1972
+ <show_in_store>1</show_in_store>
1973
+ </active>
1974
+ <title translate="label">
1975
+ <label>Title</label>
1976
+ <frontend_type>text</frontend_type>
1977
+ <sort_order>20</sort_order>
1978
+ <show_in_default>1</show_in_default>
1979
+ <show_in_website>1</show_in_website>
1980
+ <show_in_store>1</show_in_store>
1981
+ </title>
1982
  <order_status_payment_accepted translate="label">
1983
  <label>Order status when payment accepted</label>
1984
  <frontend_type>select</frontend_type>
2006
  <show_in_website>1</show_in_website>
2007
  <show_in_store>0</show_in_store>
2008
  </order_status_payment_canceled>
2009
+ <hipay_status_validate_order translate="label">
2010
  <label>Hipay status to validate order</label>
2011
  <frontend_type>select</frontend_type>
2012
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
2017
  </hipay_status_validate_order>
2018
  <success_redirect_page translate="label">
2019
  <label>Redirect page success</label>
2020
+ <comment>Page to redirect when transaction is successful, leave empty for
2021
+ checkout/onepage/success
2022
+ </comment>
2023
  <frontend_type>text</frontend_type>
2024
+ <sort_order>27</sort_order>
2025
  <show_in_default>1</show_in_default>
2026
  <show_in_website>1</show_in_website>
2027
  <show_in_store>0</show_in_store>
2028
  </success_redirect_page>
2029
+ <failure_redirect_page translate="label">
2030
+ <label>Redirect page failure</label>
2031
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
2032
+ </comment>
2033
+ <frontend_type>text</frontend_type>
2034
+ <sort_order>28</sort_order>
2035
+ <show_in_default>1</show_in_default>
2036
+ <show_in_website>1</show_in_website>
2037
+ <show_in_store>0</show_in_store>
2038
+ </failure_redirect_page>
2039
+ <pending_redirect_page translate="label">
2040
  <label>Redirect page pending status</label>
2041
  <comment>Page to redirect when transaction is in pending status</comment>
2042
  <frontend_type>select</frontend_type>
2043
  <source_model>hipay/source_pendingredirect</source_model>
2044
+ <sort_order>29</sort_order>
2045
  <show_in_default>1</show_in_default>
2046
  <show_in_website>1</show_in_website>
2047
  <show_in_store>0</show_in_store>
2048
  </pending_redirect_page>
2049
  <css_url translate="label coment">
2050
+ <label>Css Url</label>
2051
+ <comment>Important, HTTPS protocol is required</comment>
2052
+ <frontend_type>text</frontend_type>
2053
+ <sort_order>30</sort_order>
2054
+ <show_in_default>1</show_in_default>
2055
+ <show_in_website>1</show_in_website>
2056
+ <show_in_store>1</show_in_store>
2057
  </css_url>
2058
  <template translate="label">
2059
+ <label>Page payment template</label>
2060
  <frontend_type>select</frontend_type>
2061
  <source_model>hipay/source_template</source_model>
2062
  <sort_order>35</sort_order>
2063
  <show_in_default>1</show_in_default>
2064
  <show_in_website>1</show_in_website>
2065
+ <show_in_store>1</show_in_store>
2066
  </template>
2067
+ <re_add_to_cart translate="label comment">
2068
+ <label>Add product to cart</label>
2069
+ <comment>Fill cart when payment canceled or refused</comment>
2070
  <frontend_type>select</frontend_type>
2071
  <source_model>adminhtml/system_config_source_yesno</source_model>
2072
  <sort_order>95</sort_order>
2075
  <show_in_store>0</show_in_store>
2076
  </re_add_to_cart>
2077
  <cancel_pending_order translate="label comment">
2078
+ <label>Cancel pending order</label>
2079
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
2080
  <frontend_type>select</frontend_type>
2081
  <source_model>adminhtml/system_config_source_yesno</source_model>
2082
  <sort_order>97</sort_order>
2083
  <show_in_default>1</show_in_default>
2084
  <show_in_website>1</show_in_website>
2085
  <show_in_store>0</show_in_store>
2086
+ </cancel_pending_order>
2087
+ <delay_cancel_pending_order translate="label">
2088
+ <label>Delay before cancel order</label>
2089
+ <comment>In Hours</comment>
2090
+ <frontend_type>text</frontend_type>
2091
+ <sort_order>98</sort_order>
2092
+ <show_in_default>1</show_in_default>
2093
+ <show_in_website>1</show_in_website>
2094
+ <show_in_store>1</show_in_store>
2095
+ </delay_cancel_pending_order>
2096
+ <send_fraud_payment_email translate="label">
2097
+ <label>Send fraud payment email</label>
2098
+ <frontend_type>select</frontend_type>
2099
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2100
+ <sort_order>99</sort_order>
2101
+ <show_in_default>1</show_in_default>
2102
+ <show_in_website>1</show_in_website>
2103
+ <show_in_store>1</show_in_store>
2104
+ </send_fraud_payment_email>
2105
+ <allowspecific translate="label">
2106
  <label>Payment from applicable countries</label>
2107
  <frontend_type>allowspecific</frontend_type>
2108
  <sort_order>100</sort_order>
2145
  <show_in_store>1</show_in_store>
2146
  </sort_order>
2147
  <debug translate="label">
2148
+ <label>Enable debug log</label>
2149
+ <comment></comment>
2150
  <frontend_type>select</frontend_type>
2151
  <source_model>adminhtml/system_config_source_yesno</source_model>
2152
  <sort_order>150</sort_order>
2154
  <show_in_website>1</show_in_website>
2155
  <show_in_store>0</show_in_store>
2156
  </debug>
2157
+ <is_test_mode translate="label comment">
2158
+ <label>Enable test mode</label>
2159
+ <comment></comment>
2160
  <frontend_type>select</frontend_type>
2161
  <source_model>adminhtml/system_config_source_yesno</source_model>
2162
  <sort_order>200</sort_order>
2164
  <show_in_website>1</show_in_website>
2165
  <show_in_store>1</show_in_store>
2166
  </is_test_mode>
2167
+ </fields>
2168
+ </hipay_ing>
2169
+ <hipay_dexia translate="label" module="hipay">
2170
+ <label>HiPay Enterprise Belfius / Dexia Direct Net</label>
2171
  <frontend_type>text</frontend_type>
2172
  <sort_order>220</sort_order>
2173
  <show_in_default>1</show_in_default>
2174
  <show_in_website>1</show_in_website>
2175
  <show_in_store>1</show_in_store>
2176
  <fields>
2177
+ <active translate="label">
2178
+ <label>Enabled</label>
2179
+ <frontend_type>select</frontend_type>
2180
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2181
+ <sort_order>10</sort_order>
2182
+ <show_in_default>1</show_in_default>
2183
+ <show_in_website>1</show_in_website>
2184
+ <show_in_store>1</show_in_store>
2185
+ </active>
2186
+ <title translate="label">
2187
+ <label>Title</label>
2188
+ <frontend_type>text</frontend_type>
2189
+ <sort_order>20</sort_order>
2190
+ <show_in_default>1</show_in_default>
2191
+ <show_in_website>1</show_in_website>
2192
+ <show_in_store>1</show_in_store>
2193
+ </title>
2194
  <order_status_payment_accepted translate="label">
2195
  <label>Order status when payment accepted</label>
2196
  <frontend_type>select</frontend_type>
2218
  <show_in_website>1</show_in_website>
2219
  <show_in_store>0</show_in_store>
2220
  </order_status_payment_canceled>
2221
+ <hipay_status_validate_order translate="label">
2222
  <label>Hipay status to validate order</label>
2223
  <frontend_type>select</frontend_type>
2224
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
2229
  </hipay_status_validate_order>
2230
  <success_redirect_page translate="label">
2231
  <label>Redirect page success</label>
2232
+ <comment>Page to redirect when transaction is successful, leave empty for
2233
+ checkout/onepage/success
2234
+ </comment>
2235
  <frontend_type>text</frontend_type>
2236
+ <sort_order>27</sort_order>
2237
  <show_in_default>1</show_in_default>
2238
  <show_in_website>1</show_in_website>
2239
  <show_in_store>0</show_in_store>
2240
  </success_redirect_page>
2241
+ <failure_redirect_page translate="label">
2242
+ <label>Redirect page failure</label>
2243
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
2244
+ </comment>
2245
+ <frontend_type>text</frontend_type>
2246
+ <sort_order>28</sort_order>
2247
+ <show_in_default>1</show_in_default>
2248
+ <show_in_website>1</show_in_website>
2249
+ <show_in_store>0</show_in_store>
2250
+ </failure_redirect_page>
2251
+ <pending_redirect_page translate="label">
2252
  <label>Redirect page pending status</label>
2253
  <comment>Page to redirect when transaction is in pending status</comment>
2254
  <frontend_type>select</frontend_type>
2255
  <source_model>hipay/source_pendingredirect</source_model>
2256
+ <sort_order>29</sort_order>
2257
  <show_in_default>1</show_in_default>
2258
  <show_in_website>1</show_in_website>
2259
  <show_in_store>0</show_in_store>
2260
  </pending_redirect_page>
2261
  <css_url translate="label coment">
2262
+ <label>Css Url</label>
2263
+ <comment>Important, HTTPS protocol is required</comment>
2264
+ <frontend_type>text</frontend_type>
2265
+ <sort_order>30</sort_order>
2266
+ <show_in_default>1</show_in_default>
2267
+ <show_in_website>1</show_in_website>
2268
+ <show_in_store>1</show_in_store>
2269
  </css_url>
2270
  <template translate="label">
2271
+ <label>Page payment template</label>
2272
  <frontend_type>select</frontend_type>
2273
  <source_model>hipay/source_template</source_model>
2274
  <sort_order>35</sort_order>
2275
  <show_in_default>1</show_in_default>
2276
  <show_in_website>1</show_in_website>
2277
+ <show_in_store>1</show_in_store>
2278
  </template>
2279
+ <re_add_to_cart translate="label comment">
2280
+ <label>Add product to cart</label>
2281
+ <comment>Fill cart when payment canceled or refused</comment>
2282
  <frontend_type>select</frontend_type>
2283
  <source_model>adminhtml/system_config_source_yesno</source_model>
2284
  <sort_order>95</sort_order>
2287
  <show_in_store>0</show_in_store>
2288
  </re_add_to_cart>
2289
  <cancel_pending_order translate="label comment">
2290
+ <label>Cancel pending order</label>
2291
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
2292
  <frontend_type>select</frontend_type>
2293
  <source_model>adminhtml/system_config_source_yesno</source_model>
2294
  <sort_order>97</sort_order>
2295
  <show_in_default>1</show_in_default>
2296
  <show_in_website>1</show_in_website>
2297
  <show_in_store>0</show_in_store>
2298
+ </cancel_pending_order>
2299
+ <delay_cancel_pending_order translate="label">
2300
+ <label>Delay before cancel order</label>
2301
+ <comment>In Hours</comment>
2302
+ <frontend_type>text</frontend_type>
2303
+ <sort_order>98</sort_order>
2304
+ <show_in_default>1</show_in_default>
2305
+ <show_in_website>1</show_in_website>
2306
+ <show_in_store>1</show_in_store>
2307
+ </delay_cancel_pending_order>
2308
+ <send_fraud_payment_email translate="label">
2309
+ <label>Send fraud payment email</label>
2310
+ <frontend_type>select</frontend_type>
2311
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2312
+ <sort_order>99</sort_order>
2313
+ <show_in_default>1</show_in_default>
2314
+ <show_in_website>1</show_in_website>
2315
+ <show_in_store>1</show_in_store>
2316
+ </send_fraud_payment_email>
2317
+ <allowspecific translate="label">
2318
  <label>Payment from applicable countries</label>
2319
  <frontend_type>allowspecific</frontend_type>
2320
  <sort_order>100</sort_order>
2357
  <show_in_store>1</show_in_store>
2358
  </sort_order>
2359
  <debug translate="label">
2360
+ <label>Enable debug log</label>
2361
+ <comment></comment>
2362
  <frontend_type>select</frontend_type>
2363
  <source_model>adminhtml/system_config_source_yesno</source_model>
2364
  <sort_order>150</sort_order>
2366
  <show_in_website>1</show_in_website>
2367
  <show_in_store>0</show_in_store>
2368
  </debug>
2369
+ <is_test_mode translate="label comment">
2370
+ <label>Enable test mode</label>
2371
+ <comment></comment>
2372
  <frontend_type>select</frontend_type>
2373
  <source_model>adminhtml/system_config_source_yesno</source_model>
2374
  <sort_order>200</sort_order>
2376
  <show_in_website>1</show_in_website>
2377
  <show_in_store>1</show_in_store>
2378
  </is_test_mode>
2379
+ </fields>
2380
+ </hipay_dexia>
2381
+ <!-- <hipay_cbc translate="label" module="hipay"> -->
2382
+ <!-- <label>HiPay Enterprise CBC Online</label> -->
2383
+ <!-- <frontend_type>text</frontend_type> -->
2384
+ <!-- <sort_order>220</sort_order> -->
2385
+ <!-- <show_in_default>1</show_in_default> -->
2386
+ <!-- <show_in_website>1</show_in_website> -->
2387
+ <!-- <show_in_store>1</show_in_store> -->
2388
+ <!-- <fields> -->
2389
+ <!-- <active translate="label"> -->
2390
+ <!-- <label>Enabled</label> -->
2391
+ <!-- <frontend_type>select</frontend_type> -->
2392
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2393
+ <!-- <sort_order>10</sort_order> -->
2394
+ <!-- <show_in_default>1</show_in_default> -->
2395
+ <!-- <show_in_website>1</show_in_website> -->
2396
+ <!-- <show_in_store>1</show_in_store> -->
2397
+ <!-- </active> -->
2398
+ <!-- <title translate="label"> -->
2399
+ <!-- <label>Title</label> -->
2400
+ <!-- <frontend_type>text</frontend_type> -->
2401
+ <!-- <sort_order>20</sort_order> -->
2402
+ <!-- <show_in_default>1</show_in_default> -->
2403
+ <!-- <show_in_website>1</show_in_website> -->
2404
+ <!-- <show_in_store>1</show_in_store> -->
2405
+ <!-- </title> -->
2406
+ <!-- <order_status_payment_accepted translate="label"> -->
2407
+ <!-- <label>Order status when payment accepted</label> -->
2408
+ <!-- <frontend_type>select</frontend_type> -->
2409
+ <!-- <source_model>hipay/source_order_status_accepted</source_model> -->
2410
+ <!-- <sort_order>23</sort_order> -->
2411
+ <!-- <show_in_default>1</show_in_default> -->
2412
+ <!-- <show_in_website>1</show_in_website> -->
2413
+ <!-- <show_in_store>0</show_in_store> -->
2414
+ <!-- </order_status_payment_accepted> -->
2415
+ <!-- <order_status_payment_refused translate="label"> -->
2416
+ <!-- <label>Order status when payment refused</label> -->
2417
+ <!-- <frontend_type>select</frontend_type> -->
2418
+ <!-- <source_model>hipay/source_order_status_refused</source_model> -->
2419
+ <!-- <sort_order>24</sort_order> -->
2420
+ <!-- <show_in_default>1</show_in_default> -->
2421
+ <!-- <show_in_website>1</show_in_website> -->
2422
+ <!-- <show_in_store>0</show_in_store> -->
2423
+ <!-- </order_status_payment_refused> -->
2424
+ <!-- <order_status_payment_canceled translate="label"> -->
2425
+ <!-- <label>Order status when payment canceled by customer</label> -->
2426
+ <!-- <frontend_type>select</frontend_type> -->
2427
+ <!-- <source_model>hipay/source_order_status_canceled</source_model> -->
2428
+ <!-- <sort_order>25</sort_order> -->
2429
+ <!-- <show_in_default>1</show_in_default> -->
2430
+ <!-- <show_in_website>1</show_in_website> -->
2431
+ <!-- <show_in_store>0</show_in_store> -->
2432
+ <!-- </order_status_payment_canceled> -->
2433
+ <!-- <hipay_status_validate_order translate="label"> -->
2434
+ <!-- <label>Hipay status to validate order</label> -->
2435
+ <!-- <frontend_type>select</frontend_type> -->
2436
+ <!-- <source_model>hipay/source_order_hipayStatusValidate</source_model> -->
2437
+ <!-- <sort_order>26</sort_order> -->
2438
+ <!-- <show_in_default>1</show_in_default> -->
2439
+ <!-- <show_in_website>1</show_in_website> -->
2440
+ <!-- <show_in_store>0</show_in_store> -->
2441
+ <!-- </hipay_status_validate_order> -->
2442
+ <!-- <pending_redirect_page translate="label"> -->
2443
+ <!-- <label>Redirect page pending status</label> -->
2444
+ <!-- <comment>Page to redirect when transaction is in pending status</comment> -->
2445
+ <!-- <frontend_type>select</frontend_type> -->
2446
+ <!-- <source_model>hipay/source_pendingredirect</source_model> -->
2447
+ <!-- <sort_order>27</sort_order> -->
2448
+ <!-- <show_in_default>1</show_in_default> -->
2449
+ <!-- <show_in_website>1</show_in_website> -->
2450
+ <!-- <show_in_store>0</show_in_store> -->
2451
+ <!-- </pending_redirect_page> -->
2452
+ <!-- <css_url translate="label coment"> -->
2453
+ <!-- <label>Css Url</label> -->
2454
+ <!-- <comment>Important, HTTPS protocol is required</comment> -->
2455
+ <!-- <frontend_type>text</frontend_type> -->
2456
+ <!-- <sort_order>30</sort_order> -->
2457
+ <!-- <show_in_default>1</show_in_default> -->
2458
+ <!-- <show_in_website>1</show_in_website> -->
2459
+ <!-- <show_in_store>1</show_in_store> -->
2460
+ <!-- </css_url> -->
2461
+ <!-- <template translate="label"> -->
2462
+ <!-- <label>Page payment template</label> -->
2463
+ <!-- <frontend_type>select</frontend_type> -->
2464
+ <!-- <source_model>hipay/source_template</source_model> -->
2465
+ <!-- <sort_order>35</sort_order> -->
2466
+ <!-- <show_in_default>1</show_in_default> -->
2467
+ <!-- <show_in_website>1</show_in_website> -->
2468
+ <!-- <show_in_store>0</show_in_store> -->
2469
+ <!-- </template> -->
2470
+ <!-- <re_add_to_cart translate="label comment"> -->
2471
+ <!-- <label>Add product to cart</label> -->
2472
+ <!-- <comment>Fill cart when payment canceled or refused</comment> -->
2473
+ <!-- <frontend_type>select</frontend_type> -->
2474
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2475
+ <!-- <sort_order>95</sort_order> -->
2476
+ <!-- <show_in_default>1</show_in_default> -->
2477
+ <!-- <show_in_website>1</show_in_website> -->
2478
+ <!-- <show_in_store>0</show_in_store> -->
2479
+ <!-- </re_add_to_cart> -->
2480
+ <!-- <cancel_pending_order translate="label comment"> -->
2481
+ <!-- <label>Cancel pending order</label> -->
2482
+ <!-- <comment>Cancel orders stayed in pending because customer not validated payment</comment> -->
2483
+ <!-- <frontend_type>select</frontend_type> -->
2484
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2485
+ <!-- <sort_order>97</sort_order> -->
2486
+ <!-- <show_in_default>1</show_in_default> -->
2487
+ <!-- <show_in_website>1</show_in_website> -->
2488
+ <!-- <show_in_store>0</show_in_store> -->
2489
+ <!-- </cancel_pending_order> -->
2490
+ <!-- <send_fraud_payment_email translate="label"> -->
2491
+ <!-- <label>Send fraud payment email</label> -->
2492
+ <!-- <frontend_type>select</frontend_type> -->
2493
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2494
+ <!-- <sort_order>99</sort_order> -->
2495
+ <!-- <show_in_default>1</show_in_default> -->
2496
+ <!-- <show_in_website>1</show_in_website> -->
2497
+ <!-- <show_in_store>1</show_in_store> -->
2498
+ <!-- </send_fraud_payment_email> -->
2499
+ <!-- <allowspecific translate="label"> -->
2500
+ <!-- <label>Payment from applicable countries</label> -->
2501
+ <!-- <frontend_type>allowspecific</frontend_type> -->
2502
+ <!-- <sort_order>100</sort_order> -->
2503
+ <!-- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model> -->
2504
+ <!-- <show_in_default>1</show_in_default> -->
2505
+ <!-- <show_in_website>1</show_in_website> -->
2506
+ <!-- <show_in_store>1</show_in_store> -->
2507
+ <!-- </allowspecific> -->
2508
+ <!-- <specificcountry translate="label"> -->
2509
+ <!-- <label>Payment from Specific countries</label> -->
2510
+ <!-- <frontend_type>multiselect</frontend_type> -->
2511
+ <!-- <sort_order>110</sort_order> -->
2512
+ <!-- <source_model>adminhtml/system_config_source_country</source_model> -->
2513
+ <!-- <show_in_default>1</show_in_default> -->
2514
+ <!-- <show_in_website>1</show_in_website> -->
2515
+ <!-- <show_in_store>1</show_in_store> -->
2516
+ <!-- </specificcountry> -->
2517
+ <!-- <min_order_total translate="label"> -->
2518
+ <!-- <label>Minimum Order Total</label> -->
2519
+ <!-- <frontend_type>text</frontend_type> -->
2520
+ <!-- <sort_order>120</sort_order> -->
2521
+ <!-- <show_in_default>1</show_in_default> -->
2522
+ <!-- <show_in_website>1</show_in_website> -->
2523
+ <!-- <show_in_store>1</show_in_store> -->
2524
+ <!-- </min_order_total> -->
2525
+ <!-- <max_order_total translate="label"> -->
2526
+ <!-- <label>Maximum Order Total</label> -->
2527
+ <!-- <frontend_type>text</frontend_type> -->
2528
+ <!-- <sort_order>121</sort_order> -->
2529
+ <!-- <show_in_default>1</show_in_default> -->
2530
+ <!-- <show_in_website>1</show_in_website> -->
2531
+ <!-- <show_in_store>1</show_in_store> -->
2532
+ <!-- </max_order_total> -->
2533
+ <!-- <sort_order translate="label"> -->
2534
+ <!-- <label>Sort Order</label> -->
2535
+ <!-- <frontend_type>text</frontend_type> -->
2536
+ <!-- <sort_order>130</sort_order> -->
2537
+ <!-- <show_in_default>1</show_in_default> -->
2538
+ <!-- <show_in_website>1</show_in_website> -->
2539
+ <!-- <show_in_store>1</show_in_store> -->
2540
+ <!-- </sort_order> -->
2541
+ <!-- <debug translate="label"> -->
2542
+ <!-- <label>Enable debug log</label> -->
2543
+ <!-- <comment></comment> -->
2544
+ <!-- <frontend_type>select</frontend_type> -->
2545
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2546
+ <!-- <sort_order>150</sort_order> -->
2547
+ <!-- <show_in_default>1</show_in_default> -->
2548
+ <!-- <show_in_website>1</show_in_website> -->
2549
+ <!-- <show_in_store>0</show_in_store> -->
2550
+ <!-- </debug> -->
2551
+ <!-- <is_test_mode translate="label comment"> -->
2552
+ <!-- <label>Enable test mode</label> -->
2553
+ <!-- <comment></comment> -->
2554
+ <!-- <frontend_type>select</frontend_type> -->
2555
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2556
+ <!-- <sort_order>200</sort_order> -->
2557
+ <!-- <show_in_default>1</show_in_default> -->
2558
+ <!-- <show_in_website>1</show_in_website> -->
2559
+ <!-- <show_in_store>1</show_in_store> -->
2560
+ <!-- </is_test_mode> -->
2561
+ <!-- </fields> -->
2562
+ <!-- </hipay_cbc> -->
2563
+ <!-- <hipay_kbc translate="label" module="hipay"> -->
2564
+ <!-- <label>HiPay Enterprise KBC Online</label> -->
2565
+ <!-- <frontend_type>text</frontend_type> -->
2566
+ <!-- <sort_order>220</sort_order> -->
2567
+ <!-- <show_in_default>1</show_in_default> -->
2568
+ <!-- <show_in_website>1</show_in_website> -->
2569
+ <!-- <show_in_store>1</show_in_store> -->
2570
+ <!-- <fields> -->
2571
+ <!-- <active translate="label"> -->
2572
+ <!-- <label>Enabled</label> -->
2573
+ <!-- <frontend_type>select</frontend_type> -->
2574
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2575
+ <!-- <sort_order>10</sort_order> -->
2576
+ <!-- <show_in_default>1</show_in_default> -->
2577
+ <!-- <show_in_website>1</show_in_website> -->
2578
+ <!-- <show_in_store>1</show_in_store> -->
2579
+ <!-- </active> -->
2580
+ <!-- <title translate="label"> -->
2581
+ <!-- <label>Title</label> -->
2582
+ <!-- <frontend_type>text</frontend_type> -->
2583
+ <!-- <sort_order>20</sort_order> -->
2584
+ <!-- <show_in_default>1</show_in_default> -->
2585
+ <!-- <show_in_website>1</show_in_website> -->
2586
+ <!-- <show_in_store>1</show_in_store> -->
2587
+ <!-- </title> -->
2588
+ <!-- <order_status_payment_accepted translate="label"> -->
2589
+ <!-- <label>Order status when payment accepted</label> -->
2590
+ <!-- <frontend_type>select</frontend_type> -->
2591
+ <!-- <source_model>hipay/source_order_status_accepted</source_model> -->
2592
+ <!-- <sort_order>23</sort_order> -->
2593
+ <!-- <show_in_default>1</show_in_default> -->
2594
+ <!-- <show_in_website>1</show_in_website> -->
2595
+ <!-- <show_in_store>0</show_in_store> -->
2596
+ <!-- </order_status_payment_accepted> -->
2597
+ <!-- <order_status_payment_refused translate="label"> -->
2598
+ <!-- <label>Order status when payment refused</label> -->
2599
+ <!-- <frontend_type>select</frontend_type> -->
2600
+ <!-- <source_model>hipay/source_order_status_refused</source_model> -->
2601
+ <!-- <sort_order>24</sort_order> -->
2602
+ <!-- <show_in_default>1</show_in_default> -->
2603
+ <!-- <show_in_website>1</show_in_website> -->
2604
+ <!-- <show_in_store>0</show_in_store> -->
2605
+ <!-- </order_status_payment_refused> -->
2606
+ <!-- <order_status_payment_canceled translate="label"> -->
2607
+ <!-- <label>Order status when payment canceled by customer</label> -->
2608
+ <!-- <frontend_type>select</frontend_type> -->
2609
+ <!-- <source_model>hipay/source_order_status_canceled</source_model> -->
2610
+ <!-- <sort_order>25</sort_order> -->
2611
+ <!-- <show_in_default>1</show_in_default> -->
2612
+ <!-- <show_in_website>1</show_in_website> -->
2613
+ <!-- <show_in_store>0</show_in_store> -->
2614
+ <!-- </order_status_payment_canceled> -->
2615
+ <!-- <hipay_status_validate_order translate="label"> -->
2616
+ <!-- <label>Hipay status to validate order</label> -->
2617
+ <!-- <frontend_type>select</frontend_type> -->
2618
+ <!-- <source_model>hipay/source_order_hipayStatusValidate</source_model> -->
2619
+ <!-- <sort_order>26</sort_order> -->
2620
+ <!-- <show_in_default>1</show_in_default> -->
2621
+ <!-- <show_in_website>1</show_in_website> -->
2622
+ <!-- <show_in_store>0</show_in_store> -->
2623
+ <!-- </hipay_status_validate_order> -->
2624
+ <!-- <pending_redirect_page translate="label"> -->
2625
+ <!-- <label>Redirect page pending status</label> -->
2626
+ <!-- <comment>Page to redirect when transaction is in pending status</comment> -->
2627
+ <!-- <frontend_type>select</frontend_type> -->
2628
+ <!-- <source_model>hipay/source_pendingredirect</source_model> -->
2629
+ <!-- <sort_order>27</sort_order> -->
2630
+ <!-- <show_in_default>1</show_in_default> -->
2631
+ <!-- <show_in_website>1</show_in_website> -->
2632
+ <!-- <show_in_store>0</show_in_store> -->
2633
+ <!-- </pending_redirect_page> -->
2634
+ <!-- <css_url translate="label coment"> -->
2635
+ <!-- <label>Css Url</label> -->
2636
+ <!-- <comment>Important, HTTPS protocol is required</comment> -->
2637
+ <!-- <frontend_type>text</frontend_type> -->
2638
+ <!-- <sort_order>30</sort_order> -->
2639
+ <!-- <show_in_default>1</show_in_default> -->
2640
+ <!-- <show_in_website>1</show_in_website> -->
2641
+ <!-- <show_in_store>1</show_in_store> -->
2642
+ <!-- </css_url> -->
2643
+ <!-- <template translate="label"> -->
2644
+ <!-- <label>Page payment template</label> -->
2645
+ <!-- <frontend_type>select</frontend_type> -->
2646
+ <!-- <source_model>hipay/source_template</source_model> -->
2647
+ <!-- <sort_order>35</sort_order> -->
2648
+ <!-- <show_in_default>1</show_in_default> -->
2649
+ <!-- <show_in_website>1</show_in_website> -->
2650
+ <!-- <show_in_store>0</show_in_store> -->
2651
+ <!-- </template> -->
2652
+ <!-- <re_add_to_cart translate="label comment"> -->
2653
+ <!-- <label>Add product to cart</label> -->
2654
+ <!-- <comment>Fill cart when payment canceled or refused</comment> -->
2655
+ <!-- <frontend_type>select</frontend_type> -->
2656
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2657
+ <!-- <sort_order>95</sort_order> -->
2658
+ <!-- <show_in_default>1</show_in_default> -->
2659
+ <!-- <show_in_website>1</show_in_website> -->
2660
+ <!-- <show_in_store>0</show_in_store> -->
2661
+ <!-- </re_add_to_cart> -->
2662
+ <!-- <cancel_pending_order translate="label comment"> -->
2663
+ <!-- <label>Cancel pending order</label> -->
2664
+ <!-- <comment>Cancel orders stayed in pending because customer not validated payment</comment> -->
2665
+ <!-- <frontend_type>select</frontend_type> -->
2666
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2667
+ <!-- <sort_order>97</sort_order> -->
2668
+ <!-- <show_in_default>1</show_in_default> -->
2669
+ <!-- <show_in_website>1</show_in_website> -->
2670
+ <!-- <show_in_store>0</show_in_store> -->
2671
+ <!-- </cancel_pending_order> -->
2672
+ <!-- <send_fraud_payment_email translate="label"> -->
2673
+ <!-- <label>Send fraud payment email</label> -->
2674
+ <!-- <frontend_type>select</frontend_type> -->
2675
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2676
+ <!-- <sort_order>99</sort_order> -->
2677
+ <!-- <show_in_default>1</show_in_default> -->
2678
+ <!-- <show_in_website>1</show_in_website> -->
2679
+ <!-- <show_in_store>1</show_in_store> -->
2680
+ <!-- </send_fraud_payment_email> -->
2681
+ <!-- <allowspecific translate="label"> -->
2682
+ <!-- <label>Payment from applicable countries</label> -->
2683
+ <!-- <frontend_type>allowspecific</frontend_type> -->
2684
+ <!-- <sort_order>100</sort_order> -->
2685
+ <!-- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model> -->
2686
+ <!-- <show_in_default>1</show_in_default> -->
2687
+ <!-- <show_in_website>1</show_in_website> -->
2688
+ <!-- <show_in_store>1</show_in_store> -->
2689
+ <!-- </allowspecific> -->
2690
+ <!-- <specificcountry translate="label"> -->
2691
+ <!-- <label>Payment from Specific countries</label> -->
2692
+ <!-- <frontend_type>multiselect</frontend_type> -->
2693
+ <!-- <sort_order>110</sort_order> -->
2694
+ <!-- <source_model>adminhtml/system_config_source_country</source_model> -->
2695
+ <!-- <show_in_default>1</show_in_default> -->
2696
+ <!-- <show_in_website>1</show_in_website> -->
2697
+ <!-- <show_in_store>1</show_in_store> -->
2698
+ <!-- </specificcountry> -->
2699
+ <!-- <min_order_total translate="label"> -->
2700
+ <!-- <label>Minimum Order Total</label> -->
2701
+ <!-- <frontend_type>text</frontend_type> -->
2702
+ <!-- <sort_order>120</sort_order> -->
2703
+ <!-- <show_in_default>1</show_in_default> -->
2704
+ <!-- <show_in_website>1</show_in_website> -->
2705
+ <!-- <show_in_store>1</show_in_store> -->
2706
+ <!-- </min_order_total> -->
2707
+ <!-- <max_order_total translate="label"> -->
2708
+ <!-- <label>Maximum Order Total</label> -->
2709
+ <!-- <frontend_type>text</frontend_type> -->
2710
+ <!-- <sort_order>121</sort_order> -->
2711
+ <!-- <show_in_default>1</show_in_default> -->
2712
+ <!-- <show_in_website>1</show_in_website> -->
2713
+ <!-- <show_in_store>1</show_in_store> -->
2714
+ <!-- </max_order_total> -->
2715
+ <!-- <sort_order translate="label"> -->
2716
+ <!-- <label>Sort Order</label> -->
2717
+ <!-- <frontend_type>text</frontend_type> -->
2718
+ <!-- <sort_order>130</sort_order> -->
2719
+ <!-- <show_in_default>1</show_in_default> -->
2720
+ <!-- <show_in_website>1</show_in_website> -->
2721
+ <!-- <show_in_store>1</show_in_store> -->
2722
+ <!-- </sort_order> -->
2723
+ <!-- <debug translate="label"> -->
2724
+ <!-- <label>Enable debug log</label> -->
2725
+ <!-- <comment></comment> -->
2726
+ <!-- <frontend_type>select</frontend_type> -->
2727
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2728
+ <!-- <sort_order>150</sort_order> -->
2729
+ <!-- <show_in_default>1</show_in_default> -->
2730
+ <!-- <show_in_website>1</show_in_website> -->
2731
+ <!-- <show_in_store>0</show_in_store> -->
2732
+ <!-- </debug> -->
2733
+ <!-- <is_test_mode translate="label comment"> -->
2734
+ <!-- <label>Enable test mode</label> -->
2735
+ <!-- <comment></comment> -->
2736
+ <!-- <frontend_type>select</frontend_type> -->
2737
+ <!-- <source_model>adminhtml/system_config_source_yesno</source_model> -->
2738
+ <!-- <sort_order>200</sort_order> -->
2739
+ <!-- <show_in_default>1</show_in_default> -->
2740
+ <!-- <show_in_website>1</show_in_website> -->
2741
+ <!-- <show_in_store>1</show_in_store> -->
2742
+ <!-- </is_test_mode> -->
2743
+ <!-- </fields> -->
2744
+ <!-- </hipay_kbc> -->
2745
+ <hipay_giropay translate="label" module="hipay">
2746
+ <label>HiPay Enterprise Giropay</label>
2747
  <frontend_type>text</frontend_type>
2748
  <sort_order>220</sort_order>
2749
  <show_in_default>1</show_in_default>
2750
  <show_in_website>1</show_in_website>
2751
  <show_in_store>1</show_in_store>
2752
  <fields>
2753
+ <active translate="label">
2754
+ <label>Enabled</label>
2755
+ <frontend_type>select</frontend_type>
2756
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2757
+ <sort_order>10</sort_order>
2758
+ <show_in_default>1</show_in_default>
2759
+ <show_in_website>1</show_in_website>
2760
+ <show_in_store>1</show_in_store>
2761
+ </active>
2762
+ <title translate="label">
2763
+ <label>Title</label>
2764
+ <frontend_type>text</frontend_type>
2765
+ <sort_order>20</sort_order>
2766
+ <show_in_default>1</show_in_default>
2767
+ <show_in_website>1</show_in_website>
2768
+ <show_in_store>1</show_in_store>
2769
+ </title>
2770
  <order_status_payment_accepted translate="label">
2771
  <label>Order status when payment accepted</label>
2772
  <frontend_type>select</frontend_type>
2794
  <show_in_website>1</show_in_website>
2795
  <show_in_store>0</show_in_store>
2796
  </order_status_payment_canceled>
2797
+ <hipay_status_validate_order translate="label">
2798
  <label>Hipay status to validate order</label>
2799
  <frontend_type>select</frontend_type>
2800
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
2805
  </hipay_status_validate_order>
2806
  <success_redirect_page translate="label">
2807
  <label>Redirect page success</label>
2808
+ <comment>Page to redirect when transaction is successful, leave empty for
2809
+ checkout/onepage/success
2810
+ </comment>
2811
  <frontend_type>text</frontend_type>
2812
+ <sort_order>27</sort_order>
2813
  <show_in_default>1</show_in_default>
2814
  <show_in_website>1</show_in_website>
2815
  <show_in_store>0</show_in_store>
2816
  </success_redirect_page>
2817
+ <failure_redirect_page translate="label">
2818
+ <label>Redirect page failure</label>
2819
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
2820
+ </comment>
2821
+ <frontend_type>text</frontend_type>
2822
+ <sort_order>28</sort_order>
2823
+ <show_in_default>1</show_in_default>
2824
+ <show_in_website>1</show_in_website>
2825
+ <show_in_store>0</show_in_store>
2826
+ </failure_redirect_page>
2827
+ <pending_redirect_page translate="label">
2828
  <label>Redirect page pending status</label>
2829
  <comment>Page to redirect when transaction is in pending status</comment>
2830
  <frontend_type>select</frontend_type>
2831
  <source_model>hipay/source_pendingredirect</source_model>
2832
+ <sort_order>29</sort_order>
2833
  <show_in_default>1</show_in_default>
2834
  <show_in_website>1</show_in_website>
2835
  <show_in_store>0</show_in_store>
2836
  </pending_redirect_page>
2837
  <css_url translate="label coment">
2838
+ <label>Css Url</label>
2839
+ <comment>Important, HTTPS protocol is required</comment>
2840
+ <frontend_type>text</frontend_type>
2841
+ <sort_order>30</sort_order>
2842
+ <show_in_default>1</show_in_default>
2843
+ <show_in_website>1</show_in_website>
2844
+ <show_in_store>1</show_in_store>
2845
  </css_url>
2846
  <template translate="label">
2847
+ <label>Page payment template</label>
2848
  <frontend_type>select</frontend_type>
2849
  <source_model>hipay/source_template</source_model>
2850
  <sort_order>35</sort_order>
2851
  <show_in_default>1</show_in_default>
2852
  <show_in_website>1</show_in_website>
2853
+ <show_in_store>1</show_in_store>
2854
  </template>
2855
+ <re_add_to_cart translate="label comment">
2856
+ <label>Add product to cart</label>
2857
+ <comment>Fill cart when payment canceled or refused</comment>
2858
  <frontend_type>select</frontend_type>
2859
  <source_model>adminhtml/system_config_source_yesno</source_model>
2860
  <sort_order>95</sort_order>
2863
  <show_in_store>0</show_in_store>
2864
  </re_add_to_cart>
2865
  <cancel_pending_order translate="label comment">
2866
+ <label>Cancel pending order</label>
2867
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
2868
  <frontend_type>select</frontend_type>
2869
  <source_model>adminhtml/system_config_source_yesno</source_model>
2870
  <sort_order>97</sort_order>
2871
  <show_in_default>1</show_in_default>
2872
  <show_in_website>1</show_in_website>
2873
  <show_in_store>0</show_in_store>
2874
+ </cancel_pending_order>
2875
+ <delay_cancel_pending_order translate="label">
2876
+ <label>Delay before cancel order</label>
2877
+ <comment>In Hours</comment>
2878
+ <frontend_type>text</frontend_type>
2879
+ <sort_order>98</sort_order>
2880
+ <show_in_default>1</show_in_default>
2881
+ <show_in_website>1</show_in_website>
2882
+ <show_in_store>1</show_in_store>
2883
+ </delay_cancel_pending_order>
2884
+ <send_fraud_payment_email translate="label">
2885
+ <label>Send fraud payment email</label>
2886
+ <frontend_type>select</frontend_type>
2887
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2888
+ <sort_order>99</sort_order>
2889
+ <show_in_default>1</show_in_default>
2890
+ <show_in_website>1</show_in_website>
2891
+ <show_in_store>1</show_in_store>
2892
+ </send_fraud_payment_email>
2893
+ <allowspecific translate="label">
2894
  <label>Payment from applicable countries</label>
2895
  <frontend_type>allowspecific</frontend_type>
2896
  <sort_order>100</sort_order>
2933
  <show_in_store>1</show_in_store>
2934
  </sort_order>
2935
  <debug translate="label">
2936
+ <label>Enable debug log</label>
2937
+ <comment></comment>
2938
  <frontend_type>select</frontend_type>
2939
  <source_model>adminhtml/system_config_source_yesno</source_model>
2940
  <sort_order>150</sort_order>
2942
  <show_in_website>1</show_in_website>
2943
  <show_in_store>0</show_in_store>
2944
  </debug>
2945
+ <is_test_mode translate="label comment">
2946
+ <label>Enable test mode</label>
2947
+ <comment></comment>
2948
  <frontend_type>select</frontend_type>
2949
  <source_model>adminhtml/system_config_source_yesno</source_model>
2950
  <sort_order>200</sort_order>
2952
  <show_in_website>1</show_in_website>
2953
  <show_in_store>1</show_in_store>
2954
  </is_test_mode>
2955
+ </fields>
2956
+ </hipay_giropay>
2957
+ <hipay_przelewy24api translate="label" module="hipay">
2958
+ <label>HiPay Enterprise Przelewy24</label>
2959
  <frontend_type>text</frontend_type>
2960
  <sort_order>220</sort_order>
2961
  <show_in_default>1</show_in_default>
2962
  <show_in_website>1</show_in_website>
2963
  <show_in_store>1</show_in_store>
2964
  <fields>
2965
+ <active translate="label">
2966
+ <label>Enabled</label>
2967
+ <frontend_type>select</frontend_type>
2968
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2969
+ <sort_order>10</sort_order>
2970
+ <show_in_default>1</show_in_default>
2971
+ <show_in_website>1</show_in_website>
2972
+ <show_in_store>1</show_in_store>
2973
+ </active>
2974
+ <title translate="label">
2975
+ <label>Title</label>
2976
+ <frontend_type>text</frontend_type>
2977
+ <sort_order>20</sort_order>
2978
+ <show_in_default>1</show_in_default>
2979
+ <show_in_website>1</show_in_website>
2980
+ <show_in_store>1</show_in_store>
2981
+ </title>
2982
  <order_status_payment_accepted translate="label">
2983
  <label>Order status when payment accepted</label>
2984
  <frontend_type>select</frontend_type>
3006
  <show_in_website>1</show_in_website>
3007
  <show_in_store>0</show_in_store>
3008
  </order_status_payment_canceled>
3009
+ <hipay_status_validate_order translate="label">
3010
  <label>Hipay status to validate order</label>
3011
  <frontend_type>select</frontend_type>
3012
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
3017
  </hipay_status_validate_order>
3018
  <success_redirect_page translate="label">
3019
  <label>Redirect page success</label>
3020
+ <comment>Page to redirect when transaction is successful, leave empty for
3021
+ checkout/onepage/success
3022
+ </comment>
3023
  <frontend_type>text</frontend_type>
3024
+ <sort_order>27</sort_order>
3025
  <show_in_default>1</show_in_default>
3026
  <show_in_website>1</show_in_website>
3027
  <show_in_store>0</show_in_store>
3028
  </success_redirect_page>
3029
+ <failure_redirect_page translate="label">
3030
+ <label>Redirect page failure</label>
3031
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
3032
+ </comment>
3033
+ <frontend_type>text</frontend_type>
3034
+ <sort_order>28</sort_order>
3035
+ <show_in_default>1</show_in_default>
3036
+ <show_in_website>1</show_in_website>
3037
+ <show_in_store>0</show_in_store>
3038
+ </failure_redirect_page>
3039
+ <pending_redirect_page translate="label">
3040
  <label>Redirect page pending status</label>
3041
  <comment>Page to redirect when transaction is in pending status</comment>
3042
  <frontend_type>select</frontend_type>
3043
  <source_model>hipay/source_pendingredirect</source_model>
3044
+ <sort_order>29</sort_order>
3045
  <show_in_default>1</show_in_default>
3046
  <show_in_website>1</show_in_website>
3047
  <show_in_store>0</show_in_store>
3048
  </pending_redirect_page>
3049
  <css_url translate="label coment">
3050
+ <label>Css Url</label>
3051
+ <comment>Important, HTTPS protocol is required</comment>
3052
+ <frontend_type>text</frontend_type>
3053
+ <sort_order>30</sort_order>
3054
+ <show_in_default>1</show_in_default>
3055
+ <show_in_website>1</show_in_website>
3056
+ <show_in_store>1</show_in_store>
3057
  </css_url>
3058
  <template translate="label">
3059
+ <label>Page payment template</label>
3060
  <frontend_type>select</frontend_type>
3061
  <source_model>hipay/source_template</source_model>
3062
  <sort_order>35</sort_order>
3063
  <show_in_default>1</show_in_default>
3064
  <show_in_website>1</show_in_website>
3065
+ <show_in_store>1</show_in_store>
3066
  </template>
3067
+ <re_add_to_cart translate="label comment">
3068
+ <label>Add product to cart</label>
3069
+ <comment>Fill cart when payment canceled or refused</comment>
3070
  <frontend_type>select</frontend_type>
3071
  <source_model>adminhtml/system_config_source_yesno</source_model>
3072
  <sort_order>95</sort_order>
3075
  <show_in_store>0</show_in_store>
3076
  </re_add_to_cart>
3077
  <cancel_pending_order translate="label comment">
3078
+ <label>Cancel pending order</label>
3079
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3080
  <frontend_type>select</frontend_type>
3081
  <source_model>adminhtml/system_config_source_yesno</source_model>
3082
  <sort_order>97</sort_order>
3083
  <show_in_default>1</show_in_default>
3084
  <show_in_website>1</show_in_website>
3085
  <show_in_store>0</show_in_store>
3086
+ </cancel_pending_order>
3087
+ <delay_cancel_pending_order translate="label">
3088
+ <label>Delay before cancel order</label>
3089
+ <comment>In Hours</comment>
3090
+ <frontend_type>text</frontend_type>
3091
+ <sort_order>98</sort_order>
3092
+ <show_in_default>1</show_in_default>
3093
+ <show_in_website>1</show_in_website>
3094
+ <show_in_store>1</show_in_store>
3095
+ </delay_cancel_pending_order>
3096
+ <send_fraud_payment_email translate="label">
3097
+ <label>Send fraud payment email</label>
3098
+ <frontend_type>select</frontend_type>
3099
+ <source_model>adminhtml/system_config_source_yesno</source_model>
3100
+ <sort_order>99</sort_order>
3101
+ <show_in_default>1</show_in_default>
3102
+ <show_in_website>1</show_in_website>
3103
+ <show_in_store>1</show_in_store>
3104
+ </send_fraud_payment_email>
3105
+ <allowspecific translate="label">
3106
  <label>Payment from applicable countries</label>
3107
  <frontend_type>allowspecific</frontend_type>
3108
  <sort_order>100</sort_order>
3145
  <show_in_store>1</show_in_store>
3146
  </sort_order>
3147
  <debug translate="label">
3148
+ <label>Enable debug log</label>
3149
+ <comment></comment>
3150
  <frontend_type>select</frontend_type>
3151
  <source_model>adminhtml/system_config_source_yesno</source_model>
3152
  <sort_order>150</sort_order>
3154
  <show_in_website>1</show_in_website>
3155
  <show_in_store>0</show_in_store>
3156
  </debug>
3157
+ <is_test_mode translate="label comment">
3158
+ <label>Enable test mode</label>
3159
+ <comment></comment>
3160
  <frontend_type>select</frontend_type>
3161
  <source_model>adminhtml/system_config_source_yesno</source_model>
3162
  <sort_order>200</sort_order>
3164
  <show_in_website>1</show_in_website>
3165
  <show_in_store>1</show_in_store>
3166
  </is_test_mode>
3167
+ </fields>
3168
+ </hipay_przelewy24api>
3169
+ <hipay_qiwi translate="label" module="hipay">
3170
+ <label>HiPay Enterprise Visa Qiwi Wallet</label>
3171
  <frontend_type>text</frontend_type>
3172
  <sort_order>220</sort_order>
3173
  <show_in_default>1</show_in_default>
3174
  <show_in_website>1</show_in_website>
3175
  <show_in_store>1</show_in_store>
3176
  <fields>
3177
+ <active translate="label">
3178
+ <label>Enabled</label>
3179
+ <frontend_type>select</frontend_type>
3180
+ <source_model>adminhtml/system_config_source_yesno</source_model>
3181
+ <sort_order>10</sort_order>
3182
+ <show_in_default>1</show_in_default>
3183
+ <show_in_website>1</show_in_website>
3184
+ <show_in_store>1</show_in_store>
3185
+ </active>
3186
+ <title translate="label">
3187
+ <label>Title</label>
3188
+ <frontend_type>text</frontend_type>
3189
+ <sort_order>20</sort_order>
3190
+ <show_in_default>1</show_in_default>
3191
+ <show_in_website>1</show_in_website>
3192
+ <show_in_store>1</show_in_store>
3193
+ </title>
3194
  <order_status_payment_accepted translate="label">
3195
  <label>Order status when payment accepted</label>
3196
  <frontend_type>select</frontend_type>
3218
  <show_in_website>1</show_in_website>
3219
  <show_in_store>0</show_in_store>
3220
  </order_status_payment_canceled>
3221
+ <hipay_status_validate_order translate="label">
3222
  <label>Hipay status to validate order</label>
3223
  <frontend_type>select</frontend_type>
3224
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
3229
  </hipay_status_validate_order>
3230
  <success_redirect_page translate="label">
3231
  <label>Redirect page success</label>
3232
+ <comment>Page to redirect when transaction is successful, leave empty for
3233
+ checkout/onepage/success
3234
+ </comment>
3235
  <frontend_type>text</frontend_type>
3236
+ <sort_order>27</sort_order>
3237
  <show_in_default>1</show_in_default>
3238
  <show_in_website>1</show_in_website>
3239
  <show_in_store>0</show_in_store>
3240
  </success_redirect_page>
3241
+ <failure_redirect_page translate="label">
3242
+ <label>Redirect page failure</label>
3243
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
3244
+ </comment>
3245
+ <frontend_type>text</frontend_type>
3246
+ <sort_order>28</sort_order>
3247
+ <show_in_default>1</show_in_default>
3248
+ <show_in_website>1</show_in_website>
3249
+ <show_in_store>0</show_in_store>
3250
+ </failure_redirect_page>
3251
+ <pending_redirect_page translate="label">
3252
  <label>Redirect page pending status</label>
3253
  <comment>Page to redirect when transaction is in pending status</comment>
3254
  <frontend_type>select</frontend_type>
3255
  <source_model>hipay/source_pendingredirect</source_model>
3256
+ <sort_order>29</sort_order>
3257
  <show_in_default>1</show_in_default>
3258
  <show_in_website>1</show_in_website>
3259
  <show_in_store>0</show_in_store>
3260
  </pending_redirect_page>
3261
  <css_url translate="label coment">
3262
+ <label>Css Url</label>
3263
+ <comment>Important, HTTPS protocol is required</comment>
3264
+ <frontend_type>text</frontend_type>
3265
+ <sort_order>30</sort_order>
3266
+ <show_in_default>1</show_in_default>
3267
+ <show_in_website>1</show_in_website>
3268
+ <show_in_store>1</show_in_store>
3269
  </css_url>
3270
  <template translate="label">
3271
+ <label>Page payment template</label>
3272
  <frontend_type>select</frontend_type>
3273
  <source_model>hipay/source_template</source_model>
3274
  <sort_order>35</sort_order>
3275
  <show_in_default>1</show_in_default>
3276
  <show_in_website>1</show_in_website>
3277
+ <show_in_store>1</show_in_store>
3278
  </template>
3279
+ <re_add_to_cart translate="label comment">
3280
+ <label>Add product to cart</label>
3281
+ <comment>Fill cart when payment canceled or refused</comment>
3282
  <frontend_type>select</frontend_type>
3283
  <source_model>adminhtml/system_config_source_yesno</source_model>
3284
  <sort_order>95</sort_order>
3287
  <show_in_store>0</show_in_store>
3288
  </re_add_to_cart>
3289
  <cancel_pending_order translate="label comment">
3290
+ <label>Cancel pending order</label>
3291
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3292
  <frontend_type>select</frontend_type>
3293
  <source_model>adminhtml/system_config_source_yesno</source_model>
3294
  <sort_order>97</sort_order>
3295
  <show_in_default>1</show_in_default>
3296
  <show_in_website>1</show_in_website>
3297
  <show_in_store>0</show_in_store>
3298
+ </cancel_pending_order>
3299
+ <delay_cancel_pending_order translate="label">
3300
+ <label>Delay before cancel order</label>
3301
+ <comment>In Hours</comment>
3302
+ <frontend_type>text</frontend_type>
3303
+ <sort_order>98</sort_order>
3304
+ <show_in_default>1</show_in_default>
3305
+ <show_in_website>1</show_in_website>
3306
+ <show_in_store>1</show_in_store>
3307
+ </delay_cancel_pending_order>
3308
+ <send_fraud_payment_email translate="label">
3309
+ <label>Send fraud payment email</label>
3310
+ <frontend_type>select</frontend_type>
3311
+ <source_model>adminhtml/system_config_source_yesno</source_model>
3312
+ <sort_order>99</sort_order>
3313
+ <show_in_default>1</show_in_default>
3314
+ <show_in_website>1</show_in_website>
3315
+ <show_in_store>1</show_in_store>
3316
+ </send_fraud_payment_email>
3317
+ <allowspecific translate="label">
3318
  <label>Payment from applicable countries</label>
3319
  <frontend_type>allowspecific</frontend_type>
3320
  <sort_order>100</sort_order>
3357
  <show_in_store>1</show_in_store>
3358
  </sort_order>
3359
  <debug translate="label">
3360
+ <label>Enable debug log</label>
3361
+ <comment></comment>
3362
  <frontend_type>select</frontend_type>
3363
  <source_model>adminhtml/system_config_source_yesno</source_model>
3364
  <sort_order>150</sort_order>
3366
  <show_in_website>1</show_in_website>
3367
  <show_in_store>0</show_in_store>
3368
  </debug>
3369
+ <is_test_mode translate="label comment">
3370
+ <label>Enable test mode</label>
3371
+ <comment></comment>
3372
  <frontend_type>select</frontend_type>
3373
  <source_model>adminhtml/system_config_source_yesno</source_model>
3374
  <sort_order>200</sort_order>
3376
  <show_in_website>1</show_in_website>
3377
  <show_in_store>1</show_in_store>
3378
  </is_test_mode>
3379
+ </fields>
3380
+ </hipay_qiwi>
3381
+ <hipay_webmoneyapi translate="label" module="hipay">
3382
+ <label>HiPay Enterprise WebMoney Transfer</label>
3383
  <frontend_type>text</frontend_type>
3384
  <sort_order>220</sort_order>
3385
  <show_in_default>1</show_in_default>
3386
  <show_in_website>1</show_in_website>
3387
  <show_in_store>1</show_in_store>
3388
  <fields>
3389
+ <active translate="label">
3390
+ <label>Enabled</label>
3391
+ <frontend_type>select</frontend_type>
3392
+ <source_model>adminhtml/system_config_source_yesno</source_model>
3393
+ <sort_order>10</sort_order>
3394
+ <show_in_default>1</show_in_default>
3395
+ <show_in_website>1</show_in_website>
3396
+ <show_in_store>1</show_in_store>
3397
+ </active>
3398
+ <title translate="label">
3399
+ <label>Title</label>
3400
+ <frontend_type>text</frontend_type>
3401
+ <sort_order>20</sort_order>
3402
+ <show_in_default>1</show_in_default>
3403
+ <show_in_website>1</show_in_website>
3404
+ <show_in_store>1</show_in_store>
3405
+ </title>
3406
  <order_status_payment_accepted translate="label">
3407
  <label>Order status when payment accepted</label>
3408
  <frontend_type>select</frontend_type>
3430
  <show_in_website>1</show_in_website>
3431
  <show_in_store>0</show_in_store>
3432
  </order_status_payment_canceled>
3433
+ <hipay_status_validate_order translate="label">
3434
  <label>Hipay status to validate order</label>
3435
  <frontend_type>select</frontend_type>
3436
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
3441
  </hipay_status_validate_order>
3442
  <success_redirect_page translate="label">
3443
  <label>Redirect page success</label>
3444
+ <comment>Page to redirect when transaction is successful, leave empty for
3445
+ checkout/onepage/success
3446
+ </comment>
3447
  <frontend_type>text</frontend_type>
3448
+ <sort_order>27</sort_order>
3449
  <show_in_default>1</show_in_default>
3450
  <show_in_website>1</show_in_website>
3451
  <show_in_store>0</show_in_store>
3452
  </success_redirect_page>
3453
+ <failure_redirect_page translate="label">
3454
+ <label>Redirect page failure</label>
3455
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
3456
+ </comment>
3457
+ <frontend_type>text</frontend_type>
3458
+ <sort_order>28</sort_order>
3459
+ <show_in_default>1</show_in_default>
3460
+ <show_in_website>1</show_in_website>
3461
+ <show_in_store>0</show_in_store>
3462
+ </failure_redirect_page>
3463
+ <pending_redirect_page translate="label">
3464
  <label>Redirect page pending status</label>
3465
  <comment>Page to redirect when transaction is in pending status</comment>
3466
  <frontend_type>select</frontend_type>
3467
  <source_model>hipay/source_pendingredirect</source_model>
3468
+ <sort_order>29</sort_order>
3469
  <show_in_default>1</show_in_default>
3470
  <show_in_website>1</show_in_website>
3471
  <show_in_store>0</show_in_store>
3472
  </pending_redirect_page>
3473
  <css_url translate="label coment">
3474
+ <label>Css Url</label>
3475
+ <comment>Important, HTTPS protocol is required</comment>
3476
+ <frontend_type>text</frontend_type>
3477
+ <sort_order>30</sort_order>
3478
+ <show_in_default>1</show_in_default>
3479
+ <show_in_website>1</show_in_website>
3480
+ <show_in_store>1</show_in_store>
3481
  </css_url>
3482
  <template translate="label">
3483
+ <label>Page payment template</label>
3484
  <frontend_type>select</frontend_type>
3485
  <source_model>hipay/source_template</source_model>
3486
  <sort_order>35</sort_order>
3487
  <show_in_default>1</show_in_default>
3488
  <show_in_website>1</show_in_website>
3489
+ <show_in_store>1</show_in_store>
3490
  </template>
3491
+ <re_add_to_cart translate="label comment">
3492
+ <label>Add product to cart</label>
3493
+ <comment>Fill cart when payment canceled or refused</comment>
3494
  <frontend_type>select</frontend_type>
3495
  <source_model>adminhtml/system_config_source_yesno</source_model>
3496
  <sort_order>95</sort_order>
3499
  <show_in_store>0</show_in_store>
3500
  </re_add_to_cart>
3501
  <cancel_pending_order translate="label comment">
3502
+ <label>Cancel pending order</label>
3503
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3504
  <frontend_type>select</frontend_type>
3505
  <source_model>adminhtml/system_config_source_yesno</source_model>
3506
  <sort_order>97</sort_order>
3507
  <show_in_default>1</show_in_default>
3508
  <show_in_website>1</show_in_website>
3509
  <show_in_store>0</show_in_store>
3510
+ </cancel_pending_order>
3511
+ <delay_cancel_pending_order translate="label">
3512
+ <label>Delay before cancel order</label>
3513
+ <comment>In Hours</comment>
3514
+ <frontend_type>text</frontend_type>
3515
+ <sort_order>98</sort_order>
3516
+ <show_in_default>1</show_in_default>
3517
+ <show_in_website>1</show_in_website>
3518
+ <show_in_store>1</show_in_store>
3519
+ </delay_cancel_pending_order>
3520
+ <send_fraud_payment_email translate="label">
3521
+ <label>Send fraud payment email</label>
3522
+ <frontend_type>select</frontend_type>
3523
+ <source_model>adminhtml/system_config_source_yesno</source_model>
3524
+ <sort_order>99</sort_order>
3525
+ <show_in_default>1</show_in_default>
3526
+ <show_in_website>1</show_in_website>
3527
+ <show_in_store>1</show_in_store>
3528
+ </send_fraud_payment_email>
3529
+ <allowspecific translate="label">
3530
  <label>Payment from applicable countries</label>
3531
  <frontend_type>allowspecific</frontend_type>
3532
  <sort_order>100</sort_order>
3569
  <show_in_store>1</show_in_store>
3570
  </sort_order>
3571
  <debug translate="label">
3572
+ <label>Enable debug log</label>
3573
+ <comment></comment>
3574
  <frontend_type>select</frontend_type>
3575
  <source_model>adminhtml/system_config_source_yesno</source_model>
3576
  <sort_order>150</sort_order>
3578
  <show_in_website>1</show_in_website>
3579
  <show_in_store>0</show_in_store>
3580
  </debug>
3581
+ <is_test_mode translate="label comment">
3582
+ <label>Enable test mode</label>
3583
+ <comment></comment>
3584
  <frontend_type>select</frontend_type>
3585
  <source_model>adminhtml/system_config_source_yesno</source_model>
3586
  <sort_order>200</sort_order>
3588
  <show_in_website>1</show_in_website>
3589
  <show_in_store>1</show_in_store>
3590
  </is_test_mode>
3591
+ </fields>
3592
+ </hipay_webmoneyapi>
3593
+ <hipay_yandexapi translate="label" module="hipay">
3594
+ <label>HiPay Enterprise Yandex.Money</label>
3595
  <frontend_type>text</frontend_type>
3596
  <sort_order>220</sort_order>
3597
  <show_in_default>1</show_in_default>
3598
  <show_in_website>1</show_in_website>
3599
  <show_in_store>1</show_in_store>
3600
  <fields>
3601
+ <active translate="label">
3602
+ <label>Enabled</label>
3603
+ <frontend_type>select</frontend_type>
3604
+ <source_model>adminhtml/system_config_source_yesno</source_model>
3605
+ <sort_order>10</sort_order>
3606
+ <show_in_default>1</show_in_default>
3607
+ <show_in_website>1</show_in_website>
3608
+ <show_in_store>1</show_in_store>
3609
+ </active>
3610
+ <title translate="label">
3611
+ <label>Title</label>
3612
+ <frontend_type>text</frontend_type>
3613
+ <sort_order>20</sort_order>
3614
+ <show_in_default>1</show_in_default>
3615
+ <show_in_website>1</show_in_website>
3616
+ <show_in_store>1</show_in_store>
3617
+ </title>
3618
  <order_status_payment_accepted translate="label">
3619
  <label>Order status when payment accepted</label>
3620
  <frontend_type>select</frontend_type>
3642
  <show_in_website>1</show_in_website>
3643
  <show_in_store>0</show_in_store>
3644
  </order_status_payment_canceled>
3645
+ <hipay_status_validate_order translate="label">
3646
  <label>Hipay status to validate order</label>
3647
  <frontend_type>select</frontend_type>
3648
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
3653
  </hipay_status_validate_order>
3654
  <success_redirect_page translate="label">
3655
  <label>Redirect page success</label>
3656
+ <comment>Page to redirect when transaction is successful, leave empty for
3657
+ checkout/onepage/success
3658
+ </comment>
3659
  <frontend_type>text</frontend_type>
3660
+ <sort_order>27</sort_order>
3661
  <show_in_default>1</show_in_default>
3662
  <show_in_website>1</show_in_website>
3663
  <show_in_store>0</show_in_store>
3664
  </success_redirect_page>
3665
+ <failure_redirect_page translate="label">
3666
+ <label>Redirect page failure</label>
3667
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
3668
+ </comment>
3669
+ <frontend_type>text</frontend_type>
3670
+ <sort_order>28</sort_order>
3671
+ <show_in_default>1</show_in_default>
3672
+ <show_in_website>1</show_in_website>
3673
+ <show_in_store>0</show_in_store>
3674
+ </failure_redirect_page>
3675
+ <pending_redirect_page translate="label">
3676
  <label>Redirect page pending status</label>
3677
  <comment>Page to redirect when transaction is in pending status</comment>
3678
  <frontend_type>select</frontend_type>
3679
  <source_model>hipay/source_pendingredirect</source_model>
3680
+ <sort_order>29</sort_order>
3681
  <show_in_default>1</show_in_default>
3682
  <show_in_website>1</show_in_website>
3683
  <show_in_store>0</show_in_store>
3684
  </pending_redirect_page>
3685
  <css_url translate="label coment">
3686
+ <label>Css Url</label>
3687
+ <comment>Important, HTTPS protocol is required</comment>
3688
+ <frontend_type>text</frontend_type>
3689
+ <sort_order>30</sort_order>
3690
+ <show_in_default>1</show_in_default>
3691
+ <show_in_website>1</show_in_website>
3692
+ <show_in_store>1</show_in_store>
3693
  </css_url>
3694
  <template translate="label">
3695
+ <label>Page payment template</label>
3696
  <frontend_type>select</frontend_type>
3697
  <source_model>hipay/source_template</source_model>
3698
  <sort_order>35</sort_order>
3699
  <show_in_default>1</show_in_default>
3700
  <show_in_website>1</show_in_website>
3701
+ <show_in_store>1</show_in_store>
3702
  </template>
3703
+ <re_add_to_cart translate="label comment">
3704
+ <label>Add product to cart</label>
3705
+ <comment>Fill cart when payment canceled or refused</comment>
3706
  <frontend_type>select</frontend_type>
3707
  <source_model>adminhtml/system_config_source_yesno</source_model>
3708
  <sort_order>95</sort_order>
3709
  <show_in_default>1</show_in_default>
3710
  <show_in_website>1</show_in_website>
3711
+ <show_in_store>1</show_in_store>
3712
  </re_add_to_cart>
3713
  <cancel_pending_order translate="label comment">
3714
+ <label>Cancel pending order</label>
3715
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3716
  <frontend_type>select</frontend_type>
3717
  <source_model>adminhtml/system_config_source_yesno</source_model>
3718
  <sort_order>97</sort_order>
3719
  <show_in_default>1</show_in_default>
3720
  <show_in_website>1</show_in_website>
3721
  <show_in_store>0</show_in_store>
3722
+ </cancel_pending_order>
3723
+ <delay_cancel_pending_order translate="label">
3724
+ <label>Delay before cancel order</label>
3725
+ <comment>In Hours</comment>
3726
+ <frontend_type>text</frontend_type>
3727
+ <sort_order>98</sort_order>
3728
+ <show_in_default>1</show_in_default>
3729
+ <show_in_website>1</show_in_website>
3730
+ <show_in_store>1</show_in_store>
3731
+ </delay_cancel_pending_order>
3732
+ <send_fraud_payment_email translate="label">
3733
+ <label>Send fraud payment email</label>
3734
+ <frontend_type>select</frontend_type>
3735
+ <source_model>adminhtml/system_config_source_yesno</source_model>
3736
+ <sort_order>99</sort_order>
3737
+ <show_in_default>1</show_in_default>
3738
+ <show_in_website>1</show_in_website>
3739
+ <show_in_store>1</show_in_store>
3740
+ </send_fraud_payment_email>
3741
+ <allowspecific translate="label">
3742
  <label>Payment from applicable countries</label>
3743
  <frontend_type>allowspecific</frontend_type>
3744
  <sort_order>100</sort_order>
3781
  <show_in_store>1</show_in_store>
3782
  </sort_order>
3783
  <debug translate="label">
3784
+ <label>Enable debug log</label>
3785
+ <comment></comment>
3786
  <frontend_type>select</frontend_type>
3787
  <source_model>adminhtml/system_config_source_yesno</source_model>
3788
  <sort_order>150</sort_order>
3790
  <show_in_website>1</show_in_website>
3791
  <show_in_store>0</show_in_store>
3792
  </debug>
3793
+ <is_test_mode translate="label comment">
3794
+ <label>Enable test mode</label>
3795
+ <comment></comment>
3796
  <frontend_type>select</frontend_type>
3797
  <source_model>adminhtml/system_config_source_yesno</source_model>
3798
  <sort_order>200</sort_order>
3800
  <show_in_website>1</show_in_website>
3801
  <show_in_store>1</show_in_store>
3802
  </is_test_mode>
3803
+ </fields>
3804
+ </hipay_yandexapi>
3805
+ <hipay_sofortapi translate="label" module="hipay">
3806
+ <label>HiPay Enterprise Sofort Überweisung</label>
3807
  <frontend_type>text</frontend_type>
3808
  <sort_order>225</sort_order>
3809
  <show_in_default>1</show_in_default>
3810
  <show_in_website>1</show_in_website>
3811
  <show_in_store>1</show_in_store>
3812
  <fields>
3813
+ <active translate="label">
3814
+ <label>Enabled</label>
3815
+ <frontend_type>select</frontend_type>
3816
+ <source_model>adminhtml/system_config_source_yesno</source_model>
3817
+ <sort_order>10</sort_order>
3818
+ <show_in_default>1</show_in_default>
3819
+ <show_in_website>1</show_in_website>
3820
+ <show_in_store>1</show_in_store>
3821
+ </active>
3822
+ <title translate="label">
3823
+ <label>Title</label>
3824
+ <frontend_type>text</frontend_type>
3825
+ <sort_order>20</sort_order>
3826
+ <show_in_default>1</show_in_default>
3827
+ <show_in_website>1</show_in_website>
3828
+ <show_in_store>1</show_in_store>
3829
+ </title>
3830
  <order_status_payment_accepted translate="label">
3831
  <label>Order status when payment accepted</label>
3832
  <frontend_type>select</frontend_type>
3854
  <show_in_website>1</show_in_website>
3855
  <show_in_store>0</show_in_store>
3856
  </order_status_payment_canceled>
3857
+ <hipay_status_validate_order translate="label">
3858
  <label>Hipay status to validate order</label>
3859
  <frontend_type>select</frontend_type>
3860
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
3865
  </hipay_status_validate_order>
3866
  <success_redirect_page translate="label">
3867
  <label>Redirect page success</label>
3868
+ <comment>Page to redirect when transaction is successful, leave empty for
3869
+ checkout/onepage/success
3870
+ </comment>
3871
  <frontend_type>text</frontend_type>
3872
+ <sort_order>27</sort_order>
3873
  <show_in_default>1</show_in_default>
3874
  <show_in_website>1</show_in_website>
3875
  <show_in_store>0</show_in_store>
3876
  </success_redirect_page>
3877
+ <failure_redirect_page translate="label">
3878
+ <label>Redirect page failure</label>
3879
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
3880
+ </comment>
3881
+ <frontend_type>text</frontend_type>
3882
+ <sort_order>28</sort_order>
3883
+ <show_in_default>1</show_in_default>
3884
+ <show_in_website>1</show_in_website>
3885
+ <show_in_store>0</show_in_store>
3886
+ </failure_redirect_page>
3887
+ <pending_redirect_page translate="label">
3888
  <label>Redirect page pending status</label>
3889
  <comment>Page to redirect when transaction is in pending status</comment>
3890
  <frontend_type>select</frontend_type>
3891
  <source_model>hipay/source_pendingredirect</source_model>
3892
+ <sort_order>29</sort_order>
3893
  <show_in_default>1</show_in_default>
3894
  <show_in_website>1</show_in_website>
3895
  <show_in_store>0</show_in_store>
3896
  </pending_redirect_page>
3897
+ <re_add_to_cart translate="label comment">
3898
+ <label>Add product to cart</label>
3899
+ <comment>Fill cart when payment canceled or refused</comment>
3900
  <frontend_type>select</frontend_type>
3901
  <source_model>adminhtml/system_config_source_yesno</source_model>
3902
  <sort_order>95</sort_order>
3905
  <show_in_store>0</show_in_store>
3906
  </re_add_to_cart>
3907
  <cancel_pending_order translate="label comment">
3908
+ <label>Cancel pending order</label>
3909
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
3910
  <frontend_type>select</frontend_type>
3911
  <source_model>adminhtml/system_config_source_yesno</source_model>
3912
  <sort_order>97</sort_order>
3913
  <show_in_default>1</show_in_default>
3914
  <show_in_website>1</show_in_website>
3915
  <show_in_store>0</show_in_store>
3916
+ </cancel_pending_order>
3917
+ <delay_cancel_pending_order translate="label">
3918
+ <label>Delay before cancel order</label>
3919
+ <comment>In Hours</comment>
3920
+ <comment>In Hours</comment>
3921
+ <comment>In Hours</comment>
3922
+ <frontend_type>text</frontend_type>
3923
+ <sort_order>98</sort_order>
3924
+ <show_in_default>1</show_in_default>
3925
+ <show_in_website>1</show_in_website>
3926
+ <show_in_store>1</show_in_store>
3927
+ </delay_cancel_pending_order>
3928
+ <send_fraud_payment_email translate="label">
3929
+ <label>Send fraud payment email</label>
3930
+ <frontend_type>select</frontend_type>
3931
+ <source_model>adminhtml/system_config_source_yesno</source_model>
3932
+ <sort_order>99</sort_order>
3933
+ <show_in_default>1</show_in_default>
3934
+ <show_in_website>1</show_in_website>
3935
+ <show_in_store>1</show_in_store>
3936
+ </send_fraud_payment_email>
3937
+ <allowspecific translate="label">
3938
  <label>Payment from applicable countries</label>
3939
  <frontend_type>allowspecific</frontend_type>
3940
  <sort_order>100</sort_order>
3977
  <show_in_store>1</show_in_store>
3978
  </sort_order>
3979
  <debug translate="label">
3980
+ <label>Enable debug log</label>
3981
+ <comment></comment>
3982
  <frontend_type>select</frontend_type>
3983
  <source_model>adminhtml/system_config_source_yesno</source_model>
3984
  <sort_order>150</sort_order>
3986
  <show_in_website>1</show_in_website>
3987
  <show_in_store>0</show_in_store>
3988
  </debug>
3989
+ <is_test_mode translate="label comment">
3990
+ <label>Enable test mode</label>
3991
+ <comment></comment>
3992
  <frontend_type>select</frontend_type>
3993
  <source_model>adminhtml/system_config_source_yesno</source_model>
3994
  <sort_order>200</sort_order>
3996
  <show_in_website>1</show_in_website>
3997
  <show_in_store>1</show_in_store>
3998
  </is_test_mode>
3999
+ </fields>
4000
+ </hipay_sofortapi>
4001
+ <hipay_sisalapi translate="label" module="hipay">
4002
+ <label>HiPay Enterprise Sisal</label>
4003
  <frontend_type>text</frontend_type>
4004
  <sort_order>225</sort_order>
4005
  <show_in_default>1</show_in_default>
4006
  <show_in_website>1</show_in_website>
4007
  <show_in_store>1</show_in_store>
4008
  <fields>
4009
+ <active translate="label">
4010
+ <label>Enabled</label>
4011
+ <frontend_type>select</frontend_type>
4012
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4013
+ <sort_order>10</sort_order>
4014
+ <show_in_default>1</show_in_default>
4015
+ <show_in_website>1</show_in_website>
4016
+ <show_in_store>1</show_in_store>
4017
+ </active>
4018
+ <title translate="label">
4019
+ <label>Title</label>
4020
+ <frontend_type>text</frontend_type>
4021
+ <sort_order>20</sort_order>
4022
+ <show_in_default>1</show_in_default>
4023
+ <show_in_website>1</show_in_website>
4024
+ <show_in_store>1</show_in_store>
4025
+ </title>
4026
  <order_status_payment_accepted translate="label">
4027
  <label>Order status when payment accepted</label>
4028
  <frontend_type>select</frontend_type>
4050
  <show_in_website>1</show_in_website>
4051
  <show_in_store>0</show_in_store>
4052
  </order_status_payment_canceled>
4053
+ <hipay_status_validate_order translate="label">
4054
  <label>Hipay status to validate order</label>
4055
  <frontend_type>select</frontend_type>
4056
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
4061
  </hipay_status_validate_order>
4062
  <success_redirect_page translate="label">
4063
  <label>Redirect page success</label>
4064
+ <comment>Page to redirect when transaction is successful, leave empty for
4065
+ checkout/onepage/success
4066
+ </comment>
4067
  <frontend_type>text</frontend_type>
4068
+ <sort_order>27</sort_order>
4069
  <show_in_default>1</show_in_default>
4070
  <show_in_website>1</show_in_website>
4071
  <show_in_store>0</show_in_store>
4072
  </success_redirect_page>
4073
+ <failure_redirect_page translate="label">
4074
+ <label>Redirect page failure</label>
4075
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
4076
+ </comment>
4077
+ <frontend_type>text</frontend_type>
4078
+ <sort_order>28</sort_order>
4079
+ <show_in_default>1</show_in_default>
4080
+ <show_in_website>1</show_in_website>
4081
+ <show_in_store>0</show_in_store>
4082
+ </failure_redirect_page>
4083
  <pending_redirect_page translate="label">
4084
  <label>Redirect page pending status</label>
4085
  <comment>Page to redirect when transaction is in pending status</comment>
4086
  <frontend_type>select</frontend_type>
4087
  <source_model>hipay/source_pendingredirect</source_model>
4088
+ <sort_order>29</sort_order>
4089
  <show_in_default>1</show_in_default>
4090
  <show_in_website>1</show_in_website>
4091
  <show_in_store>0</show_in_store>
4092
  </pending_redirect_page>
4093
+ <re_add_to_cart translate="label comment">
4094
+ <label>Add product to cart</label>
4095
+ <comment>Fill cart when payment canceled or refused</comment>
4096
  <frontend_type>select</frontend_type>
4097
  <source_model>adminhtml/system_config_source_yesno</source_model>
4098
  <sort_order>95</sort_order>
4101
  <show_in_store>0</show_in_store>
4102
  </re_add_to_cart>
4103
  <cancel_pending_order translate="label comment">
4104
+ <label>Cancel pending order</label>
4105
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
4106
  <frontend_type>select</frontend_type>
4107
  <source_model>adminhtml/system_config_source_yesno</source_model>
4108
  <sort_order>97</sort_order>
4109
  <show_in_default>1</show_in_default>
4110
  <show_in_website>1</show_in_website>
4111
  <show_in_store>0</show_in_store>
4112
+ </cancel_pending_order>
4113
+ <delay_cancel_pending_order translate="label">
4114
+ <label>Delay before cancel order</label>
4115
+ <comment>In Hours</comment>
4116
+ <frontend_type>text</frontend_type>
4117
+ <sort_order>98</sort_order>
4118
+ <show_in_default>1</show_in_default>
4119
+ <show_in_website>1</show_in_website>
4120
+ <show_in_store>1</show_in_store>
4121
+ </delay_cancel_pending_order>
4122
+ <send_fraud_payment_email translate="label">
4123
+ <label>Send fraud payment email</label>
4124
+ <frontend_type>select</frontend_type>
4125
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4126
+ <sort_order>99</sort_order>
4127
+ <show_in_default>1</show_in_default>
4128
+ <show_in_website>1</show_in_website>
4129
+ <show_in_store>1</show_in_store>
4130
+ </send_fraud_payment_email>
4131
+ <allowspecific translate="label">
4132
+ <label>Payment from applicable countries</label>
4133
+ <frontend_type>allowspecific</frontend_type>
4134
+ <sort_order>100</sort_order>
4135
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
4136
  <show_in_default>1</show_in_default>
4137
  <show_in_website>1</show_in_website>
4171
  <show_in_store>1</show_in_store>
4172
  </sort_order>
4173
  <debug translate="label">
4174
+ <label>Enable debug log</label>
4175
+ <comment></comment>
4176
  <frontend_type>select</frontend_type>
4177
  <source_model>adminhtml/system_config_source_yesno</source_model>
4178
  <sort_order>150</sort_order>
4180
  <show_in_website>1</show_in_website>
4181
  <show_in_store>0</show_in_store>
4182
  </debug>
4183
+ <is_test_mode translate="label comment">
4184
+ <label>Enable test mode</label>
4185
+ <comment></comment>
4186
  <frontend_type>select</frontend_type>
4187
  <source_model>adminhtml/system_config_source_yesno</source_model>
4188
  <sort_order>200</sort_order>
4190
  <show_in_website>1</show_in_website>
4191
  <show_in_store>1</show_in_store>
4192
  </is_test_mode>
4193
+ </fields>
4194
+ </hipay_sisalapi>
4195
+ <hipay_paypalapi translate="label" module="hipay">
4196
+ <label>HiPay Enterprise PayPal</label>
4197
  <frontend_type>text</frontend_type>
4198
  <sort_order>225</sort_order>
4199
  <show_in_default>1</show_in_default>
4200
  <show_in_website>1</show_in_website>
4201
  <show_in_store>1</show_in_store>
4202
  <fields>
4203
+ <active translate="label">
4204
+ <label>Enabled</label>
4205
+ <frontend_type>select</frontend_type>
4206
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4207
+ <sort_order>10</sort_order>
4208
+ <show_in_default>1</show_in_default>
4209
+ <show_in_website>1</show_in_website>
4210
+ <show_in_store>1</show_in_store>
4211
+ </active>
4212
+ <title translate="label">
4213
+ <label>Title</label>
4214
+ <frontend_type>text</frontend_type>
4215
+ <sort_order>20</sort_order>
4216
+ <show_in_default>1</show_in_default>
4217
+ <show_in_website>1</show_in_website>
4218
+ <show_in_store>1</show_in_store>
4219
+ </title>
4220
  <order_status_payment_accepted translate="label">
4221
  <label>Order status when payment accepted</label>
4222
  <frontend_type>select</frontend_type>
4244
  <show_in_website>1</show_in_website>
4245
  <show_in_store>0</show_in_store>
4246
  </order_status_payment_canceled>
4247
+ <hipay_status_validate_order translate="label">
4248
  <label>Hipay status to validate order</label>
4249
  <frontend_type>select</frontend_type>
4250
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
4255
  </hipay_status_validate_order>
4256
  <success_redirect_page translate="label">
4257
  <label>Redirect page success</label>
4258
+ <comment>Page to redirect when transaction is successful, leave empty for
4259
+ checkout/onepage/success
4260
+ </comment>
4261
  <frontend_type>text</frontend_type>
4262
+ <sort_order>27</sort_order>
4263
  <show_in_default>1</show_in_default>
4264
  <show_in_website>1</show_in_website>
4265
  <show_in_store>0</show_in_store>
4266
  </success_redirect_page>
4267
+ <failure_redirect_page translate="label">
4268
+ <label>Redirect page failure</label>
4269
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
4270
+ </comment>
4271
+ <frontend_type>text</frontend_type>
4272
+ <sort_order>28</sort_order>
4273
+ <show_in_default>1</show_in_default>
4274
+ <show_in_website>1</show_in_website>
4275
+ <show_in_store>0</show_in_store>
4276
+ </failure_redirect_page>
4277
+ <pending_redirect_page translate="label">
4278
  <label>Redirect page pending status</label>
4279
  <comment>Page to redirect when transaction is in pending status</comment>
4280
  <frontend_type>select</frontend_type>
4281
  <source_model>hipay/source_pendingredirect</source_model>
4282
+ <sort_order>29</sort_order>
4283
  <show_in_default>1</show_in_default>
4284
  <show_in_website>1</show_in_website>
4285
  <show_in_store>0</show_in_store>
4286
  </pending_redirect_page>
4287
+ <re_add_to_cart translate="label comment">
4288
+ <label>Add product to cart</label>
4289
+ <comment>Fill cart when payment canceled or refused</comment>
4290
  <frontend_type>select</frontend_type>
4291
  <source_model>adminhtml/system_config_source_yesno</source_model>
4292
  <sort_order>95</sort_order>
4295
  <show_in_store>0</show_in_store>
4296
  </re_add_to_cart>
4297
  <cancel_pending_order translate="label comment">
4298
+ <label>Cancel pending order</label>
4299
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
4300
  <frontend_type>select</frontend_type>
4301
  <source_model>adminhtml/system_config_source_yesno</source_model>
4302
  <sort_order>97</sort_order>
4303
  <show_in_default>1</show_in_default>
4304
  <show_in_website>1</show_in_website>
4305
  <show_in_store>0</show_in_store>
4306
+ </cancel_pending_order>
4307
+ <delay_cancel_pending_order translate="label">
4308
+ <label>Delay before cancel order</label>
4309
+ <comment>In Hours</comment>
4310
+ <frontend_type>text</frontend_type>
4311
+ <sort_order>98</sort_order>
4312
+ <show_in_default>1</show_in_default>
4313
+ <show_in_website>1</show_in_website>
4314
+ <show_in_store>1</show_in_store>
4315
+ </delay_cancel_pending_order>
4316
+ <send_fraud_payment_email translate="label">
4317
+ <label>Send fraud payment email</label>
4318
+ <frontend_type>select</frontend_type>
4319
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4320
+ <sort_order>99</sort_order>
4321
+ <show_in_default>1</show_in_default>
4322
+ <show_in_website>1</show_in_website>
4323
+ <show_in_store>1</show_in_store>
4324
+ </send_fraud_payment_email>
4325
+ <allowspecific translate="label">
4326
  <label>Payment from applicable countries</label>
4327
  <frontend_type>allowspecific</frontend_type>
4328
  <sort_order>100</sort_order>
4365
  <show_in_store>1</show_in_store>
4366
  </sort_order>
4367
  <debug translate="label">
4368
+ <label>Enable debug log</label>
4369
+ <comment></comment>
4370
  <frontend_type>select</frontend_type>
4371
  <source_model>adminhtml/system_config_source_yesno</source_model>
4372
  <sort_order>150</sort_order>
4374
  <show_in_website>1</show_in_website>
4375
  <show_in_store>0</show_in_store>
4376
  </debug>
4377
+ <is_test_mode translate="label comment">
4378
+ <label>Enable test mode</label>
4379
+ <comment></comment>
4380
  <frontend_type>select</frontend_type>
4381
  <source_model>adminhtml/system_config_source_yesno</source_model>
4382
  <sort_order>200</sort_order>
4384
  <show_in_website>1</show_in_website>
4385
  <show_in_store>1</show_in_store>
4386
  </is_test_mode>
4387
+ </fields>
4388
+ </hipay_paypalapi>
4389
  <hipay_sdd translate="label" module="hipay">
4390
+ <label>HiPay Enterprise SEPA Direct Debit</label>
4391
  <frontend_type>text</frontend_type>
4392
  <sort_order>200</sort_order>
4393
  <show_in_default>1</show_in_default>
4410
  <show_in_default>1</show_in_default>
4411
  <show_in_website>1</show_in_website>
4412
  <show_in_store>1</show_in_store>
4413
+ </title>
4414
  <order_status_payment_accepted translate="label">
4415
  <label>Order status when payment accepted</label>
4416
  <frontend_type>select</frontend_type>
4449
  </hipay_status_validate_order>
4450
  <success_redirect_page translate="label">
4451
  <label>Redirect page success</label>
4452
+ <comment>Page to redirect when transaction is successful, leave empty for
4453
+ checkout/onepage/success
4454
+ </comment>
4455
  <frontend_type>text</frontend_type>
4456
+ <sort_order>27</sort_order>
4457
  <show_in_default>1</show_in_default>
4458
  <show_in_website>1</show_in_website>
4459
  <show_in_store>0</show_in_store>
4460
  </success_redirect_page>
4461
+ <failure_redirect_page translate="label">
4462
+ <label>Redirect page failure</label>
4463
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
4464
+ </comment>
4465
+ <frontend_type>text</frontend_type>
4466
+ <sort_order>28</sort_order>
4467
+ <show_in_default>1</show_in_default>
4468
+ <show_in_website>1</show_in_website>
4469
+ <show_in_store>0</show_in_store>
4470
+ </failure_redirect_page>
4471
  <pending_redirect_page translate="label">
4472
  <label>Redirect page pending status</label>
4473
  <comment>Page to redirect when transaction is in pending status</comment>
4474
  <frontend_type>select</frontend_type>
4475
  <source_model>hipay/source_pendingredirect</source_model>
4476
+ <sort_order>29</sort_order>
4477
  <show_in_default>1</show_in_default>
4478
  <show_in_website>1</show_in_website>
4479
  <show_in_store>0</show_in_store>
4505
  <show_in_default>1</show_in_default>
4506
  <show_in_website>1</show_in_website>
4507
  <show_in_store>0</show_in_store>
4508
+ </re_add_to_cart>
4509
+ <cancel_pending_order translate="label comment">
4510
  <label>Cancel pending order</label>
4511
  <comment>Cancel orders stayed in pending because customer not validated payment</comment>
4512
  <frontend_type>select</frontend_type>
4515
  <show_in_default>1</show_in_default>
4516
  <show_in_website>1</show_in_website>
4517
  <show_in_store>0</show_in_store>
4518
+ </cancel_pending_order>
4519
+ <delay_cancel_pending_order translate="label">
4520
+ <label>Delay before cancel order</label>
4521
+ <comment>In Hours</comment>
4522
+ <frontend_type>text</frontend_type>
4523
+ <sort_order>98</sort_order>
4524
+ <show_in_default>1</show_in_default>
4525
+ <show_in_website>1</show_in_website>
4526
+ <show_in_store>1</show_in_store>
4527
+ </delay_cancel_pending_order>
4528
+ <send_fraud_payment_email translate="label">
4529
  <label>Send fraud payment email</label>
4530
  <frontend_type>select</frontend_type>
4531
  <source_model>adminhtml/system_config_source_yesno</source_model>
4534
  <show_in_website>1</show_in_website>
4535
  <show_in_store>1</show_in_store>
4536
  </send_fraud_payment_email>
4537
+ <allowspecific translate="label">
4538
  <label>Payment from applicable countries</label>
4539
  <frontend_type>allowspecific</frontend_type>
4540
  <sort_order>100</sort_order>
4596
  <show_in_website>1</show_in_website>
4597
  <show_in_store>1</show_in_store>
4598
  </is_test_mode>
4599
+ </fields>
4600
  </hipay_sdd>
4601
  <hipay_postfinancecardapi translate="label" module="hipay">
4602
+ <label>HiPay Enterprise PostFinance Card</label>
4603
  <frontend_type>text</frontend_type>
4604
  <sort_order>225</sort_order>
4605
  <show_in_default>1</show_in_default>
4606
  <show_in_website>1</show_in_website>
4607
  <show_in_store>1</show_in_store>
4608
  <fields>
4609
+ <active translate="label">
4610
+ <label>Enabled</label>
4611
+ <frontend_type>select</frontend_type>
4612
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4613
+ <sort_order>10</sort_order>
4614
+ <show_in_default>1</show_in_default>
4615
+ <show_in_website>1</show_in_website>
4616
+ <show_in_store>1</show_in_store>
4617
+ </active>
4618
+ <title translate="label">
4619
+ <label>Title</label>
4620
+ <frontend_type>text</frontend_type>
4621
+ <sort_order>20</sort_order>
4622
+ <show_in_default>1</show_in_default>
4623
+ <show_in_website>1</show_in_website>
4624
+ <show_in_store>1</show_in_store>
4625
+ </title>
4626
  <order_status_payment_accepted translate="label">
4627
  <label>Order status when payment accepted</label>
4628
  <frontend_type>select</frontend_type>
4650
  <show_in_website>1</show_in_website>
4651
  <show_in_store>0</show_in_store>
4652
  </order_status_payment_canceled>
4653
+ <hipay_status_validate_order translate="label">
4654
  <label>Hipay status to validate order</label>
4655
  <frontend_type>select</frontend_type>
4656
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
4661
  </hipay_status_validate_order>
4662
  <success_redirect_page translate="label">
4663
  <label>Redirect page success</label>
4664
+ <comment>Page to redirect when transaction is successful, leave empty for
4665
+ checkout/onepage/success
4666
+ </comment>
4667
  <frontend_type>text</frontend_type>
4668
+ <sort_order>27</sort_order>
4669
  <show_in_default>1</show_in_default>
4670
  <show_in_website>1</show_in_website>
4671
  <show_in_store>0</show_in_store>
4672
  </success_redirect_page>
4673
+ <failure_redirect_page translate="label">
4674
+ <label>Redirect page failure</label>
4675
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
4676
+ </comment>
4677
+ <frontend_type>text</frontend_type>
4678
+ <sort_order>28</sort_order>
4679
+ <show_in_default>1</show_in_default>
4680
+ <show_in_website>1</show_in_website>
4681
+ <show_in_store>0</show_in_store>
4682
+ </failure_redirect_page>
4683
+ <pending_redirect_page translate="label">
4684
  <label>Redirect page pending status</label>
4685
  <comment>Page to redirect when transaction is in pending status</comment>
4686
  <frontend_type>select</frontend_type>
4687
  <source_model>hipay/source_pendingredirect</source_model>
4688
+ <sort_order>29</sort_order>
4689
  <show_in_default>1</show_in_default>
4690
  <show_in_website>1</show_in_website>
4691
  <show_in_store>0</show_in_store>
4692
  </pending_redirect_page>
4693
+ <re_add_to_cart translate="label comment">
4694
+ <label>Add product to cart</label>
4695
+ <comment>Fill cart when payment canceled or refused</comment>
4696
  <frontend_type>select</frontend_type>
4697
  <source_model>adminhtml/system_config_source_yesno</source_model>
4698
  <sort_order>95</sort_order>
4701
  <show_in_store>0</show_in_store>
4702
  </re_add_to_cart>
4703
  <cancel_pending_order translate="label comment">
4704
+ <label>Cancel pending order</label>
4705
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
4706
  <frontend_type>select</frontend_type>
4707
  <source_model>adminhtml/system_config_source_yesno</source_model>
4708
  <sort_order>97</sort_order>
4709
  <show_in_default>1</show_in_default>
4710
  <show_in_website>1</show_in_website>
4711
  <show_in_store>0</show_in_store>
4712
+ </cancel_pending_order>
4713
+ <delay_cancel_pending_order translate="label">
4714
+ <label>Delay before cancel order</label>
4715
+ <comment>In Hours</comment>
4716
+ <frontend_type>text</frontend_type>
4717
+ <sort_order>98</sort_order>
4718
+ <show_in_default>1</show_in_default>
4719
+ <show_in_website>1</show_in_website>
4720
+ <show_in_store>1</show_in_store>
4721
+ </delay_cancel_pending_order>
4722
+ <delay_cancel_pending_order translate="label">
4723
+ <label>Delay before cancel order</label>
4724
+ <comment>In Hours</comment>
4725
+ <frontend_type>text</frontend_type>
4726
+ <sort_order>98</sort_order>
4727
+ <show_in_default>1</show_in_default>
4728
+ <show_in_website>1</show_in_website>
4729
+ <show_in_store>1</show_in_store>
4730
+ </delay_cancel_pending_order>
4731
+ <send_fraud_payment_email translate="label">
4732
+ <label>Send fraud payment email</label>
4733
+ <frontend_type>select</frontend_type>
4734
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4735
+ <sort_order>99</sort_order>
4736
+ <show_in_default>1</show_in_default>
4737
+ <show_in_website>1</show_in_website>
4738
+ <show_in_store>1</show_in_store>
4739
+ </send_fraud_payment_email>
4740
+ <allowspecific translate="label">
4741
  <label>Payment from applicable countries</label>
4742
  <frontend_type>allowspecific</frontend_type>
4743
  <sort_order>100</sort_order>
4780
  <show_in_store>1</show_in_store>
4781
  </sort_order>
4782
  <debug translate="label">
4783
+ <label>Enable debug log</label>
4784
+ <comment></comment>
4785
  <frontend_type>select</frontend_type>
4786
  <source_model>adminhtml/system_config_source_yesno</source_model>
4787
  <sort_order>150</sort_order>
4789
  <show_in_website>1</show_in_website>
4790
  <show_in_store>0</show_in_store>
4791
  </debug>
4792
+ <is_test_mode translate="label comment">
4793
+ <label>Enable test mode</label>
4794
+ <comment></comment>
4795
  <frontend_type>select</frontend_type>
4796
  <source_model>adminhtml/system_config_source_yesno</source_model>
4797
  <sort_order>200</sort_order>
4799
  <show_in_website>1</show_in_website>
4800
  <show_in_store>1</show_in_store>
4801
  </is_test_mode>
4802
+ </fields>
4803
+ </hipay_postfinancecardapi>
4804
+ <hipay_postfinanceefinanceapi translate="label" module="hipay">
4805
+ <label>HiPay Enterprise PostFinance E-Finance</label>
4806
  <frontend_type>text</frontend_type>
4807
  <sort_order>225</sort_order>
4808
  <show_in_default>1</show_in_default>
4809
  <show_in_website>1</show_in_website>
4810
  <show_in_store>1</show_in_store>
4811
  <fields>
4812
+ <active translate="label">
4813
+ <label>Enabled</label>
4814
+ <frontend_type>select</frontend_type>
4815
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4816
+ <sort_order>10</sort_order>
4817
+ <show_in_default>1</show_in_default>
4818
+ <show_in_website>1</show_in_website>
4819
+ <show_in_store>1</show_in_store>
4820
+ </active>
4821
+ <title translate="label">
4822
+ <label>Title</label>
4823
+ <frontend_type>text</frontend_type>
4824
+ <sort_order>20</sort_order>
4825
+ <show_in_default>1</show_in_default>
4826
+ <show_in_website>1</show_in_website>
4827
+ <show_in_store>1</show_in_store>
4828
+ </title>
4829
  <order_status_payment_accepted translate="label">
4830
  <label>Order status when payment accepted</label>
4831
  <frontend_type>select</frontend_type>
4853
  <show_in_website>1</show_in_website>
4854
  <show_in_store>0</show_in_store>
4855
  </order_status_payment_canceled>
4856
+ <hipay_status_validate_order translate="label">
4857
  <label>Hipay status to validate order</label>
4858
  <frontend_type>select</frontend_type>
4859
  <source_model>hipay/source_order_hipayStatusValidate</source_model>
4864
  </hipay_status_validate_order>
4865
  <success_redirect_page translate="label">
4866
  <label>Redirect page success</label>
4867
+ <comment>Page to redirect when transaction is successful, leave empty for
4868
+ checkout/onepage/success
4869
+ </comment>
4870
  <frontend_type>text</frontend_type>
4871
+ <sort_order>27</sort_order>
4872
  <show_in_default>1</show_in_default>
4873
  <show_in_website>1</show_in_website>
4874
  <show_in_store>0</show_in_store>
4875
  </success_redirect_page>
4876
+ <failure_redirect_page translate="label">
4877
+ <label>Redirect page failure</label>
4878
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
4879
+ </comment>
4880
+ <frontend_type>text</frontend_type>
4881
+ <sort_order>28</sort_order>
4882
+ <show_in_default>1</show_in_default>
4883
+ <show_in_website>1</show_in_website>
4884
+ <show_in_store>0</show_in_store>
4885
+ </failure_redirect_page>
4886
+ <pending_redirect_page translate="label">
4887
  <label>Redirect page pending status</label>
4888
  <comment>Page to redirect when transaction is in pending status</comment>
4889
  <frontend_type>select</frontend_type>
4890
  <source_model>hipay/source_pendingredirect</source_model>
4891
+ <sort_order>29</sort_order>
4892
  <show_in_default>1</show_in_default>
4893
  <show_in_website>1</show_in_website>
4894
  <show_in_store>0</show_in_store>
4895
  </pending_redirect_page>
4896
+ <re_add_to_cart translate="label comment">
4897
+ <label>Add product to cart</label>
4898
+ <comment>Fill cart when payment canceled or refused</comment>
4899
  <frontend_type>select</frontend_type>
4900
  <source_model>adminhtml/system_config_source_yesno</source_model>
4901
  <sort_order>95</sort_order>
4904
  <show_in_store>0</show_in_store>
4905
  </re_add_to_cart>
4906
  <cancel_pending_order translate="label comment">
4907
+ <label>Cancel pending order</label>
4908
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
4909
  <frontend_type>select</frontend_type>
4910
  <source_model>adminhtml/system_config_source_yesno</source_model>
4911
  <sort_order>97</sort_order>
4912
  <show_in_default>1</show_in_default>
4913
  <show_in_website>1</show_in_website>
4914
  <show_in_store>0</show_in_store>
4915
+ </cancel_pending_order>
4916
+ <delay_cancel_pending_order translate="label">
4917
+ <label>Delay before cancel order</label>
4918
+ <comment>In Hours</comment>
4919
+ <frontend_type>text</frontend_type>
4920
+ <sort_order>98</sort_order>
4921
+ <show_in_default>1</show_in_default>
4922
+ <show_in_website>1</show_in_website>
4923
+ <show_in_store>1</show_in_store>
4924
+ </delay_cancel_pending_order>
4925
+ <send_fraud_payment_email translate="label">
4926
+ <label>Send fraud payment email</label>
4927
+ <frontend_type>select</frontend_type>
4928
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4929
+ <sort_order>99</sort_order>
4930
+ <show_in_default>1</show_in_default>
4931
+ <show_in_website>1</show_in_website>
4932
+ <show_in_store>1</show_in_store>
4933
+ </send_fraud_payment_email>
4934
+ <allowspecific translate="label">
4935
  <label>Payment from applicable countries</label>
4936
  <frontend_type>allowspecific</frontend_type>
4937
  <sort_order>100</sort_order>
4974
  <show_in_store>1</show_in_store>
4975
  </sort_order>
4976
  <debug translate="label">
4977
+ <label>Enable debug log</label>
4978
+ <comment></comment>
4979
+ <frontend_type>select</frontend_type>
4980
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4981
+ <sort_order>150</sort_order>
4982
+ <show_in_default>1</show_in_default>
4983
+ <show_in_website>1</show_in_website>
4984
+ <show_in_store>0</show_in_store>
4985
+ </debug>
4986
+ <is_test_mode translate="label comment">
4987
+ <label>Enable test mode</label>
4988
+ <comment></comment>
4989
+ <frontend_type>select</frontend_type>
4990
+ <source_model>adminhtml/system_config_source_yesno</source_model>
4991
+ <sort_order>200</sort_order>
4992
+ <show_in_default>1</show_in_default>
4993
+ <show_in_website>1</show_in_website>
4994
+ <show_in_store>1</show_in_store>
4995
+ </is_test_mode>
4996
+ </fields>
4997
+ </hipay_postfinanceefinanceapi>
4998
+ <hipay_klarna translate="label" module="hipay">
4999
+ <label>HiPay Klarna Invoice</label>
5000
+ <frontend_type>text</frontend_type>
5001
+ <sort_order>230</sort_order>
5002
+ <show_in_default>1</show_in_default>
5003
+ <show_in_website>1</show_in_website>
5004
+ <show_in_store>1</show_in_store>
5005
+ <fields>
5006
+ <notice translate="label" module="hipay">
5007
+ <frontend_model>hipay/adminhtml_system_config_form_field_Notice</frontend_model>
5008
+ <sort_order>1</sort_order>
5009
+ <show_in_default>1</show_in_default>
5010
+ <show_in_website>1</show_in_website>
5011
+ <show_in_store>1</show_in_store>
5012
+ </notice>
5013
+ <active translate="label">
5014
+ <label>Enabled</label>
5015
+ <frontend_type>select</frontend_type>
5016
+ <source_model>adminhtml/system_config_source_yesno</source_model>
5017
+ <sort_order>10</sort_order>
5018
+ <show_in_default>1</show_in_default>
5019
+ <show_in_website>1</show_in_website>
5020
+ <show_in_store>1</show_in_store>
5021
+ </active>
5022
+ <title translate="label">
5023
+ <label>Title</label>
5024
+ <frontend_type>text</frontend_type>
5025
+ <sort_order>20</sort_order>
5026
+ <show_in_default>1</show_in_default>
5027
+ <show_in_website>1</show_in_website>
5028
+ <show_in_store>1</show_in_store>
5029
+ </title>
5030
+ <order_status_payment_accepted translate="label">
5031
+ <label>Order status when payment accepted</label>
5032
+ <frontend_type>select</frontend_type>
5033
+ <source_model>hipay/source_order_status_accepted</source_model>
5034
+ <sort_order>23</sort_order>
5035
+ <show_in_default>1</show_in_default>
5036
+ <show_in_website>1</show_in_website>
5037
+ <show_in_store>0</show_in_store>
5038
+ </order_status_payment_accepted>
5039
+ <order_status_payment_refused translate="label">
5040
+ <label>Order status when payment refused</label>
5041
+ <frontend_type>select</frontend_type>
5042
+ <source_model>hipay/source_order_status_refused</source_model>
5043
+ <sort_order>24</sort_order>
5044
+ <show_in_default>1</show_in_default>
5045
+ <show_in_website>1</show_in_website>
5046
+ <show_in_store>0</show_in_store>
5047
+ </order_status_payment_refused>
5048
+ <order_status_payment_canceled translate="label">
5049
+ <label>Order status when payment canceled by customer</label>
5050
+ <frontend_type>select</frontend_type>
5051
+ <source_model>hipay/source_order_status_canceled</source_model>
5052
+ <sort_order>25</sort_order>
5053
+ <show_in_default>1</show_in_default>
5054
+ <show_in_website>1</show_in_website>
5055
+ <show_in_store>0</show_in_store>
5056
+ </order_status_payment_canceled>
5057
+ <hipay_status_validate_order translate="label">
5058
+ <label>Hipay status to validate order</label>
5059
+ <frontend_type>select</frontend_type>
5060
+ <source_model>hipay/source_order_hipayStatusValidate</source_model>
5061
+ <sort_order>26</sort_order>
5062
+ <show_in_default>1</show_in_default>
5063
+ <show_in_website>1</show_in_website>
5064
+ <show_in_store>0</show_in_store>
5065
+ </hipay_status_validate_order>
5066
+ <success_redirect_page translate="label">
5067
+ <label>Redirect page success</label>
5068
+ <comment>Page to redirect when transaction is successful, leave empty for
5069
+ checkout/onepage/success
5070
+ </comment>
5071
+ <frontend_type>text</frontend_type>
5072
+ <sort_order>27</sort_order>
5073
+ <show_in_default>1</show_in_default>
5074
+ <show_in_website>1</show_in_website>
5075
+ <show_in_store>0</show_in_store>
5076
+ </success_redirect_page>
5077
+ <failure_redirect_page translate="label">
5078
+ <label>Redirect page failure</label>
5079
+ <comment>Page to redirect when transaction fails, leave empty for checkout/onepage/failure
5080
+ </comment>
5081
+ <frontend_type>text</frontend_type>
5082
+ <sort_order>28</sort_order>
5083
+ <show_in_default>1</show_in_default>
5084
+ <show_in_website>1</show_in_website>
5085
+ <show_in_store>0</show_in_store>
5086
+ </failure_redirect_page>
5087
+ <pending_redirect_page translate="label">
5088
+ <label>Redirect page pending status</label>
5089
+ <comment>Page to redirect when transaction is in pending status</comment>
5090
+ <frontend_type>select</frontend_type>
5091
+ <source_model>hipay/source_pendingredirect</source_model>
5092
+ <sort_order>29</sort_order>
5093
+ <show_in_default>1</show_in_default>
5094
+ <show_in_website>1</show_in_website>
5095
+ <show_in_store>0</show_in_store>
5096
+ </pending_redirect_page>
5097
+ <payment_action translate="label">
5098
+ <label>Payment Action</label>
5099
+ <frontend_type>select</frontend_type>
5100
+ <source_model>hipay/source_paymentAction</source_model>
5101
+ <sort_order>30</sort_order>
5102
+ <show_in_default>1</show_in_default>
5103
+ <show_in_website>1</show_in_website>
5104
+ <show_in_store>0</show_in_store>
5105
+ </payment_action>
5106
+ <css_url translate="label coment">
5107
+ <label>Css Url</label>
5108
+ <comment>Important, HTTPS protocol is required</comment>
5109
+ <frontend_type>text</frontend_type>
5110
+ <sort_order>32</sort_order>
5111
+ <show_in_default>1</show_in_default>
5112
+ <show_in_website>1</show_in_website>
5113
+ <show_in_store>1</show_in_store>
5114
+ </css_url>
5115
+ <template translate="label">
5116
+ <label>Page payment template</label>
5117
+ <frontend_type>select</frontend_type>
5118
+ <source_model>hipay/source_template</source_model>
5119
+ <sort_order>35</sort_order>
5120
+ <show_in_default>1</show_in_default>
5121
+ <show_in_website>1</show_in_website>
5122
+ <show_in_store>1</show_in_store>
5123
+ </template>
5124
+ <display_selector translate="label">
5125
+ <label>Display card selector</label>
5126
+ <frontend_type>select</frontend_type>
5127
+ <source_model>adminhtml/system_config_source_yesno</source_model>
5128
+ <sort_order>40</sort_order>
5129
+ <show_in_default>1</show_in_default>
5130
+ <show_in_website>1</show_in_website>
5131
+ <show_in_store>0</show_in_store>
5132
+ </display_selector>
5133
+ <use_3d_secure translate="label">
5134
+ <label>Use 3D Secure</label>
5135
+ <frontend_type>select</frontend_type>
5136
+ <source_model>hipay/source_3ds</source_model>
5137
+ <sort_order>60</sort_order>
5138
+ <show_in_default>1</show_in_default>
5139
+ <show_in_website>1</show_in_website>
5140
+ <show_in_store>0</show_in_store>
5141
+ </use_3d_secure>
5142
+ <config_3ds_rules translate="label comment">
5143
+ <label>Rules 3D Secure</label>
5144
+ <comment>Configure Rules to activate 3D Secure</comment>
5145
+ <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
5146
+ <backend_model>hipay/rule_config</backend_model>
5147
+ <sort_order>61</sort_order>
5148
+ <show_in_default>1</show_in_default>
5149
+ <show_in_website>1</show_in_website>
5150
+ <show_in_store>0</show_in_store>
5151
+ </config_3ds_rules>
5152
+ <send_fraud_payment_email translate="label">
5153
+ <label>Send fraud payment email</label>
5154
+ <frontend_type>select</frontend_type>
5155
+ <source_model>adminhtml/system_config_source_yesno</source_model>
5156
+ <sort_order>63</sort_order>
5157
+ <show_in_default>1</show_in_default>
5158
+ <show_in_website>1</show_in_website>
5159
+ <show_in_store>1</show_in_store>
5160
+ </send_fraud_payment_email>
5161
+ <allow_use_oneclick translate="label">
5162
+ <label>Use Oneclick</label>
5163
+ <frontend_type>select</frontend_type>
5164
+ <source_model>adminhtml/system_config_source_yesno</source_model>
5165
+ <sort_order>70</sort_order>
5166
+ <show_in_default>1</show_in_default>
5167
+ <show_in_website>1</show_in_website>
5168
+ <show_in_store>0</show_in_store>
5169
+ </allow_use_oneclick>
5170
+ <filter_oneclick translate="label comment">
5171
+ <label>Rules Oneclick</label>
5172
+ <comment>Configure Rules to activate oneclick</comment>
5173
+ <frontend_model>hipay/adminhtml_system_config_form_field_3dsRule</frontend_model>
5174
+ <backend_model>hipay/rule_config</backend_model>
5175
+ <sort_order>80</sort_order>
5176
+ <show_in_default>1</show_in_default>
5177
+ <show_in_website>1</show_in_website>
5178
+ <show_in_store>0</show_in_store>
5179
+ </filter_oneclick>
5180
+ <re_add_to_cart translate="label comment">
5181
+ <label>Add product to cart</label>
5182
+ <comment>Fill cart when payment canceled or refused</comment>
5183
+ <frontend_type>select</frontend_type>
5184
+ <source_model>adminhtml/system_config_source_yesno</source_model>
5185
+ <sort_order>95</sort_order>
5186
+ <show_in_default>1</show_in_default>
5187
+ <show_in_website>1</show_in_website>
5188
+ <show_in_store>0</show_in_store>
5189
+ </re_add_to_cart>
5190
+ <cancel_pending_order translate="label comment">
5191
+ <label>Cancel pending order</label>
5192
+ <comment>Cancel orders stayed in pending because customer not validated payment</comment>
5193
+ <frontend_type>select</frontend_type>
5194
+ <source_model>adminhtml/system_config_source_yesno</source_model>
5195
+ <sort_order>97</sort_order>
5196
+ <show_in_default>1</show_in_default>
5197
+ <show_in_website>1</show_in_website>
5198
+ <show_in_store>0</show_in_store>
5199
+ </cancel_pending_order>
5200
+ <delay_cancel_pending_order translate="label">
5201
+ <label>Delay before cancel order</label>
5202
+ <comment>In Hours</comment>
5203
+ <frontend_type>text</frontend_type>
5204
+ <sort_order>98</sort_order>
5205
+ <show_in_default>1</show_in_default>
5206
+ <show_in_website>1</show_in_website>
5207
+ <show_in_store>1</show_in_store>
5208
+ </delay_cancel_pending_order>
5209
+ <send_fraud_payment_email translate="label">
5210
+ <label>Send fraud payment email</label>
5211
+ <frontend_type>select</frontend_type>
5212
+ <source_model>adminhtml/system_config_source_yesno</source_model>
5213
+ <sort_order>99</sort_order>
5214
+ <show_in_default>1</show_in_default>
5215
+ <show_in_website>1</show_in_website>
5216
+ <show_in_store>1</show_in_store>
5217
+ </send_fraud_payment_email>
5218
+ <min_order_total translate="label">
5219
+ <label>Minimum Order Total</label>
5220
+ <frontend_type>text</frontend_type>
5221
+ <sort_order>120</sort_order>
5222
+ <show_in_default>1</show_in_default>
5223
+ <show_in_website>1</show_in_website>
5224
+ <show_in_store>1</show_in_store>
5225
+ </min_order_total>
5226
+ <max_order_total translate="label">
5227
+ <label>Maximum Order Total</label>
5228
+ <frontend_type>text</frontend_type>
5229
+ <sort_order>121</sort_order>
5230
+ <show_in_default>1</show_in_default>
5231
+ <show_in_website>1</show_in_website>
5232
+ <show_in_store>1</show_in_store>
5233
+ </max_order_total>
5234
+ <sort_order translate="label">
5235
+ <label>Sort Order</label>
5236
+ <frontend_type>text</frontend_type>
5237
+ <sort_order>130</sort_order>
5238
+ <show_in_default>1</show_in_default>
5239
+ <show_in_website>1</show_in_website>
5240
+ <show_in_store>1</show_in_store>
5241
+ </sort_order>
5242
+ <debug translate="label">
5243
+ <label>Enable debug log</label>
5244
+ <comment></comment>
5245
  <frontend_type>select</frontend_type>
5246
  <source_model>adminhtml/system_config_source_yesno</source_model>
5247
  <sort_order>150</sort_order>
5249
  <show_in_website>1</show_in_website>
5250
  <show_in_store>0</show_in_store>
5251
  </debug>
5252
+ <is_test_mode translate="label comment">
5253
+ <label>Enable test mode</label>
5254
+ <comment></comment>
5255
  <frontend_type>select</frontend_type>
5256
  <source_model>adminhtml/system_config_source_yesno</source_model>
5257
  <sort_order>200</sort_order>
5259
  <show_in_website>1</show_in_website>
5260
  <show_in_store>1</show_in_store>
5261
  </is_test_mode>
5262
+ </fields>
5263
+ </hipay_klarna>
5264
+ </groups>
5265
+ </payment>
5266
+ </sections>
5267
+ </config>
app/code/community/Allopass/Hipay/sql/allopass_hipay_setup/mysql4-upgrade-1.1.0-1.6.0.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+
6
+ $installer->startSetup();
7
+
8
+ $installer->run("
9
+
10
+ ALTER TABLE {$this->getTable('hipay_split_payment')} ADD COLUMN `split_number` varchar(150)
11
+
12
+ "
13
+ );
14
+
15
+ $installer->run("
16
+
17
+ ALTER TABLE {$this->getTable('hipay_split_payment')} ADD COLUMN `tax_amount_to_pay` decimal(12,4) NOT NULL,
18
+ ADD COLUMN `total_tax_amount` decimal(12,4) NOT NULL
19
+
20
+ "
21
+ );
22
+
23
+
24
+ $installer->endSetup();
25
+
app/design/adminhtml/default/default/template/hipay/form/hosted.phtml CHANGED
@@ -3,6 +3,9 @@ $_code=$this->getMethodCode();
3
  $_cards = $this->getCards();
4
  ?>
5
  <div id="payment_form_<?php echo $_code ?>" style="display:none;">
 
 
 
6
  <?php if($this->allowSplitPayment()) : ?>
7
  <ul class="form-list" id="splitpayment_card_payment_form_<?php echo $_code ?>" >
8
  <li>
3
  $_cards = $this->getCards();
4
  ?>
5
  <div id="payment_form_<?php echo $_code ?>" style="display:none;">
6
+ <?php if (Mage::getStoreConfig('hipay/hipay_api_moto/moto_send_email')) {?>
7
+ <?php echo $this->__('An email with a payment link will be sent to the customer.');?>
8
+ <?php } ?>
9
  <?php if($this->allowSplitPayment()) : ?>
10
  <ul class="form-list" id="splitpayment_card_payment_form_<?php echo $_code ?>" >
11
  <li>
app/design/adminhtml/default/default/template/hipay/system/config/form/field/notice.phtml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_element = $this->getElement() ?>
2
+ <?php $_htmlId = $this->getHtmlId() ? $this->getHtmlId() : '_' . uniqid(); ?>
3
+ <?php $notices = $_element->getNoticesHipay(); ?>
4
+
5
+ <?php if (!empty($notices)){ ?>
6
+ <div class="notice-hipay" style="background:#efefef;padding: 10px;border: 1px solid #d8d8d8;">
7
+ <h1 style="color:red;">Warning</h1>
8
+ <?php foreach ($notices as $notice) { ?>
9
+ <span class="warning" style="color:red;"><?php echo $notice; ?></span>
10
+ <?php } ?>
11
+ <div style="color:red" >
12
+ <?php echo Mage::helper("adminhtml")->__('Please check the configuration') .
13
+ ' <a href="' . Mage::helper("adminhtml")->getUrl("adminhtml/system_config/edit/section/hipay") . '"' .'>'.
14
+ Mage::helper("adminhtml")->__('here') .'</a>'; ?>
15
+ </div>
16
+ </div>
17
+ <?php } ?>
18
+
19
+
app/design/frontend/base/default/layout/hipay.xml CHANGED
@@ -14,7 +14,7 @@
14
  <reference name="customer_account_navigation">
15
  <!-- @TODO Add config for enable it -->
16
  <!-- ifconfig="hipay/general/card_front_active"-->
17
- <action method="addLink" translate="label" module="hipay" ><name>hipay</name><path>hipay/card/</path><label>Hipay's cards</label></action>
18
  </reference>
19
  </customer_account>
20
 
14
  <reference name="customer_account_navigation">
15
  <!-- @TODO Add config for enable it -->
16
  <!-- ifconfig="hipay/general/card_front_active"-->
17
+ <action method="addLink" translate="label" module="hipay" ><name>hipay</name><path>hipay/card/</path><label>My Payment Cards</label></action>
18
  </reference>
19
  </customer_account>
20
 
app/design/frontend/base/default/template/hipay/card/account.phtml CHANGED
@@ -1,7 +1,7 @@
1
  <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
2
  <?php $_cards = $this->getCards(); ?>
3
  <div class="page-title">
4
- <h1><?php echo $this->__("My hipay credit cards") ?></h1>
5
  </div>
6
  <?php echo $this->getPagerHtml(); ?>
7
  <?php if($_cards->getSize()): ?>
1
  <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
2
  <?php $_cards = $this->getCards(); ?>
3
  <div class="page-title">
4
+ <h1><?php echo $this->__("My Payment Cards") ?></h1>
5
  </div>
6
  <?php echo $this->getPagerHtml(); ?>
7
  <?php if($_cards->getSize()): ?>
app/design/frontend/base/default/template/hipay/checkout/tokenjs.phtml CHANGED
@@ -45,8 +45,8 @@ if($this->hasPublicCredentials()):
45
  config.api_tokenjs_publickey = config.api_tokenjs_publickey_test;
46
 
47
  }
48
-
49
- // These are fake credentials, put your own credentials here (HiPay Fullservice back office > Integration > Security settings and create credentials with public visibility)
50
  HiPay.setCredentials(config.api_tokenjs_username, config.api_tokenjs_publickey);
51
 
52
  HiPay.create(params,
45
  config.api_tokenjs_publickey = config.api_tokenjs_publickey_test;
46
 
47
  }
48
+
49
+ // These are fake credentials, put your own credentials here (HiPay Enterprise back office > Integration > Security settings and create credentials with public visibility)
50
  HiPay.setCredentials(config.api_tokenjs_username, config.api_tokenjs_publickey);
51
 
52
  HiPay.create(params,
app/design/frontend/base/default/template/hipay/form/cc.phtml CHANGED
@@ -2,6 +2,7 @@
2
  /** @var $this Allopass_Hipay_Block_Form_Abstract */
3
  $_code=$this->getMethodCode();
4
  $_cards = $this->getCards();
 
5
 
6
  ?>
7
  <div id="payment_form_<?php echo $_code ?>" style="display:none;">
@@ -167,7 +168,12 @@ $_cards = $this->getCards();
167
  </script>
168
  <?php endif; ?>
169
  <div id="<?php echo $_code ?>_debit_amount">
170
- <?php echo $this->__('You will be debit of amount %s only after submit order.',Mage::app()->getStore()->getBaseCurrency()->format($this->getQuote()->getGrandTotal(), array(), true))?>
 
 
 
 
 
171
  </div>
172
  <script type="text/javascript">
173
  //<![CDATA[
@@ -302,7 +308,12 @@ $_cards = $this->getCards();
302
  </ul>
303
  <?php endif; ?>
304
  <div id="debit_amount">
305
- <?php echo $this->__('You will be debit of amount %s only after submit order.',Mage::app()->getStore()->getBaseCurrency()->format($this->getQuote()->getGrandTotal(), array(), true))?>
 
 
 
 
 
306
  </div>
307
  <?php endif; ?>
308
 
2
  /** @var $this Allopass_Hipay_Block_Form_Abstract */
3
  $_code=$this->getMethodCode();
4
  $_cards = $this->getCards();
5
+ $useOrderCurrency = Mage::getStoreConfig('hipay/hipay_api/currency_transaction', Mage::app()->getStore());
6
 
7
  ?>
8
  <div id="payment_form_<?php echo $_code ?>" style="display:none;">
168
  </script>
169
  <?php endif; ?>
170
  <div id="<?php echo $_code ?>_debit_amount">
171
+ <?php if ($useOrderCurrency) { ?>
172
+ <?php $this->getQuote()->setBaseCurrencyCode($this->getQuote()->getQuoteCurrencyCode()); ?>
173
+ <?php echo $this->__('You will be debit of amount %s only after submit order.',Mage::app()->getStore()->getCurrentCurrency()->format($this->getQuote()->getGrandTotal(), array(), true))?>
174
+ <?php } else { ?>
175
+ <?php echo $this->__('You will be debit of amount %s only after submit order.',Mage::app()->getStore()->getBaseCurrency()->format($this->getQuote()->getGrandTotal(), array(), true))?>
176
+ <?php } ?>
177
  </div>
178
  <script type="text/javascript">
179
  //<![CDATA[
308
  </ul>
309
  <?php endif; ?>
310
  <div id="debit_amount">
311
+ <?php if ($useOrderCurrency) { ?>
312
+ <?php $this->getQuote()->setBaseCurrencyCode($this->getQuote()->getQuoteCurrencyCode()); ?>
313
+ <?php echo $this->__('You will be debit of amount %s only after submit order.',Mage::app()->getStore()->getCurrentCurrency()->format($this->getQuote()->getGrandTotal(), array(), true))?>
314
+ <?php } else { ?>
315
+ <?php echo $this->__('You will be debit of amount %s only after submit order.',Mage::app()->getStore()->getBaseCurrency()->format($this->getQuote()->getGrandTotal(), array(), true))?>
316
+ <?php } ?>
317
  </div>
318
  <?php endif; ?>
319
 
app/locale/en_US/Allopass_Hipay.csv CHANGED
@@ -135,14 +135,14 @@
135
  "iFrame Width","iFrame Width"
136
  "iFrame Height","iFrame Height"
137
  "iFrame Style","iFrame Style"
138
- "HiPay Fullservice credentials configuration","HiPay Fullservice credentials configuration"
139
- "HiPay Fullservice Credit Card","HiPay Fullservice Credit Card API"
140
- "HiPay Fullservice Hosted Page","HiPay Fullservice Credit Card Hosted Page"
141
- "Hipay Hosted","HiPay Fullservice Credit Card Hosted Page"
142
- "Hipay Credit Card","HiPay Fullservice Credit Card API"
143
- "HiPay Fullservice Credit Card Split Payment","HiPay Fullservice Credit Card Split Payment"
144
  "Credit Card Split Payment","Credit Card Split Payment"
145
- "HiPay Fullservice Hosted Page Split Payment","HiPay Fullservice Hosted Page Split Payment"
146
  "Bankwire method","Bankwire method"
147
  "Gender","Gender"
148
  "Male","Male"
@@ -159,4 +159,9 @@
159
  "An exception has occured. Please retry checkout.","An exception has occured. Please retry checkout."
160
  "Transaction is in pending notification.","Transaction is in pending notification."
161
  "Leave blank if no proxy","Leave blank if no proxy"
162
- "Device fingerprint","Device fingerprint"
 
 
 
 
 
135
  "iFrame Width","iFrame Width"
136
  "iFrame Height","iFrame Height"
137
  "iFrame Style","iFrame Style"
138
+ "HiPay Enterprise credentials configuration","HiPay Enterprise credentials configuration"
139
+ "HiPay Enterprise Credit Card","HiPay Enterprise Credit Card API"
140
+ "HiPay Enterprise Hosted Page","HiPay Enterprise Credit Card Hosted Page"
141
+ "Hipay Hosted","HiPay Enterprise Credit Card Hosted Page"
142
+ "Hipay Credit Card","HiPay Enterprise Credit Card API"
143
+ "HiPay Enterprise Credit Card Split Payment","HiPay Enterprise Credit Card Split Payment"
144
  "Credit Card Split Payment","Credit Card Split Payment"
145
+ "HiPay Enterprise Hosted Page Split Payment","HiPay Enterprise Hosted Page Split Payment"
146
  "Bankwire method","Bankwire method"
147
  "Gender","Gender"
148
  "Male","Male"
159
  "An exception has occured. Please retry checkout.","An exception has occured. Please retry checkout."
160
  "Transaction is in pending notification.","Transaction is in pending notification."
161
  "Leave blank if no proxy","Leave blank if no proxy"
162
+ "Device fingerprint","Device fingerprint"
163
+ "An email with a payment link will be sent to the customer.","Un email avec un lien de paiement sera envoyé au client."
164
+ "Please check the configuration","'Please check the configuration"
165
+ "You have to activate and configuring the support of basket before activate the payment method klarna.","You have to activate and configuring the support of basket before activate the payment method klarna."
166
+ "Please check the configuration","'Please check the configuration"
167
+ "You have to activate and configuring the support of basket before activate the payment method klarna.","You have to activate and configuring the support of basket before activate the payment method klarna."
app/locale/en_US/template/email/hipay_hipay_api_moto.html ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject Your {{var store.getFrontendName()}} payment link to valid your order @-->
2
+ <!--@vars
3
+ {"var reason":"Transaction deny Reason",
4
+ "var checkoutType":"Checkout Type",
5
+ "var customerEmail":"Customer Email",
6
+ "var customer":"Customer Name",
7
+ "var items":"Shopping Cart Items",
8
+ "var total":"Total",
9
+ "var billingAddress.format('html')":"Billing Address",
10
+ "var shippingAddress.format('html')":"Shipping Address",
11
+ "var shippingMethod":"Shipping Method",
12
+ "var paymentMethod":"Payment Method",
13
+ "var dateAndTime":"Date and Time of Transaction"}
14
+ @-->
15
+ {{template config_path="design/email/header"}}
16
+ {{inlinecss file="email-inline.css"}}
17
+
18
+ <table>
19
+ <thead>
20
+ <tr>
21
+ <th>Thank you for your order from {{var store.getFrontendName()}}</th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <tr>
26
+ <td>
27
+ <p>
28
+ Dear {{var customer}},
29
+ </p>
30
+ <p>
31
+ You recently spoke with one of our advisors, and we thank you for that.
32
+ </p>
33
+ <p>
34
+ As agreed, you will find hereafter a specific link allowing you to pay immediately your order, in total security.
35
+ <p style="font-size:16px">
36
+ <b><a id="pay_order" href="{{var redirectUrl}}">{{var redirectUrl}}</a></b>
37
+ </p>
38
+ <p style="t-size:1">
39
+ In the same way as on our website, your banking data is protected by the SSL protocol, and the transaction is completely secure.
40
+ </p>
41
+ </td>
42
+ </tr>
43
+ </tbody>
44
+ </table>
45
+ {{template config_path="design/email/footer"}}
app/locale/fr_FR/Allopass_Hipay.csv CHANGED
@@ -3,7 +3,7 @@
3
  "Api password","Mot de passe de l'API"
4
  "Api username test","Identifiant TEST de l'API"
5
  "Api password test","Mot de passe TEST de l'API"
6
- "Hipay Credit Card","HiPay Fullservice Carte Bancaire"
7
  "Enabled","Activé"
8
  "Title","Titre"
9
  "Payment Action","Type de paiement"
@@ -67,7 +67,7 @@
67
  "Page payment template","Template de la page de paiement."
68
  "Display card selector","Afficher le sélecteur de carte"
69
  "What is this?","Aide ?"
70
- "Hipay Hosted","HiPay Fullservice Page Hébergée"
71
  "You will be debit of amount %s only after submit order.","Vous serez débité d'un montant de %s uniquement après validation de la commande à la prochaine étape."
72
  "Pending Capture","En attente de capture"
73
  "Capture Requested","Capture demandée"
@@ -138,12 +138,12 @@
138
  "iFrame Width","Largeur de l'iframe"
139
  "iFrame Height","Hauteur de l'iframe"
140
  "iFrame Style","Style de l'iframe"
141
- "HiPay Fullservice credentials configuration","HiPay Fullservice credentials configuration"
142
- "HiPay Fullservice Credit Card","HiPay Fullservice Credit Card API"
143
- "HiPay Fullservice Hosted Page","HiPay Fullservice Credit Card Hosted Page"
144
- "HiPay Fullservice Credit Card Split Payment","HiPay Fullservice Credit Card Split Payment"
145
  "Credit Card Split Payment","Paiement en plusieurs fois par carte bancaire"
146
- "HiPay Fullservice Hosted Page Split Payment","HiPay Fullservice Hosted Page Split Payment"
147
  "Bankwire method","Méthode virement bancaire"
148
  "Gender","Le genre"
149
  "Male","Homme"
@@ -162,3 +162,10 @@
162
  "Transaction is in pending notification.","Transaction en attente de validation par notification."
163
  "Leave blank if no proxy","Laisser vide si aucun proxy"
164
  "Device fingerprint","Device fingerprint"
 
 
 
 
 
 
 
3
  "Api password","Mot de passe de l'API"
4
  "Api username test","Identifiant TEST de l'API"
5
  "Api password test","Mot de passe TEST de l'API"
6
+ "Hipay Credit Card","HiPay Enterprise Carte Bancaire"
7
  "Enabled","Activé"
8
  "Title","Titre"
9
  "Payment Action","Type de paiement"
67
  "Page payment template","Template de la page de paiement."
68
  "Display card selector","Afficher le sélecteur de carte"
69
  "What is this?","Aide ?"
70
+ "Hipay Hosted","HiPay Enterprise Page Hébergée"
71
  "You will be debit of amount %s only after submit order.","Vous serez débité d'un montant de %s uniquement après validation de la commande à la prochaine étape."
72
  "Pending Capture","En attente de capture"
73
  "Capture Requested","Capture demandée"
138
  "iFrame Width","Largeur de l'iframe"
139
  "iFrame Height","Hauteur de l'iframe"
140
  "iFrame Style","Style de l'iframe"
141
+ "HiPay Enterprise credentials configuration","HiPay Enterprise credentials configuration"
142
+ "HiPay Enterprise Credit Card","HiPay Enterprise Credit Card API"
143
+ "HiPay Enterprise Hosted Page","HiPay Enterprise Credit Card Hosted Page"
144
+ "HiPay Enterprise Credit Card Split Payment","HiPay Enterprise Credit Card Split Payment"
145
  "Credit Card Split Payment","Paiement en plusieurs fois par carte bancaire"
146
+ "HiPay Enterprise Hosted Page Split Payment","HiPay Enterprise Hosted Page Split Payment"
147
  "Bankwire method","Méthode virement bancaire"
148
  "Gender","Le genre"
149
  "Male","Homme"
162
  "Transaction is in pending notification.","Transaction en attente de validation par notification."
163
  "Leave blank if no proxy","Laisser vide si aucun proxy"
164
  "Device fingerprint","Device fingerprint"
165
+ "An email with a payment link will be sent to the customer.","An email with a payment link will be sent to the customer."
166
+ "Please check the configuration","Merci de vérifier la configuration"
167
+ "here","ici"
168
+ "You have to activate and configuring the support of basket before activate the payment method klarna","Vous devez activer et configurer la gestion du panier avant d'activer la méthode de paiement klarna."
169
+ "Please check the configuration","Merci de vérifier la configuration"
170
+ "here","ici"
171
+ "You have to activate and configuring the support of basket before activate the payment method klarna","Vous devez activer et configurer la gestion du panier avant d'activer la méthode de paiement klarna."
app/locale/fr_FR/template/email/hipay_hipay_api_moto.html ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject Votre lien de paiement pour payer votre commande {{var store.getFrontendName()}} @-->
2
+ <!--@vars
3
+ {"var reason":"Transaction deny Reason",
4
+ "var checkoutType":"Checkout Type",
5
+ "var customerEmail":"Customer Email",
6
+ "var customer":"Customer Name",
7
+ "var items":"Shopping Cart Items",
8
+ "var total":"Total",
9
+ "var billingAddress.format('html')":"Billing Address",
10
+ "var shippingAddress.format('html')":"Shipping Address",
11
+ "var shippingMethod":"Shipping Method",
12
+ "var paymentMethod":"Payment Method",
13
+ "var dateAndTime":"Date and Time of Transaction"}
14
+ @-->
15
+ {{template config_path="design/email/header"}}
16
+ {{inlinecss file="email-inline.css"}}
17
+ <table>
18
+ <thead>
19
+ <tr>
20
+ <th>Merci pour votre commande sur {{var store.getFrontendName()}}</th>
21
+ </tr>
22
+ </thead>
23
+ <tbody>
24
+ <tr>
25
+ <td>
26
+ <p>
27
+ Cher {{var customer}},
28
+ </p>
29
+ <p>
30
+ Vous avez récemment échangé avec l'un de nos conseillers, et nous vous en remercions.
31
+ </p>
32
+ <p>
33
+ Comme convenu, vous trouverez ci-après un lien spécifique vous permettant de payer immédiatement votre commande, en toute sécurité.
34
+ <p style="font-size:16px">
35
+ <b><a id="pay_order" href="{{var redirectUrl}}">{{var redirectUrl}}</a></b>
36
+ </p>
37
+ <p style="t-size:1">
38
+ De la même manière que sur notre site internet, vos données bancaires sont protégées par le protocole SSL,
39
+ et la transaction est entièrement sécurisée.
40
+ </p>
41
+ </td>
42
+ </tr>
43
+ </tbody>
44
+ </table>
45
+ {{template config_path="design/email/footer"}}
app/locale/it_IT/Allopass_Hipay.csv CHANGED
@@ -117,12 +117,12 @@
117
  "iFrame Width","iFrame Width"
118
  "iFrame Height","iFrame Height"
119
  "iFrame Style","iFrame Style"
120
- "HiPay Fullservice credentials configuration","HiPay Fullservice credentials configuration"
121
- "HiPay Fullservice Credit Card","HiPay Fullservice Credit Card API"
122
- "HiPay Fullservice Hosted Page","HiPay Fullservice Credit Card Hosted Page"
123
- "HiPay Fullservice Credit Card Split Payment","HiPay Fullservice Credit Card Split Payment"
124
  "Credit Card Split Payment","Credit Card Split Payment"
125
- "HiPay Fullservice Hosted Page Split Payment","HiPay Fullservice Hosted Page Split Payment"
126
  "Notification ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %s. Transaction ID: ""%s"". Credit Memo has not been created. Please create offline Credit Memo.","Notification ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %s. Transaction ID: ""%s"". Credit Memo has not been created. Please create offline Credit Memo."
127
  "Notification ""Capture"". Capture issued by merchant. Registered notification about captured amount of %s. Transaction ID: ""%s"". Invoice has not been created. Please create offline Invoice.","Notification ""Capture"". Capture issued by merchant. Registered notification about captured amount of %s. Transaction ID: ""%s"". Invoice has not been created. Please create offline Invoice."
128
  "Accept and Capture Payment","Accept and Capture Payment"
@@ -132,3 +132,8 @@
132
  "An exception has occured. Please retry checkout.","An exception has occured. Please retry checkout."
133
  "Transaction is in pending notification.","Transaction is in pending notification."
134
  "Device fingerprint","Device fingerprint"
 
 
 
 
 
117
  "iFrame Width","iFrame Width"
118
  "iFrame Height","iFrame Height"
119
  "iFrame Style","iFrame Style"
120
+ "HiPay Enterprise credentials configuration","HiPay Enterprise credentials configuration"
121
+ "HiPay Enterprise Credit Card","HiPay Enterprise Credit Card API"
122
+ "HiPay Enterprise Hosted Page","HiPay Enterprise Credit Card Hosted Page"
123
+ "HiPay Enterprise Credit Card Split Payment","HiPay Enterprise Credit Card Split Payment"
124
  "Credit Card Split Payment","Credit Card Split Payment"
125
+ "HiPay Enterprise Hosted Page Split Payment","HiPay Enterprise Hosted Page Split Payment"
126
  "Notification ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %s. Transaction ID: ""%s"". Credit Memo has not been created. Please create offline Credit Memo.","Notification ""Refunded"". Refund issued by merchant. Registered notification about refunded amount of %s. Transaction ID: ""%s"". Credit Memo has not been created. Please create offline Credit Memo."
127
  "Notification ""Capture"". Capture issued by merchant. Registered notification about captured amount of %s. Transaction ID: ""%s"". Invoice has not been created. Please create offline Invoice.","Notification ""Capture"". Capture issued by merchant. Registered notification about captured amount of %s. Transaction ID: ""%s"". Invoice has not been created. Please create offline Invoice."
128
  "Accept and Capture Payment","Accept and Capture Payment"
132
  "An exception has occured. Please retry checkout.","An exception has occured. Please retry checkout."
133
  "Transaction is in pending notification.","Transaction is in pending notification."
134
  "Device fingerprint","Device fingerprint"
135
+ "An email with a payment link will be sent to the customer.","An email with a payment link will be sent to the customer."
136
+ "Please check the configuration","'Please check the configuration"
137
+ "You have to activate and configuring the support of basket before activate the payment method klarna.","You have to activate and configuring the support of basket before activate the payment method klarna."
138
+ "Please check the configuration","'Please check the configuration"
139
+ "You have to activate and configuring the support of basket before activate the payment method klarna.","You have to activate and configuring the support of basket before activate the payment method klarna."
app/locale/it_IT/template/email/hipay_hipay_api_moto.html ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--@subject Your {{var store.getFrontendName()}} payment link to valid your order @-->
2
+ <!--@vars
3
+ {"var reason":"Transaction deny Reason",
4
+ "var checkoutType":"Checkout Type",
5
+ "var customerEmail":"Customer Email",
6
+ "var customer":"Customer Name",
7
+ "var items":"Shopping Cart Items",
8
+ "var total":"Total",
9
+ "var billingAddress.format('html')":"Billing Address",
10
+ "var shippingAddress.format('html')":"Shipping Address",
11
+ "var shippingMethod":"Shipping Method",
12
+ "var paymentMethod":"Payment Method",
13
+ "var dateAndTime":"Date and Time of Transaction"}
14
+ @-->
15
+ {{template config_path="design/email/header"}}
16
+ {{inlinecss file="email-inline.css"}}
17
+
18
+ <table>
19
+ <thead>
20
+ <tr>
21
+ <th>Thank you for your order from {{var store.getFrontendName()}}</th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <tr>
26
+ <td>
27
+ <p>
28
+ Dear {{var customer}},
29
+ </p>
30
+ <p>
31
+ You recently spoke with one of our advisors, and we thank you for that.
32
+ </p>
33
+ <p>
34
+ As agreed, you will find hereafter a specific link allowing you to pay immediately your order, in total security.
35
+ <p style="font-size:16px">
36
+ <b><a id="pay_order" href="{{var redirectUrl}}">{{var redirectUrl}}</a></b>
37
+ </p>
38
+ <p style="t-size:1">
39
+ In the same way as on our website, your banking data is protected by the SSL protocol, and the transaction is completely secure.
40
+ </p>
41
+ </td>
42
+ </tr>
43
+ </tbody>
44
+ </table>
45
+ {{template config_path="design/email/footer"}}
package.xml CHANGED
@@ -1,2 +1,2 @@
1
  <?xml version="1.0"?>
2
- <package><name>Allopass_Hipay</name><version>1.5.1</version><stability>stable</stability><license>General Public License (GPL)</license><channel>community</channel><extends></extends><summary>Official HiPay Fullservice payment extension.</summary><description>HiPay Fullservice is the first payment platform oriented towards merchants that responds to all matters related to online payment: transaction processing, risk management, relationship management with banks and acquirers, financial reconciliation or even international expansion.</description><notes></notes><authors><author><name>Kassim Belghait</name><user>Sirateck</user><email>kassim@sirateck.com</email></author></authors><date>2017-02-01</date><time>2:03:24</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="hipay"><dir name="js"><file name="rules.js" hash="c9f87ded0b3a8505e78ab2584c2f098f"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><file name="hipay-fingerprint.min.js" hash="d0ec45711a36210d86360cb670a70014"/><file name="hipay-fullservice-sdk.min.js" hash="857b18224c0b6cc62448c12c5d959aa3"/></dir></dir></dir></dir></dir><dir name="app"><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="hipay.xml" hash="478e41f2896fd595f4d264149059c737"/></dir><dir name="template"><dir name="hipay"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="rules.phtml" hash="b25ca0397baffa2306ab70776b2febac"/></dir></dir></dir></dir><dir name="form"><file name="cc.phtml" hash="548c5d5ee72f1e036e734b83d24d3a02"/><file name="hosted.phtml" hash="5be27a6e29c212d8ab38a5b32ead66c8"/></dir><dir name="info"><file name="cc.phtml" hash="96e92e2b6564392e7294b8f96469940f"/><file name="hosted.phtml" hash="96e92e2b6564392e7294b8f96469940f"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="hipay.xml" hash="c72c3f02f2568e86faacfc8591e7aef1"/></dir><dir name="template"><dir name="hipay"><dir name="card"><file name="account.phtml" hash="8e4ec26a1ccfb13bf8c4706d74990aad"/><dir name="form"><file name="edit.phtml" hash="befde62b0368c1afb8daa70d46796865"/></dir></dir><dir name="form"><file name="cc.phtml" hash="941496593301d716d9650a67fe5d68bf"/><file name="hosted.phtml" hash="f590c6b76dcff32fa1cffd81d451c4e9"/></dir><dir name="info"><file name="cc.phtml" hash="96e92e2b6564392e7294b8f96469940f"/><file name="hosted.phtml" hash="96e92e2b6564392e7294b8f96469940f"/></dir><dir name="checkout"><file name="pending.phtml" hash="34e6bba88ea5fdd6b4ea71595de638d6"/><file name="tokenjs.phtml" hash="8465c42826cc7c5f58f3983c86d55537"/></dir></dir></dir></dir></dir></dir></dir><dir name="code"><dir name="community"><dir name="Allopass"><dir name="Hipay"><dir name="Helper"><file name="Data.php" hash="871e2a061b89da6de0cee906a27a2cd8"/></dir><dir name="Model"><file name="Card.php" hash="5d5ed0ece4cb9ef50bf445eee6911f8a"/><file name="Config.php" hash="3a223b860e229d042632068f7246fbe8"/><file name="Observer.php" hash="a979f5830e67448dcb938bbea24727f5"/><file name="PaymentProfile.php" hash="002417022b9afb132e771bbb2eb09d1c"/><file name="Rule.php" hash="4cddad3f6cb38af59dc2726d80148f51"/><file name="SplitPayment.php" hash="0a0298357ccb4ad750a0d90a13ab0d44"/><dir name="Rule"><file name="Config.php" hash="4034bf549bc274c836930a43d0ef8646"/><dir name="Condition"><file name="Address.php" hash="4180131479d72272c7b2c67534341dbc"/><file name="Combine.php" hash="e57da0bfd13c85721ef06d9f5c1d5a45"/><file name="Customer.php" hash="b847ff261e77565af4f64761d378de59"/><file name="Product.php" hash="5186cb9be313c7a772a11613ff4d1406"/><dir name="Product"><file name="Combine.php" hash="b99adc27124c3c6f56d04f0bcb5a42be"/><file name="Found.php" hash="bc266762458faaba326b7d7245b688a8"/><file name="Subselect.php" hash="5c0d482cddd69d82350bc5fec15c40b7"/></dir></dir></dir><dir name="Resource"><file name="Card.php" hash="5550c1486504972e6423fce49e3e8d93"/><file name="PaymentProfile.php" hash="fb397fd11c35b19986d4688d207b55cb"/><file name="Rule.php" hash="115bccaa9e4d37ed03e179147ab3788d"/><file name="SplitPayment.php" hash="133f41e753dfbb150cb61c6edf5745c9"/><dir name="Rule"><file name="Collection.php" hash="b4dd0d851cda670c6aafad0cf588b106"/></dir><dir name="Card"><file name="Collection.php" hash="4a9ca5d5124dcaa5fe9a01c7e864bf6e"/></dir><dir name="SplitPayment"><file name="Collection.php" hash="c44859bdf1e4de9551bc31cd57e7ef88"/></dir><dir name="PaymentProfile"><file name="Collection.php" hash="b1d5980904dbc3669cc6ee904c7620a3"/></dir></dir><dir name="Method"><file name="Abstract.php" hash="3c8cc31c4b7db99ead34745ab9af245d"/><file name="Cbc.php" hash="49d1b0e2ad320c1a78043bb7231de930"/><file name="Cc.php" hash="4e4353ecc9ee30e11a6ed5605135d7b7"/><file name="CcXtimes.php" hash="8d4f2f77f2e0377600cff2f93a3f0e66"/><file name="Dexia.php" hash="a385bcf6b0826917fecec6917a8230f9"/><file name="Giropay.php" hash="85d350f66fa3b0b162fe542165bce4cc"/><file name="Hosted.php" hash="5bd41f736ddc997d5620932838b38849"/><file name="HostedXtimes.php" hash="d81e2c0746a7d1437fde693fba219e1d"/><file name="Ideal.php" hash="0cf882d667b36c0e89bc1800ea9fa7a1"/><file name="Ing.php" hash="774c41e17868dcfe8031d047703a8b1c"/><file name="Kbc.php" hash="77981ab4ebd64d3555bd9fddccadf283"/><file name="PaypalApi.php" hash="65d6c43ad78671a49d162acb381a1079"/><file name="PostfinancecardApi.php" hash="3563685f62cfcb31ce494cab36869a85"/><file name="PostfinanceefinanceApi.php" hash="57c81f85ee51e63cdf55564492aa8ef1"/><file name="Przelewy24.php" hash="00b695e7b34b69f36d593587a9b5dcdd"/><file name="Przelewy24Api.php" hash="ff20c8621b68fea2b9d96cf131d320e7"/><file name="Qiwi.php" hash="acea5092f8fd1720d506d5be3714864f"/><file name="Sdd.php" hash="be79ca9e43d642d61cd4ceddd50e193a"/><file name="Sisal.php" hash="d6f97559eb485a8d6d66e5a7abc0e077"/><file name="SisalApi.php" hash="0c63400b243855790f987e8dd2b85402"/><file name="Sofort.php" hash="fa6cb68aff431c2dc91e7b3c62a29aaa"/><file name="SofortApi.php" hash="51111ee0872f93829833a01e36b51abf"/><file name="Webmoney.php" hash="5705818f9288d1c0acc49882c42c195f"/><file name="WebmoneyApi.php" hash="d24a31e40cba1af6e4e8fd20f3ac7dd6"/><file name="Yandex.php" hash="1edad262a001d96ede94c9406e680f46"/><file name="YandexApi.php" hash="831b63ffbe3b859cff790fb34ea63663"/></dir><dir name="Api"><file name="Request.php" hash="1dd3bf51cd1119b4de38322a17e9381e"/><dir name="Response"><file name="Abstract.php" hash="a430ca978e61796696ae4ead61efdb60"/><file name="Error.php" hash="57386fde5e5993c1126418025093a58a"/><file name="Gateway.php" hash="49b0e43a55e223df601884cfd9a0d2c5"/><file name="Notification.php" hash="0f7373ec3435b477424352c058f42255"/><file name="Vault.php" hash="47b962a59c150ffd653ba4054bc053d0"/></dir><dir name="Http"><dir name="Client"><dir name="Adapter"><file name="Curl.php" hash="cebf9e03d310e65f23a2a4ddc980e26f"/><file name="Stream.php" hash="5a110dd1f33ee4c8319cec396fc4fa40"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="CcTypes.php" hash="916ab83c9e5e1ee18d488f42a090c524"/></dir></dir></dir><dir name="Source"><file name="3ds.php" hash="e7b97e8a1c886b11951051a212c965ba"/><file name="CcType.php" hash="088d0e8c51f594092a0c6cd0f9bf6545"/><file name="CcTypeHosted.php" hash="f119a5901ac3a9056df56f9cb35b5e02"/><file name="PaymentAction.php" hash="10638f85360e7693819cbbfd156bed72"/><file name="PaymentProfile.php" hash="9e8c5e4bea5c50b1a63c71cfd9416ff1"/><file name="Pendingredirect.php" hash="f0c3125415535637c159c97fc2627740"/><file name="Template.php" hash="2aa16f597398af7ec73e4c7b0f126fd4"/><dir name="Order"><file name="HipayStatusValidate.php" hash="63414f71ce035909310f27842bc1b511"/><file name="Status.php" hash="395ac5e1567ee6095769abc6ce64fec0"/><dir name="Status"><file name="Accepted.php" hash="20cfc4b9ec26a2b458f8ffc43f6195aa"/><file name="Canceled.php" hash="49a6f0b6033e698fbefe01967b81b21d"/><file name="New.php" hash="226d2f1a5d441dbd6404ea342555e893"/><file name="Refused.php" hash="dbf1ed822488bb0d03f71461c872154d"/></dir></dir></dir><dir name="Log"><file name="Adapter.php" hash="9d5533d5d3622c72cbc84abfd4e3116c"/></dir></dir><dir name="Controller"><file name="Payment.php" hash="eeedbb1a7c007aee85f98a03ecbcd9cb"/></dir><dir name="controllers"><file name="CardController.php" hash="ebbbcf9c15ee39165d866991a6b348f3"/><file name="CbcController.php" hash="11a793cfef50322482b4d1e44f7fb427"/><file name="CcController.php" hash="2e45012894cac90a24c2017a427258b5"/><file name="CcxtimesController.php" hash="0e87e2d91b4b1214d0e37e432429c832"/><file name="CheckoutController.php" hash="ba9392dc51da0a4cfb5941b60c2473bc"/><file name="DexiaController.php" hash="abafa7205262125aef603f0d51445ebd"/><file name="GiropayController.php" hash="93ebe6d63e60627ee86815a7cc23006b"/><file name="HostedController.php" hash="f0bd2d41f36b0453e42063531b88d4a3"/><file name="HostedxtimesController.php" hash="8d97dcea1d97cc2711c3150923b8ecee"/><file name="IdealController.php" hash="49bc5c1a52c98cef934b45ce27da574a"/><file name="IngController.php" hash="43b8ae9e752d5268a51a164abc98df9f"/><file name="KbcController.php" hash="fad29361513cc354dcf200fde25265da"/><file name="NotifyController.php" hash="df46f9938f5f4d87a4d654e7710a06ab"/><file name="PaypalapiController.php" hash="6163a491b9e7b43593983da5735d29e6"/><file name="PostfinancecardapiController.php" hash="6ec048a2c6d3ac0637a99a34756a9720"/><file name="PostfinanceefinanceapiController.php" hash="b7337fa81c804c62c04a059a305c3152"/><file name="Przelewy24Controller.php" hash="d6923f98e8a53d8b8becd1d5ef99e0d0"/><file name="Przelewy24apiController.php" hash="bc488ef00a5a063d05aa12c545d8e8fe"/><file name="QiwiController.php" hash="6b3e05b2910dae0b919c50cb06363c57"/><file name="SddController.php" hash="8b1d24a040c7767b7889df51a10eac75"/><file name="SisalController.php" hash="32bdb5bf400fa1c6ee5bfb2c79b889f9"/><file name="SisalapiController.php" hash="23a04c3fe9470ef98ce84fcf5c1dd9fe"/><file name="SofortController.php" hash="5479f2e8c3043ad0dd51167bd9bcf623"/><file name="SofortapiController.php" hash="74aa59c7c7795f9f61c6b4bfeae193e3"/><file name="WebmoneyController.php" hash="b52fdbc662da23f839750c9919aad809"/><file name="WebmoneyapiController.php" hash="f34dc66aca5218930be548c88e7e9004"/><file name="YandexController.php" hash="629ec07271f8a11d7c88824154b637f0"/><file name="YandexapiController.php" hash="9741c2a9427866895907629af1e9ed98"/><dir name="Adminhtml"><file name="CardController.php" hash="1e5cba078cef7987df9314c467dd640e"/><file name="PaymentController.php" hash="06e07d68cb27e669fb6105bc78db2b9c"/><file name="PaymentProfileController.php" hash="887808a799db4e95d76bb9a014f80f29"/><file name="RuleController.php" hash="55291c15c7de616237b14dfad1bc5e80"/><file name="SplitPaymentController.php" hash="642960a1002c316efc04d3af4e6d2a57"/><dir name="Sales"><dir name="Order"><file name="CreateController.php" hash="f0f046bae0aacb974afbb62f35e5e062"/></dir></dir></dir></dir><dir name="Block"><file name="Card.php" hash="8e9a964e1b44c4664b78a2f9a5f7b1ae"/><dir name="Info"><file name="Cc.php" hash="d4ed3d7c3bbc82c1b3b13e19abdd4ddc"/><file name="Hosted.php" hash="40355126a48bd854c21bb0201840229c"/></dir><dir name="Card"><file name="Edit.php" hash="530cd326480c2d074dfdc59a578dd1db"/></dir><dir name="Form"><file name="Abstract.php" hash="776dfa8030972f74a305d270aac0ae19"/><file name="Cc.php" hash="64b899c98ee3edd77c5262eccd0bdfd1"/><file name="Hosted.php" hash="1cbc3fe21de97bba192cd5e651dfaeae"/></dir><dir name="Adminhtml"><file name="PaymentProfile.php" hash="b02de6e3cf69724d7f901f9b4f42e333"/><file name="SplitPayment.php" hash="1f5b84881308b79f0ada533862568e28"/><dir name="Card"><file name="Edit.php" hash="5f1896bb299030ade2090e2743ce2f95"/><dir name="Edit"><file name="Form.php" hash="addfd57cd54aff9ce5b57759105ad221"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="3dsRule.php" hash="c18bd31b872b7318e574676571c16491"/><file name="Allowsplitpayment.php" hash="0c6e4378ba1537584417870c9eb2c59c"/><file name="MultiselectSortable.php" hash="afba089fed75aefece6155de1210a856"/></dir></dir></dir></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Card.php" hash="652fce24783da2b3f2d2e3ffb5345bc8"/></dir></dir></dir><dir name="SplitPayment"><file name="Edit.php" hash="2aa5f311f6ba084420a6adc0fa518cc5"/><file name="Grid.php" hash="42031ca1b4a9a399e6e148378880ad82"/><dir name="Edit"><file name="Form.php" hash="06f8e4c7714d8e362c00ac8a4d88e292"/></dir></dir><dir name="PaymentProfile"><file name="Edit.php" hash="ef7b6945e91ef450a8a6a4ef0dbfef97"/><file name="Grid.php" hash="f8ac0daa082f3c6d2be6289e935dbd31"/><dir name="Edit"><file name="Form.php" hash="e17cc9773f3d4b1ef0981b513c659841"/></dir></dir></dir><dir name="Checkout"><file name="Pending.php" hash="48112f7e2fdcc79ee9431cf5350e223f"/><file name="Tokenjs.php" hash="82adcf1d7ba1cd7c5fd99e63ff193c9a"/></dir></dir><dir name="sql"><dir name="allopass_hipay_setup"><file name="mysql4-install-0.1.0.php" hash="820dc1e282c2c88deeb167d61918088b"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="af83b289e454c2d2ab91d2a6800d079a"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="1aa9291c5ac40a03ccbf3bcb6ce0c47e"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="17ddfaae63edc655fec04dcd5f96136a"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="5dfaafe02016ff47dfd80c89effaaabb"/><file name="mysql4-upgrade-1.0.6-1.0.7.php" hash="abec801a24e8515ad80dfe3563fd1492"/><file name="mysql4-upgrade-1.0.7-1.0.8.php" hash="c4e2c53d2b62d8829731449b881dd171"/><file name="mysql4-upgrade-1.0.8-1.0.9.php" hash="b3080317af653951030d7d2a1b116e75"/><file name="mysql4-upgrade-1.0.9-1.1.0.php" hash="81abd6cd95c846d67abc78d2a96a0f15"/></dir></dir><dir name="etc"><file name="config.xml" hash="1af3dfc659d54bebf3be5c0cec47ed1e"/><file name="system.xml" hash="c9137f16bce0c54d3d9c60545d347424"/></dir></dir></dir></dir></dir><dir name="locale"><dir name="en_US"><file name="Allopass_Hipay.csv" hash="c8f8e25ef5fada285fe3919a841870a2"/><dir name="template"><dir name="email"><file name="hipay_fraud_payment.html" hash="099f8760397b9c9ccaf24bee1bdfdadc"/><file name="hipay_fraud_payment_accept.html" hash="e577cb25ea4a4ad2cd764545de86a794"/><file name="hipay_fraud_payment_deny.html" hash="9011d7215936745d781f922015bc5b9a"/></dir></dir></dir><dir name="it_IT"><file name="Allopass_Hipay.csv" hash="67aae5d36bf9e77f4d1b315b6efcf39e"/><dir name="template"><dir name="email"><file name="hipay_fraud_payment.html" hash="099f8760397b9c9ccaf24bee1bdfdadc"/><file name="hipay_fraud_payment_accept.html" hash="e577cb25ea4a4ad2cd764545de86a794"/><file name="hipay_fraud_payment_deny.html" hash="9011d7215936745d781f922015bc5b9a"/></dir></dir></dir><dir name="fr_FR"><file name="Allopass_Hipay.csv" hash="236d2c510e2e9261a8c4c572b25fbe38"/><dir name="template"><dir name="email"><file name="hipay_fraud_payment.html" hash="3e2da47265d7e68bbb3db9f55cc4498f"/><file name="hipay_fraud_payment_accept.html" hash="5f2538c69555f414f7c8e8767ac505f7"/><file name="hipay_fraud_payment_deny.html" hash="035b655eac80930d6ebe4e5bf2c3e50c"/></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Allopass_Hipay.xml" hash="fd0ac2e9080c0a432a3a7b6d969171c0"/></dir></dir></dir></target></contents></package>
1
  <?xml version="1.0"?>
2
+ <package><name>Allopass_Hipay</name><version>1.6.0</version><stability>stable</stability><license>General Public License (GPL)</license><channel>community</channel><extends></extends><summary>Official HiPay Fullservice payment extension.</summary><description>HiPay Fullservice is the first payment platform oriented towards merchants that responds to all matters related to online payment: transaction processing, risk management, relationship management with banks and acquirers, financial reconciliation or even international expansion.</description><notes></notes><authors><author><name>Kassim Belghait</name><user>Sirateck</user><email>kassim@sirateck.com</email></author></authors><date>2017-02-23</date><time>6:08:39</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Allopass"><dir name="Hipay"><dir name="Model"><file name="Card.php" hash="5d5ed0ece4cb9ef50bf445eee6911f8a"/><file name="Config.php" hash="555947afaee587536f31bb0058c893d9"/><file name="Observer.php" hash="a343349c7542473dca4bdfc49b244050"/><file name="PaymentProfile.php" hash="8eb4fbb9969500ee09b3fb07363718aa"/><file name="Rule.php" hash="4cddad3f6cb38af59dc2726d80148f51"/><file name="SplitPayment.php" hash="0a0298357ccb4ad750a0d90a13ab0d44"/><dir name="Api"><file name="Request.php" hash="7d4fe8bc9cad2243c4b8c8841b86a46f"/><dir name="Response"><file name="Abstract.php" hash="a430ca978e61796696ae4ead61efdb60"/><file name="Error.php" hash="57386fde5e5993c1126418025093a58a"/><file name="Gateway.php" hash="49b0e43a55e223df601884cfd9a0d2c5"/><file name="Notification.php" hash="0f7373ec3435b477424352c058f42255"/><file name="Vault.php" hash="47b962a59c150ffd653ba4054bc053d0"/></dir><dir name="Http"><dir name="Client"><dir name="Adapter"><file name="Curl.php" hash="cebf9e03d310e65f23a2a4ddc980e26f"/><file name="Stream.php" hash="5a110dd1f33ee4c8319cec396fc4fa40"/></dir></dir></dir></dir><dir name="Rule"><file name="Config.php" hash="4034bf549bc274c836930a43d0ef8646"/><dir name="Condition"><file name="Address.php" hash="25c9966d184f61a3d61af9ea0f04aeca"/><file name="Combine.php" hash="e57da0bfd13c85721ef06d9f5c1d5a45"/><file name="Customer.php" hash="b847ff261e77565af4f64761d378de59"/><file name="Product.php" hash="5186cb9be313c7a772a11613ff4d1406"/><dir name="Product"><file name="Combine.php" hash="b99adc27124c3c6f56d04f0bcb5a42be"/><file name="Found.php" hash="bc266762458faaba326b7d7245b688a8"/><file name="Subselect.php" hash="5c0d482cddd69d82350bc5fec15c40b7"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="CcTypes.php" hash="916ab83c9e5e1ee18d488f42a090c524"/></dir></dir></dir><dir name="Method"><file name="Abstract.php" hash="6a7d53f529c202ff8d400b1b9bebc86d"/><file name="Cbc.php" hash="49d1b0e2ad320c1a78043bb7231de930"/><file name="Cc.php" hash="a304f8d419f46bae34c716cf7a9fa7bd"/><file name="CcXtimes.php" hash="8d4f2f77f2e0377600cff2f93a3f0e66"/><file name="Dexia.php" hash="a385bcf6b0826917fecec6917a8230f9"/><file name="Giropay.php" hash="85d350f66fa3b0b162fe542165bce4cc"/><file name="Hosted.php" hash="ea3f0c3cae75fea0c9fec22b5d3553ac"/><file name="HostedXtimes.php" hash="d81e2c0746a7d1437fde693fba219e1d"/><file name="Ideal.php" hash="0cf882d667b36c0e89bc1800ea9fa7a1"/><file name="Ing.php" hash="774c41e17868dcfe8031d047703a8b1c"/><file name="Kbc.php" hash="77981ab4ebd64d3555bd9fddccadf283"/><file name="Klarna.php" hash="4c65315115247d79beb47262de5272b8"/><file name="PaypalApi.php" hash="65d6c43ad78671a49d162acb381a1079"/><file name="PostfinancecardApi.php" hash="3563685f62cfcb31ce494cab36869a85"/><file name="PostfinanceefinanceApi.php" hash="57c81f85ee51e63cdf55564492aa8ef1"/><file name="Przelewy24.php" hash="00b695e7b34b69f36d593587a9b5dcdd"/><file name="Przelewy24Api.php" hash="ff20c8621b68fea2b9d96cf131d320e7"/><file name="Qiwi.php" hash="acea5092f8fd1720d506d5be3714864f"/><file name="Sdd.php" hash="be79ca9e43d642d61cd4ceddd50e193a"/><file name="Sisal.php" hash="d6f97559eb485a8d6d66e5a7abc0e077"/><file name="SisalApi.php" hash="0c63400b243855790f987e8dd2b85402"/><file name="Sofort.php" hash="fa6cb68aff431c2dc91e7b3c62a29aaa"/><file name="SofortApi.php" hash="51111ee0872f93829833a01e36b51abf"/><file name="Webmoney.php" hash="5705818f9288d1c0acc49882c42c195f"/><file name="WebmoneyApi.php" hash="d24a31e40cba1af6e4e8fd20f3ac7dd6"/><file name="Yandex.php" hash="1edad262a001d96ede94c9406e680f46"/><file name="YandexApi.php" hash="831b63ffbe3b859cff790fb34ea63663"/></dir><dir name="Source"><file name="3ds.php" hash="e7b97e8a1c886b11951051a212c965ba"/><file name="Attributes.php" hash="f32ae1fc6e394e0871c5aa9a128fe87e"/><file name="CcType.php" hash="088d0e8c51f594092a0c6cd0f9bf6545"/><file name="CcTypeHosted.php" hash="f119a5901ac3a9056df56f9cb35b5e02"/><file name="PaymentAction.php" hash="10638f85360e7693819cbbfd156bed72"/><file name="PaymentProfile.php" hash="9e8c5e4bea5c50b1a63c71cfd9416ff1"/><file name="Pendingredirect.php" hash="f0c3125415535637c159c97fc2627740"/><file name="Template.php" hash="2aa16f597398af7ec73e4c7b0f126fd4"/><dir name="Order"><file name="HipayStatusValidate.php" hash="63414f71ce035909310f27842bc1b511"/><file name="Status.php" hash="395ac5e1567ee6095769abc6ce64fec0"/><dir name="Status"><file name="Accepted.php" hash="20cfc4b9ec26a2b458f8ffc43f6195aa"/><file name="Canceled.php" hash="49a6f0b6033e698fbefe01967b81b21d"/><file name="New.php" hash="226d2f1a5d441dbd6404ea342555e893"/><file name="Refused.php" hash="dbf1ed822488bb0d03f71461c872154d"/></dir></dir></dir><dir name="Resource"><file name="Card.php" hash="5550c1486504972e6423fce49e3e8d93"/><file name="PaymentProfile.php" hash="fb397fd11c35b19986d4688d207b55cb"/><file name="Rule.php" hash="115bccaa9e4d37ed03e179147ab3788d"/><file name="SplitPayment.php" hash="133f41e753dfbb150cb61c6edf5745c9"/><dir name="PaymentProfile"><file name="Collection.php" hash="b1d5980904dbc3669cc6ee904c7620a3"/></dir><dir name="Rule"><file name="Collection.php" hash="b4dd0d851cda670c6aafad0cf588b106"/></dir><dir name="Card"><file name="Collection.php" hash="4a9ca5d5124dcaa5fe9a01c7e864bf6e"/></dir><dir name="SplitPayment"><file name="Collection.php" hash="c44859bdf1e4de9551bc31cd57e7ef88"/></dir></dir><dir name="Log"><file name="Adapter.php" hash="9d5533d5d3622c72cbc84abfd4e3116c"/></dir></dir><dir name="Helper"><file name="Data.php" hash="8fae9abee1f2eba645fdbcd28e88551d"/></dir><dir name="Controller"><file name="Payment.php" hash="debb4181d3f5e691a146cd94dfcabe8c"/></dir><dir name="controllers"><file name="CardController.php" hash="ebbbcf9c15ee39165d866991a6b348f3"/><file name="CbcController.php" hash="11a793cfef50322482b4d1e44f7fb427"/><file name="CcController.php" hash="2e45012894cac90a24c2017a427258b5"/><file name="CcxtimesController.php" hash="0e87e2d91b4b1214d0e37e432429c832"/><file name="CheckoutController.php" hash="ba9392dc51da0a4cfb5941b60c2473bc"/><file name="DexiaController.php" hash="abafa7205262125aef603f0d51445ebd"/><file name="GiropayController.php" hash="93ebe6d63e60627ee86815a7cc23006b"/><file name="HostedController.php" hash="f0bd2d41f36b0453e42063531b88d4a3"/><file name="HostedxtimesController.php" hash="8d97dcea1d97cc2711c3150923b8ecee"/><file name="IdealController.php" hash="49bc5c1a52c98cef934b45ce27da574a"/><file name="IngController.php" hash="43b8ae9e752d5268a51a164abc98df9f"/><file name="KbcController.php" hash="fad29361513cc354dcf200fde25265da"/><file name="KlarnaController.php" hash="b2b673947547780c2472e05744a4708a"/><file name="NotifyController.php" hash="df46f9938f5f4d87a4d654e7710a06ab"/><file name="PaypalapiController.php" hash="6163a491b9e7b43593983da5735d29e6"/><file name="PostfinancecardapiController.php" hash="6ec048a2c6d3ac0637a99a34756a9720"/><file name="PostfinanceefinanceapiController.php" hash="b7337fa81c804c62c04a059a305c3152"/><file name="Przelewy24Controller.php" hash="d6923f98e8a53d8b8becd1d5ef99e0d0"/><file name="Przelewy24apiController.php" hash="bc488ef00a5a063d05aa12c545d8e8fe"/><file name="QiwiController.php" hash="6b3e05b2910dae0b919c50cb06363c57"/><file name="SddController.php" hash="8b1d24a040c7767b7889df51a10eac75"/><file name="SisalController.php" hash="32bdb5bf400fa1c6ee5bfb2c79b889f9"/><file name="SisalapiController.php" hash="23a04c3fe9470ef98ce84fcf5c1dd9fe"/><file name="SofortController.php" hash="5479f2e8c3043ad0dd51167bd9bcf623"/><file name="SofortapiController.php" hash="74aa59c7c7795f9f61c6b4bfeae193e3"/><file name="WebmoneyController.php" hash="b52fdbc662da23f839750c9919aad809"/><file name="WebmoneyapiController.php" hash="f34dc66aca5218930be548c88e7e9004"/><file name="YandexController.php" hash="629ec07271f8a11d7c88824154b637f0"/><file name="YandexapiController.php" hash="9741c2a9427866895907629af1e9ed98"/><dir name="Adminhtml"><file name="CardController.php" hash="1e5cba078cef7987df9314c467dd640e"/><file name="PaymentController.php" hash="0c30820ebebe6c276ae4b468acc21321"/><file name="PaymentProfileController.php" hash="887808a799db4e95d76bb9a014f80f29"/><file name="RuleController.php" hash="55291c15c7de616237b14dfad1bc5e80"/><file name="SplitPaymentController.php" hash="642960a1002c316efc04d3af4e6d2a57"/><dir name="Sales"><dir name="Order"><file name="CreateController.php" hash="f0f046bae0aacb974afbb62f35e5e062"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="a7636de8cbcf009b9a9b9031cc38b67f"/><file name="system.xml" hash="268ac65dc6b9b5f5c05d07a10d5e16ac"/></dir><dir name="sql"><dir name="allopass_hipay_setup"><file name="mysql4-install-0.1.0.php" hash="820dc1e282c2c88deeb167d61918088b"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="af83b289e454c2d2ab91d2a6800d079a"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="1aa9291c5ac40a03ccbf3bcb6ce0c47e"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="17ddfaae63edc655fec04dcd5f96136a"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="5dfaafe02016ff47dfd80c89effaaabb"/><file name="mysql4-upgrade-1.0.6-1.0.7.php" hash="abec801a24e8515ad80dfe3563fd1492"/><file name="mysql4-upgrade-1.0.7-1.0.8.php" hash="c4e2c53d2b62d8829731449b881dd171"/><file name="mysql4-upgrade-1.0.8-1.0.9.php" hash="b3080317af653951030d7d2a1b116e75"/><file name="mysql4-upgrade-1.0.9-1.1.0.php" hash="81abd6cd95c846d67abc78d2a96a0f15"/><file name="mysql4-upgrade-1.1.0-1.6.0.php" hash="dfc9fb427f0a0dace5fb318d650277c3"/></dir></dir><dir name="Block"><file name="Card.php" hash="12b531784c6928389f4b7abfab5fc397"/><dir name="Form"><file name="Abstract.php" hash="776dfa8030972f74a305d270aac0ae19"/><file name="Cc.php" hash="64b899c98ee3edd77c5262eccd0bdfd1"/><file name="Hosted.php" hash="1cbc3fe21de97bba192cd5e651dfaeae"/></dir><dir name="Checkout"><file name="Pending.php" hash="48112f7e2fdcc79ee9431cf5350e223f"/><file name="Tokenjs.php" hash="82adcf1d7ba1cd7c5fd99e63ff193c9a"/><dir name="Cart"><file name="Totals.php" hash="b711e1f41b857d4e8da48a5b00a32677"/></dir></dir><dir name="Card"><file name="Edit.php" hash="530cd326480c2d074dfdc59a578dd1db"/></dir><dir name="Adminhtml"><file name="PaymentProfile.php" hash="b02de6e3cf69724d7f901f9b4f42e333"/><file name="SplitPayment.php" hash="1f5b84881308b79f0ada533862568e28"/><dir name="PaymentProfile"><file name="Edit.php" hash="ef7b6945e91ef450a8a6a4ef0dbfef97"/><file name="Grid.php" hash="f8ac0daa082f3c6d2be6289e935dbd31"/><dir name="Edit"><file name="Form.php" hash="3bbb2a5be1a3b6946cf132eb355231ca"/></dir></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Card.php" hash="66cfbbc826154553c33d1adb9062053b"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="3dsRule.php" hash="c18bd31b872b7318e574676571c16491"/><file name="Allowsplitpayment.php" hash="0c6e4378ba1537584417870c9eb2c59c"/><file name="MultiselectSortable.php" hash="afba089fed75aefece6155de1210a856"/><file name="Notice.php" hash="4aa94f430bd8181f898cbda9e0ddda1e"/></dir></dir></dir></dir><dir name="Card"><file name="Edit.php" hash="5f1896bb299030ade2090e2743ce2f95"/><dir name="Edit"><file name="Form.php" hash="addfd57cd54aff9ce5b57759105ad221"/></dir></dir><dir name="SplitPayment"><file name="Edit.php" hash="2aa5f311f6ba084420a6adc0fa518cc5"/><file name="Grid.php" hash="42031ca1b4a9a399e6e148378880ad82"/><dir name="Edit"><file name="Form.php" hash="33568fca2aa143006862d8aca4184262"/></dir></dir></dir><dir name="Info"><file name="Cc.php" hash="d4ed3d7c3bbc82c1b3b13e19abdd4ddc"/><file name="Hosted.php" hash="40355126a48bd854c21bb0201840229c"/></dir></dir></dir></dir></dir></dir><dir name="locale"><dir name="en_US"><file name="Allopass_Hipay.csv" hash="24801e8a3e9ed2201e6d2d3321897b69"/><dir name="template"><dir name="email"><file name="hipay_fraud_payment.html" hash="099f8760397b9c9ccaf24bee1bdfdadc"/><file name="hipay_fraud_payment_accept.html" hash="e577cb25ea4a4ad2cd764545de86a794"/><file name="hipay_fraud_payment_deny.html" hash="9011d7215936745d781f922015bc5b9a"/><file name="hipay_hipay_api_moto.html" hash="19000628bd298e3e49f3d09b9432c0c7"/></dir></dir></dir><dir name="fr_FR"><file name="Allopass_Hipay.csv" hash="c93e9ed37828a7587c5218448954775a"/><dir name="template"><dir name="email"><file name="hipay_fraud_payment.html" hash="3e2da47265d7e68bbb3db9f55cc4498f"/><file name="hipay_fraud_payment_accept.html" hash="5f2538c69555f414f7c8e8767ac505f7"/><file name="hipay_fraud_payment_deny.html" hash="035b655eac80930d6ebe4e5bf2c3e50c"/><file name="hipay_hipay_api_moto.html" hash="90509ea995a48683cee66bc822665c5f"/></dir></dir></dir><dir name="it_IT"><file name="Allopass_Hipay.csv" hash="266969a37744535ba5bede1d337dac26"/><dir name="template"><dir name="email"><file name="hipay_fraud_payment.html" hash="099f8760397b9c9ccaf24bee1bdfdadc"/><file name="hipay_fraud_payment_accept.html" hash="e577cb25ea4a4ad2cd764545de86a794"/><file name="hipay_fraud_payment_deny.html" hash="9011d7215936745d781f922015bc5b9a"/><file name="hipay_hipay_api_moto.html" hash="19000628bd298e3e49f3d09b9432c0c7"/></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Allopass_Hipay.xml" hash="fd0ac2e9080c0a432a3a7b6d969171c0"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="hipay"><dir name="checkout"><file name="pending.phtml" hash="34e6bba88ea5fdd6b4ea71595de638d6"/><file name="tokenjs.phtml" hash="8423ed38d2ec7390207f12eef69cb648"/></dir><dir name="card"><file name="account.phtml" hash="129ca019bd14dad8559e90eb09fc2180"/><dir name="form"><file name="edit.phtml" hash="befde62b0368c1afb8daa70d46796865"/></dir></dir><dir name="form"><file name="cc.phtml" hash="b85ce854175dc9a20e936b1125ddcaff"/><file name="hosted.phtml" hash="f590c6b76dcff32fa1cffd81d451c4e9"/></dir><dir name="info"><file name="cc.phtml" hash="96e92e2b6564392e7294b8f96469940f"/><file name="hosted.phtml" hash="96e92e2b6564392e7294b8f96469940f"/></dir></dir></dir><dir name="layout"><file name="hipay.xml" hash="ef6a5c8503257f8a2d3a0eb594a04ab6"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="hipay"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="notice.phtml" hash="6ff45544c303ede811734723552fedc4"/><file name="rules.phtml" hash="b25ca0397baffa2306ab70776b2febac"/></dir></dir></dir></dir><dir name="form"><file name="cc.phtml" hash="548c5d5ee72f1e036e734b83d24d3a02"/><file name="hosted.phtml" hash="b24b9dfe810e0b61309690089823303f"/></dir><dir name="info"><file name="cc.phtml" hash="96e92e2b6564392e7294b8f96469940f"/><file name="hosted.phtml" hash="96e92e2b6564392e7294b8f96469940f"/></dir></dir></dir><dir name="layout"><file name="hipay.xml" hash="478e41f2896fd595f4d264149059c737"/></dir></dir></dir></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="js"><file name="hipay-fingerprint.min.js" hash="d0ec45711a36210d86360cb670a70014"/><file name="hipay-fullservice-sdk.min.js" hash="857b18224c0b6cc62448c12c5d959aa3"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="hipay"><dir name="js"><file name="rules.js" hash="c9f87ded0b3a8505e78ab2584c2f098f"/></dir></dir></dir></dir></dir></dir></target></contents></package>