Paybox_epayment - Version 2.0.0.3

Version Notes

Stable version

Download this release

Release Info

Developer Paybox
Extension Paybox_epayment
Version 2.0.0.3
Comparing to
See all releases


Version 2.0.0.3

Files changed (122) hide show
  1. app/code/community/Paybox/Epayment/Block/Admin/Field/Checkboxes.php +54 -0
  2. app/code/community/Paybox/Epayment/Block/Admin/Field/Select.php +77 -0
  3. app/code/community/Paybox/Epayment/Block/Admin/Info.php +27 -0
  4. app/code/community/Paybox/Epayment/Block/Admin/Kwixo/Shipping.php +92 -0
  5. app/code/community/Paybox/Epayment/Block/Admin/Presentation.php +27 -0
  6. app/code/community/Paybox/Epayment/Block/Checkout/Payment.php +50 -0
  7. app/code/community/Paybox/Epayment/Block/Info.php +178 -0
  8. app/code/community/Paybox/Epayment/Block/Redirect.php +47 -0
  9. app/code/community/Paybox/Epayment/Helper/Data.php +15 -0
  10. app/code/community/Paybox/Epayment/Helper/Mobile.php +25 -0
  11. app/code/community/Paybox/Epayment/Model/Admin/Cards/Abstract.php +35 -0
  12. app/code/community/Paybox/Epayment/Model/Admin/Cards/Cb.php +17 -0
  13. app/code/community/Paybox/Epayment/Model/Admin/Cards/Financial.php +17 -0
  14. app/code/community/Paybox/Epayment/Model/Admin/Cards/Paybuttons.php +17 -0
  15. app/code/community/Paybox/Epayment/Model/Admin/Cards/Prepaid.php +17 -0
  16. app/code/community/Paybox/Epayment/Model/Admin/Cards/Private.php +17 -0
  17. app/code/community/Paybox/Epayment/Model/Admin/Cards/Threetime.php +17 -0
  18. app/code/community/Paybox/Epayment/Model/Admin/Environment.php +20 -0
  19. app/code/community/Paybox/Epayment/Model/Admin/Fianet/Categories.php +36 -0
  20. app/code/community/Paybox/Epayment/Model/Admin/Fianet/DeliverySpeeds.php +27 -0
  21. app/code/community/Paybox/Epayment/Model/Admin/Fianet/ShippingTypes.php +39 -0
  22. app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Autocapture.php +30 -0
  23. app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Canceled.php +18 -0
  24. app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Holded.php +18 -0
  25. app/code/community/Paybox/Epayment/Model/Admin/Order/Status/New.php +18 -0
  26. app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Pending.php +18 -0
  27. app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Pendingpayment.php +18 -0
  28. app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Processing.php +18 -0
  29. app/code/community/Paybox/Epayment/Model/Admin/Payment/Action.php +39 -0
  30. app/code/community/Paybox/Epayment/Model/Admin/Payment/Actionpaypal.php +9 -0
  31. app/code/community/Paybox/Epayment/Model/Admin/Payment/Delays.php +27 -0
  32. app/code/community/Paybox/Epayment/Model/Admin/Payment/Same.php +23 -0
  33. app/code/community/Paybox/Epayment/Model/Admin/Payment/Use3ds.php +23 -0
  34. app/code/community/Paybox/Epayment/Model/Admin/Subscription.php +20 -0
  35. app/code/community/Paybox/Epayment/Model/Config.php +188 -0
  36. app/code/community/Paybox/Epayment/Model/Context.php +65 -0
  37. app/code/community/Paybox/Epayment/Model/Iso4217Currency.php +206 -0
  38. app/code/community/Paybox/Epayment/Model/Kwixo.php +287 -0
  39. app/code/community/Paybox/Epayment/Model/Observer.php +104 -0
  40. app/code/community/Paybox/Epayment/Model/Observer/AdminCreateOrder.php +68 -0
  41. app/code/community/Paybox/Epayment/Model/Paybox.php +706 -0
  42. app/code/community/Paybox/Epayment/Model/Payment/Abstract.php +838 -0
  43. app/code/community/Paybox/Epayment/Model/Payment/Bcmc.php +16 -0
  44. app/code/community/Paybox/Epayment/Model/Payment/Cb.php +20 -0
  45. app/code/community/Paybox/Epayment/Model/Payment/Financial.php +16 -0
  46. app/code/community/Paybox/Epayment/Model/Payment/Kwixo/Credit.php +5 -0
  47. app/code/community/Paybox/Epayment/Model/Payment/Kwixo/Onexrnp.php +5 -0
  48. app/code/community/Paybox/Epayment/Model/Payment/Kwixo/Standard.php +5 -0
  49. app/code/community/Paybox/Epayment/Model/Payment/Maestro.php +19 -0
  50. app/code/community/Paybox/Epayment/Model/Payment/Paybuttons.php +16 -0
  51. app/code/community/Paybox/Epayment/Model/Payment/Paypal.php +16 -0
  52. app/code/community/Paybox/Epayment/Model/Payment/Prepaid.php +16 -0
  53. app/code/community/Paybox/Epayment/Model/Payment/Private.php +19 -0
  54. app/code/community/Paybox/Epayment/Model/Payment/Threetime.php +111 -0
  55. app/code/community/Paybox/Epayment/Model/Resource/Setup.php +15 -0
  56. app/code/community/Paybox/Epayment/controllers/Adminhtml/PbxepController.php +34 -0
  57. app/code/community/Paybox/Epayment/controllers/PaymentController.php +283 -0
  58. app/code/community/Paybox/Epayment/etc/adminhtml.xml +31 -0
  59. app/code/community/Paybox/Epayment/etc/config.xml +491 -0
  60. app/code/community/Paybox/Epayment/etc/pubkey.pem +6 -0
  61. app/code/community/Paybox/Epayment/etc/system.xml +2496 -0
  62. app/code/community/Paybox/Epayment/sql/pbxep_setup/mysql4-install-0.1.0.php +50 -0
  63. app/code/community/Paybox/Epayment/sql/pbxep_setup/mysql4-upgrade-0.1.0-0.3.0.php +69 -0
  64. app/code/community/Paybox/Epayment/sql/pbxep_setup/mysql4-upgrade-0.8.3.3-0.8.4.php +101 -0
  65. app/design/adminhtml/default/default/layout/pbxep.xml +9 -0
  66. app/design/adminhtml/default/default/template/pbxep/info/default.phtml +110 -0
  67. app/design/adminhtml/default/default/template/pbxep/presentation/en.phtml +1 -0
  68. app/design/adminhtml/default/default/template/pbxep/presentation/fr.phtml +92 -0
  69. app/design/frontend/base/default/layout/pbxep.xml +14 -0
  70. app/design/frontend/base/default/template/pbxep/checkout-payment.phtml +65 -0
  71. app/design/frontend/base/default/template/pbxep/info/default.phtml +99 -0
  72. app/design/frontend/base/default/template/pbxep/redirect.phtml +70 -0
  73. app/etc/modules/Paybox_Epayment.xml +9 -0
  74. app/locale/fr_FR/Paybox_Epayment.csv +162 -0
  75. package.xml +23 -0
  76. skin/adminhtml/default/default/images/paybox/1euro.45.png +0 -0
  77. skin/adminhtml/default/default/images/paybox/amex.45.png +0 -0
  78. skin/adminhtml/default/default/images/paybox/aurore.45.png +0 -0
  79. skin/adminhtml/default/default/images/paybox/bcmc.45.png +0 -0
  80. skin/adminhtml/default/default/images/paybox/buyster.45.png +0 -0
  81. skin/adminhtml/default/default/images/paybox/cashticket.45.png +0 -0
  82. skin/adminhtml/default/default/images/paybox/cb.45.png +0 -0
  83. skin/adminhtml/default/default/images/paybox/checkmark-blue.png +0 -0
  84. skin/adminhtml/default/default/images/paybox/checkmark.gif +0 -0
  85. skin/adminhtml/default/default/images/paybox/cofinoga.45.png +0 -0
  86. skin/adminhtml/default/default/images/paybox/diners.45.png +0 -0
  87. skin/adminhtml/default/default/images/paybox/ecartebleue.45.png +0 -0
  88. skin/adminhtml/default/default/images/paybox/ideal.45.png +0 -0
  89. skin/adminhtml/default/default/images/paybox/jcb.45.png +0 -0
  90. skin/adminhtml/default/default/images/paybox/kadeos.45.png +0 -0
  91. skin/adminhtml/default/default/images/paybox/leetchi.45.png +0 -0
  92. skin/adminhtml/default/default/images/paybox/maestro.png +0 -0
  93. skin/adminhtml/default/default/images/paybox/mastercard.45.png +0 -0
  94. skin/adminhtml/default/default/images/paybox/multicanal.png +0 -0
  95. skin/adminhtml/default/default/images/paybox/paybox-lg.png +0 -0
  96. skin/adminhtml/default/default/images/paybox/paybutting.45.png +0 -0
  97. skin/adminhtml/default/default/images/paybox/paypal.45.png +0 -0
  98. skin/adminhtml/default/default/images/paybox/paysafecard.45.png +0 -0
  99. skin/adminhtml/default/default/images/paybox/visa.45.png +0 -0
  100. skin/adminhtml/default/default/images/paybox/wexpay.45.png +0 -0
  101. skin/frontend/base/default/css/pbxep/styles.css +5 -0
  102. skin/frontend/base/default/images/pbxep/1euro.45.png +0 -0
  103. skin/frontend/base/default/images/pbxep/amex.45.png +0 -0
  104. skin/frontend/base/default/images/pbxep/aurore.45.png +0 -0
  105. skin/frontend/base/default/images/pbxep/bcmc.45.png +0 -0
  106. skin/frontend/base/default/images/pbxep/buyster.45.png +0 -0
  107. skin/frontend/base/default/images/pbxep/cashticket.45.png +0 -0
  108. skin/frontend/base/default/images/pbxep/cb.45.png +0 -0
  109. skin/frontend/base/default/images/pbxep/cofinoga.45.png +0 -0
  110. skin/frontend/base/default/images/pbxep/diners.45.png +0 -0
  111. skin/frontend/base/default/images/pbxep/ecartebleue.45.png +0 -0
  112. skin/frontend/base/default/images/pbxep/ideal.45.png +0 -0
  113. skin/frontend/base/default/images/pbxep/jcb.45.png +0 -0
  114. skin/frontend/base/default/images/pbxep/kadeos.45.png +0 -0
  115. skin/frontend/base/default/images/pbxep/leetchi.45.png +0 -0
  116. skin/frontend/base/default/images/pbxep/maestro.png +0 -0
  117. skin/frontend/base/default/images/pbxep/mastercard.45.png +0 -0
  118. skin/frontend/base/default/images/pbxep/paybutting.45.png +0 -0
  119. skin/frontend/base/default/images/pbxep/paypal.45.png +0 -0
  120. skin/frontend/base/default/images/pbxep/paysafecard.45.png +0 -0
  121. skin/frontend/base/default/images/pbxep/visa.45.png +0 -0
  122. skin/frontend/base/default/images/pbxep/wexpay.45.png +0 -0
app/code/community/Paybox/Epayment/Block/Admin/Field/Checkboxes.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Block_Admin_Field_Checkboxes extends Mage_Adminhtml_Block_System_Config_Form_Field {
14
+ protected function _getOptionHtmlAttributes() {
15
+ return array('type', 'name', 'class', 'style', 'checked', 'onclick', 'onchange', 'disabled');
16
+ }
17
+
18
+ protected function _optionToHtml($option, Varien_Data_Form_Element_Abstract $element) {
19
+ $id = $element->getHtmlId().'_'.Mage::helper('core')->escapeHtml($option['value']);
20
+
21
+ $html = '<li><input id="'.$id.'"';
22
+ foreach ($this->_getOptionHtmlAttributes() as $attribute) {
23
+ if ($value = $element->getDataUsingMethod($attribute, $option['value'])) {
24
+ if ($attribute == 'name') {
25
+ $value .= '[]';
26
+ }
27
+ $html .= ' '.$attribute.'="'.$value.'"';
28
+ }
29
+ }
30
+ $html .= ' value="'.$option['value'].'" />'
31
+ . ' <label for="'.$id.'">' . $option['label'] . '</label></li>'
32
+ . "\n";
33
+ return $html;
34
+ }
35
+
36
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
37
+ $element->setValue(explode(',', $element->getValue()));
38
+ $values = $element->getValues();
39
+
40
+ if (!$values) {
41
+ return '';
42
+ }
43
+
44
+ $name = $element->getDataUsingMethod('name', 'NONE');
45
+ $html = '<input type="hidden" name="'.$name.'[]" value="NONE"/>';
46
+ $html .= '<ul class="checkboxes" id="'.$this->escapeHtml($element->getHtmlId()).'">';
47
+ foreach ($values as $value) {
48
+ $html.= $this->_optionToHtml($value, $element);
49
+ }
50
+ $html .= '</ul>'. $this->getAfterElementHtml();
51
+
52
+ return $html;
53
+ }
54
+ }
app/code/community/Paybox/Epayment/Block/Admin/Field/Select.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Block_Admin_Field_Select extends Mage_Adminhtml_Block_System_Config_Form_Field {
14
+ protected function _getOptionHtmlAttributes() {
15
+ return array('type', 'name', 'class', 'style', 'checked', 'onclick', 'onchange', 'disabled');
16
+ }
17
+
18
+ protected function _optionToHtml($option, $selected) {
19
+ if (is_array($option['value'])) {
20
+ $html ='<optgroup label="'.$option['label'].'">'."\n";
21
+ foreach ($option['value'] as $groupItem) {
22
+ $html .= $this->_optionToHtml($groupItem, $selected);
23
+ }
24
+ $html .='</optgroup>'."\n";
25
+ }
26
+ else {
27
+ $html = '<option value="'.Mage::helper('core')->escapeHtml($option['value']).'"';
28
+ $html.= isset($option['title']) ? 'title="'.Mage::helper('core')->escapeHtml($option['title']).'"' : '';
29
+ $html.= isset($option['style']) ? 'style="'.$option['style'].'"' : '';
30
+ $html.= isset($option['disabled']) ? 'disabled="disabled"' : '';
31
+ if (in_array($option['value'], $selected)) {
32
+ $html.= ' selected="selected"';
33
+ }
34
+ $html.= '>'.Mage::helper('core')->escapeHtml($option['label']). '</option>'."\n";
35
+ }
36
+ return $html;
37
+ }
38
+
39
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
40
+ $element->addClass('select');
41
+ $html = '<select id="'.$element->getHtmlId().'" name="'.
42
+ $element->getName().'" '.
43
+ $this->serialize($element->getHtmlAttributes()).'>'."\n";
44
+
45
+ $value = $element->getValue();
46
+ if (!is_array($value)) {
47
+ $value = array($value);
48
+ }
49
+
50
+ if ($values = $element->getValues()) {
51
+ foreach ($values as $key => $option) {
52
+ if (!is_array($option)) {
53
+ $html.= $this->_optionToHtml(array(
54
+ 'value' => $key,
55
+ 'label' => $option),
56
+ $value
57
+ );
58
+ }
59
+ elseif (is_array($option['value'])) {
60
+ $html.='<optgroup label="'.$option['label'].'">'."\n";
61
+ foreach ($option['value'] as $groupItem) {
62
+ $html.= $this->_optionToHtml($groupItem, $value);
63
+ }
64
+ $html.='</optgroup>'."\n";
65
+ }
66
+ else {
67
+ $html.= $this->_optionToHtml($option, $value);
68
+ }
69
+ }
70
+ }
71
+
72
+ $html.= '</select>'."\n";
73
+ $html.= $this->getAfterElementHtml();
74
+ return $html;
75
+ }
76
+
77
+ }
app/code/community/Paybox/Epayment/Block/Admin/Info.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Block_Admin_Info extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
14
+ /**
15
+ * Render element html
16
+ *
17
+ * @param Varien_Data_Form_Element_Abstract $element
18
+ * @return string
19
+ */
20
+ public function render(Varien_Data_Form_Element_Abstract $element) {
21
+ $html = '<tr id="row_'.$element->getHtmlId().
22
+ '"><td class="label" colspan="5"><span id="'.$element->getHtmlId().'">';
23
+ $html .= $element->getLabel();
24
+ $html .= '</span></td></tr>';
25
+ return $html;
26
+ }
27
+ }
app/code/community/Paybox/Epayment/Block/Admin/Kwixo/Shipping.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Block_Admin_Kwixo_Shipping extends Mage_Adminhtml_Block_System_Config_Form_Field {
14
+ protected function _renderSelect($name, array $values, $current = null) {
15
+ $html = '<select name="'.$this->escapeHtml($name).'">';
16
+ foreach ($values as $value) {
17
+ $html .= '<option value="'.((int)$value['value']).'"';
18
+ if ($value['value'] == $current) {
19
+ $html .= ' selected="selected"';
20
+ }
21
+ $html .= '>'.$this->escapeHtml($value['label']).'</option>';
22
+ }
23
+ $html .= '</select>';
24
+ return $html;
25
+ }
26
+
27
+ /**
28
+ * @param Varien_Data_Form_Element_Abstract $element
29
+ * @return string
30
+ */
31
+ public function render(Varien_Data_Form_Element_Abstract $element) {
32
+ $html = '<td colspan="4">';
33
+ $html .= '<table id="'.$this->escapeHtml($element->getHtmlId()).' width="98%"><tr>';
34
+ $html .= '<th width="120px">'.$this->__('Code').'</th>';
35
+ $html .= '<th width="240px">'.$this->__('Nom').'</th>';
36
+ $html .= '<th>'.$this->__('Type FIA-NET').'</th>';
37
+ $html .= '<th>'.$this->__('Rapidité').'</th>';
38
+ $html .= '<th>'.$this->__('Transporteur').'</th>';
39
+ $html .= '</tr></thead><tbody>';
40
+
41
+ $config = Mage::getModel('pbxep/config');
42
+ $defaultType = $config->getKwixoDefaultCarrierType();
43
+ $defaultSpeed = $config->getKwixoDefaultCarrierSpeed();
44
+
45
+ $values = $element->getValue();
46
+ $shippingTypes = Mage::getModel('pbxep/admin_fianet_shippingTypes')->toOptionArray();
47
+ $deliverySpeeds = Mage::getModel('pbxep/admin_fianet_deliverySpeeds')->toOptionArray();
48
+ $carriers = Mage::getModel('shipping/config')->getAllCarriers();
49
+
50
+ foreach ($carriers as $code => $carrier) {
51
+ $title = Mage::getStoreConfig('carriers/'.$code.'/title');
52
+ $type = $defaultType;
53
+ $speed = $defaultSpeed;
54
+ $name = $title;
55
+ if (isset($values[$code]['type'])) {
56
+ $type = (int)$values[$code]['type'];
57
+ }
58
+ if (isset($values[$code]['speed'])) {
59
+ $speed = (int)$values[$code]['speed'];
60
+ }
61
+ if (isset($values[$code]['name'])) {
62
+ $name = (string)$values[$code]['name'];
63
+ }
64
+
65
+ $base = $element->getName().'['.$code.']';
66
+
67
+ $html .= '<tr>';
68
+ $html .= '<td>'.$this->escapeHtml($code).'</td>';
69
+ $html .= '<td>'.$this->escapeHtml($title).'</td>';
70
+ $html .= '<td>'.$this->_renderSelect($base.'[type]', $shippingTypes, $type).'</td>';
71
+ $html .= '<td>'.$this->_renderSelect($base.'[speed]', $deliverySpeeds, $speed).'</td>';
72
+ $html .= '<td><input type="text" name="'.$base.'[name]" value="'.$this->escapeHtml($name).'"/></td>';
73
+ $html .= '</tr>';
74
+
75
+ }
76
+ $html .= '</tbody></table>';
77
+ $html .= '</td>';
78
+ return $this->_decorateRowHtml($element, $html);
79
+ }
80
+
81
+ /**
82
+ * Decorate field row html
83
+ *
84
+ * @param Varien_Data_Form_Element_Abstract $element
85
+ * @param string $html
86
+ * @return string
87
+ */
88
+ protected function _decorateRowHtml($element, $html) {
89
+ return '<tr id="row_' . $element->getHtmlId() . '">' . $html . '</tr>';
90
+ }
91
+
92
+ }
app/code/community/Paybox/Epayment/Block/Admin/Presentation.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Block_Admin_Presentation extends Mage_Adminhtml_Block_Template {
14
+ protected function _construct() {
15
+ parent::_construct();
16
+
17
+ $config = Mage::getSingleton('pbxep/config');
18
+ $lang = Mage::app()->getLocale();
19
+ if (!empty($lang)) {
20
+ $lang = preg_replace('#_.*$#', '', $lang->getLocaleCode());
21
+ }
22
+ if (!in_array($lang, array('fr', 'en'))) {
23
+ $lang = 'en';
24
+ }
25
+ $this->setTemplate('pbxep/presentation/'.$lang.'.phtml');
26
+ }
27
+ }
app/code/community/Paybox/Epayment/Block/Checkout/Payment.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Block_Checkout_Payment extends Mage_Payment_Block_Form_Cc {
14
+ protected function _construct() {
15
+ parent::_construct();
16
+ $this->setTemplate('pbxep/checkout-payment.phtml');
17
+ }
18
+
19
+ protected function _prepareLayout() {
20
+ $head = $this->getLayout()->getBlock('head');
21
+ if (!empty($head)) {
22
+ $head->addCss('css/pbxep/styles.css');
23
+ }
24
+ return parent::_prepareLayout();
25
+ }
26
+
27
+ public function getCreditCards() {
28
+ $result = array();
29
+ $cards = $this->getMethod()->getCards();
30
+ $selected = explode(',', $this->getMethod()->getConfigData('cctypes'));
31
+ foreach ($cards as $code => $card) {
32
+ if (in_array($code, $selected)) {
33
+ $result[$code] = $card;
34
+ }
35
+ }
36
+ return $result;
37
+ }
38
+
39
+ public function getMethodLabelAfterHtml() {
40
+ $cards = $this->getCreditCards();
41
+ $html = array();
42
+ foreach ($cards as $card) {
43
+ $url = $this->htmlEscape($this->getSkinUrl($card['image']));
44
+ $alt = $this->htmlEscape($card['label']);
45
+ $html[] = '<img class="pbxep-payment-logo" src="'.$url.'" alt="'.$alt.'"/>';
46
+ }
47
+ $html = '<span class="pbxep-payment-label">'.implode('&nbsp;', $html).'</span>';
48
+ return $html;
49
+ }
50
+ }
app/code/community/Paybox/Epayment/Block/Info.php ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Block_Info extends Mage_Payment_Block_Info {
14
+
15
+ protected function _construct() {
16
+ parent::_construct();
17
+ $this->setTemplate('pbxep/info/default.phtml');
18
+ }
19
+
20
+ public function getCreditCards() {
21
+ $result = array();
22
+ $cards = $this->getMethod()->getCards();
23
+ $selected = explode(',', $this->getMethod()->getConfigData('cctypes'));
24
+ foreach ($cards as $code => $card) {
25
+ if (in_array($code, $selected)) {
26
+ $result[$code] = $card;
27
+ }
28
+ }
29
+ return $result;
30
+ }
31
+
32
+ public function getPayboxData() {
33
+ return unserialize($this->getInfo()->getPbxepAuthorization());
34
+ }
35
+
36
+ /**
37
+ * @return Paybox_Epayment_Model_Config Paybox configuration object
38
+ */
39
+ public function getPayboxConfig() {
40
+ return Mage::getSingleton('pbxep/config');
41
+ }
42
+
43
+ public function getCardImageUrl() {
44
+ $data = $this->getPayboxData();
45
+ $cards = $this->getCreditCards();
46
+ if (isset($cards[$data['cardType']])) {
47
+ $card = $cards[$data['cardType']];
48
+ return $this->getSkinUrl($card['image'], array('_area' => 'frontend'));
49
+ }
50
+ return $this->getSkinUrl('images/pbxep/'.strtolower($data['cardType']).'.45.png', array('_area' => 'frontend'));
51
+ }
52
+
53
+ public function getCardImageLabel() {
54
+ $data = $this->getPayboxData();
55
+ $cards = $this->getCreditCards();
56
+ if (!isset($cards[$data['cardType']])) {
57
+ return null;
58
+ }
59
+ $card = $cards[$data['cardType']];
60
+ return $card['label'];
61
+ }
62
+
63
+ public function isAuthorized() {
64
+ $info = $this->getInfo();
65
+ $auth = $info->getPbxepAuthorization();
66
+ return !empty($auth);
67
+ }
68
+
69
+ public function canCapture() {
70
+ $info = $this->getInfo();
71
+ $capture = $info->getPbxepCapture();
72
+ $config = $this->getPayboxConfig();
73
+ if ($config->getSubscription() == Paybox_Epayment_Model_Config::SUBSCRIPTION_FLEXIBLE) {
74
+ if ($info->getPbxepAction() == Paybox_Epayment_Model_Payment_Abstract::PBXACTION_MANUAL) {
75
+ $order = $info->getOrder();
76
+ return empty($capture) && $order->canInvoice();
77
+ }
78
+ }
79
+ return false;
80
+ }
81
+
82
+ public function canRefund() {
83
+ $info = $this->getInfo();
84
+ $capture = $info->getPbxepCapture();
85
+ $config = $this->getPayboxConfig();
86
+ if ($config->getSubscription() == Paybox_Epayment_Model_Config::SUBSCRIPTION_FLEXIBLE) {
87
+ return !empty($capture);
88
+ }
89
+ return false;
90
+ }
91
+
92
+ public function getDebitTypeLabel() {
93
+ $info = $this->getInfo();
94
+ $action = $info->getPbxepAction();
95
+ if (is_null($action) || ($action == 'three-time')) {
96
+ return null;
97
+ }
98
+
99
+ $actions = Mage::getSingleton('pbxep/admin_payment_action')->toOptionArray();
100
+ $result = $actions[$action]['label'];
101
+ if (($info->getPbxepAction() == Paybox_Epayment_Model_Payment_Abstract::PBXACTION_DEFERRED) && (!is_null($info->getPbxepDelay()))) {
102
+ $delays = Mage::getSingleton('pbxep/admin_payment_delays')->toOptionArray();
103
+ $result .= ' (' . $delays[$info->getPbxepDelay()]['label'] . ')';
104
+ }
105
+ return $result;
106
+ }
107
+
108
+ public function getShowInfoToCustomer() {
109
+ $config = $this->getPayboxConfig();
110
+ return $config->getShowInfoToCustomer() != 0;
111
+ }
112
+
113
+ public function getThreeTimeLabels() {
114
+ $info = $this->getInfo();
115
+ $action = $info->getPbxepAction();
116
+ if (is_null($action) || ($action != 'three-time')) {
117
+ return null;
118
+ }
119
+
120
+ $result = array(
121
+ 'first' => $this->__('Not achieved'),
122
+ 'second' => $this->__('Not achieved'),
123
+ 'third' => $this->__('Not achieved'),
124
+ );
125
+
126
+ $data = $info->getPbxepFirstPayment();
127
+ if (!empty($data)) {
128
+ $data = unserialize($data);
129
+ $date = preg_replace('/^([0-9]{2})([0-9]{2})([0-9]{4})$/', '$1/$2/$3', $data['date']);
130
+ $result['first'] = $this->__('%s (%s)', $data['amount'] / 100.0, $date);
131
+ }
132
+ $data = $info->getPbxepSecondPayment();
133
+ if (!empty($data)) {
134
+ $data = unserialize($data);
135
+ $date = preg_replace('/^([0-9]{2})([0-9]{2})([0-9]{4})$/', '$1/$2/$3', $data['date']);
136
+ $result['second'] = $this->__('%s (%s)', $data['amount'] / 100.0, $date);
137
+ }
138
+ $data = $info->getPbxepThirdPayment();
139
+ if (!empty($data)) {
140
+ $data = unserialize($data);
141
+ $date = preg_replace('/^([0-9]{2})([0-9]{2})([0-9]{4})$/', '$1/$2/$3', $data['date']);
142
+ $result['third'] = $this->__('%s (%s)', $data['amount'] / 100.0, $date);
143
+ }
144
+ return $result;
145
+ }
146
+
147
+ public function getPartialCaptureUrl() {
148
+ $info = $this->getInfo();
149
+ return Mage::helper("adminhtml")->getUrl("/sales_order_invoice/start", array(
150
+ 'order_id' => $info->getOrder()->getId(),
151
+ ));
152
+ }
153
+
154
+ public function getCaptureUrl() {
155
+ $data = $this->getPayboxData();
156
+ $info = $this->getInfo();
157
+ return Mage::helper("adminhtml")->getUrl("/pbxep/invoice", array(
158
+ 'order_id' => $info->getOrder()->getId(),
159
+ 'transaction' => $data['transaction'],
160
+ ));
161
+ }
162
+
163
+ public function getRefundUrl() {
164
+ $info = $this->getInfo();
165
+ $order = $info->getOrder();
166
+ $invoices = $order->getInvoiceCollection();
167
+ foreach ($invoices as $invoice) {
168
+ if ($invoice->canRefund()) {
169
+ return Mage::helper("adminhtml")->getUrl("/sales_order_creditmemo/new", array(
170
+ 'order_id' => $order->getId(),
171
+ 'invoice_id' => $invoice->getId(),
172
+ ));
173
+ }
174
+ }
175
+ return null;
176
+ }
177
+
178
+ }
app/code/community/Paybox/Epayment/Block/Redirect.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Block_Redirect extends Mage_Page_Block_Html {
14
+
15
+ public function getFormFields() {
16
+ $order = Mage::registry('pbxep/order');
17
+ $payment = $order->getPayment()->getMethodInstance();
18
+ $cntr = Mage::getSingleton('pbxep/paybox');
19
+ return $cntr->buildSystemParams($order, $payment);
20
+ }
21
+
22
+ public function getInputType() {
23
+ $config = Mage::getSingleton('pbxep/config');
24
+ if ($config->isDebug()) {
25
+ return 'text';
26
+ }
27
+ return 'hidden';
28
+ }
29
+
30
+ public function getKwixoUrl() {
31
+ $paybox = Mage::getSingleton('pbxep/paybox');
32
+ $urls = $paybox->getConfig()->getKwixoUrls();
33
+ return $paybox->checkUrls($urls);
34
+ }
35
+
36
+ public function getMobileUrl() {
37
+ $paybox = Mage::getSingleton('pbxep/paybox');
38
+ $urls = $paybox->getConfig()->getMobileUrls();
39
+ return $paybox->checkUrls($urls);
40
+ }
41
+
42
+ public function getSystemUrl() {
43
+ $paybox = Mage::getSingleton('pbxep/paybox');
44
+ $urls = $paybox->getConfig()->getSystemUrls();
45
+ return $paybox->checkUrls($urls);
46
+ }
47
+ }
app/code/community/Paybox/Epayment/Helper/Data.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Helper_Data extends Mage_Core_Helper_Abstract {
14
+
15
+ }
app/code/community/Paybox/Epayment/Helper/Mobile.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Helper_Mobile extends Mage_Core_Helper_Abstract {
14
+ public function isMobile() {
15
+ // From http://detectmobilebrowsers.com/, regexp of 09/09/2013
16
+ $userAgent = Mage::helper('core/http')->getHttpUserAgent();
17
+ if (preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$userAgent)) {
18
+ return true;
19
+ }
20
+ if (preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i', substr($userAgent, 0, 4))) {
21
+ return true;
22
+ }
23
+ return false;
24
+ }
25
+ }
app/code/community/Paybox/Epayment/Model/Admin/Cards/Abstract.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ abstract class Paybox_Epayment_Model_Admin_Cards_Abstract {
14
+ public function getConfigPath() {
15
+ return 'default/payment/pbxep_'.$this->getConfigNodeName().'/cards';
16
+ }
17
+
18
+ public abstract function getConfigNodeName();
19
+
20
+ public function toOptionArray() {
21
+ $result = array();
22
+ $configPath = $this->getConfigPath();
23
+ $cards = Mage::getConfig()->getNode($configPath)->asArray();
24
+ if (!empty($cards)) {
25
+ $helper = Mage::helper('pbxep');
26
+ foreach ($cards as $code => $card) {
27
+ $result[] = array(
28
+ 'label' => $helper->__($card['label']),
29
+ 'value' => $code,
30
+ );
31
+ }
32
+ }
33
+ return $result;
34
+ }
35
+ }
app/code/community/Paybox/Epayment/Model/Admin/Cards/Cb.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Cards_Cb extends Paybox_Epayment_Model_Admin_Cards_Abstract {
14
+ public function getConfigNodeName() {
15
+ return 'cb';
16
+ }
17
+ }
app/code/community/Paybox/Epayment/Model/Admin/Cards/Financial.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Cards_Financial extends Paybox_Epayment_Model_Admin_Cards_Abstract {
14
+ public function getConfigNodeName() {
15
+ return 'financial';
16
+ }
17
+ }
app/code/community/Paybox/Epayment/Model/Admin/Cards/Paybuttons.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Cards_Paybuttons extends Paybox_Epayment_Model_Admin_Cards_Abstract {
14
+ public function getConfigNodeName() {
15
+ return 'paybuttons';
16
+ }
17
+ }
app/code/community/Paybox/Epayment/Model/Admin/Cards/Prepaid.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Cards_Prepaid extends Paybox_Epayment_Model_Admin_Cards_Abstract {
14
+ public function getConfigNodeName() {
15
+ return 'prepaid';
16
+ }
17
+ }
app/code/community/Paybox/Epayment/Model/Admin/Cards/Private.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Cards_Private extends Paybox_Epayment_Model_Admin_Cards_Abstract {
14
+ public function getConfigNodeName() {
15
+ return 'private';
16
+ }
17
+ }
app/code/community/Paybox/Epayment/Model/Admin/Cards/Threetime.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Cards_Threetime extends Paybox_Epayment_Model_Admin_Cards_Abstract {
14
+ public function getConfigNodeName() {
15
+ return 'threetime';
16
+ }
17
+ }
app/code/community/Paybox/Epayment/Model/Admin/Environment.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Environment {
14
+ public function toOptionArray() {
15
+ return array(
16
+ array('value' => 'PRODUCTION', 'label' => Mage::helper('pbxep')->__('Production')),
17
+ array('value' => 'TEST', 'label' => Mage::helper('pbxep')->__('Test')),
18
+ );
19
+ }
20
+ }
app/code/community/Paybox/Epayment/Model/Admin/Fianet/Categories.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Fianet_Categories extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
14
+
15
+ public function getAllOptions() {
16
+ if (is_null($this->_options)) {
17
+ $helper = Mage::helper('pbxep');
18
+ $kwixo = Mage::getSingleton('pbxep/kwixo');
19
+ $this->_options = array(
20
+ array('value' => null, 'label' => ''),
21
+ );
22
+ foreach ($kwixo->getCategories() as $value => $label) {
23
+ $this->_options[] = array(
24
+ 'value' => $value,
25
+ 'label' => $helper->__($label),
26
+ );
27
+ }
28
+ }
29
+ return $this->_options;
30
+ }
31
+
32
+ public function toOptionArray() {
33
+ return $this->getAllOptions();
34
+ }
35
+
36
+ }
app/code/community/Paybox/Epayment/Model/Admin/Fianet/DeliverySpeeds.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * List of FIA-NET delivery speed
15
+ *
16
+ * @author olivier
17
+ */
18
+ class Paybox_Epayment_Model_Admin_Fianet_DeliverySpeeds {
19
+ public function toOptionArray() {
20
+ $helper = Mage::helper('pbxep');
21
+ return array(
22
+ array('value' => null, 'label' => ''),
23
+ array('value' => "1", 'label' => $helper->__('Express (moins de 24h)')),
24
+ array('value' => "2", 'label' => $helper->__('Standard')),
25
+ );
26
+ }
27
+ }
app/code/community/Paybox/Epayment/Model/Admin/Fianet/ShippingTypes.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * List of FIA-NET shipping types
15
+ *
16
+ * @author olivier
17
+ */
18
+ class Paybox_Epayment_Model_Admin_Fianet_ShippingTypes extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
19
+ public function getAllOptions() {
20
+ if (is_null($this->_options)) {
21
+ $helper = Mage::helper('pbxep');
22
+ $kwixo = Mage::getSingleton('pbxep/kwixo');
23
+ $this->_options = array(
24
+ array('value' => null, 'label' => ''),
25
+ );
26
+ foreach ($kwixo->getCarrierType() as $value => $label) {
27
+ $this->_options[] = array(
28
+ 'value' => $value,
29
+ 'label' => $helper->__($label),
30
+ );
31
+ }
32
+ }
33
+ return $this->_options;
34
+ }
35
+
36
+ public function toOptionArray() {
37
+ return $this->getAllOptions();
38
+ }
39
+ }
app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Autocapture.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * Order Statuses source model
15
+ */
16
+ class Paybox_Epayment_Model_Admin_Order_Status_Autocapture extends Mage_Adminhtml_Model_System_Config_Source_Order_Status {
17
+ protected $_stateStatuses = array(
18
+ Mage_Sales_Model_Order::STATE_NEW,
19
+ Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,
20
+ );
21
+
22
+ public function toOptionArray() {
23
+ $options = parent::toOptionArray();
24
+ $options[0] = array(
25
+ 'value' => '',
26
+ 'label' => Mage::helper('pbxep')->__('Manual capture only'),
27
+ );
28
+ return $options;
29
+ }
30
+ }
app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Canceled.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * Order Statuses source model
15
+ */
16
+ class Paybox_Epayment_Model_Admin_Order_Status_Canceled extends Mage_Adminhtml_Model_System_Config_Source_Order_Status {
17
+ protected $_stateStatuses = Mage_Sales_Model_Order::STATE_CANCELED;
18
+ }
app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Holded.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * Order Statuses source model
15
+ */
16
+ class Paybox_Epayment_Model_Admin_Order_Status_Holded extends Mage_Adminhtml_Model_System_Config_Source_Order_Status {
17
+ protected $_stateStatuses = Mage_Sales_Model_Order::STATE_HOLDED;
18
+ }
app/code/community/Paybox/Epayment/Model/Admin/Order/Status/New.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * Order Statuses source model
15
+ */
16
+ class Paybox_Epayment_Model_Admin_Order_Status_New extends Mage_Adminhtml_Model_System_Config_Source_Order_Status {
17
+ protected $_stateStatuses = Mage_Sales_Model_Order::STATE_NEW;
18
+ }
app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Pending.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * Order Statuses source model
15
+ */
16
+ class Paybox_Epayment_Model_Admin_Order_Status_Pending extends Mage_Adminhtml_Model_System_Config_Source_Order_Status {
17
+ protected $_stateStatuses = Mage_Sales_Model_Order::STATE_PENDING;
18
+ }
app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Pendingpayment.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * Order Statuses source model
15
+ */
16
+ class Paybox_Epayment_Model_Admin_Order_Status_Pendingpayment extends Mage_Adminhtml_Model_System_Config_Source_Order_Status {
17
+ protected $_stateStatuses = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
18
+ }
app/code/community/Paybox/Epayment/Model/Admin/Order/Status/Processing.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * Order Statuses source model
15
+ */
16
+ class Paybox_Epayment_Model_Admin_Order_Status_Processing extends Mage_Adminhtml_Model_System_Config_Source_Order_Status {
17
+ protected $_stateStatuses = Mage_Sales_Model_Order::STATE_PROCESSING;
18
+ }
app/code/community/Paybox/Epayment/Model/Admin/Payment/Action.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Payment_Action {
14
+ public function toOptionArray() {
15
+ $immediate = array(
16
+ 'value' => 'immediate',
17
+ 'label' => Mage::helper('pbxep')->__('Paid Immediatly')
18
+ );
19
+ $deferred = array(
20
+ 'value' => 'deferred',
21
+ 'label' => Mage::helper('pbxep')->__('Defered payment')
22
+ );
23
+ $manual = array(
24
+ 'value' => 'manual',
25
+ 'label' => Mage::helper('pbxep')->__('Paid shipping')
26
+ );
27
+
28
+ $config = Mage::getSingleton('pbxep/config');
29
+ if ($config->getSubscription() != Paybox_Epayment_Model_Config::SUBSCRIPTION_FLEXIBLE) {
30
+ $manual['disabled'] = 'disabled';
31
+ }
32
+
33
+ return array(
34
+ $immediate['value'] => $immediate,
35
+ $deferred['value'] => $deferred,
36
+ $manual['value'] => $manual,
37
+ );
38
+ }
39
+ }
app/code/community/Paybox/Epayment/Model/Admin/Payment/Actionpaypal.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Paybox_Epayment_Model_Admin_Payment_Actionpaypal extends Paybox_Epayment_Model_Admin_Payment_Action {
4
+ public function toOptionArray() {
5
+ $options = parent::toOptionArray();
6
+ array_splice($options, 1, 1);
7
+ return $options;
8
+ }
9
+ }
app/code/community/Paybox/Epayment/Model/Admin/Payment/Delays.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Payment_Delays {
14
+ public function toOptionArray() {
15
+ $helper = Mage::helper('pbxep');
16
+ $result = array(
17
+ '1' => array('value' => 1, 'label' => $helper->__('1')),
18
+ '2' => array('value' => 2, 'label' => $helper->__('2')),
19
+ '3' => array('value' => 3, 'label' => $helper->__('3')),
20
+ '4' => array('value' => 4, 'label' => $helper->__('4')),
21
+ '5' => array('value' => 5, 'label' => $helper->__('5')),
22
+ '6' => array('value' => 6, 'label' => $helper->__('6')),
23
+ '7' => array('value' => 7, 'label' => $helper->__('7')),
24
+ );
25
+ return $result;
26
+ }
27
+ }
app/code/community/Paybox/Epayment/Model/Admin/Payment/Same.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Payment_Same {
14
+ public function toOptionArray() {
15
+ $helper = Mage::helper('pbxep');
16
+ $options = array(
17
+ array('value' => '', 'label' => $helper->__('')),
18
+ array('value' => 'same', 'label' => $helper->__('Same')),
19
+ array('value' => 'different', 'label' => $helper->__('Different')),
20
+ );
21
+ return $options;
22
+ }
23
+ }
app/code/community/Paybox/Epayment/Model/Admin/Payment/Use3ds.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Payment_Use3ds {
14
+ public function toOptionArray() {
15
+ $helper = Mage::helper('pbxep');
16
+ $options = array(
17
+ array('value' => 'always', 'label' => $helper->__('Yes')),
18
+ array('value' => 'never', 'label' => $helper->__('No')),
19
+ array('value' => 'condition', 'label' => $helper->__('Conditionnal')),
20
+ );
21
+ return $options;
22
+ }
23
+ }
app/code/community/Paybox/Epayment/Model/Admin/Subscription.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Admin_Subscription {
14
+ public function toOptionArray() {
15
+ return array(
16
+ array('value' => 'essential', 'label' => Mage::helper('pbxep')->__('Paybox System (Essential Pack)')),
17
+ array('value' => 'flexible', 'label' => Mage::helper('pbxep')->__('Paybox System + Paybox Direct (Flexible Pack)')),
18
+ );
19
+ }
20
+ }
app/code/community/Paybox/Epayment/Model/Config.php ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Config {
14
+
15
+ const SUBSCRIPTION_ESSENTIAL = 'essential';
16
+ const SUBSCRIPTION_FLEXIBLE = 'flexible';
17
+
18
+ private $_store;
19
+ private $_configCache = array();
20
+ private $_configMapping = array(
21
+ 'allowedIps' => 'allowedips',
22
+ 'environment' => 'environment',
23
+ 'debug' => 'debug',
24
+ 'hmacAlgo' => 'merchant/hmacalgo',
25
+ 'hmacKey' => 'merchant/hmackey',
26
+ 'identifier' => 'merchant/identifier',
27
+ 'languages' => 'languages',
28
+ 'password' => 'merchant/password',
29
+ 'rank' => 'merchant/rank',
30
+ 'site' => 'merchant/site',
31
+ 'subscription' => 'merchant/subscription',
32
+ 'kwixoShipping' => 'kwixo/shipping'
33
+ );
34
+ private $_urls = array(
35
+ 'system' => array(
36
+ 'test' => array(
37
+ 'https://preprod-tpeweb.paybox.com/cgi/MYchoix_pagepaiement.cgi'
38
+ ),
39
+ 'production' => array(
40
+ 'https://tpeweb.paybox.com/cgi/MYchoix_pagepaiement.cgi',
41
+ 'https://tpeweb1.paybox.com/cgi/MYchoix_pagepaiement.cgi',
42
+ ),
43
+ ),
44
+ 'kwixo' => array(
45
+ 'test' => array(
46
+ 'https://preprod-tpeweb.paybox.com/php/'
47
+ ),
48
+ 'production' => array(
49
+ 'https://tpeweb.paybox.com/php/',
50
+ 'https://tpeweb1.paybox.com/php/',
51
+ ),
52
+ ),
53
+ 'mobile' => array(
54
+ 'test' => array(
55
+ 'https://preprod-tpeweb.paybox.com/cgi/MYframepagepaiement_ip.cgi'
56
+ ),
57
+ 'production' => array(
58
+ 'https://tpeweb.paybox.com/cgi/MYframepagepaiement_ip.cgi',
59
+ 'https://tpeweb1.paybox.com/cgi/MYframepagepaiement_ip.cgi',
60
+ ),
61
+ ),
62
+ 'direct' => array(
63
+ 'test' => array(
64
+ 'https://preprod-ppps.paybox.com/PPPS.php'
65
+ ),
66
+ 'production' => array(
67
+ 'https://ppps.paybox.com/PPPS.php',
68
+ 'https://ppps1.paybox.com/PPPS.php',
69
+ ),
70
+ )
71
+ );
72
+
73
+ public function __call($name, $args) {
74
+ if (preg_match('#^get(.)(.*)$#', $name, $matches)) {
75
+ $prop = strtolower($matches[1]) . $matches[2];
76
+ if (isset($this->_configCache[$prop])) {
77
+ return $this->_configCache[$prop];
78
+ } else if (isset($this->_configMapping[$prop])) {
79
+ $key = 'pbxep/' . $this->_configMapping[$prop];
80
+ $value = $this->_getConfigValue($key);
81
+ $this->_configCache[$prop] = $value;
82
+ return $value;
83
+ }
84
+ } else if (preg_match('#^is(.)(.*)$#', $name, $matches)) {
85
+ $prop = strtolower($matches[1]) . $matches[2];
86
+ if (isset($this->_configCache[$prop])) {
87
+ return $this->_configCache[$prop] == 1;
88
+ } else if (isset($this->_configMapping[$prop])) {
89
+ $key = 'pbxep/' . $this->_configMapping[$prop];
90
+ $value = $this->_getConfigValue($key);
91
+ $this->_configCache[$prop] = $value;
92
+ return $value == 1;
93
+ }
94
+ }
95
+ throw new Exception('No function ' . $name);
96
+ }
97
+
98
+ public function getStore() {
99
+ if (is_null($this->_store)) {
100
+ $this->_store = Mage::app()->getStore();
101
+ }
102
+ return $this->_store;
103
+ }
104
+
105
+ private function _getConfigValue($name) {
106
+ return Mage::getStoreConfig($name, $this->getStore());
107
+ }
108
+
109
+ protected function _getUrls($type, $environment = null) {
110
+ if (is_null($environment)) {
111
+ $environment = $this->getEnvironment();
112
+ }
113
+ $environment = strtolower($environment);
114
+ if (isset($this->_urls[$type][$environment])) {
115
+ return $this->_urls[$type][$environment];
116
+ }
117
+ return array();
118
+ }
119
+
120
+ public function getSystemUrls($environment = null) {
121
+ return $this->_getUrls('system', $environment);
122
+ }
123
+
124
+ public function getKwixoUrls($environment = null) {
125
+ return $this->_getUrls('kwixo', $environment);
126
+ }
127
+
128
+ public function getMobileUrls($environment = null) {
129
+ return $this->_getUrls('mobile', $environment);
130
+ }
131
+
132
+ public function getDirectUrls($environment = null) {
133
+ return $this->_getUrls('direct', $environment);
134
+ }
135
+
136
+ public function getDefaultNewOrderStatus() {
137
+ return $this->_getConfigValue('pbxep/defaultoption/new_order_status');
138
+ }
139
+
140
+ public function getDefaultCapturedStatus() {
141
+ return $this->_getConfigValue('pbxep/defaultoption/payment_captured_status');
142
+ }
143
+
144
+ public function getDefaultAuthorizedStatus() {
145
+ return $this->_getConfigValue('pbxep/defaultoption/payment_authorized_status');
146
+ }
147
+
148
+ public function getAutomaticInvoice() {
149
+ $value = $this->_getConfigValue('pbxep/automatic_invoice');
150
+ if (is_null($value)) {
151
+ $value = 0;
152
+ }
153
+ return (int) $value;
154
+ }
155
+
156
+ public function getShowInfoToCustomer() {
157
+ $value = $this->_getConfigValue('pbxep/info_to_customer');
158
+ if (is_null($value)) {
159
+ $value = 1;
160
+ }
161
+ return (int) $value;
162
+ }
163
+
164
+ public function getKwixoDefaultCategory() {
165
+ $value = $this->_getConfigValue('pbxep/kwixo/default_category');
166
+ if (is_null($value)) {
167
+ $value = 1;
168
+ }
169
+ return (int) $value;
170
+ }
171
+
172
+ public function getKwixoDefaultCarrierType() {
173
+ $value = $this->_getConfigValue('pbxep/kwixo/default_carrier_type');
174
+ if (is_null($value)) {
175
+ $value = 4;
176
+ }
177
+ return (int) $value;
178
+ }
179
+
180
+ public function getKwixoDefaultCarrierSpeed() {
181
+ $value = $this->_getConfigValue('pbxep/kwixo/default_carrier_speed');
182
+ if (is_null($value)) {
183
+ $value = 2;
184
+ }
185
+ return (int) $value;
186
+ }
187
+
188
+ }
app/code/community/Paybox/Epayment/Model/Context.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Context {
14
+ private $_order;
15
+
16
+ public static function generateToken(Mage_Sales_Model_Order $order) {
17
+ $reference = array();
18
+ $reference[] = $order->getRealOrderId();
19
+ $reference[] = $order->getCustomerName();
20
+ $reference = implode(' - ', $reference);
21
+ return $reference;
22
+ }
23
+
24
+ public function getOrder() {
25
+ return $this->_order;
26
+ }
27
+
28
+
29
+ /**
30
+ * Reference = order id and customer name
31
+ * The data integrity check is provided by the customer name
32
+ */
33
+ public function getToken() {
34
+ return self::generateToken($this->getOrder());
35
+ }
36
+
37
+ public function setOrder(Mage_Sales_Model_Order $order) {
38
+ $this->_order = $order;
39
+ }
40
+
41
+ public function setToken($reference) {
42
+ $parts = explode(' - ', $reference, 2);
43
+ if (count($parts) < 2) {
44
+ $message = 'Invalid decrypted reference "%s"';
45
+ Mage::throwException(Mage::helper('pbxep')->__($message, $reference));
46
+ }
47
+
48
+ // Retrieves order
49
+ $order = Mage::getSingleton('sales/order')->loadByIncrementId($parts[0]);
50
+ if (empty($order)) {
51
+ $message = 'Not existing order id from decrypted reference "%s"';
52
+ Mage::throwException(Mage::helper('pbxep')->__($message, $reference));
53
+ }
54
+ if (is_null($order->getId())) {
55
+ $message = 'Not existing order id from decrypted reference "%s"';
56
+ Mage::throwException(Mage::helper('pbxep')->__($message, $reference));
57
+ }
58
+ if ($order->getCustomerName() != $parts[1]) {
59
+ $message = 'Consistency error on descrypted reference "%s"';
60
+ Mage::throwException(Mage::helper('pbxep')->__($message, $reference));
61
+ }
62
+
63
+ $this->_order = $order;
64
+ }
65
+ }
app/code/community/Paybox/Epayment/Model/Iso4217Currency.php ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Iso4217Currency {
14
+ private $_mapping = array(
15
+ 'AED' => '784',
16
+ 'AFN' => '971',
17
+ 'ALL' => '008',
18
+ 'AMD' => '051',
19
+ 'ANG' => '532',
20
+ 'AOA' => '973',
21
+ 'ARS' => '032',
22
+ 'AUD' => '036',
23
+ 'AWG' => '533',
24
+ 'AZN' => '944',
25
+ 'BAM' => '977',
26
+ 'BBD' => '052',
27
+ 'BDT' => '050',
28
+ 'BGN' => '975',
29
+ 'BHD' => '048',
30
+ 'BIF' => '108',
31
+ 'BMD' => '060',
32
+ 'BND' => '096',
33
+ 'BOB' => '068',
34
+ 'BOV' => '984',
35
+ 'BRL' => '986',
36
+ 'BSD' => '044',
37
+ 'BTN' => '064',
38
+ 'BWP' => '072',
39
+ 'BYR' => '974',
40
+ 'BZD' => '084',
41
+ 'CAD' => '124',
42
+ 'CDF' => '976',
43
+ 'CHE' => '947',
44
+ 'CHF' => '756',
45
+ 'CHW' => '948',
46
+ 'CLF' => '990',
47
+ 'CLP' => '152',
48
+ 'CNY' => '156',
49
+ 'COP' => '170',
50
+ 'COU' => '970',
51
+ 'CRC' => '188',
52
+ 'CUC' => '931',
53
+ 'CUP' => '192',
54
+ 'CVE' => '132',
55
+ 'CZK' => '203',
56
+ 'DJF' => '262',
57
+ 'DKK' => '208',
58
+ 'DOP' => '214',
59
+ 'DZD' => '012',
60
+ 'EEK' => '233',
61
+ 'EGP' => '818',
62
+ 'ERN' => '232',
63
+ 'ETB' => '230',
64
+ 'EUR' => '978',
65
+ 'FJD' => '242',
66
+ 'FKP' => '238',
67
+ 'GBP' => '826',
68
+ 'GEL' => '981',
69
+ 'GHS' => '936',
70
+ 'GIP' => '292',
71
+ 'GMD' => '270',
72
+ 'GNF' => '324',
73
+ 'GTQ' => '320',
74
+ 'GYD' => '328',
75
+ 'HKD' => '344',
76
+ 'HNL' => '340',
77
+ 'HRK' => '191',
78
+ 'HTG' => '332',
79
+ 'HUF' => '348',
80
+ 'IDR' => '360',
81
+ 'ILS' => '376',
82
+ 'INR' => '356',
83
+ 'IQD' => '368',
84
+ 'IRR' => '364',
85
+ 'ISK' => '352',
86
+ 'JMD' => '388',
87
+ 'JOD' => '400',
88
+ 'JPY' => '392',
89
+ 'KES' => '404',
90
+ 'KGS' => '417',
91
+ 'KHR' => '116',
92
+ 'KMF' => '174',
93
+ 'KPW' => '408',
94
+ 'KRW' => '410',
95
+ 'KWD' => '414',
96
+ 'KYD' => '136',
97
+ 'KZT' => '398',
98
+ 'LAK' => '418',
99
+ 'LBP' => '422',
100
+ 'LKR' => '144',
101
+ 'LRD' => '430',
102
+ 'LSL' => '426',
103
+ 'LTL' => '440',
104
+ 'LVL' => '428',
105
+ 'LYD' => '434',
106
+ 'MAD' => '504',
107
+ 'MDL' => '498',
108
+ 'MGA' => '969',
109
+ 'MKD' => '807',
110
+ 'MMK' => '104',
111
+ 'MNT' => '496',
112
+ 'MOP' => '446',
113
+ 'MRO' => '478',
114
+ 'MUR' => '480',
115
+ 'MVR' => '462',
116
+ 'MWK' => '454',
117
+ 'MXN' => '484',
118
+ 'MXV' => '979',
119
+ 'MYR' => '458',
120
+ 'MZN' => '943',
121
+ 'NAD' => '516',
122
+ 'NGN' => '566',
123
+ 'NIO' => '558',
124
+ 'NOK' => '578',
125
+ 'NPR' => '524',
126
+ 'NZD' => '554',
127
+ 'OMR' => '512',
128
+ 'PAB' => '590',
129
+ 'PEN' => '604',
130
+ 'PGK' => '598',
131
+ 'PHP' => '608',
132
+ 'PKR' => '586',
133
+ 'PLN' => '985',
134
+ 'PYG' => '600',
135
+ 'QAR' => '634',
136
+ 'RON' => '946',
137
+ 'RSD' => '941',
138
+ 'RUB' => '643',
139
+ 'RWF' => '646',
140
+ 'SAR' => '682',
141
+ 'SBD' => '090',
142
+ 'SCR' => '690',
143
+ 'SDG' => '938',
144
+ 'SEK' => '752',
145
+ 'SGD' => '702',
146
+ 'SHP' => '654',
147
+ 'SLL' => '694',
148
+ 'SOS' => '706',
149
+ 'SRD' => '968',
150
+ 'STD' => '678',
151
+ 'SYP' => '760',
152
+ 'SZL' => '748',
153
+ 'THB' => '764',
154
+ 'TJS' => '972',
155
+ 'TMT' => '934',
156
+ 'TND' => '788',
157
+ 'TOP' => '776',
158
+ 'TRY' => '949',
159
+ 'TTD' => '780',
160
+ 'TWD' => '901',
161
+ 'TZS' => '834',
162
+ 'UAH' => '980',
163
+ 'UGX' => '800',
164
+ 'USD' => '840',
165
+ 'USN' => '997',
166
+ 'USS' => '998',
167
+ 'UYU' => '858',
168
+ 'UZS' => '860',
169
+ 'VEF' => '937',
170
+ 'VND' => '704',
171
+ 'VUV' => '548',
172
+ 'WST' => '882',
173
+ 'XAF' => '950',
174
+ 'XAG' => '961',
175
+ 'XAU' => '959',
176
+ 'XBA' => '955',
177
+ 'XBB' => '956',
178
+ 'XBC' => '957',
179
+ 'XBD' => '958',
180
+ 'XCD' => '951',
181
+ 'XDR' => '960',
182
+ 'XOF' => '952',
183
+ 'XPD' => '964',
184
+ 'XPF' => '953',
185
+ 'XPT' => '962',
186
+ 'XTS' => '963',
187
+ 'XXX' => '999',
188
+ 'YER' => '886',
189
+ 'ZAR' => '710',
190
+ 'ZMK' => '894',
191
+ 'ZWL' => '932',
192
+ );
193
+
194
+ /**
195
+ * Return ISO 4217 currency code from Magento currency code
196
+ *
197
+ * @param string$code Magento currency code
198
+ * @return string ISO 4217 currency code
199
+ */
200
+ public function getIsoCode($magentoCode, $default = null) {
201
+ if (isset($this->_mapping[$magentoCode])) {
202
+ return $this->_mapping[$magentoCode];
203
+ }
204
+ return $default;
205
+ }
206
+ }
app/code/community/Paybox/Epayment/Model/Kwixo.php ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Kwixo {
14
+ // category defined by Receive&Pay
15
+ private $_categories = array(
16
+ 1 => 'Alimentation & gastronomie',
17
+ 2 => 'Auto & moto',
18
+ 3 => 'Culture & divertissements',
19
+ 4 => 'Maison & jardin',
20
+ 5 => 'Electroménager',
21
+ 6 => 'Enchères et achats groupés',
22
+ 7 => 'Fleurs & cadeaux',
23
+ 8 => 'Informatique & logiciels',
24
+ 9 => 'Santé & beauté',
25
+ 10 => 'Services aux particuliers',
26
+ 11 => 'Services aux professionnels',
27
+ 12 => 'Sport',
28
+ 13 => 'Vêtements & accessoires',
29
+ 14 => 'Voyage & tourisme',
30
+ 15 => 'Hifi, photo & vidéos',
31
+ 16 => 'Téléphonie & communication',
32
+ 17 => 'Bijoux et métaux précieux',
33
+ 18 => 'Articles et accessoires pour bébé',
34
+ 19 => 'Sonorisation & lumière'
35
+ );
36
+
37
+ private $_carrierType = array(
38
+ //1 => 'Retrait de la marchandise chez le marchand',
39
+ //2 => 'Utilisation d\'un réseau de points-retrait tiers (type kiala, alveol, etc.)',
40
+ //3 => 'Retrait dans un aéroport, une gare ou une agence de voyage',
41
+ 4 => 'Transporteur (La Poste, Colissimo, UPS, DHL... ou tout transporteur privé)',
42
+ 5 => 'Emission d’un billet électronique, téléchargements'
43
+ );
44
+
45
+ private function _getAddressParams(Mage_Sales_Model_Order_Address $address, $prefix) {
46
+ $country = $address->getCountry();
47
+ $country = Mage::getModel('directory/country')->loadByCode($country);
48
+
49
+ $values = array(
50
+ $prefix.'CIVILITY' => 'monsieur',
51
+ $prefix.'NAME_FIRST' => $this->cleanupUpString($address->getFirstname()),
52
+ $prefix.'NAME_LAST' => $this->cleanupUpString($address->getLastname()),
53
+ $prefix.'OFFICE' => $this->cleanupUpString($address->getCompany()),
54
+ $prefix.'MOBILE' => $this->cleanUpPhone($address->getTelephone()),
55
+ $prefix.'HOME' => $this->cleanUpPhone($address->getTelephone()),
56
+ $prefix.'EMAIL' => $address->getEmail(),
57
+ $prefix.'STREET_LINE_1' => $this->cleanupUpString($address->getStreet(1)),
58
+ $prefix.'POSTALCODE' => $address->getPostcode(),
59
+ $prefix.'CITY' => $this->cleanupUpString($address->getCity()),
60
+ $prefix.'COUNTRY' => $this->cleanupUpString($country->getName()),
61
+ );
62
+
63
+ if (!is_null($address->getFax())) {
64
+ $values[$prefix.'FAX'] = $this->cleanUpPhone($address->getFax());
65
+ }
66
+
67
+ $street = $address->getStreet(2);
68
+ if (!empty($street)) {
69
+ $values[$prefix.'STREET_LINE_2'] = $this->cleanupUpString($street);
70
+ }
71
+
72
+ return $values;
73
+ }
74
+
75
+ protected function _getFianetCategory(Mage_Catalog_Model_Product $product) {
76
+ $result = $product->getFianetCategory();
77
+ if (!is_null($result)) {
78
+ return $result;
79
+ }
80
+
81
+ $categories = $product->getCategoryCollection();
82
+ foreach ($categories as $category) {
83
+ $result = $category->getFianetCategory();
84
+ if (!is_null($result)) {
85
+ return $result;
86
+ }
87
+
88
+ $parent = $category->getParentCategory();
89
+ while (!is_null($parent)) {
90
+ $result = $category->getFianetCategory();
91
+ $propagate = $category->getFianetApplyToSubs();
92
+ if (!is_null($result)) {
93
+ if ($propagate == 1) {
94
+ return $result;
95
+ } else {
96
+ break;
97
+ }
98
+ }
99
+ }
100
+ }
101
+
102
+ $config = $this->getConfig();
103
+ return $config->getKwixoDefaultCategory();
104
+ }
105
+
106
+ private function _getOrderHistory(Mage_Sales_Model_Order $order) {
107
+ $orders = Mage::getModel('sales/order')->getCollection()
108
+ ->addAttributeToSelect('grand_total')
109
+ ->addAttributeToSelect('created_at')
110
+ ->addFieldToFilter('status', array('in' => array(
111
+ 'processing',
112
+ 'complete',
113
+ 'closed',
114
+ )))
115
+ ->addFieldToFilter('customer_id', $order->getCustomerId());
116
+ $sum = 0;
117
+ $first = new DateTime();
118
+ $last = DateTime::createFromFormat('Y-m-d', '1970-01-01');
119
+ $cnt = 0;
120
+ foreach ($orders as $previous) {
121
+ ++$cnt;
122
+ $sum += $previous->getGrandTotal();
123
+ $date = DateTime::createFromFormat('Y-m-d H:i:s', $previous->getCreatedAt());
124
+ if ($date < $first) {
125
+ $first = $date;
126
+ }
127
+ if ($date > $last) {
128
+ $last = $date;
129
+ }
130
+ }
131
+
132
+ $values = array();
133
+ $values['PBX_BILLTO_NB_PAYMENTS'] = $cnt;
134
+ if ($cnt > 0) {
135
+ $values['PBX_BILLTO_SUM_AMOUNTS'] = (int) ($sum * 100);
136
+ $values['PBX_BILLTO_DATE_FIRST'] = $first->format('Y-m-d') . 'T' . $first->format('H:i:s');
137
+ $values['PBX_BILLTO_DATE_LAST'] = $last->format('Y-m-d') . 'T' . $last->format('H:i:s');
138
+ }
139
+ return $values;
140
+ }
141
+
142
+ private function _getProductDetails(Mage_Sales_Model_Order $order) {
143
+ $config = $this->getconfig();
144
+
145
+ $amountScale = $this->getPaybox()->getCurrencyScale($order);
146
+
147
+ $items = $order->getAllVisibleItems();
148
+ $products = array();
149
+ foreach ($items as $item) {
150
+ $sku = $item->getSku();
151
+ $name = $item->getName();
152
+ $type = $this->_getFianetCategory($item);
153
+ if (empty($type)) {
154
+ $type = $config->getKwixoDefaultCategory();
155
+ }
156
+ if (empty($type)) {
157
+ $type = 1;
158
+ }
159
+ $products[] = array(
160
+ 'reference' => $this->cleanupUpString($sku),
161
+ 'type' => (string)$type,
162
+ 'label' => $this->cleanupUpString($name),
163
+ 'quantity' => (string)(int)$item->getQtyOrdered(),
164
+ 'unitprice' => (string)(int)round(floatval($item->getPrice()) * $amountScale),
165
+ );
166
+ }
167
+
168
+ return $products;
169
+ }
170
+
171
+ public function buildKwixoParams(Mage_Sales_Model_Order $order, array $values) {
172
+ $config = $this->getconfig();
173
+ $shipping = unserialize($config->getKwixoShipping());
174
+ $carrier = $order->getShippingCarrier();
175
+ if (empty($carrier)) {
176
+ $shipping = array(
177
+ 'code' => '',
178
+ 'delay' => 3,
179
+ 'name' => '',
180
+ 'speed' => $config->getKwixoDefaultCarrierSpeed(),
181
+ 'type' => $config->getKwixoDefaultCarrierType(),
182
+ );
183
+ }
184
+ else if (!isset($shipping[$carrier->getCarrierCode()])) {
185
+ $shipping = array(
186
+ 'code' => $carrier->getCarrierCode(),
187
+ 'delay' => 3,
188
+ 'name' => $carrier->getConfigData('title'),
189
+ 'speed' => $config->getKwixoDefaultCarrierSpeed(),
190
+ 'type' => $config->getKwixoDefaultCarrierType(),
191
+ );
192
+ }
193
+ else {
194
+ $shipping = $shipping[$carrier->getCarrierCode()];
195
+ if (empty($shipping['name'])) {
196
+ $shipping['name'] = $carrier->getConfigData('title');
197
+ }
198
+ $shipping['code'] = $carrier->getCarrierCode();
199
+ $shipping['delay'] = (int)$shipping['delay'];
200
+ if (empty($shipping['delay'])) {
201
+ $shipping['delay'] = 3;
202
+ }
203
+ }
204
+
205
+ // Date and delay
206
+ $orderDate = date("Y-m-d H:i:s");
207
+ $deliveryDate = mktime(0, 0, 0, date('m'), date('d') + $shipping['delay']);
208
+ $deliveryDate = date('Y-m-d', $deliveryDate);
209
+
210
+ // Billing information
211
+ $address = $order->getBillingAddress();
212
+ $others = $this->_getAddressParams($address, 'PBX_BILLTO_');
213
+ $values = array_merge($values, $others);
214
+
215
+ if ($shipping['type'] == 4) {
216
+ // Shipping information
217
+ $address = $order->getShippingAddress();
218
+ $others = $this->_getAddressParams($address, 'PBX_SHIPTO_');
219
+ $values = array_merge($values, $others);
220
+ }
221
+
222
+ // Carrier information
223
+ $values['PBX_SHIPTO_SHIPPER_NAME'] = $this->cleanupUpString($shipping['name']);
224
+ $values['PBX_SHIPTO_SHIPPER_ID'] = $this->cleanupUpString($shipping['code']);
225
+ $values['PBX_SHIPTO_SHIPPER_SIGN'] = $this->cleanupUpString($shipping['name']);
226
+ $values['PBX_SHIPTO_DELIVERY_TYPE'] = $shipping['type'];
227
+ $values['PBX_SHIPTO_DELIVERY_SPEED']= $shipping['speed'];
228
+ $values['PBX_DELIVERY_DATE'] = $deliveryDate;
229
+
230
+ // Order information
231
+ $values['PBX_ORDER_DATE'] = $orderDate;
232
+
233
+ // Order history
234
+ $values = array_merge($values, $this->_getOrderHistory($order));
235
+
236
+ // Product details
237
+ $values['PBX_PRODUCT_DETAILS'] = json_encode($this->_getProductDetails($order));
238
+
239
+ return $values;
240
+ }
241
+
242
+ public function cleanUpPhone($text) {
243
+ $text = preg_replace('#[^0-9]+#', '', $text);
244
+ if (preg_match('#^33[1-9][0-9]{8}$#', $text, $matches)) {
245
+ return '+'.$text;
246
+ }
247
+ else if (preg_match('#^0[1-9][0-9]{8}$#', $text, $matches)) {
248
+ return $text;
249
+ }
250
+ throw new \Exception('Invalid phone number "'.$text.'"');
251
+ }
252
+
253
+ public function cleanupUpString($str) {
254
+ // TODO: Code to review
255
+ if (function_exists('mb_strtolower'))
256
+ $str = mb_strtolower($str, 'utf-8');
257
+
258
+ $str = trim($str);
259
+
260
+ // Remove all non-whitelist chars.
261
+ $str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-\pL]/u', '', $str);
262
+ $str = preg_replace('/[\s\'\:\/\[\]-]+/', ' ', $str);
263
+
264
+ // If it was not possible to lowercase the string with mb_strtolower, we do it after the transformations.
265
+ // This way we lose fewer special chars.
266
+ if (!function_exists('mb_strtolower'))
267
+ $str = strtolower($str);
268
+
269
+ return $str;
270
+ }
271
+
272
+ public function getCategories() {
273
+ return $this->_categories;
274
+ }
275
+
276
+ public function getCarrierType() {
277
+ return $this->_carrierType;
278
+ }
279
+
280
+ public function getConfig() {
281
+ return Mage::getSingleton('pbxep/config');
282
+ }
283
+
284
+ public function getPaybox() {
285
+ return Mage::getSingleton('pbxep/paybox');
286
+ }
287
+ }
app/code/community/Paybox/Epayment/Model/Observer.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Observer extends Mage_Core_Model_Observer
14
+ {
15
+ /**
16
+ * ajoute un bloc à la fin du bloc "content"
17
+ *
18
+ * utilise l'événement "controller_action_layout_load_before"
19
+ *
20
+ * @param Varien_Event_Observer $observer
21
+ * @return \Paybox_Epayment_Model_Observer
22
+ */
23
+ public function addBlockAtEndOfMainContent(Varien_Event_Observer $observer)
24
+ {
25
+ $event = $observer->getEvent();
26
+ $data = $event->getData();
27
+ $section = $data['action']->getRequest()->getParam('section', false);
28
+ if ($section == 'pbxep') {
29
+ $layout = $observer->getEvent()->getLayout()->getUpdate();
30
+ $layout->addHandle('pbxep_pres');
31
+ }
32
+ return $this;
33
+ }
34
+
35
+ public function onAfterOrderSave($observer) {
36
+ // Find the order
37
+ $order = $observer->getEvent()->getOrder();
38
+ if (empty($order)) {
39
+ return $this;
40
+ }
41
+
42
+ // This order must be paid by Paybox
43
+ $payment = $order->getPayment();
44
+ if (empty($payment)) {
45
+ return $this;
46
+ }
47
+ $method = $payment->getMethodInstance();
48
+ if (!($method instanceof Paybox_Epayment_Model_Payment_Abstract)) {
49
+ return $this;
50
+ }
51
+
52
+ // Paybox Direct must be activated
53
+ $config = $method->getPayboxConfig();
54
+ if ($config->getSubscription() != Paybox_Epayment_Model_Config::SUBSCRIPTION_FLEXIBLE) {
55
+ return $this;
56
+ }
57
+
58
+ // Action must be "Manual"
59
+ if ($payment->getPbxepAction() != Paybox_Epayment_Model_Payment_Abstract::PBXACTION_MANUAL) {
60
+ return $this;
61
+ }
62
+
63
+ // No capture must be prevously done
64
+ $capture = $payment->getPbxepCapture();
65
+ if (!empty($capture)) {
66
+ return $this;
67
+ }
68
+
69
+ // Order must be "invoiceable"
70
+ if (!$order->canInvoice()) {
71
+ return $this;
72
+ }
73
+
74
+ // Auto capture status must be defined
75
+ $captureStatus = $method->getConfigAutoCaptureStatus();
76
+ if (empty($captureStatus)) {
77
+ return $this;
78
+ }
79
+
80
+ // Order status must match auto capture status
81
+ $orderStatus = $order->getStatus();
82
+ if ($orderStatus != $captureStatus) {
83
+ return $this;
84
+ }
85
+
86
+ $result = false;
87
+ $error = 'Unknown error';
88
+ try {
89
+ $result = $method->makeCapture($order);
90
+ }
91
+ catch (Exception $e) {
92
+ $error = $e->getMessage();
93
+ }
94
+
95
+ if (!$result) {
96
+ $message = 'Automatic Paybox payment capture failed: %s.';
97
+ $message = $method->__($message, $error);
98
+ $status = $order->addStatusHistoryComment($message);
99
+ $status->save();
100
+ }
101
+
102
+ return $this;
103
+ }
104
+ }
app/code/community/Paybox/Epayment/Model/Observer/AdminCreateOrder.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Observer_AdminCreateOrder extends Mage_Core_Model_Observer
14
+ {
15
+ private static $_oldOrder = null;
16
+
17
+ public function onBeforeCreate($observer) {
18
+ $event = $observer->getEvent();
19
+ $session = $event->getSession();
20
+
21
+ if ($session->getOrder()->getId()) {
22
+ Paybox_Epayment_Model_Observer_AdminCreateOrder::$_oldOrder = $session->getOrder();
23
+ }
24
+ }
25
+
26
+ public function onAfterSubmit($observer) {
27
+ $oldOrder = Paybox_Epayment_Model_Observer_AdminCreateOrder::$_oldOrder;
28
+ if (!is_null($oldOrder)) {
29
+ $order = $observer->getEvent()->getOrder();
30
+ if (!is_null($order)) {
31
+ $payment = $order->getPayment();
32
+ $oldPayment = $oldOrder->getPayment();
33
+
34
+ // Payment information
35
+ $payment->setPbxepAction($oldPayment->getPbxepAction());
36
+ $payment->setPbxepAuthorization($oldPayment->getPbxepAuthorization());
37
+ $payment->setPbxepCapture($oldPayment->getPbxepCapture());
38
+ $payment->setPbxepFirstPayment($oldPayment->getPbxepFirstPayment());
39
+ $payment->setPbxepSecondPayment($oldPayment->getPbxepSecondPayment());
40
+ $payment->setPbxepSecondThird($oldPayment->getPbxepSecondPThird());
41
+ $payment->setPbxepDelay($oldPayment->getPbxepDelay());
42
+ $payment->setPbxepSecondPayment($oldPayment->getPbxepSecondPayment());
43
+
44
+ // Transactions
45
+ $oldTxns = Mage::getModel('sales/order_payment_transaction')->getCollection();
46
+ $oldTxns->addFilter('payment_id', $oldPayment->getId());
47
+ foreach ($oldTxns as $oldTxn) {
48
+ $payment->setTransactionId($oldTxn->getTxnId());
49
+ $payment->setParentTransactionId($oldTxn->getParentTxnId());
50
+ $txn = $payment->addTransaction($oldTxn->getTxnType());
51
+ $txn->setParentTxnId($oldTxn->getParentTxnId());
52
+ $txn->setIsClosed($oldTxn->getIsClosed());
53
+ $infos = $oldTxn->getAdditionalInformation();
54
+ foreach ($infos as $key => $value) {
55
+ $txn->setAdditionalInformation($key, $value);
56
+ }
57
+
58
+ $txn->setOrderPaymentObject($payment);
59
+ $txn->setPaymentId($payment->getId());
60
+ $txn->setOrderId($order->getId());
61
+ $txn->save();
62
+ }
63
+
64
+ $payment->save();
65
+ }
66
+ }
67
+ }
68
+ }
app/code/community/Paybox/Epayment/Model/Paybox.php ADDED
@@ -0,0 +1,706 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Paybox {
14
+ private $_currencyDecimals = array(
15
+ '008' => 2,
16
+ '012' => 2,
17
+ '032' => 2,
18
+ '036' => 2,
19
+ '044' => 2,
20
+ '048' => 3,
21
+ '050' => 2,
22
+ '051' => 2,
23
+ '052' => 2,
24
+ '060' => 2,
25
+ '064' => 2,
26
+ '068' => 2,
27
+ '072' => 2,
28
+ '084' => 2,
29
+ '090' => 2,
30
+ '096' => 2,
31
+ '104' => 2,
32
+ '108' => 0,
33
+ '116' => 2,
34
+ '124' => 2,
35
+ '132' => 2,
36
+ '136' => 2,
37
+ '144' => 2,
38
+ '152' => 0,
39
+ '156' => 2,
40
+ '170' => 2,
41
+ '174' => 0,
42
+ '188' => 2,
43
+ '191' => 2,
44
+ '192' => 2,
45
+ '203' => 2,
46
+ '208' => 2,
47
+ '214' => 2,
48
+ '222' => 2,
49
+ '230' => 2,
50
+ '232' => 2,
51
+ '238' => 2,
52
+ '242' => 2,
53
+ '262' => 0,
54
+ '270' => 2,
55
+ '292' => 2,
56
+ '320' => 2,
57
+ '324' => 0,
58
+ '328' => 2,
59
+ '332' => 2,
60
+ '340' => 2,
61
+ '344' => 2,
62
+ '348' => 2,
63
+ '352' => 0,
64
+ '356' => 2,
65
+ '360' => 2,
66
+ '364' => 2,
67
+ '368' => 3,
68
+ '376' => 2,
69
+ '388' => 2,
70
+ '392' => 0,
71
+ '398' => 2,
72
+ '400' => 3,
73
+ '404' => 2,
74
+ '408' => 2,
75
+ '410' => 0,
76
+ '414' => 3,
77
+ '417' => 2,
78
+ '418' => 2,
79
+ '422' => 2,
80
+ '426' => 2,
81
+ '428' => 2,
82
+ '430' => 2,
83
+ '434' => 3,
84
+ '440' => 2,
85
+ '446' => 2,
86
+ '454' => 2,
87
+ '458' => 2,
88
+ '462' => 2,
89
+ '478' => 2,
90
+ '480' => 2,
91
+ '484' => 2,
92
+ '496' => 2,
93
+ '498' => 2,
94
+ '504' => 2,
95
+ '504' => 2,
96
+ '512' => 3,
97
+ '516' => 2,
98
+ '524' => 2,
99
+ '532' => 2,
100
+ '532' => 2,
101
+ '533' => 2,
102
+ '548' => 0,
103
+ '554' => 2,
104
+ '558' => 2,
105
+ '566' => 2,
106
+ '578' => 2,
107
+ '586' => 2,
108
+ '590' => 2,
109
+ '598' => 2,
110
+ '600' => 0,
111
+ '604' => 2,
112
+ '608' => 2,
113
+ '634' => 2,
114
+ '643' => 2,
115
+ '646' => 0,
116
+ '654' => 2,
117
+ '678' => 2,
118
+ '682' => 2,
119
+ '690' => 2,
120
+ '694' => 2,
121
+ '702' => 2,
122
+ '704' => 0,
123
+ '706' => 2,
124
+ '710' => 2,
125
+ '728' => 2,
126
+ '748' => 2,
127
+ '752' => 2,
128
+ '756' => 2,
129
+ '760' => 2,
130
+ '764' => 2,
131
+ '776' => 2,
132
+ '780' => 2,
133
+ '784' => 2,
134
+ '788' => 3,
135
+ '800' => 2,
136
+ '807' => 2,
137
+ '818' => 2,
138
+ '826' => 2,
139
+ '834' => 2,
140
+ '840' => 2,
141
+ '858' => 2,
142
+ '860' => 2,
143
+ '882' => 2,
144
+ '886' => 2,
145
+ '901' => 2,
146
+ '931' => 2,
147
+ '932' => 2,
148
+ '934' => 2,
149
+ '936' => 2,
150
+ '937' => 2,
151
+ '938' => 2,
152
+ '940' => 0,
153
+ '941' => 2,
154
+ '943' => 2,
155
+ '944' => 2,
156
+ '946' => 2,
157
+ '947' => 2,
158
+ '948' => 2,
159
+ '949' => 2,
160
+ '950' => 0,
161
+ '951' => 2,
162
+ '952' => 0,
163
+ '953' => 0,
164
+ '967' => 2,
165
+ '968' => 2,
166
+ '969' => 2,
167
+ '970' => 2,
168
+ '971' => 2,
169
+ '972' => 2,
170
+ '973' => 2,
171
+ '974' => 0,
172
+ '975' => 2,
173
+ '976' => 2,
174
+ '977' => 2,
175
+ '978' => 2,
176
+ '979' => 2,
177
+ '980' => 2,
178
+ '981' => 2,
179
+ '984' => 2,
180
+ '985' => 2,
181
+ '986' => 2,
182
+ '990' => 0,
183
+ '997' => 2,
184
+ '998' => 2,
185
+ );
186
+
187
+ private $_errorCode = array(
188
+ '00000' => 'Successful operation',
189
+ '00001' => 'Payment system not available',
190
+ '00003' => 'Paybor error',
191
+ '00004' => 'Card number or invalid cryptogram',
192
+ '00006' => 'Access denied or invalid identification',
193
+ '00008' => 'Invalid validity date',
194
+ '00009' => 'Subscription creation failed',
195
+ '00010' => 'Unknown currency',
196
+ '00011' => 'Invalid amount',
197
+ '00015' => 'Payment already done',
198
+ '00016' => 'Existing subscriber',
199
+ '00021' => 'Unauthorized card',
200
+ '00029' => 'Invalid card',
201
+ '00030' => 'Timeout',
202
+ '00033' => 'Unauthorized IP country',
203
+ '00040' => 'No 3-D Secure',
204
+ );
205
+
206
+ private $_resultMapping = array(
207
+ 'M' => 'amount',
208
+ 'R' => 'reference',
209
+ 'T' => 'transaction',
210
+ 'A' => 'authorization',
211
+ 'B' => 'subscription',
212
+ 'C' => 'cardType',
213
+ 'D' => 'validity',
214
+ 'E' => 'error',
215
+ 'F' => '3ds',
216
+ 'G' => '3dsWarranty',
217
+ 'H' => 'imprint',
218
+ 'I' => 'ip',
219
+ 'J' => 'lastNumbers',
220
+ 'K' => 'sign',
221
+ 'N' => 'firstNumbers',
222
+ 'O' => '3dsInlistment',
223
+ 'o' => 'celetemType',
224
+ 'P' => 'paymentType',
225
+ 'Q' => 'time',
226
+ 'S' => 'call',
227
+ 'U' => 'subscriptionData',
228
+ 'W' => 'date',
229
+ 'Y' => 'country',
230
+ 'Z' => 'paymentIndex',
231
+ );
232
+
233
+ protected function _buildUrl($url) {
234
+ $url = Mage::getUrl($url, array('_secure' => true));
235
+ $url = Mage::getModel('core/url')->sessionUrlVar($url);
236
+ return $url;
237
+ }
238
+
239
+ protected function _callDirect($type, $amount, Mage_Sales_Model_Order $order, Mage_Sales_Model_Order_Payment_Transaction $transaction) {
240
+ $config = $this->getConfig();
241
+
242
+ $amountScale = $this->getCurrencyScale($order);
243
+ $amount = round($amount * $amountScale);
244
+
245
+ // Transaction information
246
+ $callNumber = $transaction->getAdditionalInformation(Paybox_Epayment_Model_Payment_Abstract::CALL_NUMBER);
247
+ $transNumber = $transaction->getAdditionalInformation(Paybox_Epayment_Model_Payment_Abstract::TRANSACTION_NUMBER);
248
+
249
+
250
+ $now = new DateTime('now', new DateTimeZone('Europe/Paris'));
251
+ $fields = array(
252
+ 'ACTIVITE' => '024',
253
+ 'VERSION' => '00103',
254
+ 'CLE' => $config->getPassword(),
255
+ 'DATEQ' => $now->format('dmYHis'),
256
+ 'DEVISE' => sprintf('%03d', $this->getCurrency($order)),
257
+ 'IDENTIFIANT' => $config->getIdentifier(),
258
+ 'MONTANT' => sprintf('%010d', $amount),
259
+ 'NUMAPPEL' => sprintf('%010d', $transNumber),
260
+ 'NUMQUESTION' => sprintf('%010d', $now->format('U')),
261
+ 'NUMTRANS' => sprintf('%010d', $callNumber),
262
+ 'RANG' => sprintf('%02d', $config->getRank()),
263
+ 'REFERENCE' => $this->tokenizeOrder($order),
264
+ 'SITE' => sprintf('%07d', $config->getSite()),
265
+ 'TYPE' => sprintf('%05d', (int)$type),
266
+ );
267
+
268
+ // Specific Paypal
269
+ $details = $transaction->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
270
+ switch ($details['cardType']) {
271
+ case 'PAYPAL':
272
+ $fields['ACQUEREUR'] = 'PAYPAL';
273
+ break;
274
+ }
275
+
276
+ $urls = $config->getDirectUrls();
277
+ $url = $this->checkUrls($urls);
278
+
279
+ // Init client
280
+ $clt = new Varien_Http_Client($url, array(
281
+ 'maxredirects' => 0,
282
+ 'useragent' => 'Magento Paybox module',
283
+ 'timeout' => 5,
284
+ ));
285
+ $clt->setMethod(Varien_Http_Client::POST);
286
+ $clt->setRawData(http_build_query($fields));
287
+
288
+ // Do call
289
+ $response = $clt->request();
290
+
291
+ if ($response->isSuccessful()) {
292
+ // Process result
293
+ $result = array();
294
+ parse_str($response->getBody(), $result);
295
+ return $result;
296
+ }
297
+
298
+ // Here, there's a problem
299
+ Mage::throwException(Mage::helper('pbxep')->__('Paybox not available. Please try again later.'));
300
+ }
301
+
302
+ public function buildSystemParams(Mage_Sales_Model_Order $order, Paybox_Epayment_Model_Payment_Abstract $payment) {
303
+ $config = $this->getConfig();
304
+
305
+ // URLs
306
+ $baseUrl = 'pbxep/payment';
307
+ $values = array(
308
+ 'PBX_ANNULE' => $this->_buildUrl($baseUrl . '/cancel'),
309
+ 'PBX_EFFECTUE' => $this->_buildUrl($baseUrl . '/success'),
310
+ 'PBX_REFUSE' => $this->_buildUrl($baseUrl . '/failed'),
311
+ 'PBX_REPONDRE_A' => $this->_buildUrl($baseUrl . '/ipn'),
312
+ );
313
+
314
+ // Merchant information
315
+ $values['PBX_SITE'] = $config->getSite();
316
+ $values['PBX_RANG'] = substr(sprintf('%02d', $config->getRank()), -2);
317
+ $values['PBX_IDENTIFIANT'] = $config->getIdentifier();
318
+
319
+ // Card information
320
+ $cards = $payment->getCards();
321
+ if ($payment->getHasCctypes()) {
322
+ $code = $order->getPayment()->getData('cc_type');
323
+ } else {
324
+ $code = array_keys($cards);
325
+ $code = $code[0];
326
+ }
327
+ if (!isset($cards[$code])) {
328
+ $message = 'No card with code %s.';
329
+ Mage::throwException(Mage::helper('pbxep')->__($message), $code);
330
+ }
331
+ $card = $cards[$code];
332
+ $values['PBX_TYPEPAIEMENT'] = $card['payment'];
333
+ $values['PBX_TYPECARTE'] = $card['card'];
334
+ if ($card['payment'] == 'KWIXO') {
335
+ $kwixo = Mage::getSingleton('pbxep/kwixo');
336
+ $values = $kwixo->buildKwixoParams($order, $values);
337
+ }
338
+
339
+ // Order information
340
+ $values['PBX_PORTEUR'] = $this->getBillingEmail($order);
341
+ $values['PBX_DEVISE'] = $this->getCurrency($order);
342
+ $values['PBX_CMD'] = $this->tokenizeOrder($order);
343
+
344
+ // Amount
345
+ $orderAmount = $order->getBaseGrandTotal();
346
+ $amountScale = $this->_currencyDecimals[$values['PBX_DEVISE']];
347
+ $amountScale = pow(10, $amountScale);
348
+ if ($payment->getCode() == 'pbxep_threetime') {
349
+ $amounts = $this->computeThreetimePayments($orderAmount, $amountScale);
350
+ foreach ($amounts as $k => $v) {
351
+ $values[$k] = $v;
352
+ }
353
+ }
354
+ else {
355
+ $values['PBX_TOTAL'] = sprintf('%03d', round($orderAmount * $amountScale));
356
+ switch ($payment->getPayboxAction()) {
357
+ case Paybox_Epayment_Model_Payment_Abstract::PBXACTION_MANUAL:
358
+ $values['PBX_AUTOSEULE'] = 'O';
359
+ break;
360
+
361
+ case Paybox_Epayment_Model_Payment_Abstract::PBXACTION_DEFERRED:
362
+ $delay = (int) $payment->getConfigData('delay');
363
+ if ($delay < 1) {
364
+ $delay = 1;
365
+ } else if ($delay > 7) {
366
+ $delay = 7;
367
+ }
368
+ $values['PBX_DIFF'] = sprintf('%02d', $delay);
369
+ break;
370
+ }
371
+ }
372
+
373
+ // 3-D Secure
374
+ if (!$payment->is3DSEnabled($order)) {
375
+ $values['PBX_3DS'] = 'N';
376
+ }
377
+
378
+ // Paybox => Magento
379
+ $values['PBX_RETOUR'] = 'M:M;R:R;T:T;A:A;B:B;C:C;D:D;E:E;F:F;G:G;H:H;I:I;J:J;N:N;O:O;P:P;Q:Q;S:S;W:W;Y:Y;K:K';
380
+ $values['PBX_RUF1'] = 'POST';
381
+
382
+ // Choose correct language
383
+ $lang = Mage::app()->getLocale();
384
+ if (!empty($lang)) {
385
+ $lang = preg_replace('#_.*$#', '', $lang->getLocaleCode());
386
+ }
387
+ $languages = $config->getLanguages();
388
+ if (!array_key_exists($lang, $languages)) {
389
+ $lang = 'default';
390
+ }
391
+ $lang = $languages[$lang];
392
+ $values['PBX_LANGUE'] = $lang;
393
+
394
+ // Choose page format depending on browser/devise
395
+ if (Mage::helper('pbxep/mobile')->isMobile()) {
396
+ $values['PBX_SOURCE'] = 'XHTML';
397
+ }
398
+
399
+ // Misc.
400
+ $values['PBX_TIME'] = date('c');
401
+ $values['PBX_HASH'] = strtoupper($config->getHmacAlgo());
402
+
403
+ // Card specific workaround
404
+ if (($card['payment'] == 'LEETCHI') && ($card['card'] == 'LEETCHI')) {
405
+ $values['PBX_EFFECTUE'] .= '?R='.urlencode($values['PBX_CMD']);
406
+ $values['PBX_REFUSE'] .= '?R='.urlencode($values['PBX_CMD']);
407
+ }
408
+ else if (($card['payment'] == 'PREPAYEE') && ($card['card'] == 'IDEAL')) {
409
+ $s = '?C=IDEAL&P=PREPAYEE';
410
+ $values['PBX_ANNULE'] .= $s;
411
+ $values['PBX_EFFECTUE'] .= $s;
412
+ $values['PBX_REFUSE'] .= $s;
413
+ $values['PBX_REPONDRE_A'] .= $s;
414
+ }
415
+
416
+ // Sort parameters for simpler debug
417
+ ksort($values);
418
+
419
+ // Sign values
420
+ $sign = $this->signValues($values);
421
+
422
+ // Hash HMAC
423
+ $values['PBX_HMAC'] = $sign;
424
+
425
+ return $values;
426
+ }
427
+
428
+ public function checkUrls(array $urls) {
429
+ // Init client
430
+ $client = new Varien_Http_Client(null, array(
431
+ 'maxredirects' => 0,
432
+ 'useragent' => 'Magento Paybox module',
433
+ 'timeout' => 5,
434
+ ));
435
+ $client->setMethod(Varien_Http_Client::GET);
436
+
437
+ $error = null;
438
+ foreach ($urls as $url) {
439
+ $testUrl = preg_replace('#^([a-zA-Z0-9]+://[^/]+)(/.*)?$#', '\1/load.html', $url);
440
+ $client->setUri($testUrl);
441
+
442
+ try {
443
+ $response = $client->request();
444
+ if ($response->isSuccessful()) {
445
+ return $url;
446
+ }
447
+ }
448
+ catch (Exception $e) {
449
+ $error = $e;
450
+ }
451
+ }
452
+
453
+ // Here, there's a problem
454
+ throw new Exception($this->l('Paybox not available. Please try again later.'));
455
+ }
456
+
457
+ public function computeThreetimePayments($orderAmount, $amountScale) {
458
+ $values = array();
459
+ // Compute each payment amount
460
+ $step = round($orderAmount * $amountScale / 3);
461
+ $firstStep = ($orderAmount * $amountScale) - 2 * $step;
462
+ $values['PBX_TOTAL'] = sprintf('%03d', $firstStep);
463
+ $values['PBX_2MONT1'] = sprintf('%03d', $step);
464
+ $values['PBX_2MONT2'] = sprintf('%03d', $step);
465
+
466
+ // Payment dates
467
+ $now = new DateTime();
468
+ $now->modify('1 month');
469
+ $values['PBX_DATE1'] = $now->format('d/m/Y');
470
+ $now->modify('1 month');
471
+ $values['PBX_DATE2'] = $now->format('d/m/Y');
472
+
473
+
474
+ // Force validity date of card
475
+ $values['PBX_DATEVALMAX'] = $now->format('ym');
476
+ return $values;
477
+ }
478
+
479
+ public function convertParams(array $params) {
480
+ $result = array();
481
+ foreach ($this->_resultMapping as $param => $key) {
482
+ if (isset($params[$param])) {
483
+ $result[$key] = utf8_encode($params[$param]);
484
+ }
485
+ }
486
+
487
+ return $result;
488
+ }
489
+
490
+ /**
491
+ * Create transaction ID from Paybox data
492
+ */
493
+ protected function createTransactionId(array $payboxData) {
494
+ $call = (int) (isset($payboxData['call']) ? $payboxData['call'] : $payboxData['NUMTRANS']);
495
+ $now = new DateTime('now', new DateTimeZone('Europe/Paris'));
496
+ return $call . '/' . $now->format('U');
497
+ }
498
+
499
+ public function directCapture($amount, Mage_Sales_Model_Order $order, Mage_Sales_Model_Order_Payment_Transaction $transaction) {
500
+ return $this->_callDirect(2, $amount, $order, $transaction);
501
+ }
502
+
503
+ public function directRefund($amount, Mage_Sales_Model_Order $order, Mage_Sales_Model_Order_Payment_Transaction $transaction) {
504
+ return $this->_callDirect(14, $amount, $order, $transaction);
505
+ }
506
+
507
+ public function getBillingEmail(Mage_Sales_Model_Order $order) {
508
+ return $order->getCustomerEmail();
509
+ }
510
+
511
+ public function getBillingName(Mage_Sales_Model_Order $order) {
512
+ return trim(preg_replace("/[^-. a-zA-Z0-9]/", " ", Mage::helper('core')->removeAccents($order->getCustomerName())));
513
+ }
514
+
515
+ /**
516
+ * @return Paybox_Epayment_Model_Config Paybox configuration object
517
+ */
518
+ public function getConfig() {
519
+ return Mage::getSingleton('pbxep/config');
520
+ }
521
+
522
+ public function getCurrency(Mage_Sales_Model_Order $order) {
523
+ $currencyMapper = Mage::getSingleton('pbxep/iso4217Currency');
524
+ $currency = $order->getBaseCurrencyCode();
525
+ return $currencyMapper->getIsoCode($currency);
526
+ }
527
+
528
+ public function getCurrencyDecimals($cartOrOrder) {
529
+ return $this->_currencyDecimals[$this->getCurrency($cartOrOrder)];
530
+ }
531
+
532
+ public function getCurrencyScale($cartOrOrder) {
533
+ return pow(10, $this->getCurrencyDecimals($cartOrOrder));
534
+ }
535
+
536
+ public function getParams($logParams = false, $checkSign = true) {
537
+ // Retrieves data
538
+ $data = file_get_contents('php://input');
539
+ if (empty($data)) {
540
+ $data = $_SERVER['QUERY_STRING'];
541
+ }
542
+ if (empty($data)) {
543
+ $helper = Mage::helper('pbxep');
544
+ Mage::throwException($helper->__('An unexpected error in Paybox call has occured: no parameters.'));
545
+ }
546
+
547
+ // Log params if needed
548
+ if ($logParams) {
549
+ $this->logDebug(sprintf('Call params: %s', $data));
550
+ }
551
+
552
+ // Check signature if needed
553
+ if ($checkSign) {
554
+ // Extract signature
555
+ $matches = array();
556
+ if (!preg_match('#^(.*)&K=(.*)$#', $data, $matches)) {
557
+ $helper = Mage::helper('pbxep');
558
+ Mage::throwException($helper->__('An unexpected error in Paybox call has occured: missing signature.'));
559
+ }
560
+
561
+ // Check signature
562
+ $signature = base64_decode(urldecode($matches[2]));
563
+ $pubkey = file_get_contents(dirname(__FILE__).'/../etc/pubkey.pem');
564
+ $res = (boolean)openssl_verify($matches[1], $signature, $pubkey);
565
+
566
+ if (!$res) {
567
+ if (preg_match('#^C=IDEAL&P=PREPAYEE&(.*)&K=(.*)$#', $data, $matches)) {
568
+ $signature = base64_decode(urldecode($matches[2]));
569
+ $res = (boolean) openssl_verify($matches[1], $signature, $pubkey);
570
+ }
571
+
572
+ if (!$res) {
573
+ $helper = Mage::helper('pbxep');
574
+ Mage::throwException($helper->__('An unexpected error in Paybox call has occured: invalid signature.'));
575
+ }
576
+ }
577
+ }
578
+
579
+ $rawParams = array();
580
+ parse_str($data, $rawParams);
581
+
582
+ // Decrypt params
583
+ $params = $this->convertParams($rawParams);
584
+ if (empty($params)) {
585
+ $helper = Mage::helper('pbxep');
586
+ Mage::throwException($helper->__('An unexpected error in Paybox call has occured.'));
587
+ }
588
+
589
+ return $params;
590
+ }
591
+
592
+ public function getSystemUrl() {
593
+ $config = $this->getConfig();
594
+ $urls = $config->getSystemUrls();
595
+ if (empty($urls)) {
596
+ $message = 'Missing URL for Paybox system in configuration';
597
+ $helper = Mage::helper('pbxep');
598
+ Mage::throwException($helper->__($message));
599
+ }
600
+
601
+ $url = $this->checkUrls($urls);
602
+
603
+ return $url;
604
+ }
605
+
606
+ public function getKwixoUrl() {
607
+ $config = $this->getConfig();
608
+ $urls = $config->getKwixoUrls();
609
+ if (empty($urls)) {
610
+ $message = 'Missing URL for Paybox system in configuration';
611
+ $helper = Mage::helper('pbxep');
612
+ Mage::throwException($helper->__($message));
613
+ }
614
+
615
+ $url = $this->checkUrls($urls);
616
+
617
+ return $url;
618
+ }
619
+
620
+ public function logDebug($message) {
621
+ Mage::log($message, Zend_Log::DEBUG, 'paybox-epayment.log');
622
+ }
623
+
624
+ public function logWarning($message) {
625
+ Mage::log($message, Zend_Log::WARN, 'paybox-epayment.log');
626
+ }
627
+
628
+ public function logError($message) {
629
+ Mage::log($message, Zend_Log::ERR, 'paybox-epayment.log');
630
+ }
631
+
632
+ public function logFatal($message) {
633
+ Mage::log($message, Zend_Log::ALERT, 'paybox-epayment.log');
634
+ }
635
+
636
+ public function signValues(array $values) {
637
+ $config = $this->getConfig();
638
+
639
+ // Serialize values
640
+ $query = array();
641
+ foreach ($values as $name => $value) {
642
+ $query[] = $name . '=' . $value;
643
+ }
644
+ $query = implode('&', $query);
645
+
646
+ // Prepare key
647
+ $key = pack('H*', $config->getHmacKey());
648
+
649
+ // Sign values
650
+ $sign = hash_hmac($config->getHmacAlgo(), $query, $key);
651
+ if ($sign === false) {
652
+ $errorMsg = 'Unable to create hmac signature. Maybe a wrong configuration.';
653
+ $helper = Mage::helper('pbxep');
654
+ Mage::throwException($helper->__($errorMsg));
655
+ }
656
+
657
+ return strtoupper($sign);
658
+ }
659
+
660
+ public function toErrorMessage($code) {
661
+ if (isset($this->_errorCode[$code])) {
662
+ return $this->_errorCode[$code];
663
+ }
664
+ return 'Unknown error '.$code;
665
+ }
666
+
667
+ public function tokenizeOrder(Mage_Sales_Model_Order $order) {
668
+ $reference = array();
669
+ $reference[] = $order->getRealOrderId();
670
+ $reference[] = $this->getBillingName($order);
671
+ $reference = implode(' - ', $reference);
672
+ return $reference;
673
+ }
674
+
675
+ /**
676
+ * Load order from the $token
677
+ * @param string $token Token (@see tokenizeOrder)
678
+ * @return Mage_Sales_Model_Order
679
+ */
680
+ public function untokenizeOrder($token) {
681
+ $parts = explode(' - ', $token, 2);
682
+ if (count($parts) < 2) {
683
+ $message = 'Invalid decrypted token "%s"';
684
+ Mage::throwException(Mage::helper('pbxep')->__($message, $token));
685
+ }
686
+
687
+ // Retrieves order
688
+ $order = Mage::getSingleton('sales/order')->loadByIncrementId($parts[0]);
689
+ if (empty($order)) {
690
+ $message = 'Not existing order id from decrypted token "%s"';
691
+ Mage::throwException(Mage::helper('pbxep')->__($message, $token));
692
+ }
693
+ if (is_null($order->getId())) {
694
+ $message = 'Not existing order id from decrypted token "%s"';
695
+ Mage::throwException(Mage::helper('pbxep')->__($message, $token));
696
+ }
697
+
698
+ $goodName = $this->getBillingName($order);
699
+ if (($goodName != utf8_decode($parts[1])) && ($goodName != $parts[1])) {
700
+ $message = 'Consistency error on descrypted token "%s"';
701
+ Mage::throwException(Mage::helper('pbxep')->__($message, $token));
702
+ }
703
+
704
+ return $order;
705
+ }
706
+ }
app/code/community/Paybox/Epayment/Model/Payment/Abstract.php ADDED
@@ -0,0 +1,838 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ abstract class Paybox_Epayment_Model_Payment_Abstract extends Mage_Payment_Model_Method_Abstract {
14
+
15
+ const CALL_NUMBER = 'paybox_call_number';
16
+ const TRANSACTION_NUMBER = 'paybox_transaction_number';
17
+ const PBXACTION_DEFERRED = 'deferred';
18
+ const PBXACTION_IMMEDIATE = 'immediate';
19
+ const PBXACTION_MANUAL = 'manual';
20
+
21
+ /**
22
+ * Availability options
23
+ */
24
+ protected $_isGateway = true;
25
+ protected $_canAuthorize = true;
26
+ protected $_canVoid = false;
27
+ protected $_canUseInternal = false;
28
+ protected $_canUseCheckout = true;
29
+ protected $_canUseForMultishipping = false;
30
+ protected $_canSaveCc = false;
31
+ protected $_canFetchTransactionInfo = false;
32
+ // Fake to avoid calling au authorize ou capture before redirect
33
+ protected $_isInitializeNeeded = true;
34
+ protected $_formBlockType = 'pbxep/checkout_payment';
35
+ protected $_infoBlockType = 'pbxep/info';
36
+
37
+ /**
38
+ * Paybox specific options
39
+ */
40
+ protected $_3dsAllowed = false;
41
+ protected $_3dsMandatory = false;
42
+ protected $_allowDeferredDebit = false;
43
+ protected $_allowImmediatDebit = true;
44
+ protected $_allowManualDebit = false;
45
+ protected $_allowRefund = false;
46
+ protected $_hasCctypes = false;
47
+
48
+ protected $_processingTransaction = null;
49
+
50
+ public function __construct() {
51
+ parent::__construct();
52
+ $config = $this->getPayboxConfig();
53
+ if ($config->getSubscription() == Paybox_Epayment_Model_Config::SUBSCRIPTION_FLEXIBLE) {
54
+ $this->_canRefund = $this->getAllowRefund();
55
+ $this->_canCapturePartial = ($this->getPayboxAction() == Paybox_Epayment_Model_Payment_Abstract::PBXACTION_MANUAL);
56
+ $this->_canRefundInvoicePartial = $this->_canRefund;
57
+ } else {
58
+ $this->_canRefund = false;
59
+ $this->_canCapturePartial = false;
60
+ $this->_canRefundInvoicePartial = false;
61
+ }
62
+ $this->_canCapture = true;
63
+ }
64
+
65
+ /**
66
+ * Message translator helper
67
+ */
68
+ public function __($message) {
69
+ $helper = Mage::helper('pbxep');
70
+ $args = func_get_args();
71
+ return call_user_func_array(array($helper, '__'), $args);
72
+ }
73
+
74
+ /**
75
+ *
76
+ * @param Mage_Sales_Model_Order $order
77
+ * @param string $type
78
+ * @param array $data
79
+ * @param type $closed
80
+ * @param array $infos
81
+ * @return Mage_Sales_Model_Order_Payment_Transaction
82
+ */
83
+ protected function _addPayboxTransaction(Mage_Sales_Model_Order $order, $type, array $data, $closed, array $infos = array()) {
84
+ $withCapture = $this->getConfigPaymentAction() != Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE;
85
+
86
+ $payment = $order->getPayment();
87
+ $txnId = $this->_createTransactionId($data);
88
+ if (empty($txnId)) {
89
+ if (!empty($parent)) {
90
+ $txnId = $parent->getAdditionalInformation(Paybox_Epayment_Model_Payment_Abstract::CALL_NUMBER);
91
+ }
92
+ else {
93
+ throw new Exception('Invalid transaction id '.$txnId);
94
+ }
95
+ }
96
+ $payment->setTransactionId($txnId);
97
+ $payment->setParentTransactionId(null);
98
+ $transaction = $type;
99
+ $transaction = $payment->addTransaction($transaction);
100
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $data);
101
+ foreach ($infos as $key => $value) {
102
+ $transaction->setAdditionalInformation($key, $value);
103
+ }
104
+ if (!empty($parent)) {
105
+ $transaction->setParentTxnId($parent->getTxnId());
106
+ }
107
+
108
+ $transaction->setIsClosed($closed === true);
109
+
110
+ $this->_processingTransaction = $transaction;
111
+
112
+ return $transaction;
113
+ }
114
+
115
+ /**
116
+ *
117
+ * @param Mage_Sales_Model_Order $order
118
+ * @param string $type
119
+ * @param array $data
120
+ * @param type $closed
121
+ * @param array $infos
122
+ * @return Mage_Sales_Model_Order_Payment_Transaction
123
+ */
124
+ protected function _addPayboxDirectTransaction(Mage_Sales_Model_Order $order, $type, array $data, $closed, array $infos, Mage_Sales_Model_Order_Payment_Transaction $parent) {
125
+ $withCapture = $this->getConfigPaymentAction() != Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE;
126
+
127
+ $payment = $order->getPayment();
128
+ $txnId = intval($parent->getAdditionalInformation(Paybox_Epayment_Model_Payment_Abstract::CALL_NUMBER));
129
+ $now = new DateTime('now', new DateTimeZone('Europe/Paris'));
130
+ $txnId .= '/'.$now->format('dmYHis');
131
+ $payment->setTransactionId($txnId);
132
+ $payment->setParentTransactionId($parent->getTxnId());
133
+ $transaction = $type;
134
+ $transaction = $payment->addTransaction($transaction);
135
+ $transaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $data);
136
+ foreach ($infos as $key => $value) {
137
+ $transaction->setAdditionalInformation($key, $value);
138
+ }
139
+
140
+ $transaction->setIsClosed($closed === true);
141
+
142
+ $this->_processingTransaction = $transaction;
143
+
144
+ return $transaction;
145
+ }
146
+
147
+ /**
148
+ * Create transaction ID from Paybox data
149
+ */
150
+ protected function _createTransactionId(array $payboxData) {
151
+ $call = (int) (isset($payboxData['call']) ? $payboxData['call'] : $payboxData['NUMTRANS']);
152
+ return $call;
153
+ }
154
+
155
+ public function getPayboxTransaction(Varien_Object $payment, $type, $openedOnly = false) {
156
+ $order = $payment->getOrder();
157
+
158
+ // Find transaction
159
+ $collection = Mage::getModel('sales/order_payment_transaction')->getCollection()
160
+ ->setOrderFilter($order)
161
+ ->addPaymentIdFilter($payment->getId())
162
+ ->addTxnTypeFilter($type);
163
+
164
+ if ($collection->getSize() == 0) {
165
+ return null;
166
+ }
167
+
168
+ if ($openedOnly) {
169
+ foreach ($collection as $item) {
170
+ if ((!is_null($item)) && (!is_null($item->getTransactionId())) && (!$item->getIsClosed())) {
171
+ return $item;
172
+ }
173
+ }
174
+ return null;
175
+ }
176
+
177
+ $item = $collection->getFirstItem();
178
+ if (is_null($item) || is_null($item->getTransactionId())) {
179
+ return null;
180
+ }
181
+
182
+ // Transaction found
183
+ return $item;
184
+ }
185
+
186
+ /**
187
+ * Assign data to info model instance
188
+ *
189
+ * @param mixed $data
190
+ * @return Mage_Payment_Model_Info
191
+ */
192
+ public function assignData($data) {
193
+ if (!($data instanceof Varien_Object)) {
194
+ $data = new Varien_Object($data);
195
+ }
196
+ $info = $this->getInfoInstance();
197
+ $info->setCcType($data->getCcType());
198
+ return $this;
199
+ }
200
+
201
+ /**
202
+ * Cancel payment abstract method
203
+ *
204
+ * @param Varien_Object $payment
205
+ *
206
+ * @return Mage_Payment_Model_Abstract
207
+ */
208
+ public function cancel(Varien_Object $payment) {
209
+ debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
210
+ $order = $payment->getOrder();
211
+ $order->addStatusHistoryComment('Call to cancel()');
212
+ $order->save();
213
+ die();
214
+ return $this;
215
+ }
216
+
217
+ /**
218
+ * Capture payment
219
+ *
220
+ * @param Varien_Object $payment
221
+ * @param float $amount
222
+ *
223
+ * @return Mage_Payment_Model_Abstract
224
+ */
225
+ public function capture(Varien_Object $payment, $amount) {
226
+ $order = $payment->getOrder();
227
+
228
+ // Currently processing a transaction ? Use it.
229
+ if (!is_null($this->_processingTransaction)) {
230
+ $txn = $this->_processingTransaction;
231
+
232
+ switch ($txn->getTxnType()) {
233
+ // Already captured
234
+ case Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE:
235
+ $trxData = $txn->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
236
+ if (!is_array($trxData)) {
237
+ Mage::throwException('No transaction found.');
238
+ }
239
+
240
+ $payment->setTransactionId($txn->getTransactionId());
241
+ $payment->setSkipTransactionCreation(true);
242
+ return $this;
243
+
244
+ case Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH:
245
+ // Nothing to do
246
+ break;
247
+
248
+ default:
249
+ Mage::throwException('Unsupported transaction type '.$txn->getTxnType());
250
+ }
251
+ }
252
+
253
+ // Otherwise, find the good transaction
254
+ else {
255
+ // Find capture transaction
256
+ $txn = $this->getPayboxTransaction($payment, Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
257
+ if (!is_null($txn)) {
258
+ // Find Paybox data
259
+ $trxData = $txn->getAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS);
260
+ if (!is_array($trxData)) {
261
+ Mage::throwException('No transaction found.');
262
+ }
263
+
264
+ // Already captured
265
+ $payment->setTransactionId($txn->getTransactionId());
266
+ $payment->setSkipTransactionCreation(true);
267
+ return $this;
268
+ }
269
+
270
+ // Find authorization transaction
271
+ $txn = $this->getPayboxTransaction($payment, Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH, true);
272
+ if (is_null($txn)) {
273
+ Mage::throwException('Payment never authorized.');
274
+ }
275
+ }
276
+
277
+ // Call Paybox Direct
278
+ $paybox = $this->getPaybox();
279
+ $data = $paybox->directCapture($amount, $order, $txn);
280
+
281
+ // Message
282
+ if ($data['CODEREPONSE'] == '00000') {
283
+ $message = 'Payment was captured by Paybox.';
284
+ $close = true;
285
+ } else {
286
+ $message = 'Paybox direct error ('.$data['CODEREPONSE'].': '.$data['COMMENTAIRE'].')';
287
+ $close = false;
288
+ }
289
+ $data['status'] = $message;
290
+
291
+ // Transaction
292
+ $type = Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE;
293
+ $captureTxn = $this->_addPayboxDirectTransaction($order, $type, $data, $close, array(
294
+ Paybox_Epayment_Model_Payment_Abstract::CALL_NUMBER => $data['NUMTRANS'],
295
+ Paybox_Epayment_Model_Payment_Abstract::TRANSACTION_NUMBER => $data['NUMAPPEL'],
296
+ ), $txn);
297
+ $captureTxn->save();
298
+ if ($close) {
299
+ $captureTxn->close();
300
+ $payment->setPbxepCapture(serialize($data));
301
+ }
302
+
303
+ // Avoid automatic transaction creation
304
+ $payment->setSkipTransactionCreation(true);
305
+ $payment->save();
306
+
307
+ // If Paybox returned an error, throw an exception
308
+ if ($data['CODEREPONSE'] != '00000') {
309
+ Mage::throwException($message);
310
+ }
311
+
312
+ // Change order state and create history entry
313
+ $status = $this->getConfigPaidStatus();
314
+ $state = Mage_Sales_Model_Order::STATE_PROCESSING;
315
+ $order->setState($state, $status, $this->__($message));
316
+ $order->setIsInProgress(true);
317
+ $order->save();
318
+
319
+ return $this;
320
+ }
321
+
322
+ /**
323
+ * Checks parameter send by Paybox to IPN.
324
+ * @param Mage_Sales_Model_Order $order Order
325
+ * @param array $params Parsed call parameters
326
+ */
327
+ public function checkIpnParams(Mage_Sales_Model_Order $order, array $params) {
328
+ // Check required parameters
329
+ $requiredParams = array('amount', 'transaction', 'error', 'reference', 'sign', 'date', 'time');
330
+ foreach ($requiredParams as $requiredParam) {
331
+ if (!isset($params[$requiredParam])) {
332
+ $message = $this->__('Missing ' . $requiredParam . ' parameter in Paybox call');
333
+ $this->logFatal(sprintf('Order %s: (IPN) %s', $order->getIncrementId(), $message));
334
+ Mage::throwException($message);
335
+ }
336
+ }
337
+ }
338
+
339
+ public function getAllowDeferredDebit() {
340
+ return $this->_allowDeferredDebit;
341
+ }
342
+
343
+ public function getAllowImmediatDebit() {
344
+ return $this->_allowImmediatDebit;
345
+ }
346
+
347
+ public function getAllowManualDebit() {
348
+ return $this->_allowManualDebit;
349
+ }
350
+
351
+ public function getAllowRefund() {
352
+ return $this->_allowRefund;
353
+ }
354
+
355
+ public function getCards() {
356
+ return $this->getConfigData('cards');
357
+ }
358
+
359
+ public function getConfigPaymentAction() {
360
+ if ($this->getPayboxAction() == Paybox_Epayment_Model_Payment_Abstract::PBXACTION_MANUAL) {
361
+ return Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE;
362
+ }
363
+ return Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE;
364
+ }
365
+
366
+ public function getConfigAuthorizedStatus() {
367
+ return $this->getConfigData('status/authorized');
368
+ }
369
+
370
+ public function getConfigPaidStatus() {
371
+ return $this->getConfigData('status/paid');
372
+ }
373
+
374
+ public function getConfigAutoCaptureStatus() {
375
+ return $this->getConfigData('status/auto_capture');
376
+ }
377
+
378
+ public function getHasCctypes() {
379
+ return $this->_hasCctypes;
380
+ }
381
+
382
+ public function getOrderPlaceRedirectUrl() {
383
+ return Mage::getUrl('pbxep/payment/redirect', array('_secure' => true));
384
+ }
385
+
386
+ public function getPayboxAction() {
387
+ $config = $this->getPayboxConfig();
388
+ $action = $this->getConfigData('action');
389
+ switch ($action) {
390
+ case Paybox_Epayment_Model_Payment_Abstract::PBXACTION_DEFERRED:
391
+ if (!$this->getAllowDeferredDebit()) {
392
+ return Paybox_Epayment_Model_Payment_Abstract::PBXACTION_IMMEDIATE;
393
+ }
394
+ break;
395
+ case Paybox_Epayment_Model_Payment_Abstract::PBXACTION_IMMEDIATE:
396
+ if (!$this->getAllowImmediatDebit()) {
397
+ // Not possible
398
+ Mage::throwException('Unexpected condition in getPayboxAction');
399
+ }
400
+ break;
401
+ case Paybox_Epayment_Model_Payment_Abstract::PBXACTION_MANUAL:
402
+ if (($config->getSubscription() != Paybox_Epayment_Model_Config::SUBSCRIPTION_FLEXIBLE) ||
403
+ !$this->getAllowManualDebit()) {
404
+ return Paybox_Epayment_Model_Payment_Abstract::PBXACTION_IMMEDIATE;
405
+ }
406
+ break;
407
+ default:
408
+ $action = Paybox_Epayment_Model_Payment_Abstract::PBXACTION_IMMEDIATE;
409
+ }
410
+ return $action;
411
+ }
412
+
413
+ /**
414
+ * @return Paybox_Epayment_Model_Config Paybox configuration object
415
+ */
416
+ public function getPayboxConfig() {
417
+ return Mage::getSingleton('pbxep/config');
418
+ }
419
+
420
+ /**
421
+ * @return Paybox_Epayment_Model_Config Paybox configuration object
422
+ */
423
+ public function getPaybox() {
424
+ return Mage::getSingleton('pbxep/paybox');
425
+ }
426
+
427
+ /**
428
+ * Check whether there are CC types set in configuration
429
+ *
430
+ * @param Mage_Sales_Model_Quote|null $quote
431
+ * @return bool
432
+ */
433
+ public function isAvailable($quote = null) {
434
+ if (parent::isAvailable($quote)) {
435
+ if ($this->getHasCctypes()) {
436
+ $cctypes = $this->getConfigData('cctypes', ($quote ? $quote->getStoreId() : null));
437
+ $cctypes = preg_replace('/NONE,?/', '',$cctypes);
438
+ return !empty($cctypes);
439
+ }
440
+ return true;
441
+ }
442
+ return false;
443
+ }
444
+
445
+ /**
446
+ * Check whether 3DS is enabled
447
+ *
448
+ * @param Mage_Sales_Model_Order $order
449
+ * @return boolean
450
+ */
451
+ public function is3DSEnabled(Mage_Sales_Model_Order $order) {
452
+ // If 3DS is mandatory, answer is simple
453
+ if ($this->_3dsMandatory) {
454
+ return true;
455
+ }
456
+
457
+ // If 3DS is not allowed, answer is simple
458
+ if (!$this->_3dsAllowed) {
459
+ return false;
460
+ }
461
+
462
+ // Otherwise lets see the configuration
463
+ switch ($this->getConfigData('tds_active')) {
464
+ case 'always':
465
+ return true;
466
+ case 'condition':
467
+ // Minimum order total
468
+ $value = $this->getConfigData('tds_min_order_total');
469
+ if (!empty($value)) {
470
+ $total = round($order->getGrandTotal(), 2);
471
+ if ($total >= round($value, 2)) {
472
+ return true;
473
+ }
474
+ }
475
+ return false;
476
+ }
477
+
478
+ // Always off
479
+ return false;
480
+ }
481
+
482
+ public function logDebug($message) {
483
+ Mage::log($message, Zend_Log::DEBUG, 'paybox-epayment.log');
484
+ }
485
+
486
+ public function logWarning($message) {
487
+ Mage::log($message, Zend_Log::WARN, 'paybox-epayment.log');
488
+ }
489
+
490
+ public function logError($message) {
491
+ Mage::log($message, Zend_Log::ERR, 'paybox-epayment.log');
492
+ }
493
+
494
+ public function logFatal($message) {
495
+ Mage::log($message, Zend_Log::ALERT, 'paybox-epayment.log');
496
+ }
497
+
498
+ public function makeCapture(Mage_Sales_Model_Order $order) {
499
+ $payment = $order->getPayment();
500
+ $txn = $this->getPayboxTransaction($payment, Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH, true);
501
+
502
+ if (empty($txn)) {
503
+ return false;
504
+ }
505
+ if ($txn->getIsClosed()) {
506
+ return false;
507
+ }
508
+ if (!$order->canInvoice()) {
509
+ return false;
510
+ }
511
+
512
+ $invoice = $order->prepareInvoice();
513
+ $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
514
+ $invoice->setTransactionId($txn->getTransactionId());
515
+ $invoice->register();
516
+ $invoice->pay();
517
+
518
+ $transactionSave = Mage::getModel('core/resource_transaction')
519
+ ->addObject($invoice)
520
+ ->addObject($order);
521
+ $transactionSave->save();
522
+
523
+ return true;
524
+ }
525
+
526
+ /**
527
+ * Refund specified amount for payment
528
+ *
529
+ * @param Varien_Object $payment
530
+ * @param float $amount
531
+ *
532
+ * @return Mage_Payment_Model_Abstract
533
+ */
534
+ public function refund(Varien_Object $payment, $amount) {
535
+ $order = $payment->getOrder();
536
+
537
+ // Find capture transaction
538
+ $collection = Mage::getModel('sales/order_payment_transaction')->getCollection()
539
+ ->setOrderFilter($order)
540
+ ->addPaymentIdFilter($payment->getId())
541
+ ->addTxnTypeFilter(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
542
+ if ($collection->getSize() == 0) {
543
+ // If none, error
544
+ Mage::throwException('No payment or capture transaction. Unable to refund.');
545
+ }
546
+
547
+ // Transaction found
548
+ $txn = $collection->getFirstItem();
549
+
550
+ // Transaction not captured
551
+ if (!$txn->getIsClosed()) {
552
+ Mage::throwException('Payment was not fully captured. Unable to refund.');
553
+ }
554
+
555
+ // Call Paybox Direct
556
+ $connector = $this->getPaybox();
557
+ $data = $connector->directRefund((float) $amount, $order, $txn);
558
+
559
+ // Message
560
+ if ($data['CODEREPONSE'] == '00000') {
561
+ $message = 'Payment was refund by Paybox.';
562
+ } else {
563
+ $message = 'Paybox direct error ('.$data['CODEREPONSE'].': '.$data['COMMENTAIRE'].')';
564
+ }
565
+ $data['status'] = $message;
566
+
567
+ // Transaction
568
+ $transaction = $this->_addPayboxDirectTransaction($order, Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND,
569
+ $data, true, array(), $txn);
570
+ $transaction->save();
571
+
572
+ // Avoid automatic transaction creation
573
+ $payment->setSkipTransactionCreation(true);
574
+
575
+ // If Paybox returned an error, throw an exception
576
+ if ($data['CODEREPONSE'] != '00000') {
577
+ Mage::throwException($message);
578
+ }
579
+
580
+ // Add message to history
581
+ $order->addStatusHistoryComment($this->__($message));
582
+
583
+ return $this;
584
+ }
585
+
586
+ /**
587
+ * Validate payment method information object
588
+ *
589
+ * @return Mage_Payment_Model_Abstract
590
+ */
591
+ public function validate() {
592
+ parent::validate();
593
+
594
+ if ($this->getHasCctypes()) {
595
+ $info = $this->getInfoInstance();
596
+
597
+ $cctype = $info->getCcType();
598
+ if (empty($cctype)) {
599
+ $errorMsg = 'Please select a valid credit card type';
600
+ Mage::throwException($this->__($errorMsg));
601
+ }
602
+
603
+ $selected = explode(',', $this->getConfigData('cctypes'));
604
+ if (!in_array($cctype, $selected)) {
605
+ $errorMsg = 'Please select a valid credit card type';
606
+ Mage::throwException($this->__($errorMsg));
607
+ }
608
+ }
609
+
610
+ return $this;
611
+ }
612
+
613
+ /**
614
+ * When the visitor come back from Paybox using the cancel URL
615
+ */
616
+ public function onPaymentCanceled(Mage_Sales_Model_Order $order) {
617
+ // Cancel order
618
+ $order->cancel();
619
+
620
+ // Add a message
621
+ $message = 'Payment was canceled by user on Paybox payment page.';
622
+ $message = $this->__($message);
623
+ $status = $order->addStatusHistoryComment($message);
624
+
625
+ $this->logDebug(sprintf('Order %s: %s', $order->getIncrementId(), $message));
626
+
627
+ $order->save();
628
+ }
629
+
630
+ /**
631
+ * When the visitor come back from Paybox using the failure URL
632
+ */
633
+ public function onPaymentFailed(Mage_Sales_Model_Order $order) {
634
+ // Message
635
+ $message = 'Customer is back from Paybox payment page.';
636
+ $message = $this->__($message);
637
+ $status = $order->addStatusHistoryComment($message);
638
+
639
+ $status->save();
640
+ }
641
+
642
+ /**
643
+ * When the visitor is redirected to Paybox
644
+ */
645
+ public function onPaymentRedirect(Mage_Sales_Model_Order $order) {
646
+ $info = $this->getInfoInstance();
647
+ $info->setPbxepPaymentAction($this->getConfigPaymentAction());
648
+ $info->setPbxepPayboxAction($this->getPayboxAction());
649
+ $info->save();
650
+ // Keep track of this redirection in order history
651
+ $message = 'Redirecting customer to Paybox payment page.';
652
+ $status = $order->addStatusHistoryComment($this->__($message));
653
+
654
+ $this->logDebug(sprintf('Order %s: %s', $order->getIncrementId(), $message));
655
+
656
+ $status->save();
657
+ }
658
+
659
+ /**
660
+ * When the visitor come back from Paybox using the success URL
661
+ */
662
+ public function onPaymentSuccess(Mage_Sales_Model_Order $order, array $data) {
663
+ // Message
664
+ $message = 'Customer is back from Paybox payment page.';
665
+ $message = $this->__($message);
666
+ $status = $order->addStatusHistoryComment($message);
667
+
668
+ $status->save();
669
+ }
670
+
671
+ /**
672
+ * When the IPN is called
673
+ */
674
+ public function onIPNCalled(Mage_Sales_Model_Order $order, array $params) {
675
+ try {
676
+ // Check parameters
677
+ $this->checkIpnParams($order, $params);
678
+
679
+ // Look for transaction
680
+ $txnId = $this->_createTransactionId($params);
681
+ $txn = Mage::getModel('sales/order_payment_transaction');
682
+ $txn->setOrderPaymentObject($order->getPayment());
683
+ $txn->loadByTxnId($txnId);
684
+ if (!is_null($txn->getTxnId())) {
685
+ return false;
686
+ }
687
+
688
+ // Payment success
689
+ if (in_array($params['error'], array('00000', '00200', '00201', '00300', '00301', '00302', '00303'))) {
690
+ $this->onIPNSuccess($order, $params);
691
+ }
692
+
693
+ // Payment refused
694
+ else {
695
+ $this->onIPNFailed($order, $params);
696
+ }
697
+
698
+ return true;
699
+ } catch (Exception $e) {
700
+ $this->onIPNError($order, $params, $e);
701
+ throw $e;
702
+ }
703
+ }
704
+
705
+ /**
706
+ * When an error has occured in the IPN handler
707
+ */
708
+ public function onIPNError(Mage_Sales_Model_Order $order, array $data, Exception $e = null) {
709
+ $withCapture = $this->getConfigPaymentAction() != Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE;
710
+
711
+ // Message
712
+ $message = 'An unexpected error have occured while processing Paybox payment (%s).';
713
+ $error = is_null($e) ? 'unknown error' : $e->getMessage();
714
+ $error = $this->__($error);
715
+ $message = $this->__($message, $error);
716
+ $data['status'] = $message;
717
+ $status = $order->addStatusHistoryComment($message);
718
+ $status->save();
719
+ $this->logFatal(sprintf('Order %s: (IPN) %s', $order->getIncrementId(), $message));
720
+
721
+ // Transaction
722
+ if (is_null($this->_processingTransaction)) {
723
+ $type = $withCapture ?
724
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE :
725
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH;
726
+ $this->_addPayboxTransaction($order, $type, $data, true);
727
+ }
728
+ else {
729
+ $this->_processingTransaction->setAdditionalInformation(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, $data);
730
+ }
731
+
732
+ $order->save();
733
+ }
734
+
735
+ /**
736
+ * When the IPN is called to refuse a payment
737
+ */
738
+ public function onIPNFailed(Mage_Sales_Model_Order $order, array $data) {
739
+ $withCapture = $this->getConfigPaymentAction() != Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE;
740
+
741
+ // Message
742
+ $message = 'Payment was refused by Paybox (%s).';
743
+ $error = $this->getPaybox()->toErrorMessage($data['error']);
744
+ $message = $this->__($message, $error);
745
+ $data['status'] = $message;
746
+ $order->addStatusHistoryComment($message);
747
+ $this->logDebug(sprintf('Order %s: (IPN) %s', $order->getIncrementId(), $message));
748
+
749
+ // Transaction
750
+ $type = $withCapture ?
751
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE :
752
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH;
753
+ $this->_addPayboxTransaction($order, $type, $data, true);
754
+
755
+ $order->save();
756
+ }
757
+
758
+ /**
759
+ * When the IPN is called to validate a payment
760
+ */
761
+ public function onIPNSuccess(Mage_Sales_Model_Order $order, array $data) {
762
+ $this->logDebug(sprintf('Order %s: Standard IPN', $order->getIncrementId()));
763
+
764
+ $payment = $order->getPayment();
765
+
766
+ $withCapture = $this->getConfigPaymentAction() != Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE;
767
+
768
+ // Message
769
+ if ($withCapture) {
770
+ $message = 'Payment was authorized and captured by Paybox.';
771
+ $status = $this->getConfigPaidStatus();
772
+ $state = Mage_Sales_Model_Order::STATE_PROCESSING;
773
+ $allowedStates = array(
774
+ Mage_Sales_Model_Order::STATE_NEW,
775
+ Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,
776
+ Mage_Sales_Model_Order::STATE_PROCESSING,
777
+ );
778
+ } else {
779
+ $message = 'Payment was authorized by Paybox.';
780
+ $status = $this->getConfigAuthorizedStatus();
781
+ $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
782
+ $allowedStates = array(
783
+ Mage_Sales_Model_Order::STATE_NEW,
784
+ Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,
785
+ );
786
+ }
787
+ $data['status'] = $message;
788
+
789
+ // Status and message
790
+ $current = $order->getState();
791
+ $message = $this->__($message);
792
+ if (in_array($current, $allowedStates)) {
793
+ $order->setState($state, $status, $message);
794
+ } else {
795
+ $order->addStatusHistoryComment($message);
796
+ }
797
+
798
+ // Create transaction
799
+ $type = $withCapture ?
800
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE :
801
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH;
802
+ $txn = $this->_addPayboxTransaction($order, $type, $data, $withCapture, array(
803
+ Paybox_Epayment_Model_Payment_Abstract::CALL_NUMBER => $data['call'],
804
+ Paybox_Epayment_Model_Payment_Abstract::TRANSACTION_NUMBER => $data['transaction'],
805
+ ));
806
+
807
+ // Associate data to payment
808
+ $payment->setPbxepAction($this->getPayboxAction());
809
+ $payment->setPbxepDelay((int) $this->getConfigData('delay'));
810
+ $payment->setPbxepAuthorization(serialize($data));
811
+ if ($withCapture) {
812
+ $payment->setPbxepCapture(serialize($data));
813
+ $this->_createInvoice($order, $txn);
814
+ }
815
+ $order->save();
816
+ $this->logDebug(sprintf('Order %s: %s', $order->getIncrementId(), $message));
817
+
818
+ // Client notification if needed
819
+ $order->sendNewOrderEmail();
820
+ }
821
+
822
+ /**
823
+ *
824
+ * @param Mage_Sales_Model_Order $order
825
+ * @param Mage_Sales_Model_Order_Payment_Transaction $txn
826
+ * @return Mage_Sales_Model_Order_Invoice
827
+ */
828
+ protected function _createInvoice($order, $txn) {
829
+ $invoice = $order->prepareInvoice();
830
+ $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
831
+ $invoice->setTransactionId($txn->getTransactionId());
832
+ $invoice->register();
833
+ $invoice->pay();
834
+ $invoice->sendEmail();
835
+ $invoice->save();
836
+ return $invoice;
837
+ }
838
+ }
app/code/community/Paybox/Epayment/Model/Payment/Bcmc.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Payment_Bcmc extends Paybox_Epayment_Model_Payment_Abstract {
14
+ protected $_code = 'pbxep_bcmc';
15
+ protected $_3dsMandatory = true;
16
+ }
app/code/community/Paybox/Epayment/Model/Payment/Cb.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Payment_Cb extends Paybox_Epayment_Model_Payment_Abstract {
14
+ protected $_code = 'pbxep_cb';
15
+ protected $_3dsAllowed = true;
16
+ protected $_hasCctypes = true;
17
+ protected $_allowManualDebit = true;
18
+ protected $_allowDeferredDebit = true;
19
+ protected $_allowRefund = true;
20
+ }
app/code/community/Paybox/Epayment/Model/Payment/Financial.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Payment_Financial extends Paybox_Epayment_Model_Payment_Abstract {
14
+ protected $_code = 'pbxep_financial';
15
+ protected $_hasCctypes = true;
16
+ }
app/code/community/Paybox/Epayment/Model/Payment/Kwixo/Credit.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class Paybox_Epayment_Model_Payment_Kwixo_Standard extends Paybox_Epayment_Model_Payment_Abstract {
4
+ protected $_code = 'pbxep_kwixo_credit';
5
+ }
app/code/community/Paybox/Epayment/Model/Payment/Kwixo/Onexrnp.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class Paybox_Epayment_Model_Payment_Kwixo_Onexrnp extends Paybox_Epayment_Model_Payment_Abstract {
4
+ protected $_code = 'pbxep_kwixo_onexrnp';
5
+ }
app/code/community/Paybox/Epayment/Model/Payment/Kwixo/Standard.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class Paybox_Epayment_Model_Payment_Kwixo_Standard extends Paybox_Epayment_Model_Payment_Abstract {
4
+ protected $_code = 'pbxep_kwixo_standard';
5
+ }
app/code/community/Paybox/Epayment/Model/Payment/Maestro.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Payment_Maestro extends Paybox_Epayment_Model_Payment_Abstract {
14
+ protected $_code = 'pbxep_maestro';
15
+ protected $_3dsMandatory = true;
16
+ protected $_allowManualDebit = true;
17
+ protected $_allowDeferredDebit = true;
18
+ protected $_allowRefund = true;
19
+ }
app/code/community/Paybox/Epayment/Model/Payment/Paybuttons.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Payment_Paybuttons extends Paybox_Epayment_Model_Payment_Abstract {
14
+ protected $_code = 'pbxep_paybuttons';
15
+ protected $_hasCctypes = true;
16
+ }
app/code/community/Paybox/Epayment/Model/Payment/Paypal.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Payment_Paypal extends Paybox_Epayment_Model_Payment_Abstract {
14
+ protected $_code = 'pbxep_paypal';
15
+ protected $_allowManualDebit = true;
16
+ }
app/code/community/Paybox/Epayment/Model/Payment/Prepaid.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Payment_Prepaid extends Paybox_Epayment_Model_Payment_Abstract {
14
+ protected $_code = 'pbxep_prepaid';
15
+ protected $_hasCctypes = true;
16
+ }
app/code/community/Paybox/Epayment/Model/Payment/Private.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Payment_Private extends Paybox_Epayment_Model_Payment_Abstract {
14
+ protected $_code = 'pbxep_private';
15
+ protected $_hasCctypes = true;
16
+ protected $_allowManualDebit = true;
17
+ protected $_allowDeferredDebit = true;
18
+ protected $_allowRefund = true;
19
+ }
app/code/community/Paybox/Epayment/Model/Payment/Threetime.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Payment_Threetime extends Paybox_Epayment_Model_Payment_Abstract {
14
+
15
+ protected $_code = 'pbxep_threetime';
16
+ protected $_hasCctypes = true;
17
+ protected $_allowRefund = true;
18
+ protected $_3dsAllowed = true;
19
+
20
+ public function checkIpnParams(Mage_Sales_Model_Order $order, array $params) {
21
+ if (!isset($params['amount'])) {
22
+ $message = $this->__('Missing amount parameter');
23
+ $this->logFatal(sprintf('Order %s: (IPN) %s', $order->getIncrementId(), $message));
24
+ Mage::throwException($message);
25
+ }
26
+ if (!isset($params['transaction'])) {
27
+ $message = $this->__('Missing transaction parameter');
28
+ $this->logFatal(sprintf('Order %s: (IPN) %s', $order->getIncrementId(), $message));
29
+ Mage::throwException($message);
30
+ }
31
+ }
32
+
33
+ public function onIPNSuccess(Mage_Sales_Model_Order $order, array $data) {
34
+ $this->logDebug(sprintf('Order %s: Threetime IPN', $order->getIncrementId()));
35
+
36
+ $payment = $order->getPayment();
37
+
38
+ // Message
39
+
40
+ // Create transaction
41
+ $type = Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE;
42
+ $txn = $this->_addPayboxTransaction($order, $type, $data, true, array(
43
+ self::CALL_NUMBER => $data['call'],
44
+ self::TRANSACTION_NUMBER => $data['transaction'],
45
+ ));
46
+ if (is_null($payment->getPbxepFirstPayment())) {
47
+ $this->logDebug(sprintf('Order %s: First payment', $order->getIncrementId()));
48
+
49
+ // Message
50
+ $message = 'Payment was authorized and captured by Paybox.';
51
+
52
+ // Status
53
+ $status = $this->getConfigPaidStatus();
54
+ $state = Mage_Sales_Model_Order::STATE_PROCESSING;
55
+ $allowedStates = array(
56
+ Mage_Sales_Model_Order::STATE_NEW,
57
+ Mage_Sales_Model_Order::STATE_PENDING_PAYMENT,
58
+ Mage_Sales_Model_Order::STATE_PROCESSING,
59
+ );
60
+ $current = $order->getState();
61
+ $message = $this->__($message);
62
+ if (in_array($current, $allowedStates)) {
63
+ $order->setState($state, $status, $message);
64
+ } else {
65
+ $order->addStatusHistoryComment($message);
66
+ }
67
+
68
+ // Additional informations
69
+ $payment->setPbxepFirstPayment(serialize($data));
70
+ $payment->setPbxepAuthorization(serialize($data));
71
+
72
+ $this->logDebug(sprintf('Order %s: %s', $order->getIncrementId(), $message));
73
+
74
+ // Create invoice is needed
75
+ $invoice = $this->_createInvoice($order, $txn);
76
+ } else if (is_null($payment->getPbxepSecondPayment())) {
77
+ // Message
78
+ $message = 'Second payment was captured by Paybox.';
79
+ $order->addStatusHistoryComment($message);
80
+
81
+ // Additional informations
82
+ $payment->setPbxepSecondPayment(serialize($data));
83
+ $this->logDebug(sprintf('Order %s: %s', $order->getIncrementId(), $message));
84
+ } else if (is_null($payment->getPbxepThirdPayment())) {
85
+ // Message
86
+ $message = 'Third payment was captured by Paybox.';
87
+ $order->addStatusHistoryComment($message);
88
+
89
+ // Additional informations
90
+ $payment->setPbxepThirdPayment(serialize($data));
91
+ $this->logDebug(sprintf('Order %s: %s', $order->getIncrementId(), $message));
92
+ } else {
93
+ $this->logDebug(sprintf('Order %s: Invalid three-time payment status', $order->getIncrementId()));
94
+ Mage::throwException('Invalid three-time payment status');
95
+ }
96
+ $data['status'] = $message;
97
+
98
+ // Associate data to payment
99
+ $payment->setPbxepAction('three-time');
100
+
101
+ $transactionSave = Mage::getModel('core/resource_transaction');
102
+ $transactionSave->addObject($payment);
103
+ if (isset($invoice)) {
104
+ $transactionSave->addObject($invoice);
105
+ }
106
+ $transactionSave->save();
107
+
108
+ // Client notification if needed
109
+ $order->sendNewOrderEmail();
110
+ }
111
+ }
app/code/community/Paybox/Epayment/Model/Resource/Setup.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Model_Resource_Setup extends Mage_Sales_Model_Resource_Setup {
14
+
15
+ }
app/code/community/Paybox/Epayment/controllers/Adminhtml/PbxepController.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_Adminhtml_PbxepController extends Mage_Adminhtml_Controller_Action {
14
+ /**
15
+ * Fired when an administrator click the total payment on paybox box
16
+ * @return type
17
+ */
18
+ public function invoiceAction() {
19
+ $orderId = $this->getRequest()->getParam('order_id');
20
+ $order = Mage::getModel('sales/order')->load($orderId);
21
+ $data = $this->getRequest()->getParams();
22
+
23
+ $payment = $order->getPayment();
24
+ $method = $payment->getMethodInstance();
25
+
26
+ $result = $method->makeCapture($order);
27
+
28
+ if (!$result) {
29
+ Mage::getSingleton('adminhtml/session')->setCommentText($this->__('Unable to create an invoice.'));
30
+ }
31
+
32
+ $this->_redirect('/sales_order/view', array('order_id' => $orderId));
33
+ }
34
+ }
app/code/community/Paybox/Epayment/controllers/PaymentController.php ADDED
@@ -0,0 +1,283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ class Paybox_Epayment_PaymentController extends Mage_Core_Controller_Front_Action {
14
+
15
+ private function _404() {
16
+ $this->_forward('defaultNoRoute');
17
+ }
18
+
19
+ private function _loadQuoteFromOrder(Mage_Sales_Model_Order $order) {
20
+ $quoteId = $order->getQuoteId();
21
+
22
+ // Retrieves quote
23
+ $quote = Mage::getSingleton('sales/quote')->load($quoteId);
24
+ if (empty($quote) || is_null($quote->getId())) {
25
+ $message = 'Not existing quote id associated with the order %d';
26
+ Mage::throwException(Mage::helper('pbxep')->__($message, $order->getId()));
27
+ }
28
+
29
+ return $quote;
30
+ }
31
+
32
+ private function _getOrderFromParams(array $params) {
33
+ // Retrieves order
34
+ $paybox = $this->getPaybox();
35
+ $order = $paybox->untokenizeOrder($params['reference']);
36
+ if (is_null($order) || is_null($order->getId())) {
37
+ return null;
38
+ }
39
+ return $order;
40
+ }
41
+
42
+ public function cancelAction() {
43
+ try {
44
+ $session = $this->getSession();
45
+ $paybox = $this->getPaybox();
46
+
47
+ // Retrieves params
48
+ $params = $paybox->getParams();
49
+ if ($params === false) {
50
+ return $this->_404();
51
+ }
52
+
53
+ // Load order
54
+ $order = $this->_getOrderFromParams($params);
55
+ if (is_null($order) || is_null($order->getId())) {
56
+ return $this->_404();
57
+ }
58
+
59
+ // Payment method
60
+ $order->getPayment()->getMethodInstance()->onPaymentCanceled($order);
61
+
62
+ // Set quote to active
63
+ $this->_loadQuoteFromOrder($order)->setIsActive(true)->save();
64
+
65
+ // Cleanup
66
+ $session->unsCurrentPbxepOrderId();
67
+
68
+ $message = sprintf('Order %d: Payment was canceled by user on Paybox payment page.', $order->getIncrementId());
69
+ $this->logDebug($message);
70
+
71
+ $message = $this->__('Payment canceled by user');
72
+ $session->addError($message);
73
+ }
74
+ catch (Exception $e) {
75
+ $this->logDebug(sprintf('cancelAction: %s', $e->getMessage()));
76
+ }
77
+
78
+ // Redirect to cart
79
+ $this->_redirect('checkout/cart');
80
+ }
81
+
82
+ public function failedAction() {
83
+ try {
84
+ $session = $this->getSession();
85
+ $paybox = $this->getPaybox();
86
+
87
+ // Retrieves params
88
+ $params = $paybox->getParams(false, false);
89
+ if ($params === false) {
90
+ return $this->_404();
91
+ }
92
+
93
+ // Load order
94
+ $order = $this->_getOrderFromParams($params);
95
+ if (is_null($order) || is_null($order->getId())) {
96
+ return $this->_404();
97
+ }
98
+
99
+ // Payment method
100
+ $order->getPayment()->getMethodInstance()->onPaymentFailed($order);
101
+
102
+ // Set quote to active
103
+ $this->_loadQuoteFromOrder($order)->setIsActive(true)->save();
104
+
105
+ // Cleanup
106
+ $session->unsCurrentPbxepOrderId();
107
+
108
+ $message = sprintf('Order %d: Customer is back from Paybox payment page. Payment refused by Paybox (%d).', $order->getIncrementId(), $params['error']);
109
+ $this->logDebug($message);
110
+
111
+ $message = $this->__('Payment refused by Paybox');
112
+ $session->addError($message);
113
+ }
114
+ catch (Exception $e) {
115
+ $this->logDebug(sprintf('failureAction: %s', $e->getMessage()));
116
+ }
117
+
118
+ // Redirect to cart
119
+ $this->_redirect('checkout/cart');
120
+ }
121
+
122
+ public function getConfig() {
123
+ return Mage::getSingleton('pbxep/config');
124
+ }
125
+
126
+ public function getPaybox() {
127
+ return Mage::getSingleton('pbxep/paybox');
128
+ }
129
+
130
+ public function getSession() {
131
+ return Mage::getSingleton('checkout/session');
132
+ }
133
+
134
+ public function ipnAction() {
135
+ try {
136
+ $paybox = $this->getPaybox();
137
+
138
+ // Retrieves params
139
+ $params = $paybox->getParams(true);
140
+ if ($params === false) {
141
+ return $this->_404();
142
+ }
143
+
144
+ // Load order
145
+ $order = $this->_getOrderFromParams($params);
146
+ if (is_null($order) || is_null($order->getId())) {
147
+ return $this->_404();
148
+ }
149
+
150
+ // IP not allowed
151
+ $config = $this->getConfig();
152
+ $allowedIps = explode(',', $config->getAllowedIps());
153
+ $currentIp = Mage::helper('core/http')->getRemoteAddr();
154
+ if (!in_array($currentIp, $allowedIps)) {
155
+ $message = $this->__('IPN call from %s not allowed.', $currentIp);
156
+ $order->addStatusHistoryComment($message);
157
+ $order->save();
158
+ $this->logFatal(sprintf('Order %s: (IPN) %s', $order->getIncrementId(), $message));
159
+ $message = 'Access denied to %s';
160
+ Mage::throwException($this->__($message, $currentIp));
161
+ }
162
+
163
+ // Call payment method
164
+ $method = $order->getPayment()->getMethodInstance();
165
+ $res = $method->onIPNCalled($order, $params);
166
+
167
+ if ($res) {
168
+ echo 'Done.';
169
+ }
170
+ else {
171
+ echo 'Already done.';
172
+ }
173
+ }
174
+ catch (Exception $e) {
175
+ $message = sprintf('(IPN) Exception %s (%s %d).', $e->getMessage(), $e->getFile(), $e->getLine());
176
+ $this->logFatal($message);
177
+ header('Status: 500 Error', true, 500);
178
+ echo $e->getMessage();
179
+ }
180
+ }
181
+
182
+ public function logDebug($message) {
183
+ Mage::log($message, Zend_Log::DEBUG, 'paybox-epayment.log');
184
+ }
185
+
186
+ public function logWarning($message) {
187
+ Mage::log($message, Zend_Log::WARN, 'paybox-epayment.log');
188
+ }
189
+
190
+ public function logError($message) {
191
+ Mage::log($message, Zend_Log::ERR, 'paybox-epayment.log');
192
+ }
193
+
194
+ public function logFatal($message) {
195
+ Mage::log($message, Zend_Log::ALERT, 'paybox-epayment.log');
196
+ }
197
+
198
+ public function redirectAction() {
199
+ // Retrieves order id
200
+ $session = $this->getSession();
201
+ $orderId = $session->getLastRealOrderId();
202
+
203
+ // If none, try previously saved
204
+ if (is_null($orderId)) {
205
+ $orderId = $session->getCurrentPbxepOrderId();
206
+ }
207
+
208
+ // If none, 404
209
+ if (is_null($orderId)) {
210
+ return $this->_404();
211
+ }
212
+
213
+ // Load order
214
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
215
+ if (is_null($order) || is_null($order->getId())) {
216
+ $session->unsCurrentPbxepOrderId();
217
+ return $this->_404();
218
+ }
219
+
220
+ // Check order status
221
+ $state = $order->getState();
222
+ if ($state != Mage_Sales_Model_Order::STATE_NEW) {
223
+ $session->unsCurrentPbxepOrderId();
224
+ return $this->_404();
225
+ }
226
+
227
+ // Save id
228
+ $session->setCurrentPbxepOrderId($orderId);
229
+
230
+ // Keep track of order for security check
231
+ $orders = $session->getPbxepOrders();
232
+ if (is_null($orders)) {
233
+ $orders = array();
234
+ }
235
+ $orders[Mage::helper('core')->encrypt($orderId)] = true;
236
+ $session->setPbxepOrders($orders);
237
+
238
+ // Payment method
239
+ $order->getPayment()->getMethodInstance()->onPaymentRedirect($order);
240
+
241
+ // Render form
242
+ Mage::register('pbxep/order', $order);
243
+ $this->loadLayout();
244
+ $this->renderLayout();
245
+ }
246
+
247
+ public function successAction() {
248
+ try {
249
+ $session = $this->getSession();
250
+ $paybox = $this->getPaybox();
251
+
252
+ // Retrieves params
253
+ $params = $paybox->getParams(false, false);
254
+ if ($params === false) {
255
+ return $this->_404();
256
+ }
257
+
258
+ // Load order
259
+ $order = $this->_getOrderFromParams($params);
260
+ if (is_null($order) || is_null($order->getId())) {
261
+ return $this->_404();
262
+ }
263
+
264
+ // Payment method
265
+ $order->getPayment()->getMethodInstance()->onPaymentSuccess($order, $params);
266
+
267
+ // Cleanup
268
+ $session->unsCurrentPbxepOrderId();
269
+
270
+ $message = sprintf('Order %s: Customer is back from Paybox payment page. Payment success.', $order->getIncrementId());
271
+ $this->logDebug($message);
272
+
273
+ // Redirect to success page
274
+ $this->_redirect('checkout/onepage/success');
275
+ return;
276
+ }
277
+ catch (Exception $e) {
278
+ $this->logDebug(sprintf('successAction: %s', $e->getMessage()));
279
+ }
280
+
281
+ $this->_redirect('checkout/cart');
282
+ }
283
+ }
app/code/community/Paybox/Epayment/etc/adminhtml.xml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <pbxep translate="title" module="pbxep">
12
+ <title>Paybox Presentation</title>
13
+ </pbxep>
14
+ <pbxep_merchant translate="title" module="pbxep">
15
+ <title>Paybox Merchant Account</title>
16
+ </pbxep_merchant>
17
+ <pbxep_payments translate="title" module="pbxep">
18
+ <title>Paybox Payments</title>
19
+ </pbxep_payments>
20
+ <pbxep_kwixo translate="title" module="pbxep">
21
+ <title>Paybox Kwixo</title>
22
+ </pbxep_kwixo>
23
+ </children>
24
+ </config>
25
+ </children>
26
+ </system>
27
+ </children>
28
+ </admin>
29
+ </resources>
30
+ </acl>
31
+ </config>
app/code/community/Paybox/Epayment/etc/config.xml ADDED
@@ -0,0 +1,491 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Paybox_Epayment>
5
+ <version>2.0.0</version>
6
+ </Paybox_Epayment>
7
+ </modules>
8
+ <frontend>
9
+ <translate>
10
+ <modules>
11
+ <Paybox_Epayment>
12
+ <files>
13
+ <default>Paybox_Epayment.csv</default>
14
+ </files>
15
+ </Paybox_Epayment>
16
+ </modules>
17
+ </translate>
18
+ <layout>
19
+ <updates>
20
+ <pbxep>
21
+ <file>pbxep.xml</file>
22
+ </pbxep>
23
+ </updates>
24
+ </layout>
25
+ <routers>
26
+ <pbxep>
27
+ <use>standard</use>
28
+ <args>
29
+ <module>Paybox_Epayment</module>
30
+ <frontName>paybox</frontName>
31
+ </args>
32
+ </pbxep>
33
+ </routers>
34
+ </frontend>
35
+ <global>
36
+ <blocks>
37
+ <pbxep>
38
+ <class>Paybox_Epayment_Block</class>
39
+ </pbxep>
40
+ </blocks>
41
+ <events>
42
+ <sales_order_save_commit_after>
43
+ <observers>
44
+ <pbxep_after_order_save>
45
+ <class>pbxep/observer</class>
46
+ <method>onAfterOrderSave</method>
47
+ </pbxep_after_order_save>
48
+ </observers>
49
+ </sales_order_save_commit_after>
50
+ </events>
51
+ <helpers>
52
+ <pbxep>
53
+ <class>Paybox_Epayment_Helper</class>
54
+ </pbxep>
55
+ </helpers>
56
+ <models>
57
+ <pbxep>
58
+ <class>Paybox_Epayment_Model</class>
59
+ <resourceModel>paypal_resource</resourceModel>
60
+ </pbxep>
61
+ <pbxep_resource>
62
+ <class>Paybox_Epayment_Model_Resource</class>
63
+ </pbxep_resource>
64
+ </models>
65
+ <resources>
66
+ <pbxep_setup>
67
+ <setup>
68
+ <module>Paybox_Epayment</module>
69
+ <class>Paybox_Epayment_Model_Resource_Setup</class>
70
+ </setup>
71
+ <connection>
72
+ <use>core_setup</use>
73
+ </connection>
74
+ </pbxep_setup>
75
+ <pbxep_write>
76
+ <connection>
77
+ <use>core_write</use>
78
+ </connection>
79
+ </pbxep_write>
80
+ <pbxep_read>
81
+ <connection>
82
+ <use>core_read</use>
83
+ </connection>
84
+ </pbxep_read>
85
+ <pbxep_helpers>
86
+ <!-- Helper definition needed by Magento -->
87
+ <class>Mage_Core_Helper</class>
88
+ </pbxep_helpers>
89
+ </resources>
90
+ </global>
91
+ <admin>
92
+ <routers>
93
+ <adminhtml>
94
+ <args>
95
+ <modules>
96
+ <direct_invoice before="Mage_Adminhtml">Paybox_Epayment_Adminhtml</direct_invoice>
97
+ </modules>
98
+ </args>
99
+ </adminhtml>
100
+ </routers>
101
+ </admin>
102
+ <adminhtml>
103
+ <translate>
104
+ <modules>
105
+ <Paybox_Epayment>
106
+ <files>
107
+ <default>Paybox_Epayment.csv</default>
108
+ </files>
109
+ </Paybox_Epayment>
110
+ </modules>
111
+ </translate>
112
+ <layout>
113
+ <updates>
114
+ <pbxep>
115
+ <file>pbxep.xml</file>
116
+ </pbxep>
117
+ </updates>
118
+ </layout>
119
+ <events>
120
+ <controller_action_layout_load_before>
121
+ <observers>
122
+ <pbxep_append>
123
+ <type>singleton</type>
124
+ <class>pbxep/observer</class>
125
+ <method>addBlockAtEndOfMainContent</method>
126
+ </pbxep_append>
127
+ </observers>
128
+ </controller_action_layout_load_before>
129
+ <adminhtml_sales_order_create_process_data_before>
130
+ <observers>
131
+ <pbxep_before_admin_order_create>
132
+ <class>pbxep/observer_adminCreateOrder</class>
133
+ <method>onBeforeCreate</method>
134
+ </pbxep_before_admin_order_create>
135
+ </observers>
136
+ </adminhtml_sales_order_create_process_data_before>
137
+ <checkout_submit_all_after>
138
+ <observers>
139
+ <pbxep_before_admin_order_save>
140
+ <class>pbxep/observer_adminCreateOrder</class>
141
+ <method>onAfterSubmit</method>
142
+ </pbxep_before_admin_order_save>
143
+ </observers>
144
+ </checkout_submit_all_after>
145
+ </events>
146
+ </adminhtml>
147
+ <default>
148
+ <pbxep>
149
+ <environment>TEST</environment>
150
+ <automatic_invoice>0</automatic_invoice>
151
+ <info_to_customer>1</info_to_customer>
152
+ <debug>0</debug>
153
+ <merchant>
154
+ <site>1999888</site>
155
+ <rank>77</rank>
156
+ <identifier>3262411</identifier>
157
+ <password>1999888I</password>
158
+ <hmackey>0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF</hmackey>
159
+ <hmacalgo>SHA512</hmacalgo>
160
+ <subscription>flexible</subscription>
161
+ </merchant>
162
+ <languages>
163
+ <fr>FRA</fr>
164
+ <es>ESP</es>
165
+ <it>ITA</it>
166
+ <de>DEU</de>
167
+ <nl>NLD</nl>
168
+ <sv>SWE</sv>
169
+ <pt>PRT</pt>
170
+ <default>GBR</default>
171
+ </languages>
172
+ <allowedips>194.2.122.158,195.25.7.166,195.101.99.76,10.48.2.254</allowedips>
173
+ <kwixo>
174
+ <default_carrier_type>4</default_carrier_type>
175
+ <default_carrier_speed>2</default_carrier_speed>
176
+ <default_categorie>1</default_categorie>
177
+ </kwixo>
178
+ </pbxep>
179
+ <payment>
180
+ <pbxep_cb>
181
+ <active>1</active>
182
+ <model>pbxep/payment_cb</model>
183
+ <title>Paiement par carte bancaire</title>
184
+ <allowspecific>0</allowspecific>
185
+ <cctypes>CB,VISA,EUROCARD_MASTERCARD,E_CARD</cctypes>
186
+ <status>
187
+ <paid>pbxep_paid</paid>
188
+ <authorized>pbxep_authorized</authorized>
189
+ </status>
190
+ <action>immediate</action>
191
+ <delay>1</delay>
192
+ <tds_active>always</tds_active>
193
+ <cards>
194
+ <CB>
195
+ <label>CB</label>
196
+ <image>images/pbxep/cb.45.png</image>
197
+ <payment>CARTE</payment>
198
+ <card>CB</card>
199
+ </CB>
200
+ <VISA>
201
+ <label>Visa</label>
202
+ <image>images/pbxep/visa.45.png</image>
203
+ <payment>CARTE</payment>
204
+ <card>VISA</card>
205
+ </VISA>
206
+ <EUROCARD_MASTERCARD>
207
+ <label>Mastercard</label>
208
+ <image>images/pbxep/mastercard.45.png</image>
209
+ <payment>CARTE</payment>
210
+ <card>EUROCARD_MASTERCARD</card>
211
+ </EUROCARD_MASTERCARD>
212
+ <E_CARD>
213
+ <label>E-Carte Bleue</label>
214
+ <image>images/pbxep/ecartebleue.45.png</image>
215
+ <payment>CARTE</payment>
216
+ <card>E_CARD</card>
217
+ </E_CARD>
218
+ </cards>
219
+ </pbxep_cb>
220
+ <pbxep_threetime>
221
+ <active>0</active>
222
+ <model>pbxep/payment_threetime</model>
223
+ <title>Paiement en trois fois par carte bancaire</title>
224
+ <allowspecific>0</allowspecific>
225
+ <cctypes>CB,VISA,EUROCARD_MASTERCARD,E_CARD</cctypes>
226
+ <status>
227
+ <intermediary>pbxep_intermediary</intermediary>
228
+ <paid>pbxep_paid</paid>
229
+ </status>
230
+ <action>immediate</action>
231
+ <tds_active>always</tds_active>
232
+ <cards>
233
+ <CB>
234
+ <label>CB</label>
235
+ <image>images/pbxep/cb.45.png</image>
236
+ <payment>CARTE</payment>
237
+ <card>CB</card>
238
+ </CB>
239
+ <VISA>
240
+ <label>Visa</label>
241
+ <image>images/pbxep/visa.45.png</image>
242
+ <payment>CARTE</payment>
243
+ <card>VISA</card>
244
+ </VISA>
245
+ <EUROCARD_MASTERCARD>
246
+ <label>Mastercard</label>
247
+ <image>images/pbxep/mastercard.45.png</image>
248
+ <payment>CARTE</payment>
249
+ <card>EUROCARD_MASTERCARD</card>
250
+ </EUROCARD_MASTERCARD>
251
+ <E_CARD>
252
+ <label>E-Carte Bleue</label>
253
+ <image>images/pbxep/ecartebleue.45.png</image>
254
+ <payment>CARTE</payment>
255
+ <card>E_CARD</card>
256
+ </E_CARD>
257
+ </cards>
258
+ </pbxep_threetime>
259
+ <pbxep_private>
260
+ <active>0</active>
261
+ <model>pbxep/payment_private</model>
262
+ <title>Paiement par carte privative</title>
263
+ <allowspecific>0</allowspecific>
264
+ <status>
265
+ <authorized>pbxep_authorized</authorized>
266
+ <paid>pbxep_paid</paid>
267
+ </status>
268
+ <action>immediate</action>
269
+ <delay>1</delay>
270
+ <cards>
271
+ <AMEX>
272
+ <label>American Express</label>
273
+ <image>images/pbxep/amex.45.png</image>
274
+ <payment>CARTE</payment>
275
+ <card>AMEX</card>
276
+ </AMEX>
277
+ <DINERS>
278
+ <label>Diners</label>
279
+ <image>images/pbxep/diners.45.png</image>
280
+ <payment>CARTE</payment>
281
+ <card>DINERS</card>
282
+ </DINERS>
283
+ <JCB>
284
+ <label>JCB</label>
285
+ <image>images/pbxep/jcb.45.png</image>
286
+ <payment>CARTE</payment>
287
+ <card>JCB</card>
288
+ </JCB>
289
+ </cards>
290
+ </pbxep_private>
291
+ <pbxep_paypal>
292
+ <active>0</active>
293
+ <model>pbxep/payment_paypal</model>
294
+ <title>Paiement par Paypal</title>
295
+ <allowspecific>0</allowspecific>
296
+ <action>immediate</action>
297
+ <status>
298
+ <authorized>pbxep_authorized</authorized>
299
+ <paid>pbxep_paid</paid>
300
+ </status>
301
+ <cards>
302
+ <card1>
303
+ <label>Paypal</label>
304
+ <image>images/pbxep/paypal.45.png</image>
305
+ <payment>PAYPAL</payment>
306
+ <card>PAYPAL</card>
307
+ </card1>
308
+ </cards>
309
+ </pbxep_paypal>
310
+ <pbxep_prepaid>
311
+ <active>0</active>
312
+ <model>pbxep/payment_prepaid</model>
313
+ <title>Paiement par cagnotte ou ticket prépayé</title>
314
+ <allowspecific>0</allowspecific>
315
+ <action>immediate</action>
316
+ <status>
317
+ <authorized>pbxep_authorized</authorized>
318
+ <paid>pbxep_paid</paid>
319
+ </status>
320
+ <cards>
321
+ <LEETCHI>
322
+ <label>Leetchi</label>
323
+ <image>images/pbxep/leetchi.45.png</image>
324
+ <payment>LEETCHI</payment>
325
+ <card>LEETCHI</card>
326
+ </LEETCHI>
327
+ <PSC>
328
+ <label>Paysafecard</label>
329
+ <image>images/pbxep/paysafecard.45.png</image>
330
+ <payment>PREPAYEE</payment>
331
+ <card>PSC</card>
332
+ </PSC>
333
+ </cards>
334
+ </pbxep_prepaid>
335
+ <pbxep_financial>
336
+ <active>0</active>
337
+ <model>pbxep/payment_financial</model>
338
+ <title>Paiement par carte et moyen de financement</title>
339
+ <allowspecific>0</allowspecific>
340
+ <action>immediate</action>
341
+ <status>
342
+ <authorized>pbxep_authorized</authorized>
343
+ <paid>pbxep_paid</paid>
344
+ </status>
345
+ <cards>
346
+ <COFINOGA>
347
+ <label>Carte Cofinoga</label>
348
+ <image>images/pbxep/cofinoga.45.png</image>
349
+ <payment>CARTE</payment>
350
+ <card>COFINOGA</card>
351
+ </COFINOGA>
352
+ <AURORE>
353
+ <label>Carte Aurore</label>
354
+ <image>images/pbxep/aurore.45.png</image>
355
+ <payment>CARTE</payment>
356
+ <card>AURORE</card>
357
+ </AURORE>
358
+ <UNEURO>
359
+ <label>1euro.com</label>
360
+ <image>images/pbxep/1euro.45.png</image>
361
+ <payment>CREDIT</payment>
362
+ <card>UNEURO</card>
363
+ </UNEURO>
364
+ </cards>
365
+ </pbxep_financial>
366
+ <pbxep_bcmc>
367
+ <active>0</active>
368
+ <model>pbxep/payment_bcmc</model>
369
+ <title>Paiement par Bancontact/Mistercash</title>
370
+ <allowspecific>0</allowspecific>
371
+ <action>immediate</action>
372
+ <status>
373
+ <authorized>pbxep_authorized</authorized>
374
+ <paid>pbxep_paid</paid>
375
+ </status>
376
+ <tds_active>always</tds_active>
377
+ <cards>
378
+ <BCMC>
379
+ <label>Bancontact/Mistercash</label>
380
+ <image>images/pbxep/none.45.png</image>
381
+ <payment>CARTE</payment>
382
+ <card>BCMC</card>
383
+ </BCMC>
384
+ </cards>
385
+ </pbxep_bcmc>
386
+ <pbxep_maestro>
387
+ <active>0</active>
388
+ <model>pbxep/payment_maestro</model>
389
+ <title>Paiement par carte Maestro</title>
390
+ <allowspecific>0</allowspecific>
391
+ <action>immediate</action>
392
+ <delay>1</delay>
393
+ <status>
394
+ <authorized>pbxep_authorized</authorized>
395
+ <paid>pbxep_paid</paid>
396
+ </status>
397
+ <tds_active>always</tds_active>
398
+ <cards>
399
+ <MAESTRO>
400
+ <label>Carte Maestro</label>
401
+ <image>images/pbxep/maestro.png</image>
402
+ <payment>CARTE</payment>
403
+ <card>MAESTRO</card>
404
+ </MAESTRO>
405
+ </cards>
406
+ </pbxep_maestro>
407
+ <pbxep_paybuttons>
408
+ <active>0</active>
409
+ <model>pbxep/payment_paybuttons</model>
410
+ <title>Paiement par Paybutton</title>
411
+ <allowspecific>0</allowspecific>
412
+ <action>immediate</action>
413
+ <status>
414
+ <authorized>pbxep_authorized</authorized>
415
+ <paid>pbxep_paid</paid>
416
+ </status>
417
+ <cards>
418
+ <IDEAL>
419
+ <label>iDEAL</label>
420
+ <image>images/pbxep/ideal.45.png</image>
421
+ <payment>PREPAYEE</payment>
422
+ <card>IDEAL</card>
423
+ </IDEAL>
424
+ <PAYBUTTING>
425
+ <label>ING HomePay</label>
426
+ <image>images/pbxep/paybutting.45.png</image>
427
+ <payment>PAYBUTTONS</payment>
428
+ <card>PAYBUTTING</card>
429
+ </PAYBUTTING>
430
+ </cards>
431
+ </pbxep_paybuttons>
432
+ <pbxep_kwixo_standard>
433
+ <active>0</active>
434
+ <model>pbxep/payment_kwixo_standard</model>
435
+ <title>Paiement par carte bancaire avec Kwixo</title>
436
+ <allowspecific>0</allowspecific>
437
+ <action>immediate</action>
438
+ <status>
439
+ <authorized>pbxep_authorized</authorized>
440
+ <paid>pbxep_paid</paid>
441
+ </status>
442
+ <cards>
443
+ <STANDARD>
444
+ <label>Kwixo</label>
445
+ <image>images/pbxep/kwixo_standard.45.png</image>
446
+ <payment>KWIXO</payment>
447
+ <card>STANDARD</card>
448
+ </STANDARD>
449
+ </cards>
450
+ </pbxep_kwixo_standard>
451
+ <pbxep_kwixo_onexrnp>
452
+ <active>0</active>
453
+ <model>pbxep/payment_kwixo_onexrnp</model>
454
+ <title>Paiement à la réception avec Kwixo</title>
455
+ <allowspecific>0</allowspecific>
456
+ <action>immediate</action>
457
+ <status>
458
+ <authorized>pbxep_authorized</authorized>
459
+ <paid>pbxep_paid</paid>
460
+ </status>
461
+ <cards>
462
+ <XRNP>
463
+ <label>Kwixo</label>
464
+ <image>images/pbxep/kwixo_standard.45.png</image>
465
+ <payment>KWIXO</payment>
466
+ <card>1XRNP</card>
467
+ </XRNP>
468
+ </cards>
469
+ </pbxep_kwixo_onexrnp>
470
+ <pbxep_kwixo_credit>
471
+ <active>0</active>
472
+ <model>pbxep/payment_kwixo_onexrnp</model>
473
+ <title>Paiement en plusieurs fois avec Kwixo</title>
474
+ <allowspecific>0</allowspecific>
475
+ <action>immediate</action>
476
+ <status>
477
+ <authorized>pbxep_authorized</authorized>
478
+ <paid>pbxep_paid</paid>
479
+ </status>
480
+ <cards>
481
+ <CREDIT>
482
+ <label>Kwixo</label>
483
+ <image>images/pbxep/kwixo_standard.45.png</image>
484
+ <payment>KWIXO</payment>
485
+ <card>CREDIT</card>
486
+ </CREDIT>
487
+ </cards>
488
+ </pbxep_kwixo_credit>
489
+ </payment>
490
+ </default>
491
+ </config>
app/code/community/Paybox/Epayment/etc/pubkey.pem ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ -----BEGIN PUBLIC KEY-----
2
+ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDe+hkicNP7ROHUssGNtHwiT2Ew
3
+ HFrSk/qwrcq8v5metRtTTFPE/nmzSkRnTs3GMpi57rBdxBBJW5W9cpNyGUh0jNXc
4
+ VrOSClpD5Ri2hER/GcNrxVRP7RlWOqB1C03q4QYmwjHZ+zlM4OUhCCAtSWflB4wC
5
+ Ka1g88CjFwRw/PB9kwIDAQAB
6
+ -----END PUBLIC KEY-----
app/code/community/Paybox/Epayment/etc/system.xml ADDED
@@ -0,0 +1,2496 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <pbxep translate="label comment" module="pbxep">
5
+ <label>Paybox</label>
6
+ <sort_order>400</sort_order>
7
+ </pbxep>
8
+ </tabs>
9
+ <sections>
10
+ <pbxep translate="label comment" module="pbxep">
11
+ <label>Presentation</label>
12
+ <tab>pbxep</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>350</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ </pbxep>
19
+ <pbxep_merchant translate="label comment" module="pbxep">
20
+ <label>Account settings</label>
21
+ <tab>pbxep</tab>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>351</sort_order>
24
+ <show_in_default>1</show_in_default>
25
+ <show_in_website>1</show_in_website>
26
+ <show_in_store>1</show_in_store>
27
+ <groups>
28
+ <environment translate="label comment">
29
+ <label>Environment</label>
30
+ <expanded>1</expanded>
31
+ <frontend_type>text</frontend_type>
32
+ <comment><![CDATA[In test mode your payments will not be sent to the bank.]]></comment>
33
+ <sort_order>10</sort_order>
34
+ <show_in_default>1</show_in_default>
35
+ <show_in_website>1</show_in_website>
36
+ <show_in_store>1</show_in_store>
37
+ <fields>
38
+ <environment translate="label comment">
39
+ <label>Environment</label>
40
+ <frontend_type>select</frontend_type>
41
+ <source_model>pbxep/admin_environment</source_model>
42
+ <config_path>pbxep/environment</config_path>
43
+ <sort_order>10</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+ </environment>
48
+ </fields>
49
+ </environment>
50
+ <settings translate="label comment">
51
+ <label>Account settings</label>
52
+ <expanded>1</expanded>
53
+ <frontend_type>text</frontend_type>
54
+ <sort_order>20</sort_order>
55
+ <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
+ <fields>
59
+ <subscription translate="label comment">
60
+ <label>Subscribed Paybox Solution</label>
61
+ <frontend_type>select</frontend_type>
62
+ <source_model>pbxep/admin_subscription</source_model>
63
+ <config_path>pbxep/merchant/subscription</config_path>
64
+ <sort_order>0</sort_order>
65
+ <show_in_default>1</show_in_default>
66
+ <show_in_website>1</show_in_website>
67
+ <show_in_store>1</show_in_store>
68
+ </subscription>
69
+ <site translate="label comment">
70
+ <label>Site number</label>
71
+ <comment><![CDATA[Site number provided by Paybox.]]></comment>
72
+ <frontend_type>text</frontend_type>
73
+ <config_path>pbxep/merchant/site</config_path>
74
+ <validate>required-entry validate-digits validate-exact-length length-7</validate>
75
+ <sort_order>10</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>1</show_in_store>
79
+ </site>
80
+ <rank translate="label comment">
81
+ <label>Rank number</label>
82
+ <comment><![CDATA[Rank number provided by Paybox (last 2 digits).]]></comment>
83
+ <frontend_type>text</frontend_type>
84
+ <config_path>pbxep/merchant/rank</config_path>
85
+ <validate>required-entry validate-digits validate-exact-length length-2</validate>
86
+ <sort_order>20</sort_order>
87
+ <show_in_default>1</show_in_default>
88
+ <show_in_website>1</show_in_website>
89
+ <show_in_store>1</show_in_store>
90
+ </rank>
91
+ <identifier translate="label comment">
92
+ <label>Login</label>
93
+ <comment><![CDATA[Internal login provided by Paybox.]]></comment>
94
+ <config_path>pbxep/merchant/identifier</config_path>
95
+ <frontend_type>text</frontend_type>
96
+ <validate>required-entry validate-digits validate-length maximum-length-9</validate>
97
+ <sort_order>30</sort_order>
98
+ <show_in_default>1</show_in_default>
99
+ <show_in_website>1</show_in_website>
100
+ <show_in_store>1</show_in_store>
101
+ </identifier>
102
+ <hmackey translate="label comment">
103
+ <label>HMAC</label>
104
+ <comment><![CDATA[Secrete HMAC key to create using the Paybox interface.]]></comment>
105
+ <frontend_type>text</frontend_type>
106
+ <config_path>pbxep/merchant/hmackey</config_path>
107
+ <validate>required-entry</validate>
108
+ <sort_order>50</sort_order>
109
+ <show_in_default>1</show_in_default>
110
+ <show_in_website>1</show_in_website>
111
+ <show_in_store>1</show_in_store>
112
+ </hmackey>
113
+ <password translate="label comment">
114
+ <label>Paybox Back Office password</label>
115
+ <comment><![CDATA[Back Office password provided by Paybox.]]></comment>
116
+ <frontend_type>text</frontend_type>
117
+ <config_path>pbxep/merchant/password</config_path>
118
+ <sort_order>40</sort_order>
119
+ <show_in_default>1</show_in_default>
120
+ <show_in_website>1</show_in_website>
121
+ <show_in_store>1</show_in_store>
122
+ <depends>
123
+ <subscription>flexible</subscription>
124
+ </depends>
125
+ </password>
126
+ </fields>
127
+ </settings>
128
+ <misc translate="label comment">
129
+ <label>Other options</label>
130
+ <expanded>1</expanded>
131
+ <frontend_type>text</frontend_type>
132
+ <sort_order>30</sort_order>
133
+ <show_in_default>1</show_in_default>
134
+ <show_in_website>1</show_in_website>
135
+ <show_in_store>1</show_in_store>
136
+ <fields>
137
+ <customer_info translate="label comment">
138
+ <label>Show payment information to customers</label>
139
+ <comment><![CDATA[Paybox module can show payment information to customer. You can disable this feature here.]]></comment>
140
+ <frontend_type>select</frontend_type>
141
+ <source_model>adminhtml/system_config_source_yesno</source_model>
142
+ <config_path>pbxep/info_to_customer</config_path>
143
+ <sort_order>20</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>1</show_in_website>
146
+ <show_in_store>1</show_in_store>
147
+ </customer_info>
148
+ </fields>
149
+ </misc>
150
+ <!--technical translate="label comment">
151
+ <label>Technical options</label>
152
+ <expanded>0</expanded>
153
+ <frontend_type>text</frontend_type>
154
+ <sort_order>40</sort_order>
155
+ <show_in_default>1</show_in_default>
156
+ <show_in_website>1</show_in_website>
157
+ <show_in_store>1</show_in_store>
158
+ <fields>
159
+ <debug translate="label comment">
160
+ <label>Debug</label>
161
+ <comment><![CDATA[Enable some debugging information.]]></comment>
162
+ <frontend_type>select</frontend_type>
163
+ <source_model>adminhtml/system_config_source_yesno</source_model>
164
+ <config_path>pbxep/debug</config_path>
165
+ <sort_order>10</sort_order>
166
+ <show_in_default>1</show_in_default>
167
+ <show_in_website>1</show_in_website>
168
+ <show_in_store>1</show_in_store>
169
+ </debug>
170
+ <allowedips translate="label comment">
171
+ <label>Allowed IPs</label>
172
+ <comment><![CDATA[A coma separated list of Paybox IPs.]]></comment>
173
+ <frontend_type>text</frontend_type>
174
+ <config_path>pbxep/allowedips</config_path>
175
+ <sort_order>20</sort_order>
176
+ <show_in_default>1</show_in_default>
177
+ <show_in_website>1</show_in_website>
178
+ <show_in_store>1</show_in_store>
179
+ </allowedips>
180
+ </fields>
181
+ </technical-->
182
+ </groups>
183
+ </pbxep_merchant>
184
+ <pbxep_payments translate="label comment" module="pbxep">
185
+ <label>Payment methods</label>
186
+ <tab>pbxep</tab>
187
+ <frontend_type>text</frontend_type>
188
+ <sort_order>353</sort_order>
189
+ <show_in_default>1</show_in_default>
190
+ <show_in_website>1</show_in_website>
191
+ <show_in_store>1</show_in_store>
192
+ <groups>
193
+ <pbxep_cb translate="label comment">
194
+ <label>Pay by Bank Card</label>
195
+ <expanded>1</expanded>
196
+ <frontend_type>text</frontend_type>
197
+ <sort_order>10</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
+ <fields>
202
+ <active translate="label comment">
203
+ <label>Enable</label>
204
+ <frontend_type>select</frontend_type>
205
+ <source_model>adminhtml/system_config_source_yesno</source_model>
206
+ <config_path>payment/pbxep_cb/active</config_path>
207
+ <sort_order>10</sort_order>
208
+ <show_in_default>1</show_in_default>
209
+ <show_in_website>1</show_in_website>
210
+ <show_in_store>1</show_in_store>
211
+ </active>
212
+ <cctypes translate="label comment">
213
+ <label>Card type</label>
214
+ <comment><![CDATA[If you disable E-Carte Bleu, contact the Paybox support]]></comment>
215
+ <config_path>payment/pbxep_cb/cctypes</config_path>
216
+ <frontend_model>pbxep/admin_field_checkboxes</frontend_model>
217
+ <frontend_type>checkboxes</frontend_type>
218
+ <source_model>pbxep/admin_cards_cb</source_model>
219
+ <sort_order>20</sort_order>
220
+ <show_in_default>1</show_in_default>
221
+ <show_in_website>1</show_in_website>
222
+ <show_in_store>1</show_in_store>
223
+ <depends>
224
+ <active>1</active>
225
+ </depends>
226
+ </cctypes>
227
+ <title translate="label comment">
228
+ <label>Title</label>
229
+ <config_path>payment/pbxep_cb/title</config_path>
230
+ <frontend_type>text</frontend_type>
231
+ <sort_order>30</sort_order>
232
+ <show_in_default>1</show_in_default>
233
+ <show_in_website>1</show_in_website>
234
+ <show_in_store>1</show_in_store>
235
+ <depends>
236
+ <active>1</active>
237
+ </depends>
238
+ </title>
239
+ <sort_order translate="label comment">
240
+ <label>Sort Order</label>
241
+ <config_path>payment/pbxep_cb/sort_order</config_path>
242
+ <frontend_type>text</frontend_type>
243
+ <sort_order>40</sort_order>
244
+ <show_in_default>1</show_in_default>
245
+ <show_in_website>1</show_in_website>
246
+ <show_in_store>1</show_in_store>
247
+ <frontend_class>validate-number</frontend_class>
248
+ <depends>
249
+ <active>1</active>
250
+ </depends>
251
+ </sort_order>
252
+ <action translate="label comment">
253
+ <label>Debit type</label>
254
+ <frontend_model>pbxep/admin_field_select</frontend_model>
255
+ <frontend_type>select</frontend_type>
256
+ <source_model>pbxep/admin_payment_action</source_model>
257
+ <config_path>payment/pbxep_cb/action</config_path>
258
+ <sort_order>50</sort_order>
259
+ <show_in_default>1</show_in_default>
260
+ <show_in_website>1</show_in_website>
261
+ <show_in_store>1</show_in_store>
262
+ <depends>
263
+ <active>1</active>
264
+ </depends>
265
+ </action>
266
+ <delay translate="label comment">
267
+ <label>Delay</label>
268
+ <config_path>payment/pbxep_cb/delay</config_path>
269
+ <frontend_type>select</frontend_type>
270
+ <source_model>pbxep/admin_payment_delays</source_model>
271
+ <sort_order>60</sort_order>
272
+ <show_in_default>1</show_in_default>
273
+ <show_in_website>1</show_in_website>
274
+ <show_in_store>1</show_in_store>
275
+ <depends>
276
+ <action>deferred</action>
277
+ <active>1</active>
278
+ </depends>
279
+ </delay>
280
+ <status translate="label comment">
281
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
282
+ <label>Payment status</label>
283
+ <sort_order>100</sort_order>
284
+ <show_in_default>1</show_in_default>
285
+ <show_in_website>1</show_in_website>
286
+ <show_in_store>1</show_in_store>
287
+ <depends>
288
+ <active>1</active>
289
+ </depends>
290
+ </status>
291
+ <status_authorized translate="label comment">
292
+ <label>Once authorized</label>
293
+ <config_path>payment/pbxep_cb/status/authorized</config_path>
294
+ <frontend_type>select</frontend_type>
295
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
296
+ <sort_order>110</sort_order>
297
+ <show_in_default>1</show_in_default>
298
+ <show_in_website>1</show_in_website>
299
+ <show_in_store>0</show_in_store>
300
+ <depends>
301
+ <active>1</active>
302
+ <action>manual</action>
303
+ </depends>
304
+ </status_authorized>
305
+ <status_paid translate="label comment">
306
+ <label>Once paid</label>
307
+ <config_path>payment/pbxep_cb/status/paid</config_path>
308
+ <frontend_type>select</frontend_type>
309
+ <source_model>pbxep/admin_order_status_processing</source_model>
310
+ <sort_order>110</sort_order>
311
+ <show_in_default>1</show_in_default>
312
+ <show_in_website>1</show_in_website>
313
+ <show_in_store>0</show_in_store>
314
+ <depends>
315
+ <active>1</active>
316
+ </depends>
317
+ </status_paid>
318
+ <status_auto_capture translate="label comment">
319
+ <label>Automatic capture status</label>
320
+ <config_path>payment/pbxep_cb/status/auto_capture</config_path>
321
+ <frontend_type>select</frontend_type>
322
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
323
+ <sort_order>112</sort_order>
324
+ <show_in_default>1</show_in_default>
325
+ <show_in_website>1</show_in_website>
326
+ <show_in_store>0</show_in_store>
327
+ <depends>
328
+ <active>1</active>
329
+ <action>manual</action>
330
+ </depends>
331
+ </status_auto_capture>
332
+ <conditions translate="label comment">
333
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
334
+ <label>Conditions</label>
335
+ <sort_order>200</sort_order>
336
+ <show_in_default>1</show_in_default>
337
+ <show_in_website>1</show_in_website>
338
+ <show_in_store>1</show_in_store>
339
+ <depends>
340
+ <active>1</active>
341
+ </depends>
342
+ </conditions>
343
+ <allowspecific translate="label comment">
344
+ <label>Payment from Applicable Countries</label>
345
+ <config_path>payment/pbxep_cb/allowspecific</config_path>
346
+ <frontend_type>allowspecific</frontend_type>
347
+ <sort_order>210</sort_order>
348
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
349
+ <show_in_default>1</show_in_default>
350
+ <show_in_website>1</show_in_website>
351
+ <show_in_store>1</show_in_store>
352
+ <depends>
353
+ <active>1</active>
354
+ </depends>
355
+ </allowspecific>
356
+ <specificcountry translate="label comment">
357
+ <label>Payment from Specific Countries</label>
358
+ <config_path>payment/pbxep_cb/specificcountry</config_path>
359
+ <frontend_type>multiselect</frontend_type>
360
+ <sort_order>220</sort_order>
361
+ <source_model>adminhtml/system_config_source_country</source_model>
362
+ <show_in_default>1</show_in_default>
363
+ <show_in_website>1</show_in_website>
364
+ <show_in_store>1</show_in_store>
365
+ <depends>
366
+ <allowspecific>1</allowspecific>
367
+ <active>1</active>
368
+ </depends>
369
+ </specificcountry>
370
+ <min_order_total translate="label comment">
371
+ <label>Minimum Order Total</label>
372
+ <config_path>payment/pbxep_cb/min_order_total</config_path>
373
+ <frontend_type>text</frontend_type>
374
+ <sort_order>230</sort_order>
375
+ <show_in_default>1</show_in_default>
376
+ <show_in_website>1</show_in_website>
377
+ <show_in_store>1</show_in_store>
378
+ <depends>
379
+ <active>1</active>
380
+ </depends>
381
+ </min_order_total>
382
+ <max_order_total translate="label comment">
383
+ <label>Maximum Order Total</label>
384
+ <config_path>payment/pbxep_cb/max_order_total</config_path>
385
+ <frontend_type>text</frontend_type>
386
+ <sort_order>240</sort_order>
387
+ <show_in_default>1</show_in_default>
388
+ <show_in_website>1</show_in_website>
389
+ <show_in_store>1</show_in_store>
390
+ <depends>
391
+ <active>1</active>
392
+ </depends>
393
+ </max_order_total>
394
+ <tds translate="label comment">
395
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
396
+ <label>3-D Secure</label>
397
+ <sort_order>300</sort_order>
398
+ <show_in_default>1</show_in_default>
399
+ <show_in_website>1</show_in_website>
400
+ <show_in_store>1</show_in_store>
401
+ <depends>
402
+ <active>1</active>
403
+ </depends>
404
+ </tds>
405
+ <tds_info translate="label comment">
406
+ <label><![CDATA[Make sure that the contract signed with your bank allows 3-D Secure before proceeding with setup.]]></label>
407
+ <frontend_model>pbxep/admin_info</frontend_model>
408
+ <sort_order>305</sort_order>
409
+ <show_in_default>1</show_in_default>
410
+ <show_in_website>1</show_in_website>
411
+ <show_in_store>1</show_in_store>
412
+ <depends>
413
+ <active>1</active>
414
+ </depends>
415
+ </tds_info>
416
+ <tds_active translate="label comment">
417
+ <label>Enable 3-D Secure</label>
418
+ <comment><![CDATA[<span style="color: red;">Warning: your bank may enforce 3-D Secure.<br/>Make sure your setup is coherent with your bank, Paybox and Magento module.</span>]]></comment>
419
+ <frontend_type>select</frontend_type>
420
+ <source_model>pbxep/admin_payment_use3ds</source_model>
421
+ <config_path>payment/pbxep_cb/tds_active</config_path>
422
+ <sort_order>310</sort_order>
423
+ <show_in_default>1</show_in_default>
424
+ <show_in_website>1</show_in_website>
425
+ <show_in_store>1</show_in_store>
426
+ <depends>
427
+ <active>1</active>
428
+ </depends>
429
+ </tds_active>
430
+ <tds_min_order_total translate="label comment">
431
+ <label>Minimum Order Amount</label>
432
+ <config_path>payment/pbxep_cb/tds_min_order_total</config_path>
433
+ <frontend_type>text</frontend_type>
434
+ <sort_order>330</sort_order>
435
+ <show_in_default>1</show_in_default>
436
+ <show_in_website>1</show_in_website>
437
+ <show_in_store>1</show_in_store>
438
+ <depends>
439
+ <tds_active>condition</tds_active>
440
+ <active>1</active>
441
+ </depends>
442
+ </tds_min_order_total>
443
+ </fields>
444
+ </pbxep_cb>
445
+ <pbxep_threetime translate="label comment">
446
+ <label>Pay by Card Three Times</label>
447
+ <expanded>0</expanded>
448
+ <frontend_type>text</frontend_type>
449
+ <sort_order>20</sort_order>
450
+ <show_in_default>1</show_in_default>
451
+ <show_in_website>1</show_in_website>
452
+ <show_in_store>1</show_in_store>
453
+ <fields>
454
+ <info translate="label comment">
455
+ <label><![CDATA[Check your Paybox contract before enabling this option.]]></label>
456
+ <frontend_model>pbxep/admin_info</frontend_model>
457
+ <sort_order>5</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
+ <depends>
462
+ <active>1</active>
463
+ </depends>
464
+ </info>
465
+ <active translate="label comment">
466
+ <label>Enable</label>
467
+ <frontend_type>select</frontend_type>
468
+ <source_model>adminhtml/system_config_source_yesno</source_model>
469
+ <config_path>payment/pbxep_threetime/active</config_path>
470
+ <sort_order>10</sort_order>
471
+ <show_in_default>1</show_in_default>
472
+ <show_in_website>1</show_in_website>
473
+ <show_in_store>1</show_in_store>
474
+ </active>
475
+ <cctypes translate="label comment">
476
+ <label>Card type</label>
477
+ <comment><![CDATA[If you disable E-Carte Bleu, contact the Paybox support]]></comment>
478
+ <config_path>payment/pbxep_threetime/cctypes</config_path>
479
+ <frontend_model>pbxep/admin_field_checkboxes</frontend_model>
480
+ <frontend_type>checkboxes</frontend_type>
481
+ <source_model>pbxep/admin_cards_threetime</source_model>
482
+ <sort_order>20</sort_order>
483
+ <show_in_default>1</show_in_default>
484
+ <show_in_website>1</show_in_website>
485
+ <show_in_store>1</show_in_store>
486
+ <depends>
487
+ <active>1</active>
488
+ </depends>
489
+ </cctypes>
490
+ <title translate="label comment">
491
+ <label>Title</label>
492
+ <config_path>payment/pbxep_threetime/title</config_path>
493
+ <frontend_type>text</frontend_type>
494
+ <sort_order>30</sort_order>
495
+ <show_in_default>1</show_in_default>
496
+ <show_in_website>1</show_in_website>
497
+ <show_in_store>1</show_in_store>
498
+ <depends>
499
+ <active>1</active>
500
+ </depends>
501
+ </title>
502
+ <sort_order translate="label comment">
503
+ <label>Sort Order</label>
504
+ <config_path>payment/pbxep_threetime/sort_order</config_path>
505
+ <frontend_type>text</frontend_type>
506
+ <sort_order>40</sort_order>
507
+ <show_in_default>1</show_in_default>
508
+ <show_in_website>1</show_in_website>
509
+ <show_in_store>1</show_in_store>
510
+ <frontend_class>validate-number</frontend_class>
511
+ <depends>
512
+ <active>1</active>
513
+ </depends>
514
+ </sort_order>
515
+ <status translate="label comment">
516
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
517
+ <label>Payment status</label>
518
+ <sort_order>100</sort_order>
519
+ <show_in_default>1</show_in_default>
520
+ <show_in_website>1</show_in_website>
521
+ <show_in_store>1</show_in_store>
522
+ <depends>
523
+ <active>1</active>
524
+ </depends>
525
+ </status>
526
+ <status_intermediary translate="label comment">
527
+ <label>Once authorized</label>
528
+ <config_path>payment/pbxep_threetime/status/intermediary</config_path>
529
+ <frontend_type>select</frontend_type>
530
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
531
+ <sort_order>110</sort_order>
532
+ <show_in_default>1</show_in_default>
533
+ <show_in_website>1</show_in_website>
534
+ <show_in_store>0</show_in_store>
535
+ <depends>
536
+ <active>1</active>
537
+ <action>manual</action>
538
+ </depends>
539
+ </status_intermediary>
540
+ <status_paid translate="label comment">
541
+ <label>Once paid</label>
542
+ <config_path>payment/pbxep_threetime/status/paid</config_path>
543
+ <frontend_type>select</frontend_type>
544
+ <source_model>pbxep/admin_order_status_processing</source_model>
545
+ <sort_order>110</sort_order>
546
+ <show_in_default>1</show_in_default>
547
+ <show_in_website>1</show_in_website>
548
+ <show_in_store>0</show_in_store>
549
+ <depends>
550
+ <active>1</active>
551
+ </depends>
552
+ </status_paid>
553
+ <conditions translate="label comment">
554
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
555
+ <label>Conditions</label>
556
+ <sort_order>200</sort_order>
557
+ <show_in_default>1</show_in_default>
558
+ <show_in_website>1</show_in_website>
559
+ <show_in_store>1</show_in_store>
560
+ <depends>
561
+ <active>1</active>
562
+ </depends>
563
+ </conditions>
564
+ <allowspecific translate="label comment">
565
+ <label>Payment from Applicable Countries</label>
566
+ <config_path>payment/pbxep_threetime/allowspecific</config_path>
567
+ <frontend_type>allowspecific</frontend_type>
568
+ <sort_order>210</sort_order>
569
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
570
+ <show_in_default>1</show_in_default>
571
+ <show_in_website>1</show_in_website>
572
+ <show_in_store>1</show_in_store>
573
+ <depends>
574
+ <active>1</active>
575
+ </depends>
576
+ </allowspecific>
577
+ <specificcountry translate="label comment">
578
+ <label>Payment from Specific Countries</label>
579
+ <config_path>payment/pbxep_threetime/specificcountry</config_path>
580
+ <frontend_type>multiselect</frontend_type>
581
+ <sort_order>220</sort_order>
582
+ <source_model>adminhtml/system_config_source_country</source_model>
583
+ <show_in_default>1</show_in_default>
584
+ <show_in_website>1</show_in_website>
585
+ <show_in_store>1</show_in_store>
586
+ <depends>
587
+ <allowspecific>1</allowspecific>
588
+ <active>1</active>
589
+ </depends>
590
+ </specificcountry>
591
+ <min_order_total translate="label comment">
592
+ <label>Minimum Order Total</label>
593
+ <config_path>payment/pbxep_threetime/min_order_total</config_path>
594
+ <frontend_type>text</frontend_type>
595
+ <sort_order>230</sort_order>
596
+ <show_in_default>1</show_in_default>
597
+ <show_in_website>1</show_in_website>
598
+ <show_in_store>1</show_in_store>
599
+ <depends>
600
+ <active>1</active>
601
+ </depends>
602
+ </min_order_total>
603
+ <max_order_total translate="label comment">
604
+ <label>Maximum Order Total</label>
605
+ <config_path>payment/pbxep_threetime/max_order_total</config_path>
606
+ <frontend_type>text</frontend_type>
607
+ <sort_order>240</sort_order>
608
+ <show_in_default>1</show_in_default>
609
+ <show_in_website>1</show_in_website>
610
+ <show_in_store>1</show_in_store>
611
+ <depends>
612
+ <active>1</active>
613
+ </depends>
614
+ </max_order_total>
615
+ <tds translate="label comment">
616
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
617
+ <label>3-D Secure</label>
618
+ <sort_order>300</sort_order>
619
+ <show_in_default>1</show_in_default>
620
+ <show_in_website>1</show_in_website>
621
+ <show_in_store>1</show_in_store>
622
+ <depends>
623
+ <active>1</active>
624
+ </depends>
625
+ </tds>
626
+ <tds_info translate="label comment">
627
+ <label><![CDATA[Make sure that the contract signed with your bank allows 3-D Secure before proceeding with setup.]]></label>
628
+ <frontend_model>pbxep/admin_info</frontend_model>
629
+ <sort_order>305</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
+ <depends>
634
+ <active>1</active>
635
+ </depends>
636
+ </tds_info>
637
+ <tds_active translate="label comment">
638
+ <label>Enable 3-D Secure</label>
639
+ <comment><![CDATA[<span style="color: red;">Warning: your bank may enforce 3-D Secure.<br/>Make sure your setup is coherent with your bank, Paybox and Magento module.</span>]]></comment>
640
+ <frontend_type>select</frontend_type>
641
+ <source_model>pbxep/admin_payment_use3ds</source_model>
642
+ <config_path>payment/pbxep_threetime/tds_active</config_path>
643
+ <sort_order>310</sort_order>
644
+ <show_in_default>1</show_in_default>
645
+ <show_in_website>1</show_in_website>
646
+ <show_in_store>1</show_in_store>
647
+ <depends>
648
+ <active>1</active>
649
+ </depends>
650
+ </tds_active>
651
+ <tds_min_order_total translate="label comment">
652
+ <label>Minimum Order Amount</label>
653
+ <config_path>payment/pbxep_threetime/tds_min_order_total</config_path>
654
+ <frontend_type>text</frontend_type>
655
+ <sort_order>330</sort_order>
656
+ <show_in_default>1</show_in_default>
657
+ <show_in_website>1</show_in_website>
658
+ <show_in_store>1</show_in_store>
659
+ <depends>
660
+ <tds_active>condition</tds_active>
661
+ <active>1</active>
662
+ </depends>
663
+ </tds_min_order_total>
664
+ </fields>
665
+ </pbxep_threetime>
666
+ <pbxep_private translate="label comment">
667
+ <label>Pay by Private Card</label>
668
+ <expanded>0</expanded>
669
+ <frontend_type>text</frontend_type>
670
+ <sort_order>30</sort_order>
671
+ <show_in_default>1</show_in_default>
672
+ <show_in_website>1</show_in_website>
673
+ <show_in_store>1</show_in_store>
674
+ <fields>
675
+ <active translate="label comment">
676
+ <label>Enable</label>
677
+ <frontend_type>select</frontend_type>
678
+ <source_model>adminhtml/system_config_source_yesno</source_model>
679
+ <config_path>payment/pbxep_private/active</config_path>
680
+ <sort_order>10</sort_order>
681
+ <show_in_default>1</show_in_default>
682
+ <show_in_website>1</show_in_website>
683
+ <show_in_store>1</show_in_store>
684
+ </active>
685
+ <cctypes translate="label comment">
686
+ <label>Card type</label>
687
+ <config_path>payment/pbxep_private/cctypes</config_path>
688
+ <frontend_model>pbxep/admin_field_checkboxes</frontend_model>
689
+ <frontend_type>checkboxes</frontend_type>
690
+ <source_model>pbxep/admin_cards_private</source_model>
691
+ <sort_order>20</sort_order>
692
+ <show_in_default>1</show_in_default>
693
+ <show_in_website>1</show_in_website>
694
+ <show_in_store>1</show_in_store>
695
+ <depends>
696
+ <active>1</active>
697
+ </depends>
698
+ </cctypes>
699
+ <title translate="label comment">
700
+ <label>Title</label>
701
+ <config_path>payment/pbxep_private/title</config_path>
702
+ <frontend_type>text</frontend_type>
703
+ <sort_order>30</sort_order>
704
+ <show_in_default>1</show_in_default>
705
+ <show_in_website>1</show_in_website>
706
+ <show_in_store>1</show_in_store>
707
+ <depends>
708
+ <active>1</active>
709
+ </depends>
710
+ </title>
711
+ <sort_order translate="label comment">
712
+ <label>Sort Order</label>
713
+ <config_path>payment/pbxep_private/sort_order</config_path>
714
+ <frontend_type>text</frontend_type>
715
+ <sort_order>40</sort_order>
716
+ <show_in_default>1</show_in_default>
717
+ <show_in_website>1</show_in_website>
718
+ <show_in_store>1</show_in_store>
719
+ <frontend_class>validate-number</frontend_class>
720
+ <depends>
721
+ <active>1</active>
722
+ </depends>
723
+ </sort_order>
724
+ <action translate="label comment">
725
+ <label>Debit type</label>
726
+ <frontend_model>pbxep/admin_field_select</frontend_model>
727
+ <frontend_type>select</frontend_type>
728
+ <source_model>pbxep/admin_payment_action</source_model>
729
+ <config_path>payment/pbxep_private/action</config_path>
730
+ <sort_order>50</sort_order>
731
+ <show_in_default>1</show_in_default>
732
+ <show_in_website>1</show_in_website>
733
+ <show_in_store>1</show_in_store>
734
+ <depends>
735
+ <active>1</active>
736
+ </depends>
737
+ </action>
738
+ <delay translate="label comment">
739
+ <label>Delay</label>
740
+ <config_path>payment/pbxep_private/delay</config_path>
741
+ <frontend_type>select</frontend_type>
742
+ <source_model>pbxep/admin_payment_delays</source_model>
743
+ <sort_order>60</sort_order>
744
+ <show_in_default>1</show_in_default>
745
+ <show_in_website>1</show_in_website>
746
+ <show_in_store>1</show_in_store>
747
+ <depends>
748
+ <action>deferred</action>
749
+ <active>1</active>
750
+ </depends>
751
+ </delay>
752
+ <status translate="label comment">
753
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
754
+ <label>Payment status</label>
755
+ <sort_order>100</sort_order>
756
+ <show_in_default>1</show_in_default>
757
+ <show_in_website>1</show_in_website>
758
+ <show_in_store>1</show_in_store>
759
+ <depends>
760
+ <active>1</active>
761
+ </depends>
762
+ </status>
763
+ <status_authorized translate="label comment">
764
+ <label>Once authorized</label>
765
+ <config_path>payment/pbxep_private/status/authorized</config_path>
766
+ <frontend_type>select</frontend_type>
767
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
768
+ <sort_order>110</sort_order>
769
+ <show_in_default>1</show_in_default>
770
+ <show_in_website>1</show_in_website>
771
+ <show_in_store>0</show_in_store>
772
+ <depends>
773
+ <active>1</active>
774
+ <action>manual</action>
775
+ </depends>
776
+ </status_authorized>
777
+ <status_paid translate="label comment">
778
+ <label>Once paid</label>
779
+ <config_path>payment/pbxep_private/status/paid</config_path>
780
+ <frontend_type>select</frontend_type>
781
+ <source_model>pbxep/admin_order_status_processing</source_model>
782
+ <sort_order>110</sort_order>
783
+ <show_in_default>1</show_in_default>
784
+ <show_in_website>1</show_in_website>
785
+ <show_in_store>0</show_in_store>
786
+ <depends>
787
+ <active>1</active>
788
+ </depends>
789
+ </status_paid>
790
+ <status_auto_capture translate="label comment">
791
+ <label>Automatic capture status</label>
792
+ <config_path>payment/pbxep_private/status/auto_capture</config_path>
793
+ <frontend_type>select</frontend_type>
794
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
795
+ <sort_order>112</sort_order>
796
+ <show_in_default>1</show_in_default>
797
+ <show_in_website>1</show_in_website>
798
+ <show_in_store>0</show_in_store>
799
+ <depends>
800
+ <active>1</active>
801
+ <action>manual</action>
802
+ </depends>
803
+ </status_auto_capture>
804
+ <conditions translate="label comment">
805
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
806
+ <label>Conditions</label>
807
+ <sort_order>200</sort_order>
808
+ <show_in_default>1</show_in_default>
809
+ <show_in_website>1</show_in_website>
810
+ <show_in_store>1</show_in_store>
811
+ <depends>
812
+ <active>1</active>
813
+ </depends>
814
+ </conditions>
815
+ <allowspecific translate="label comment">
816
+ <label>Payment from Applicable Countries</label>
817
+ <config_path>payment/pbxep_private/allowspecific</config_path>
818
+ <frontend_type>allowspecific</frontend_type>
819
+ <sort_order>210</sort_order>
820
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
821
+ <show_in_default>1</show_in_default>
822
+ <show_in_website>1</show_in_website>
823
+ <show_in_store>1</show_in_store>
824
+ <depends>
825
+ <active>1</active>
826
+ </depends>
827
+ </allowspecific>
828
+ <specificcountry translate="label comment">
829
+ <label>Payment from Specific Countries</label>
830
+ <config_path>payment/pbxep_private/specificcountry</config_path>
831
+ <frontend_type>multiselect</frontend_type>
832
+ <sort_order>220</sort_order>
833
+ <source_model>adminhtml/system_config_source_country</source_model>
834
+ <show_in_default>1</show_in_default>
835
+ <show_in_website>1</show_in_website>
836
+ <show_in_store>1</show_in_store>
837
+ <depends>
838
+ <allowspecific>1</allowspecific>
839
+ <active>1</active>
840
+ </depends>
841
+ </specificcountry>
842
+ <min_order_total translate="label comment">
843
+ <label>Minimum Order Total</label>
844
+ <config_path>payment/pbxep_private/min_order_total</config_path>
845
+ <frontend_type>text</frontend_type>
846
+ <sort_order>230</sort_order>
847
+ <show_in_default>1</show_in_default>
848
+ <show_in_website>1</show_in_website>
849
+ <show_in_store>1</show_in_store>
850
+ <depends>
851
+ <active>1</active>
852
+ </depends>
853
+ </min_order_total>
854
+ <max_order_total translate="label comment">
855
+ <label>Maximum Order Total</label>
856
+ <config_path>payment/pbxep_private/max_order_total</config_path>
857
+ <frontend_type>text</frontend_type>
858
+ <sort_order>240</sort_order>
859
+ <show_in_default>1</show_in_default>
860
+ <show_in_website>1</show_in_website>
861
+ <show_in_store>1</show_in_store>
862
+ <depends>
863
+ <active>1</active>
864
+ </depends>
865
+ </max_order_total>
866
+ </fields>
867
+ </pbxep_private>
868
+ <pbxep_paypal translate="label comment">
869
+ <label>Pay by Paypal</label>
870
+ <expanded>0</expanded>
871
+ <frontend_type>text</frontend_type>
872
+ <sort_order>40</sort_order>
873
+ <show_in_default>1</show_in_default>
874
+ <show_in_website>1</show_in_website>
875
+ <show_in_store>1</show_in_store>
876
+ <fields>
877
+ <active translate="label comment">
878
+ <label>Enable</label>
879
+ <frontend_type>select</frontend_type>
880
+ <source_model>adminhtml/system_config_source_yesno</source_model>
881
+ <config_path>payment/pbxep_paypal/active</config_path>
882
+ <sort_order>10</sort_order>
883
+ <show_in_default>1</show_in_default>
884
+ <show_in_website>1</show_in_website>
885
+ <show_in_store>1</show_in_store>
886
+ </active>
887
+ <title translate="label comment">
888
+ <label>Title</label>
889
+ <config_path>payment/pbxep_paypal/title</config_path>
890
+ <frontend_type>text</frontend_type>
891
+ <sort_order>30</sort_order>
892
+ <show_in_default>1</show_in_default>
893
+ <show_in_website>1</show_in_website>
894
+ <show_in_store>1</show_in_store>
895
+ <depends>
896
+ <active>1</active>
897
+ </depends>
898
+ </title>
899
+ <sort_order translate="label comment">
900
+ <label>Sort Order</label>
901
+ <config_path>payment/pbxep_paypal/sort_order</config_path>
902
+ <frontend_type>text</frontend_type>
903
+ <sort_order>40</sort_order>
904
+ <show_in_default>1</show_in_default>
905
+ <show_in_website>1</show_in_website>
906
+ <show_in_store>1</show_in_store>
907
+ <frontend_class>validate-number</frontend_class>
908
+ <depends>
909
+ <active>1</active>
910
+ </depends>
911
+ </sort_order>
912
+ <action translate="label comment">
913
+ <label>Debit type</label>
914
+ <frontend_model>pbxep/admin_field_select</frontend_model>
915
+ <frontend_type>select</frontend_type>
916
+ <source_model>pbxep/admin_payment_actionpaypal</source_model>
917
+ <config_path>payment/pbxep_paypal/action</config_path>
918
+ <sort_order>50</sort_order>
919
+ <show_in_default>1</show_in_default>
920
+ <show_in_website>1</show_in_website>
921
+ <show_in_store>1</show_in_store>
922
+ <depends>
923
+ <active>1</active>
924
+ </depends>
925
+ </action>
926
+ <status translate="label comment">
927
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
928
+ <label>Payment status</label>
929
+ <sort_order>100</sort_order>
930
+ <show_in_default>1</show_in_default>
931
+ <show_in_website>1</show_in_website>
932
+ <show_in_store>1</show_in_store>
933
+ <depends>
934
+ <active>1</active>
935
+ </depends>
936
+ </status>
937
+ <status_authorized translate="label comment">
938
+ <label>Once authorized</label>
939
+ <config_path>payment/pbxep_paypal/status/authorized</config_path>
940
+ <frontend_type>select</frontend_type>
941
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
942
+ <sort_order>110</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
+ <depends>
947
+ <active>1</active>
948
+ <action>manual</action>
949
+ </depends>
950
+ </status_authorized>
951
+ <status_paid translate="label comment">
952
+ <label>Once paid</label>
953
+ <config_path>payment/pbxep_paypal/status/paid</config_path>
954
+ <frontend_type>select</frontend_type>
955
+ <source_model>pbxep/admin_order_status_processing</source_model>
956
+ <sort_order>110</sort_order>
957
+ <show_in_default>1</show_in_default>
958
+ <show_in_website>1</show_in_website>
959
+ <show_in_store>0</show_in_store>
960
+ <depends>
961
+ <active>1</active>
962
+ </depends>
963
+ </status_paid>
964
+ <status_auto_capture translate="label comment">
965
+ <label>Automatic capture status</label>
966
+ <config_path>payment/pbxep_paypal/status/auto_capture</config_path>
967
+ <frontend_type>select</frontend_type>
968
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
969
+ <sort_order>112</sort_order>
970
+ <show_in_default>1</show_in_default>
971
+ <show_in_website>1</show_in_website>
972
+ <show_in_store>0</show_in_store>
973
+ <depends>
974
+ <active>1</active>
975
+ <action>manual</action>
976
+ </depends>
977
+ </status_auto_capture>
978
+ <conditions translate="label comment">
979
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
980
+ <label>Conditions</label>
981
+ <sort_order>200</sort_order>
982
+ <show_in_default>1</show_in_default>
983
+ <show_in_website>1</show_in_website>
984
+ <show_in_store>1</show_in_store>
985
+ <depends>
986
+ <active>1</active>
987
+ </depends>
988
+ </conditions>
989
+ <allowspecific translate="label comment">
990
+ <label>Payment from Applicable Countries</label>
991
+ <config_path>payment/pbxep_paypal/allowspecific</config_path>
992
+ <frontend_type>allowspecific</frontend_type>
993
+ <sort_order>210</sort_order>
994
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
995
+ <show_in_default>1</show_in_default>
996
+ <show_in_website>1</show_in_website>
997
+ <show_in_store>1</show_in_store>
998
+ <depends>
999
+ <active>1</active>
1000
+ </depends>
1001
+ </allowspecific>
1002
+ <specificcountry translate="label comment">
1003
+ <label>Payment from Specific Countries</label>
1004
+ <config_path>payment/pbxep_paypal/specificcountry</config_path>
1005
+ <frontend_type>multiselect</frontend_type>
1006
+ <sort_order>220</sort_order>
1007
+ <source_model>adminhtml/system_config_source_country</source_model>
1008
+ <show_in_default>1</show_in_default>
1009
+ <show_in_website>1</show_in_website>
1010
+ <show_in_store>1</show_in_store>
1011
+ <depends>
1012
+ <allowspecific>1</allowspecific>
1013
+ <active>1</active>
1014
+ </depends>
1015
+ </specificcountry>
1016
+ <min_order_total translate="label comment">
1017
+ <label>Minimum Order Total</label>
1018
+ <config_path>payment/pbxep_paypal/min_order_total</config_path>
1019
+ <frontend_type>text</frontend_type>
1020
+ <sort_order>230</sort_order>
1021
+ <show_in_default>1</show_in_default>
1022
+ <show_in_website>1</show_in_website>
1023
+ <show_in_store>1</show_in_store>
1024
+ <depends>
1025
+ <active>1</active>
1026
+ </depends>
1027
+ </min_order_total>
1028
+ <max_order_total translate="label comment">
1029
+ <label>Maximum Order Total</label>
1030
+ <config_path>payment/pbxep_paypal/max_order_total</config_path>
1031
+ <frontend_type>text</frontend_type>
1032
+ <sort_order>240</sort_order>
1033
+ <show_in_default>1</show_in_default>
1034
+ <show_in_website>1</show_in_website>
1035
+ <show_in_store>1</show_in_store>
1036
+ <depends>
1037
+ <active>1</active>
1038
+ </depends>
1039
+ </max_order_total>
1040
+ </fields>
1041
+ </pbxep_paypal>
1042
+ <pbxep_prepaid translate="label comment">
1043
+ <label>Pay by Saving or Prepaid Ticket</label>
1044
+ <expanded>0</expanded>
1045
+ <frontend_type>text</frontend_type>
1046
+ <sort_order>50</sort_order>
1047
+ <show_in_default>1</show_in_default>
1048
+ <show_in_website>1</show_in_website>
1049
+ <show_in_store>1</show_in_store>
1050
+ <fields>
1051
+ <active translate="label comment">
1052
+ <label>Enable</label>
1053
+ <frontend_type>select</frontend_type>
1054
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1055
+ <config_path>payment/pbxep_prepaid/active</config_path>
1056
+ <sort_order>10</sort_order>
1057
+ <show_in_default>1</show_in_default>
1058
+ <show_in_website>1</show_in_website>
1059
+ <show_in_store>1</show_in_store>
1060
+ </active>
1061
+ <cctypes translate="label comment">
1062
+ <label>Card type</label>
1063
+ <config_path>payment/pbxep_prepaid/cctypes</config_path>
1064
+ <frontend_model>pbxep/admin_field_checkboxes</frontend_model>
1065
+ <frontend_type>checkboxes</frontend_type>
1066
+ <source_model>pbxep/admin_cards_prepaid</source_model>
1067
+ <sort_order>20</sort_order>
1068
+ <show_in_default>1</show_in_default>
1069
+ <show_in_website>1</show_in_website>
1070
+ <show_in_store>1</show_in_store>
1071
+ <depends>
1072
+ <active>1</active>
1073
+ </depends>
1074
+ </cctypes>
1075
+ <title translate="label comment">
1076
+ <label>Title</label>
1077
+ <config_path>payment/pbxep_prepaid/title</config_path>
1078
+ <frontend_type>text</frontend_type>
1079
+ <sort_order>30</sort_order>
1080
+ <show_in_default>1</show_in_default>
1081
+ <show_in_website>1</show_in_website>
1082
+ <show_in_store>1</show_in_store>
1083
+ <depends>
1084
+ <active>1</active>
1085
+ </depends>
1086
+ </title>
1087
+ <sort_order translate="label comment">
1088
+ <label>Sort Order</label>
1089
+ <config_path>payment/pbxep_prepaid/sort_order</config_path>
1090
+ <frontend_type>text</frontend_type>
1091
+ <sort_order>40</sort_order>
1092
+ <show_in_default>1</show_in_default>
1093
+ <show_in_website>1</show_in_website>
1094
+ <show_in_store>1</show_in_store>
1095
+ <frontend_class>validate-number</frontend_class>
1096
+ <depends>
1097
+ <active>1</active>
1098
+ </depends>
1099
+ </sort_order>
1100
+ <status translate="label comment">
1101
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1102
+ <label>Payment status</label>
1103
+ <sort_order>100</sort_order>
1104
+ <show_in_default>1</show_in_default>
1105
+ <show_in_website>1</show_in_website>
1106
+ <show_in_store>1</show_in_store>
1107
+ <depends>
1108
+ <active>1</active>
1109
+ </depends>
1110
+ </status>
1111
+ <status_authorized translate="label comment">
1112
+ <label>Once authorized</label>
1113
+ <config_path>payment/pbxep_prepaid/status/authorized</config_path>
1114
+ <frontend_type>select</frontend_type>
1115
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
1116
+ <sort_order>110</sort_order>
1117
+ <show_in_default>1</show_in_default>
1118
+ <show_in_website>1</show_in_website>
1119
+ <show_in_store>0</show_in_store>
1120
+ <depends>
1121
+ <active>1</active>
1122
+ <action>manual</action>
1123
+ </depends>
1124
+ </status_authorized>
1125
+ <status_paid translate="label comment">
1126
+ <label>Once paid</label>
1127
+ <config_path>payment/pbxep_prepaid/status/paid</config_path>
1128
+ <frontend_type>select</frontend_type>
1129
+ <source_model>pbxep/admin_order_status_processing</source_model>
1130
+ <sort_order>110</sort_order>
1131
+ <show_in_default>1</show_in_default>
1132
+ <show_in_website>1</show_in_website>
1133
+ <show_in_store>0</show_in_store>
1134
+ <depends>
1135
+ <active>1</active>
1136
+ </depends>
1137
+ </status_paid>
1138
+ <status_auto_capture translate="label comment">
1139
+ <label>Automatic capture status</label>
1140
+ <config_path>payment/pbxep_prepaid/status/auto_capture</config_path>
1141
+ <frontend_type>select</frontend_type>
1142
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
1143
+ <sort_order>112</sort_order>
1144
+ <show_in_default>1</show_in_default>
1145
+ <show_in_website>1</show_in_website>
1146
+ <show_in_store>0</show_in_store>
1147
+ <depends>
1148
+ <active>1</active>
1149
+ <action>manual</action>
1150
+ </depends>
1151
+ </status_auto_capture>
1152
+ <conditions translate="label comment">
1153
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1154
+ <label>Conditions</label>
1155
+ <sort_order>200</sort_order>
1156
+ <show_in_default>1</show_in_default>
1157
+ <show_in_website>1</show_in_website>
1158
+ <show_in_store>1</show_in_store>
1159
+ <depends>
1160
+ <active>1</active>
1161
+ </depends>
1162
+ </conditions>
1163
+ <allowspecific translate="label comment">
1164
+ <label>Payment from Applicable Countries</label>
1165
+ <config_path>payment/pbxep_prepaid/allowspecific</config_path>
1166
+ <frontend_type>allowspecific</frontend_type>
1167
+ <sort_order>210</sort_order>
1168
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1169
+ <show_in_default>1</show_in_default>
1170
+ <show_in_website>1</show_in_website>
1171
+ <show_in_store>1</show_in_store>
1172
+ <depends>
1173
+ <active>1</active>
1174
+ </depends>
1175
+ </allowspecific>
1176
+ <specificcountry translate="label comment">
1177
+ <label>Payment from Specific Countries</label>
1178
+ <config_path>payment/pbxep_prepaid/specificcountry</config_path>
1179
+ <frontend_type>multiselect</frontend_type>
1180
+ <sort_order>220</sort_order>
1181
+ <source_model>adminhtml/system_config_source_country</source_model>
1182
+ <show_in_default>1</show_in_default>
1183
+ <show_in_website>1</show_in_website>
1184
+ <show_in_store>1</show_in_store>
1185
+ <depends>
1186
+ <allowspecific>1</allowspecific>
1187
+ <active>1</active>
1188
+ </depends>
1189
+ </specificcountry>
1190
+ <min_order_total translate="label comment">
1191
+ <label>Minimum Order Total</label>
1192
+ <config_path>payment/pbxep_prepaid/min_order_total</config_path>
1193
+ <frontend_type>text</frontend_type>
1194
+ <sort_order>230</sort_order>
1195
+ <show_in_default>1</show_in_default>
1196
+ <show_in_website>1</show_in_website>
1197
+ <show_in_store>1</show_in_store>
1198
+ <depends>
1199
+ <active>1</active>
1200
+ </depends>
1201
+ </min_order_total>
1202
+ <max_order_total translate="label comment">
1203
+ <label>Maximum Order Total</label>
1204
+ <config_path>payment/pbxep_prepaid/max_order_total</config_path>
1205
+ <frontend_type>text</frontend_type>
1206
+ <sort_order>240</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
+ <depends>
1211
+ <active>1</active>
1212
+ </depends>
1213
+ </max_order_total>
1214
+ </fields>
1215
+ </pbxep_prepaid>
1216
+ <pbxep_financial translate="label comment">
1217
+ <label>Pay by Card and Means of Financing</label>
1218
+ <expanded>0</expanded>
1219
+ <frontend_type>text</frontend_type>
1220
+ <sort_order>60</sort_order>
1221
+ <show_in_default>1</show_in_default>
1222
+ <show_in_website>1</show_in_website>
1223
+ <show_in_store>1</show_in_store>
1224
+ <fields>
1225
+ <active translate="label comment">
1226
+ <label>Enable</label>
1227
+ <frontend_type>select</frontend_type>
1228
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1229
+ <config_path>payment/pbxep_financial/active</config_path>
1230
+ <sort_order>10</sort_order>
1231
+ <show_in_default>1</show_in_default>
1232
+ <show_in_website>1</show_in_website>
1233
+ <show_in_store>1</show_in_store>
1234
+ </active>
1235
+ <cctypes translate="label comment">
1236
+ <label>Card type</label>
1237
+ <config_path>payment/pbxep_financial/cctypes</config_path>
1238
+ <frontend_model>pbxep/admin_field_checkboxes</frontend_model>
1239
+ <frontend_type>checkboxes</frontend_type>
1240
+ <source_model>pbxep/admin_cards_financial</source_model>
1241
+ <sort_order>20</sort_order>
1242
+ <show_in_default>1</show_in_default>
1243
+ <show_in_website>1</show_in_website>
1244
+ <show_in_store>1</show_in_store>
1245
+ <depends>
1246
+ <active>1</active>
1247
+ </depends>
1248
+ </cctypes>
1249
+ <title translate="label comment">
1250
+ <label>Title</label>
1251
+ <config_path>payment/pbxep_financial/title</config_path>
1252
+ <frontend_type>text</frontend_type>
1253
+ <sort_order>30</sort_order>
1254
+ <show_in_default>1</show_in_default>
1255
+ <show_in_website>1</show_in_website>
1256
+ <show_in_store>1</show_in_store>
1257
+ <depends>
1258
+ <active>1</active>
1259
+ </depends>
1260
+ </title>
1261
+ <sort_order translate="label comment">
1262
+ <label>Sort Order</label>
1263
+ <config_path>payment/pbxep_financial/sort_order</config_path>
1264
+ <frontend_type>text</frontend_type>
1265
+ <sort_order>40</sort_order>
1266
+ <show_in_default>1</show_in_default>
1267
+ <show_in_website>1</show_in_website>
1268
+ <show_in_store>1</show_in_store>
1269
+ <frontend_class>validate-number</frontend_class>
1270
+ <depends>
1271
+ <active>1</active>
1272
+ </depends>
1273
+ </sort_order>
1274
+ <status translate="label comment">
1275
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1276
+ <label>Payment status</label>
1277
+ <sort_order>100</sort_order>
1278
+ <show_in_default>1</show_in_default>
1279
+ <show_in_website>1</show_in_website>
1280
+ <show_in_store>1</show_in_store>
1281
+ <depends>
1282
+ <active>1</active>
1283
+ </depends>
1284
+ </status>
1285
+ <status_authorized translate="label comment">
1286
+ <label>Once authorized</label>
1287
+ <config_path>payment/pbxep_financial/status/authorized</config_path>
1288
+ <frontend_type>select</frontend_type>
1289
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
1290
+ <sort_order>110</sort_order>
1291
+ <show_in_default>1</show_in_default>
1292
+ <show_in_website>1</show_in_website>
1293
+ <show_in_store>0</show_in_store>
1294
+ <depends>
1295
+ <active>1</active>
1296
+ <action>manual</action>
1297
+ </depends>
1298
+ </status_authorized>
1299
+ <status_paid translate="label comment">
1300
+ <label>Once paid</label>
1301
+ <config_path>payment/pbxep_financial/status/paid</config_path>
1302
+ <frontend_type>select</frontend_type>
1303
+ <source_model>pbxep/admin_order_status_processing</source_model>
1304
+ <sort_order>110</sort_order>
1305
+ <show_in_default>1</show_in_default>
1306
+ <show_in_website>1</show_in_website>
1307
+ <show_in_store>0</show_in_store>
1308
+ <depends>
1309
+ <active>1</active>
1310
+ </depends>
1311
+ </status_paid>
1312
+ <status_auto_capture translate="label comment">
1313
+ <label>Automatic capture status</label>
1314
+ <config_path>payment/pbxep_financial/status/auto_capture</config_path>
1315
+ <frontend_type>select</frontend_type>
1316
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
1317
+ <sort_order>112</sort_order>
1318
+ <show_in_default>1</show_in_default>
1319
+ <show_in_website>1</show_in_website>
1320
+ <show_in_store>0</show_in_store>
1321
+ <depends>
1322
+ <active>1</active>
1323
+ <action>manual</action>
1324
+ </depends>
1325
+ </status_auto_capture>
1326
+ <conditions translate="label comment">
1327
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1328
+ <label>Conditions</label>
1329
+ <sort_order>200</sort_order>
1330
+ <show_in_default>1</show_in_default>
1331
+ <show_in_website>1</show_in_website>
1332
+ <show_in_store>1</show_in_store>
1333
+ <depends>
1334
+ <active>1</active>
1335
+ </depends>
1336
+ </conditions>
1337
+ <allowspecific translate="label comment">
1338
+ <label>Payment from Applicable Countries</label>
1339
+ <config_path>payment/pbxep_financial/allowspecific</config_path>
1340
+ <frontend_type>allowspecific</frontend_type>
1341
+ <sort_order>210</sort_order>
1342
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1343
+ <show_in_default>1</show_in_default>
1344
+ <show_in_website>1</show_in_website>
1345
+ <show_in_store>1</show_in_store>
1346
+ <depends>
1347
+ <active>1</active>
1348
+ </depends>
1349
+ </allowspecific>
1350
+ <specificcountry translate="label comment">
1351
+ <label>Payment from Specific Countries</label>
1352
+ <config_path>payment/pbxep_financial/specificcountry</config_path>
1353
+ <frontend_type>multiselect</frontend_type>
1354
+ <sort_order>220</sort_order>
1355
+ <source_model>adminhtml/system_config_source_country</source_model>
1356
+ <show_in_default>1</show_in_default>
1357
+ <show_in_website>1</show_in_website>
1358
+ <show_in_store>1</show_in_store>
1359
+ <depends>
1360
+ <allowspecific>1</allowspecific>
1361
+ <active>1</active>
1362
+ </depends>
1363
+ </specificcountry>
1364
+ <min_order_total translate="label comment">
1365
+ <label>Minimum Order Total</label>
1366
+ <config_path>payment/pbxep_financial/min_order_total</config_path>
1367
+ <frontend_type>text</frontend_type>
1368
+ <sort_order>230</sort_order>
1369
+ <show_in_default>1</show_in_default>
1370
+ <show_in_website>1</show_in_website>
1371
+ <show_in_store>1</show_in_store>
1372
+ <depends>
1373
+ <active>1</active>
1374
+ </depends>
1375
+ </min_order_total>
1376
+ <max_order_total translate="label comment">
1377
+ <label>Maximum Order Total</label>
1378
+ <config_path>payment/pbxep_financial/max_order_total</config_path>
1379
+ <frontend_type>text</frontend_type>
1380
+ <sort_order>240</sort_order>
1381
+ <show_in_default>1</show_in_default>
1382
+ <show_in_website>1</show_in_website>
1383
+ <show_in_store>1</show_in_store>
1384
+ <depends>
1385
+ <active>1</active>
1386
+ </depends>
1387
+ </max_order_total>
1388
+ </fields>
1389
+ </pbxep_financial>
1390
+ <pbxep_bcmc translate="label comment">
1391
+ <label>Pay by Bancontact Mister Cash</label>
1392
+ <expanded>0</expanded>
1393
+ <frontend_type>text</frontend_type>
1394
+ <sort_order>70</sort_order>
1395
+ <show_in_default>1</show_in_default>
1396
+ <show_in_website>1</show_in_website>
1397
+ <show_in_store>1</show_in_store>
1398
+ <fields>
1399
+ <active translate="label comment">
1400
+ <label>Enable</label>
1401
+ <frontend_type>select</frontend_type>
1402
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1403
+ <config_path>payment/pbxep_bcmc/active</config_path>
1404
+ <sort_order>10</sort_order>
1405
+ <show_in_default>1</show_in_default>
1406
+ <show_in_website>1</show_in_website>
1407
+ <show_in_store>1</show_in_store>
1408
+ </active>
1409
+ <title translate="label comment">
1410
+ <label>Title</label>
1411
+ <config_path>payment/pbxep_bcmc/title</config_path>
1412
+ <frontend_type>text</frontend_type>
1413
+ <sort_order>30</sort_order>
1414
+ <show_in_default>1</show_in_default>
1415
+ <show_in_website>1</show_in_website>
1416
+ <show_in_store>1</show_in_store>
1417
+ <depends>
1418
+ <active>1</active>
1419
+ </depends>
1420
+ </title>
1421
+ <sort_order translate="label comment">
1422
+ <label>Sort Order</label>
1423
+ <config_path>payment/pbxep_bcmc/sort_order</config_path>
1424
+ <frontend_type>text</frontend_type>
1425
+ <sort_order>40</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
+ <frontend_class>validate-number</frontend_class>
1430
+ <depends>
1431
+ <active>1</active>
1432
+ </depends>
1433
+ </sort_order>
1434
+ <status translate="label comment">
1435
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1436
+ <label>Payment status</label>
1437
+ <sort_order>100</sort_order>
1438
+ <show_in_default>1</show_in_default>
1439
+ <show_in_website>1</show_in_website>
1440
+ <show_in_store>1</show_in_store>
1441
+ <depends>
1442
+ <active>1</active>
1443
+ </depends>
1444
+ </status>
1445
+ <status_authorized translate="label comment">
1446
+ <label>Once authorized</label>
1447
+ <config_path>payment/pbxep_bcmc/status/authorized</config_path>
1448
+ <frontend_type>select</frontend_type>
1449
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
1450
+ <sort_order>110</sort_order>
1451
+ <show_in_default>1</show_in_default>
1452
+ <show_in_website>1</show_in_website>
1453
+ <show_in_store>0</show_in_store>
1454
+ <depends>
1455
+ <active>1</active>
1456
+ <action>manual</action>
1457
+ </depends>
1458
+ </status_authorized>
1459
+ <status_paid translate="label comment">
1460
+ <label>Once paid</label>
1461
+ <config_path>payment/pbxep_bcmc/status/paid</config_path>
1462
+ <frontend_type>select</frontend_type>
1463
+ <source_model>pbxep/admin_order_status_processing</source_model>
1464
+ <sort_order>110</sort_order>
1465
+ <show_in_default>1</show_in_default>
1466
+ <show_in_website>1</show_in_website>
1467
+ <show_in_store>0</show_in_store>
1468
+ <depends>
1469
+ <active>1</active>
1470
+ </depends>
1471
+ </status_paid>
1472
+ <status_auto_capture translate="label comment">
1473
+ <label>Automatic capture status</label>
1474
+ <config_path>payment/pbxep_bcmc/status/auto_capture</config_path>
1475
+ <frontend_type>select</frontend_type>
1476
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
1477
+ <sort_order>112</sort_order>
1478
+ <show_in_default>1</show_in_default>
1479
+ <show_in_website>1</show_in_website>
1480
+ <show_in_store>0</show_in_store>
1481
+ <depends>
1482
+ <active>1</active>
1483
+ <action>manual</action>
1484
+ </depends>
1485
+ </status_auto_capture>
1486
+ <conditions translate="label comment">
1487
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1488
+ <label>Conditions</label>
1489
+ <sort_order>200</sort_order>
1490
+ <show_in_default>1</show_in_default>
1491
+ <show_in_website>1</show_in_website>
1492
+ <show_in_store>1</show_in_store>
1493
+ <depends>
1494
+ <active>1</active>
1495
+ </depends>
1496
+ </conditions>
1497
+ <allowspecific translate="label comment">
1498
+ <label>Payment from Applicable Countries</label>
1499
+ <config_path>payment/pbxep_bcmc/allowspecific</config_path>
1500
+ <frontend_type>allowspecific</frontend_type>
1501
+ <sort_order>210</sort_order>
1502
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1503
+ <show_in_default>1</show_in_default>
1504
+ <show_in_website>1</show_in_website>
1505
+ <show_in_store>1</show_in_store>
1506
+ <depends>
1507
+ <active>1</active>
1508
+ </depends>
1509
+ </allowspecific>
1510
+ <specificcountry translate="label comment">
1511
+ <label>Payment from Specific Countries</label>
1512
+ <config_path>payment/pbxep_bcmc/specificcountry</config_path>
1513
+ <frontend_type>multiselect</frontend_type>
1514
+ <sort_order>220</sort_order>
1515
+ <source_model>adminhtml/system_config_source_country</source_model>
1516
+ <show_in_default>1</show_in_default>
1517
+ <show_in_website>1</show_in_website>
1518
+ <show_in_store>1</show_in_store>
1519
+ <depends>
1520
+ <allowspecific>1</allowspecific>
1521
+ <active>1</active>
1522
+ </depends>
1523
+ </specificcountry>
1524
+ <min_order_total translate="label comment">
1525
+ <label>Minimum Order Total</label>
1526
+ <config_path>payment/pbxep_bcmc/min_order_total</config_path>
1527
+ <frontend_type>text</frontend_type>
1528
+ <sort_order>230</sort_order>
1529
+ <show_in_default>1</show_in_default>
1530
+ <show_in_website>1</show_in_website>
1531
+ <show_in_store>1</show_in_store>
1532
+ <depends>
1533
+ <active>1</active>
1534
+ </depends>
1535
+ </min_order_total>
1536
+ <max_order_total translate="label comment">
1537
+ <label>Maximum Order Total</label>
1538
+ <config_path>payment/pbxep_bcmc/max_order_total</config_path>
1539
+ <frontend_type>text</frontend_type>
1540
+ <sort_order>240</sort_order>
1541
+ <show_in_default>1</show_in_default>
1542
+ <show_in_website>1</show_in_website>
1543
+ <show_in_store>1</show_in_store>
1544
+ <depends>
1545
+ <active>1</active>
1546
+ </depends>
1547
+ </max_order_total>
1548
+ <tds translate="label comment">
1549
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1550
+ <label>3-D Secure</label>
1551
+ <sort_order>300</sort_order>
1552
+ <show_in_default>1</show_in_default>
1553
+ <show_in_website>1</show_in_website>
1554
+ <show_in_store>1</show_in_store>
1555
+ <depends>
1556
+ <active>1</active>
1557
+ </depends>
1558
+ </tds>
1559
+ <tds_info translate="label comment">
1560
+ <label><![CDATA[3-D Secure is mandatory for this payment method.]]></label>
1561
+ <frontend_model>pbxep/admin_info</frontend_model>
1562
+ <sort_order>305</sort_order>
1563
+ <show_in_default>1</show_in_default>
1564
+ <show_in_website>1</show_in_website>
1565
+ <show_in_store>1</show_in_store>
1566
+ <depends>
1567
+ <active>1</active>
1568
+ </depends>
1569
+ </tds_info>
1570
+ </fields>
1571
+ </pbxep_bcmc>
1572
+ <pbxep_maestro translate="label comment">
1573
+ <label>Pay by Maestro</label>
1574
+ <expanded>0</expanded>
1575
+ <frontend_type>text</frontend_type>
1576
+ <sort_order>80</sort_order>
1577
+ <show_in_default>1</show_in_default>
1578
+ <show_in_website>1</show_in_website>
1579
+ <show_in_store>1</show_in_store>
1580
+ <fields>
1581
+ <active translate="label comment">
1582
+ <label>Enable</label>
1583
+ <frontend_type>select</frontend_type>
1584
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1585
+ <config_path>payment/pbxep_maestro/active</config_path>
1586
+ <sort_order>10</sort_order>
1587
+ <show_in_default>1</show_in_default>
1588
+ <show_in_website>1</show_in_website>
1589
+ <show_in_store>1</show_in_store>
1590
+ </active>
1591
+ <title translate="label comment">
1592
+ <label>Title</label>
1593
+ <config_path>payment/pbxep_maestro/title</config_path>
1594
+ <frontend_type>text</frontend_type>
1595
+ <sort_order>30</sort_order>
1596
+ <show_in_default>1</show_in_default>
1597
+ <show_in_website>1</show_in_website>
1598
+ <show_in_store>1</show_in_store>
1599
+ <depends>
1600
+ <active>1</active>
1601
+ </depends>
1602
+ </title>
1603
+ <sort_order translate="label comment">
1604
+ <label>Sort Order</label>
1605
+ <config_path>payment/pbxep_maestro/sort_order</config_path>
1606
+ <frontend_type>text</frontend_type>
1607
+ <sort_order>40</sort_order>
1608
+ <show_in_default>1</show_in_default>
1609
+ <show_in_website>1</show_in_website>
1610
+ <show_in_store>1</show_in_store>
1611
+ <frontend_class>validate-number</frontend_class>
1612
+ <depends>
1613
+ <active>1</active>
1614
+ </depends>
1615
+ </sort_order>
1616
+ <action translate="label comment">
1617
+ <label>Debit type</label>
1618
+ <frontend_model>pbxep/admin_field_select</frontend_model>
1619
+ <frontend_type>select</frontend_type>
1620
+ <source_model>pbxep/admin_payment_action</source_model>
1621
+ <config_path>payment/pbxep_maestro/action</config_path>
1622
+ <sort_order>50</sort_order>
1623
+ <show_in_default>1</show_in_default>
1624
+ <show_in_website>1</show_in_website>
1625
+ <show_in_store>1</show_in_store>
1626
+ <depends>
1627
+ <active>1</active>
1628
+ </depends>
1629
+ </action>
1630
+ <delay translate="label comment">
1631
+ <label>Delay</label>
1632
+ <config_path>payment/pbxep_maestro/delay</config_path>
1633
+ <frontend_type>select</frontend_type>
1634
+ <source_model>pbxep/admin_payment_delays</source_model>
1635
+ <sort_order>60</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
+ <depends>
1640
+ <action>deferred</action>
1641
+ <active>1</active>
1642
+ </depends>
1643
+ </delay>
1644
+ <status translate="label comment">
1645
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1646
+ <label>Payment status</label>
1647
+ <sort_order>100</sort_order>
1648
+ <show_in_default>1</show_in_default>
1649
+ <show_in_website>1</show_in_website>
1650
+ <show_in_store>1</show_in_store>
1651
+ <depends>
1652
+ <active>1</active>
1653
+ </depends>
1654
+ </status>
1655
+ <status_authorized translate="label comment">
1656
+ <label>Once authorized</label>
1657
+ <config_path>payment/pbxep_maestro/status/authorized</config_path>
1658
+ <frontend_type>select</frontend_type>
1659
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
1660
+ <sort_order>110</sort_order>
1661
+ <show_in_default>1</show_in_default>
1662
+ <show_in_website>1</show_in_website>
1663
+ <show_in_store>0</show_in_store>
1664
+ <depends>
1665
+ <active>1</active>
1666
+ <action>manual</action>
1667
+ </depends>
1668
+ </status_authorized>
1669
+ <status_paid translate="label comment">
1670
+ <label>Once paid</label>
1671
+ <config_path>payment/pbxep_maestro/status/paid</config_path>
1672
+ <frontend_type>select</frontend_type>
1673
+ <source_model>pbxep/admin_order_status_processing</source_model>
1674
+ <sort_order>110</sort_order>
1675
+ <show_in_default>1</show_in_default>
1676
+ <show_in_website>1</show_in_website>
1677
+ <show_in_store>0</show_in_store>
1678
+ <depends>
1679
+ <active>1</active>
1680
+ </depends>
1681
+ </status_paid>
1682
+ <status_auto_capture translate="label comment">
1683
+ <label>Automatic capture status</label>
1684
+ <config_path>payment/pbxep_maestro/status/auto_capture</config_path>
1685
+ <frontend_type>select</frontend_type>
1686
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
1687
+ <sort_order>112</sort_order>
1688
+ <show_in_default>1</show_in_default>
1689
+ <show_in_website>1</show_in_website>
1690
+ <show_in_store>0</show_in_store>
1691
+ <depends>
1692
+ <active>1</active>
1693
+ <action>manual</action>
1694
+ </depends>
1695
+ </status_auto_capture>
1696
+ <conditions translate="label comment">
1697
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1698
+ <label>Conditions</label>
1699
+ <sort_order>200</sort_order>
1700
+ <show_in_default>1</show_in_default>
1701
+ <show_in_website>1</show_in_website>
1702
+ <show_in_store>1</show_in_store>
1703
+ <depends>
1704
+ <active>1</active>
1705
+ </depends>
1706
+ </conditions>
1707
+ <allowspecific translate="label comment">
1708
+ <label>Payment from Applicable Countries</label>
1709
+ <config_path>payment/pbxep_maestro/allowspecific</config_path>
1710
+ <frontend_type>allowspecific</frontend_type>
1711
+ <sort_order>210</sort_order>
1712
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1713
+ <show_in_default>1</show_in_default>
1714
+ <show_in_website>1</show_in_website>
1715
+ <show_in_store>1</show_in_store>
1716
+ <depends>
1717
+ <active>1</active>
1718
+ </depends>
1719
+ </allowspecific>
1720
+ <specificcountry translate="label comment">
1721
+ <label>Payment from Specific Countries</label>
1722
+ <config_path>payment/pbxep_maestro/specificcountry</config_path>
1723
+ <frontend_type>multiselect</frontend_type>
1724
+ <sort_order>220</sort_order>
1725
+ <source_model>adminhtml/system_config_source_country</source_model>
1726
+ <show_in_default>1</show_in_default>
1727
+ <show_in_website>1</show_in_website>
1728
+ <show_in_store>1</show_in_store>
1729
+ <depends>
1730
+ <allowspecific>1</allowspecific>
1731
+ <active>1</active>
1732
+ </depends>
1733
+ </specificcountry>
1734
+ <min_order_total translate="label comment">
1735
+ <label>Minimum Order Total</label>
1736
+ <config_path>payment/pbxep_maestro/min_order_total</config_path>
1737
+ <frontend_type>text</frontend_type>
1738
+ <sort_order>230</sort_order>
1739
+ <show_in_default>1</show_in_default>
1740
+ <show_in_website>1</show_in_website>
1741
+ <show_in_store>1</show_in_store>
1742
+ <depends>
1743
+ <active>1</active>
1744
+ </depends>
1745
+ </min_order_total>
1746
+ <max_order_total translate="label comment">
1747
+ <label>Maximum Order Total</label>
1748
+ <config_path>payment/pbxep_maestro/max_order_total</config_path>
1749
+ <frontend_type>text</frontend_type>
1750
+ <sort_order>240</sort_order>
1751
+ <show_in_default>1</show_in_default>
1752
+ <show_in_website>1</show_in_website>
1753
+ <show_in_store>1</show_in_store>
1754
+ <depends>
1755
+ <active>1</active>
1756
+ </depends>
1757
+ </max_order_total>
1758
+ <tds translate="label comment">
1759
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1760
+ <label>3-D Secure</label>
1761
+ <sort_order>300</sort_order>
1762
+ <show_in_default>1</show_in_default>
1763
+ <show_in_website>1</show_in_website>
1764
+ <show_in_store>1</show_in_store>
1765
+ <depends>
1766
+ <active>1</active>
1767
+ </depends>
1768
+ </tds>
1769
+ <tds_info translate="label comment">
1770
+ <label><![CDATA[3-D Secure is mandatory for this payment method.]]></label>
1771
+ <frontend_model>pbxep/admin_info</frontend_model>
1772
+ <sort_order>305</sort_order>
1773
+ <show_in_default>1</show_in_default>
1774
+ <show_in_website>1</show_in_website>
1775
+ <show_in_store>1</show_in_store>
1776
+ <depends>
1777
+ <active>1</active>
1778
+ </depends>
1779
+ </tds_info>
1780
+ </fields>
1781
+ </pbxep_maestro>
1782
+ <pbxep_paybuttons translate="label comment">
1783
+ <label>Pay by Paybutton</label>
1784
+ <expanded>0</expanded>
1785
+ <frontend_type>text</frontend_type>
1786
+ <sort_order>90</sort_order>
1787
+ <show_in_default>1</show_in_default>
1788
+ <show_in_website>1</show_in_website>
1789
+ <show_in_store>1</show_in_store>
1790
+ <fields>
1791
+ <active translate="label comment">
1792
+ <label>Enable</label>
1793
+ <frontend_type>select</frontend_type>
1794
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1795
+ <config_path>payment/pbxep_paybuttons/active</config_path>
1796
+ <sort_order>10</sort_order>
1797
+ <show_in_default>1</show_in_default>
1798
+ <show_in_website>1</show_in_website>
1799
+ <show_in_store>1</show_in_store>
1800
+ </active>
1801
+ <cctypes translate="label comment">
1802
+ <label>Card type</label>
1803
+ <config_path>payment/pbxep_paybuttons/cctypes</config_path>
1804
+ <frontend_model>pbxep/admin_field_checkboxes</frontend_model>
1805
+ <frontend_type>checkboxes</frontend_type>
1806
+ <source_model>pbxep/admin_cards_paybuttons</source_model>
1807
+ <sort_order>20</sort_order>
1808
+ <show_in_default>1</show_in_default>
1809
+ <show_in_website>1</show_in_website>
1810
+ <show_in_store>1</show_in_store>
1811
+ <depends>
1812
+ <active>1</active>
1813
+ </depends>
1814
+ </cctypes>
1815
+ <title translate="label comment">
1816
+ <label>Title</label>
1817
+ <config_path>payment/pbxep_paybuttons/title</config_path>
1818
+ <frontend_type>text</frontend_type>
1819
+ <sort_order>30</sort_order>
1820
+ <show_in_default>1</show_in_default>
1821
+ <show_in_website>1</show_in_website>
1822
+ <show_in_store>1</show_in_store>
1823
+ <depends>
1824
+ <active>1</active>
1825
+ </depends>
1826
+ </title>
1827
+ <sort_order translate="label comment">
1828
+ <label>Sort Order</label>
1829
+ <config_path>payment/pbxep_paybuttons/sort_order</config_path>
1830
+ <frontend_type>text</frontend_type>
1831
+ <sort_order>40</sort_order>
1832
+ <show_in_default>1</show_in_default>
1833
+ <show_in_website>1</show_in_website>
1834
+ <show_in_store>1</show_in_store>
1835
+ <frontend_class>validate-number</frontend_class>
1836
+ <depends>
1837
+ <active>1</active>
1838
+ </depends>
1839
+ </sort_order>
1840
+ <status translate="label comment">
1841
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1842
+ <label>Payment status</label>
1843
+ <sort_order>100</sort_order>
1844
+ <show_in_default>1</show_in_default>
1845
+ <show_in_website>1</show_in_website>
1846
+ <show_in_store>1</show_in_store>
1847
+ <depends>
1848
+ <active>1</active>
1849
+ </depends>
1850
+ </status>
1851
+ <status_authorized translate="label comment">
1852
+ <label>Once authorized</label>
1853
+ <config_path>payment/pbxep_paybuttons/status/authorized</config_path>
1854
+ <frontend_type>select</frontend_type>
1855
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
1856
+ <sort_order>110</sort_order>
1857
+ <show_in_default>1</show_in_default>
1858
+ <show_in_website>1</show_in_website>
1859
+ <show_in_store>0</show_in_store>
1860
+ <depends>
1861
+ <active>1</active>
1862
+ <action>manual</action>
1863
+ </depends>
1864
+ </status_authorized>
1865
+ <status_paid translate="label comment">
1866
+ <label>Once paid</label>
1867
+ <config_path>payment/pbxep_paybuttons/status/paid</config_path>
1868
+ <frontend_type>select</frontend_type>
1869
+ <source_model>pbxep/admin_order_status_processing</source_model>
1870
+ <sort_order>110</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
+ <depends>
1875
+ <active>1</active>
1876
+ </depends>
1877
+ </status_paid>
1878
+ <status_auto_capture translate="label comment">
1879
+ <label>Automatic capture status</label>
1880
+ <config_path>payment/pbxep_paybuttons/status/auto_capture</config_path>
1881
+ <frontend_type>select</frontend_type>
1882
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
1883
+ <sort_order>112</sort_order>
1884
+ <show_in_default>1</show_in_default>
1885
+ <show_in_website>1</show_in_website>
1886
+ <show_in_store>0</show_in_store>
1887
+ <depends>
1888
+ <active>1</active>
1889
+ <action>manual</action>
1890
+ </depends>
1891
+ </status_auto_capture>
1892
+ <conditions translate="label comment">
1893
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1894
+ <label>Conditions</label>
1895
+ <sort_order>200</sort_order>
1896
+ <show_in_default>1</show_in_default>
1897
+ <show_in_website>1</show_in_website>
1898
+ <show_in_store>1</show_in_store>
1899
+ <depends>
1900
+ <active>1</active>
1901
+ </depends>
1902
+ </conditions>
1903
+ <allowspecific translate="label comment">
1904
+ <label>Payment from Applicable Countries</label>
1905
+ <config_path>payment/pbxep_paybuttons/allowspecific</config_path>
1906
+ <frontend_type>allowspecific</frontend_type>
1907
+ <sort_order>210</sort_order>
1908
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1909
+ <show_in_default>1</show_in_default>
1910
+ <show_in_website>1</show_in_website>
1911
+ <show_in_store>1</show_in_store>
1912
+ <depends>
1913
+ <active>1</active>
1914
+ </depends>
1915
+ </allowspecific>
1916
+ <specificcountry translate="label comment">
1917
+ <label>Payment from Specific Countries</label>
1918
+ <config_path>payment/pbxep_paybuttons/specificcountry</config_path>
1919
+ <frontend_type>multiselect</frontend_type>
1920
+ <sort_order>220</sort_order>
1921
+ <source_model>adminhtml/system_config_source_country</source_model>
1922
+ <show_in_default>1</show_in_default>
1923
+ <show_in_website>1</show_in_website>
1924
+ <show_in_store>1</show_in_store>
1925
+ <depends>
1926
+ <allowspecific>1</allowspecific>
1927
+ <active>1</active>
1928
+ </depends>
1929
+ </specificcountry>
1930
+ <min_order_total translate="label comment">
1931
+ <label>Minimum Order Total</label>
1932
+ <config_path>payment/pbxep_paybuttons/min_order_total</config_path>
1933
+ <frontend_type>text</frontend_type>
1934
+ <sort_order>230</sort_order>
1935
+ <show_in_default>1</show_in_default>
1936
+ <show_in_website>1</show_in_website>
1937
+ <show_in_store>1</show_in_store>
1938
+ <depends>
1939
+ <active>1</active>
1940
+ </depends>
1941
+ </min_order_total>
1942
+ <max_order_total translate="label comment">
1943
+ <label>Maximum Order Total</label>
1944
+ <config_path>payment/pbxep_paybuttons/max_order_total</config_path>
1945
+ <frontend_type>text</frontend_type>
1946
+ <sort_order>240</sort_order>
1947
+ <show_in_default>1</show_in_default>
1948
+ <show_in_website>1</show_in_website>
1949
+ <show_in_store>1</show_in_store>
1950
+ <depends>
1951
+ <active>1</active>
1952
+ </depends>
1953
+ </max_order_total>
1954
+ </fields>
1955
+ </pbxep_paybuttons>
1956
+ </groups>
1957
+ </pbxep_payments>
1958
+ <pbxep_kwixo translate="label comment" module="pbxep">
1959
+ <label>Kwixo</label>
1960
+ <tab>pbxep</tab>
1961
+ <frontend_type>text</frontend_type>
1962
+ <sort_order>354</sort_order>
1963
+ <show_in_default>1</show_in_default>
1964
+ <show_in_website>1</show_in_website>
1965
+ <show_in_store>1</show_in_store>
1966
+ <groups>
1967
+ <fianet translate="label comment">
1968
+ <label>Informations FIA-NET</label>
1969
+ <expanded>1</expanded>
1970
+ <frontend_type>text</frontend_type>
1971
+ <sort_order>20</sort_order>
1972
+ <show_in_default>1</show_in_default>
1973
+ <show_in_website>1</show_in_website>
1974
+ <show_in_store>1</show_in_store>
1975
+ <fields>
1976
+ <default_category translate="label comment">
1977
+ <label>Catégorie par défaut</label>
1978
+ <config_path>pbxep/kwixo/default_category</config_path>
1979
+ <frontend_type>select</frontend_type>
1980
+ <source_model>pbxep/admin_fianet_categories</source_model>
1981
+ <sort_order>10</sort_order>
1982
+ <show_in_default>1</show_in_default>
1983
+ <show_in_website>1</show_in_website>
1984
+ <show_in_store>1</show_in_store>
1985
+ </default_category>
1986
+ <shipping translate="label comment">
1987
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
1988
+ <label>Informations sur les moyens de livraison</label>
1989
+ <sort_order>100</sort_order>
1990
+ <show_in_default>1</show_in_default>
1991
+ <show_in_website>1</show_in_website>
1992
+ <show_in_store>1</show_in_store>
1993
+ </shipping>
1994
+ <shipping_info translate="label comment">
1995
+ <config_path>pbxep/kwixo/shipping</config_path>
1996
+ <frontend_model>pbxep/admin_kwixo_shipping</frontend_model>
1997
+ <frontend_type>text</frontend_type>
1998
+ <backend_model>adminhtml/system_config_backend_serialized</backend_model>
1999
+ <source_model>pbxep/admin_fianet_categories</source_model>
2000
+ <sort_order>110</sort_order>
2001
+ <show_in_default>1</show_in_default>
2002
+ <show_in_website>1</show_in_website>
2003
+ <show_in_store>1</show_in_store>
2004
+ </shipping_info>
2005
+ </fields>
2006
+ </fianet>
2007
+ <kwixo_standard translate="label comment">
2008
+ <label>Paiement par Kwixo Standard</label>
2009
+ <expanded>1</expanded>
2010
+ <frontend_type>text</frontend_type>
2011
+ <sort_order>20</sort_order>
2012
+ <show_in_default>1</show_in_default>
2013
+ <show_in_website>1</show_in_website>
2014
+ <show_in_store>1</show_in_store>
2015
+ <fields>
2016
+ <active translate="label comment">
2017
+ <label>Enable</label>
2018
+ <frontend_type>select</frontend_type>
2019
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2020
+ <config_path>payment/pbxep_kwixo_standard/active</config_path>
2021
+ <sort_order>10</sort_order>
2022
+ <show_in_default>1</show_in_default>
2023
+ <show_in_website>1</show_in_website>
2024
+ <show_in_store>1</show_in_store>
2025
+ </active>
2026
+ <title translate="label comment">
2027
+ <label>Title</label>
2028
+ <config_path>payment/pbxep_kwixo_standard/title</config_path>
2029
+ <frontend_type>text</frontend_type>
2030
+ <sort_order>20</sort_order>
2031
+ <show_in_default>1</show_in_default>
2032
+ <show_in_website>1</show_in_website>
2033
+ <show_in_store>1</show_in_store>
2034
+ <depends>
2035
+ <active>1</active>
2036
+ </depends>
2037
+ </title>
2038
+ <sort_order translate="label comment">
2039
+ <label>Sort Order</label>
2040
+ <config_path>payment/pbxep_kwixo_standard/sort_order</config_path>
2041
+ <frontend_type>text</frontend_type>
2042
+ <sort_order>30</sort_order>
2043
+ <show_in_default>1</show_in_default>
2044
+ <show_in_website>1</show_in_website>
2045
+ <show_in_store>1</show_in_store>
2046
+ <frontend_class>validate-number</frontend_class>
2047
+ <depends>
2048
+ <active>1</active>
2049
+ </depends>
2050
+ </sort_order>
2051
+ <status translate="label comment">
2052
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
2053
+ <label>Payment status</label>
2054
+ <sort_order>100</sort_order>
2055
+ <show_in_default>1</show_in_default>
2056
+ <show_in_website>1</show_in_website>
2057
+ <show_in_store>1</show_in_store>
2058
+ <depends>
2059
+ <active>1</active>
2060
+ </depends>
2061
+ </status>
2062
+ <status_authorized translate="label comment">
2063
+ <label>Once authorized</label>
2064
+ <config_path>payment/pbxep_kwixo_standard/status/authorized</config_path>
2065
+ <frontend_type>select</frontend_type>
2066
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
2067
+ <validate>required-entry</validate>
2068
+ <sort_order>110</sort_order>
2069
+ <show_in_default>1</show_in_default>
2070
+ <show_in_website>1</show_in_website>
2071
+ <show_in_store>0</show_in_store>
2072
+ <depends>
2073
+ <active>1</active>
2074
+ <action>manual</action>
2075
+ </depends>
2076
+ </status_authorized>
2077
+ <status_paid translate="label comment">
2078
+ <label>Once paid</label>
2079
+ <config_path>payment/pbxep_kwixo_standard/status/paid</config_path>
2080
+ <frontend_type>select</frontend_type>
2081
+ <source_model>pbxep/admin_order_status_processing</source_model>
2082
+ <validate>required-entry</validate>
2083
+ <sort_order>110</sort_order>
2084
+ <show_in_default>1</show_in_default>
2085
+ <show_in_website>1</show_in_website>
2086
+ <show_in_store>0</show_in_store>
2087
+ <depends>
2088
+ <active>1</active>
2089
+ </depends>
2090
+ </status_paid>
2091
+ <status_auto_capture translate="label comment">
2092
+ <label>Automatic capture status</label>
2093
+ <config_path>payment/pbxep_kwixo_standard/status/auto_capture</config_path>
2094
+ <frontend_type>select</frontend_type>
2095
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
2096
+ <sort_order>112</sort_order>
2097
+ <show_in_default>1</show_in_default>
2098
+ <show_in_website>1</show_in_website>
2099
+ <show_in_store>0</show_in_store>
2100
+ <depends>
2101
+ <active>1</active>
2102
+ <action>manual</action>
2103
+ </depends>
2104
+ </status_auto_capture>
2105
+ <conditions translate="label comment">
2106
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
2107
+ <label>Conditions</label>
2108
+ <sort_order>200</sort_order>
2109
+ <show_in_default>1</show_in_default>
2110
+ <show_in_website>1</show_in_website>
2111
+ <show_in_store>1</show_in_store>
2112
+ <depends>
2113
+ <active>1</active>
2114
+ </depends>
2115
+ </conditions>
2116
+ <allowspecific translate="label comment">
2117
+ <label>Payment from Applicable Countries</label>
2118
+ <config_path>payment/pbxep_kwixo_standard/allowspecific</config_path>
2119
+ <frontend_type>allowspecific</frontend_type>
2120
+ <sort_order>210</sort_order>
2121
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
2122
+ <show_in_default>1</show_in_default>
2123
+ <show_in_website>1</show_in_website>
2124
+ <show_in_store>1</show_in_store>
2125
+ <depends>
2126
+ <active>1</active>
2127
+ </depends>
2128
+ </allowspecific>
2129
+ <specificcountry translate="label comment">
2130
+ <label>Payment from Specific Countries</label>
2131
+ <config_path>payment/pbxep_kwixo_standard/specificcountry</config_path>
2132
+ <frontend_type>multiselect</frontend_type>
2133
+ <sort_order>220</sort_order>
2134
+ <source_model>adminhtml/system_config_source_country</source_model>
2135
+ <show_in_default>1</show_in_default>
2136
+ <show_in_website>1</show_in_website>
2137
+ <show_in_store>1</show_in_store>
2138
+ <depends>
2139
+ <allowspecific>1</allowspecific>
2140
+ <active>1</active>
2141
+ </depends>
2142
+ </specificcountry>
2143
+ <min_order_total translate="label comment">
2144
+ <label>Minimum Order Total</label>
2145
+ <config_path>payment/pbxep_kwixo_standard/min_order_total</config_path>
2146
+ <frontend_type>text</frontend_type>
2147
+ <sort_order>230</sort_order>
2148
+ <show_in_default>1</show_in_default>
2149
+ <show_in_website>1</show_in_website>
2150
+ <show_in_store>1</show_in_store>
2151
+ <depends>
2152
+ <active>1</active>
2153
+ </depends>
2154
+ </min_order_total>
2155
+ <max_order_total translate="label comment">
2156
+ <label>Maximum Order Total</label>
2157
+ <config_path>payment/pbxep_kwixo_standard/max_order_total</config_path>
2158
+ <frontend_type>text</frontend_type>
2159
+ <sort_order>240</sort_order>
2160
+ <show_in_default>1</show_in_default>
2161
+ <show_in_website>1</show_in_website>
2162
+ <show_in_store>1</show_in_store>
2163
+ <depends>
2164
+ <active>1</active>
2165
+ </depends>
2166
+ </max_order_total>
2167
+ </fields>
2168
+ </kwixo_standard>
2169
+ <kwixo_credit translate="label comment">
2170
+ <label>Paiement par Kwixo Credit</label>
2171
+ <expanded>1</expanded>
2172
+ <frontend_type>text</frontend_type>
2173
+ <sort_order>30</sort_order>
2174
+ <show_in_default>1</show_in_default>
2175
+ <show_in_website>1</show_in_website>
2176
+ <show_in_store>1</show_in_store>
2177
+ <fields>
2178
+ <active translate="label comment">
2179
+ <label>Enable</label>
2180
+ <frontend_type>select</frontend_type>
2181
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2182
+ <config_path>payment/pbxep_kwixo_credit/active</config_path>
2183
+ <sort_order>10</sort_order>
2184
+ <show_in_default>1</show_in_default>
2185
+ <show_in_website>1</show_in_website>
2186
+ <show_in_store>1</show_in_store>
2187
+ </active>
2188
+ <title translate="label comment">
2189
+ <label>Title</label>
2190
+ <config_path>payment/pbxep_kwixo_credit/title</config_path>
2191
+ <frontend_type>text</frontend_type>
2192
+ <sort_order>20</sort_order>
2193
+ <show_in_default>1</show_in_default>
2194
+ <show_in_website>1</show_in_website>
2195
+ <show_in_store>1</show_in_store>
2196
+ <depends>
2197
+ <active>1</active>
2198
+ </depends>
2199
+ </title>
2200
+ <sort_order translate="label comment">
2201
+ <label>Sort Order</label>
2202
+ <config_path>payment/pbxep_kwixo_credit/sort_order</config_path>
2203
+ <frontend_type>text</frontend_type>
2204
+ <sort_order>30</sort_order>
2205
+ <show_in_default>1</show_in_default>
2206
+ <show_in_website>1</show_in_website>
2207
+ <show_in_store>1</show_in_store>
2208
+ <frontend_class>validate-number</frontend_class>
2209
+ <depends>
2210
+ <active>1</active>
2211
+ </depends>
2212
+ </sort_order>
2213
+ <status translate="label comment">
2214
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
2215
+ <label>Payment status</label>
2216
+ <sort_order>100</sort_order>
2217
+ <show_in_default>1</show_in_default>
2218
+ <show_in_website>1</show_in_website>
2219
+ <show_in_store>1</show_in_store>
2220
+ <depends>
2221
+ <active>1</active>
2222
+ </depends>
2223
+ </status>
2224
+ <status_authorized translate="label comment">
2225
+ <label>Once authorized</label>
2226
+ <config_path>payment/pbxep_kwixo_credit/status/authorized</config_path>
2227
+ <frontend_type>select</frontend_type>
2228
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
2229
+ <validate>required-entry</validate>
2230
+ <sort_order>110</sort_order>
2231
+ <show_in_default>1</show_in_default>
2232
+ <show_in_website>1</show_in_website>
2233
+ <show_in_store>0</show_in_store>
2234
+ <depends>
2235
+ <active>1</active>
2236
+ <action>manual</action>
2237
+ </depends>
2238
+ </status_authorized>
2239
+ <status_paid translate="label comment">
2240
+ <label>Once paid</label>
2241
+ <config_path>payment/pbxep_kwixo_credit/status/paid</config_path>
2242
+ <frontend_type>select</frontend_type>
2243
+ <source_model>pbxep/admin_order_status_processing</source_model>
2244
+ <validate>required-entry</validate>
2245
+ <sort_order>110</sort_order>
2246
+ <show_in_default>1</show_in_default>
2247
+ <show_in_website>1</show_in_website>
2248
+ <show_in_store>0</show_in_store>
2249
+ <depends>
2250
+ <active>1</active>
2251
+ </depends>
2252
+ </status_paid>
2253
+ <status_auto_capture translate="label comment">
2254
+ <label>Automatic capture status</label>
2255
+ <config_path>payment/pbxep_kwixo_credit/status/auto_capture</config_path>
2256
+ <frontend_type>select</frontend_type>
2257
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
2258
+ <sort_order>112</sort_order>
2259
+ <show_in_default>1</show_in_default>
2260
+ <show_in_website>1</show_in_website>
2261
+ <show_in_store>0</show_in_store>
2262
+ <depends>
2263
+ <active>1</active>
2264
+ <action>manual</action>
2265
+ </depends>
2266
+ </status_auto_capture>
2267
+ <conditions translate="label comment">
2268
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
2269
+ <label>Conditions</label>
2270
+ <sort_order>200</sort_order>
2271
+ <show_in_default>1</show_in_default>
2272
+ <show_in_website>1</show_in_website>
2273
+ <show_in_store>1</show_in_store>
2274
+ <depends>
2275
+ <active>1</active>
2276
+ </depends>
2277
+ </conditions>
2278
+ <allowspecific translate="label comment">
2279
+ <label>Payment from Applicable Countries</label>
2280
+ <config_path>payment/pbxep_kwixo_credit/allowspecific</config_path>
2281
+ <frontend_type>allowspecific</frontend_type>
2282
+ <sort_order>210</sort_order>
2283
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
2284
+ <show_in_default>1</show_in_default>
2285
+ <show_in_website>1</show_in_website>
2286
+ <show_in_store>1</show_in_store>
2287
+ <depends>
2288
+ <active>1</active>
2289
+ </depends>
2290
+ </allowspecific>
2291
+ <specificcountry translate="label comment">
2292
+ <label>Payment from Specific Countries</label>
2293
+ <config_path>payment/pbxep_kwixo_credit/specificcountry</config_path>
2294
+ <frontend_type>multiselect</frontend_type>
2295
+ <sort_order>220</sort_order>
2296
+ <source_model>adminhtml/system_config_source_country</source_model>
2297
+ <show_in_default>1</show_in_default>
2298
+ <show_in_website>1</show_in_website>
2299
+ <show_in_store>1</show_in_store>
2300
+ <depends>
2301
+ <allowspecific>1</allowspecific>
2302
+ <active>1</active>
2303
+ </depends>
2304
+ </specificcountry>
2305
+ <min_order_total translate="label comment">
2306
+ <label>Minimum Order Total</label>
2307
+ <config_path>payment/pbxep_kwixo_credit/min_order_total</config_path>
2308
+ <frontend_type>text</frontend_type>
2309
+ <sort_order>230</sort_order>
2310
+ <show_in_default>1</show_in_default>
2311
+ <show_in_website>1</show_in_website>
2312
+ <show_in_store>1</show_in_store>
2313
+ <depends>
2314
+ <active>1</active>
2315
+ </depends>
2316
+ </min_order_total>
2317
+ <max_order_total translate="label comment">
2318
+ <label>Maximum Order Total</label>
2319
+ <config_path>payment/pbxep_kwixo_credit/max_order_total</config_path>
2320
+ <frontend_type>text</frontend_type>
2321
+ <sort_order>240</sort_order>
2322
+ <show_in_default>1</show_in_default>
2323
+ <show_in_website>1</show_in_website>
2324
+ <show_in_store>1</show_in_store>
2325
+ <depends>
2326
+ <active>1</active>
2327
+ </depends>
2328
+ </max_order_total>
2329
+ </fields>
2330
+ </kwixo_credit>
2331
+ <kwixo_onexrnp translate="label comment">
2332
+ <label>Paiement par Kwixo 1xrnp</label>
2333
+ <expanded>1</expanded>
2334
+ <frontend_type>text</frontend_type>
2335
+ <sort_order>40</sort_order>
2336
+ <show_in_default>1</show_in_default>
2337
+ <show_in_website>1</show_in_website>
2338
+ <show_in_store>1</show_in_store>
2339
+ <fields>
2340
+ <active translate="label comment">
2341
+ <label>Enable</label>
2342
+ <frontend_type>select</frontend_type>
2343
+ <source_model>adminhtml/system_config_source_yesno</source_model>
2344
+ <config_path>payment/pbxep_kwixo_onexrnp/active</config_path>
2345
+ <sort_order>10</sort_order>
2346
+ <show_in_default>1</show_in_default>
2347
+ <show_in_website>1</show_in_website>
2348
+ <show_in_store>1</show_in_store>
2349
+ </active>
2350
+ <title translate="label comment">
2351
+ <label>Title</label>
2352
+ <config_path>payment/pbxep_kwixo_onexrnp/title</config_path>
2353
+ <frontend_type>text</frontend_type>
2354
+ <sort_order>20</sort_order>
2355
+ <show_in_default>1</show_in_default>
2356
+ <show_in_website>1</show_in_website>
2357
+ <show_in_store>1</show_in_store>
2358
+ <depends>
2359
+ <active>1</active>
2360
+ </depends>
2361
+ </title>
2362
+ <sort_order translate="label comment">
2363
+ <label>Sort Order</label>
2364
+ <config_path>payment/pbxep_kwixo_onexrnp/sort_order</config_path>
2365
+ <frontend_type>text</frontend_type>
2366
+ <sort_order>30</sort_order>
2367
+ <show_in_default>1</show_in_default>
2368
+ <show_in_website>1</show_in_website>
2369
+ <show_in_store>1</show_in_store>
2370
+ <frontend_class>validate-number</frontend_class>
2371
+ <depends>
2372
+ <active>1</active>
2373
+ </depends>
2374
+ </sort_order>
2375
+ <status translate="label comment">
2376
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
2377
+ <label>Payment status</label>
2378
+ <sort_order>100</sort_order>
2379
+ <show_in_default>1</show_in_default>
2380
+ <show_in_website>1</show_in_website>
2381
+ <show_in_store>1</show_in_store>
2382
+ <depends>
2383
+ <active>1</active>
2384
+ </depends>
2385
+ </status>
2386
+ <status_authorized translate="label comment">
2387
+ <label>Once authorized</label>
2388
+ <config_path>payment/pbxep_kwixo_onexrnp/status/authorized</config_path>
2389
+ <frontend_type>select</frontend_type>
2390
+ <source_model>pbxep/admin_order_status_pendingpayment</source_model>
2391
+ <validate>required-entry</validate>
2392
+ <sort_order>110</sort_order>
2393
+ <show_in_default>1</show_in_default>
2394
+ <show_in_website>1</show_in_website>
2395
+ <show_in_store>0</show_in_store>
2396
+ <depends>
2397
+ <active>1</active>
2398
+ <action>manual</action>
2399
+ </depends>
2400
+ </status_authorized>
2401
+ <status_paid translate="label comment">
2402
+ <label>Once paid</label>
2403
+ <config_path>payment/pbxep_kwixo_onexrnp/status/paid</config_path>
2404
+ <frontend_type>select</frontend_type>
2405
+ <source_model>pbxep/admin_order_status_processing</source_model>
2406
+ <validate>required-entry</validate>
2407
+ <sort_order>110</sort_order>
2408
+ <show_in_default>1</show_in_default>
2409
+ <show_in_website>1</show_in_website>
2410
+ <show_in_store>0</show_in_store>
2411
+ <depends>
2412
+ <active>1</active>
2413
+ </depends>
2414
+ </status_paid>
2415
+ <status_auto_capture translate="label comment">
2416
+ <label>Automatic capture status</label>
2417
+ <config_path>payment/pbxep_kwixo_onexrnp/status/auto_capture</config_path>
2418
+ <frontend_type>select</frontend_type>
2419
+ <source_model>pbxep/admin_order_status_autocapture</source_model>
2420
+ <sort_order>112</sort_order>
2421
+ <show_in_default>1</show_in_default>
2422
+ <show_in_website>1</show_in_website>
2423
+ <show_in_store>0</show_in_store>
2424
+ <depends>
2425
+ <active>1</active>
2426
+ <action>manual</action>
2427
+ </depends>
2428
+ </status_auto_capture>
2429
+ <conditions translate="label comment">
2430
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
2431
+ <label>Conditions</label>
2432
+ <sort_order>200</sort_order>
2433
+ <show_in_default>1</show_in_default>
2434
+ <show_in_website>1</show_in_website>
2435
+ <show_in_store>1</show_in_store>
2436
+ <depends>
2437
+ <active>1</active>
2438
+ </depends>
2439
+ </conditions>
2440
+ <allowspecific translate="label comment">
2441
+ <label>Payment from Applicable Countries</label>
2442
+ <config_path>payment/pbxep_kwixo_onexrnp/allowspecific</config_path>
2443
+ <frontend_type>allowspecific</frontend_type>
2444
+ <sort_order>210</sort_order>
2445
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
2446
+ <show_in_default>1</show_in_default>
2447
+ <show_in_website>1</show_in_website>
2448
+ <show_in_store>1</show_in_store>
2449
+ <depends>
2450
+ <active>1</active>
2451
+ </depends>
2452
+ </allowspecific>
2453
+ <specificcountry translate="label comment">
2454
+ <label>Payment from Specific Countries</label>
2455
+ <config_path>payment/pbxep_kwixo_onexrnp/specificcountry</config_path>
2456
+ <frontend_type>multiselect</frontend_type>
2457
+ <sort_order>220</sort_order>
2458
+ <source_model>adminhtml/system_config_source_country</source_model>
2459
+ <show_in_default>1</show_in_default>
2460
+ <show_in_website>1</show_in_website>
2461
+ <show_in_store>1</show_in_store>
2462
+ <depends>
2463
+ <allowspecific>1</allowspecific>
2464
+ <active>1</active>
2465
+ </depends>
2466
+ </specificcountry>
2467
+ <min_order_total translate="label comment">
2468
+ <label>Minimum Order Total</label>
2469
+ <config_path>payment/pbxep_kwixo_onexrnp/min_order_total</config_path>
2470
+ <frontend_type>text</frontend_type>
2471
+ <sort_order>230</sort_order>
2472
+ <show_in_default>1</show_in_default>
2473
+ <show_in_website>1</show_in_website>
2474
+ <show_in_store>1</show_in_store>
2475
+ <depends>
2476
+ <active>1</active>
2477
+ </depends>
2478
+ </min_order_total>
2479
+ <max_order_total translate="label comment">
2480
+ <label>Maximum Order Total</label>
2481
+ <config_path>payment/pbxep_kwixo_onexrnp/max_order_total</config_path>
2482
+ <frontend_type>text</frontend_type>
2483
+ <sort_order>240</sort_order>
2484
+ <show_in_default>1</show_in_default>
2485
+ <show_in_website>1</show_in_website>
2486
+ <show_in_store>1</show_in_store>
2487
+ <depends>
2488
+ <active>1</active>
2489
+ </depends>
2490
+ </max_order_total>
2491
+ </fields>
2492
+ </kwixo_onexrnp>
2493
+ </groups>
2494
+ </pbxep_kwixo>
2495
+ </sections>
2496
+ </config>
app/code/community/Paybox/Epayment/sql/pbxep_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ // Initialization
14
+ $installer = $this;
15
+ $installer->startSetup();
16
+
17
+ $catalogEav = Mage::getResourceModel('catalog/eav_mysql4_setup', 'core_setup');
18
+
19
+ $defs = array(
20
+ 'pbxep_action' => array(
21
+ 'type' => 'varchar',
22
+ ),
23
+ 'pbxep_delay' => array(
24
+ 'type' => 'varchar',
25
+ ),
26
+ 'pbxep_authorization' => array(
27
+ 'type' => 'text',
28
+ ),
29
+ 'pbxep_capture' => array(
30
+ 'type' => 'text',
31
+ ),
32
+ 'pbxep_first_payment' => array(
33
+ 'type' => 'text',
34
+ ),
35
+ 'pbxep_second_payment' => array(
36
+ 'type' => 'text',
37
+ ),
38
+ 'pbxep_third_payment' => array(
39
+ 'type' => 'text',
40
+ ),
41
+ );
42
+
43
+ $entity = 'order_payment';
44
+
45
+ foreach ($defs as $name => $def) {
46
+ $installer->addAttribute('order_payment', $name, $def);
47
+ }
48
+
49
+ // Finalization
50
+ $installer->endSetup();
app/code/community/Paybox/Epayment/sql/pbxep_setup/mysql4-upgrade-0.1.0-0.3.0.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ // Initialization
14
+ $installer = $this;
15
+ $installer->startSetup();
16
+
17
+ $code = 'fianet_category';
18
+
19
+ $catalogEav = Mage::getResourceModel('catalog/eav_mysql4_setup', 'core_setup');
20
+ $attrId = $catalogEav->getAttributeId(Mage_Catalog_Model_Product::ENTITY, 'fianet_category');
21
+ if (empty($attrId)) {
22
+ $def = array(
23
+ 'input' => 'select',
24
+ 'group' => 'General',
25
+ 'label' => 'FIA-NET Category',
26
+ 'required' => false,
27
+ 'scope' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
28
+ 'source' => 'pbxep/admin_fianet_categories',
29
+ 'type' => 'int',
30
+ 'visible' => true,
31
+ 'visible_on_front' => false,
32
+ );
33
+ $installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'fianet_category', $def);
34
+ }
35
+
36
+ $attrId = $catalogEav->getAttributeId(Mage_Catalog_Model_Category::ENTITY, 'fianet_category');
37
+ if (empty($attrId)) {
38
+ $def = array(
39
+ 'input' => 'select',
40
+ 'group' => 'FIA-NET',
41
+ 'label' => 'Default category for products',
42
+ 'required' => false,
43
+ 'scope' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
44
+ 'source' => 'pbxep/admin_fianet_categories',
45
+ 'type' => 'int',
46
+ 'visible' => true,
47
+ 'visible_on_front' => false,
48
+ );
49
+ $installer->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'fianet_category', $def);
50
+ }
51
+
52
+ $attrId = $catalogEav->getAttributeId(Mage_Catalog_Model_Category::ENTITY, 'fianet_apply_to_subs');
53
+ if (empty($attrId)) {
54
+ $def = array(
55
+ 'inputl' => 'select',
56
+ 'group' => 'FIA-NET',
57
+ 'label' => 'Apply to sub-categories',
58
+ 'required' => false,
59
+ 'scope' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
60
+ 'source' => 'eav/entity_attribute_source_boolean',
61
+ 'type' => 'int',
62
+ 'visible' => true,
63
+ 'visible_on_front' => false,
64
+ );
65
+ $installer->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'fianet_apply_to_subs', $def);
66
+ }
67
+
68
+ // Finalization
69
+ $installer->endSetup();
app/code/community/Paybox/Epayment/sql/pbxep_setup/mysql4-upgrade-0.8.3.3-0.8.4.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ // Initialization
14
+ $installer = $this;
15
+ $installer->startSetup();
16
+
17
+ $catalogEav = Mage::getResourceModel('catalog/eav_mysql4_setup', 'core_setup');
18
+
19
+ $defs = array(
20
+ 'pbxep_action' => array(
21
+ 'type' => 'varchar',
22
+ ),
23
+ 'pbxep_delay' => array(
24
+ 'type' => 'varchar',
25
+ ),
26
+ 'pbxep_authorization' => array(
27
+ 'type' => 'text',
28
+ ),
29
+ 'pbxep_capture' => array(
30
+ 'type' => 'text',
31
+ ),
32
+ 'pbxep_first_payment' => array(
33
+ 'type' => 'text',
34
+ ),
35
+ 'pbxep_second_payment' => array(
36
+ 'type' => 'text',
37
+ ),
38
+ 'pbxep_third_payment' => array(
39
+ 'type' => 'text',
40
+ ),
41
+ );
42
+
43
+ $entity = 'order_payment';
44
+
45
+ foreach ($defs as $name => $def) {
46
+ $installer->addAttribute('order_payment', $name, $def);
47
+ }
48
+
49
+ $code = 'fianet_category';
50
+
51
+ $catalogEav = Mage::getResourceModel('catalog/eav_mysql4_setup', 'core_setup');
52
+ $attrId = $catalogEav->getAttributeId(Mage_Catalog_Model_Product::ENTITY, 'fianet_category');
53
+ if (empty($attrId)) {
54
+ $def = array(
55
+ 'input' => 'select',
56
+ 'group' => 'General',
57
+ 'label' => 'FIA-NET Category',
58
+ 'required' => false,
59
+ 'scope' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
60
+ 'source' => 'pbxep/admin_fianet_categories',
61
+ 'type' => 'int',
62
+ 'visible' => true,
63
+ 'visible_on_front' => false,
64
+ );
65
+ $installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'fianet_category', $def);
66
+ }
67
+
68
+ $attrId = $catalogEav->getAttributeId(Mage_Catalog_Model_Category::ENTITY, 'fianet_category');
69
+ if (empty($attrId)) {
70
+ $def = array(
71
+ 'input' => 'select',
72
+ 'group' => 'FIA-NET',
73
+ 'label' => 'Default category for products',
74
+ 'required' => false,
75
+ 'scope' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
76
+ 'source' => 'pbxep/admin_fianet_categories',
77
+ 'type' => 'int',
78
+ 'visible' => true,
79
+ 'visible_on_front' => false,
80
+ );
81
+ $installer->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'fianet_category', $def);
82
+ }
83
+
84
+ $attrId = $catalogEav->getAttributeId(Mage_Catalog_Model_Category::ENTITY, 'fianet_apply_to_subs');
85
+ if (empty($attrId)) {
86
+ $def = array(
87
+ 'inputl' => 'select',
88
+ 'group' => 'FIA-NET',
89
+ 'label' => 'Apply to sub-categories',
90
+ 'required' => false,
91
+ 'scope' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
92
+ 'source' => 'eav/entity_attribute_source_boolean',
93
+ 'type' => 'int',
94
+ 'visible' => true,
95
+ 'visible_on_front' => false,
96
+ );
97
+ $installer->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'fianet_apply_to_subs', $def);
98
+ }
99
+
100
+ // Finalization
101
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/pbxep.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <pbxep_pres>
4
+ <reference name="content">
5
+ <block type="pbxep/admin_presentation" name="pbxep_presentation"
6
+ after="content.child2"></block>
7
+ </reference>
8
+ </pbxep_pres>
9
+ </layout>
app/design/adminhtml/default/default/template/pbxep/info/default.phtml ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * @see Mage_Payment_Block_Info
15
+ */
16
+ $controllerName = Mage::app()->getRequest()->getControllerName();
17
+ $method = $this->getMethod();
18
+ $data = $this->getPayboxData();
19
+ $debitType = $this->getDebitTypeLabel();
20
+ $threeTime = $this->getThreeTimeLabels();
21
+ ?>
22
+ <?php echo $this->htmlEscape($method->getTitle()); ?>
23
+ <?php if ($this->isAuthorized()): ?>
24
+ <table>
25
+ <tr>
26
+ <td><?php echo $this->__('Transaction number'); ?></td>
27
+ <td><?php echo $this->escapeHtml($data['transaction']); ?></td>
28
+ </tr>
29
+ <tr>
30
+ <td><?php echo $this->__('Paybox Back Office Reference'); ?></td>
31
+ <td><?php echo $this->escapeHtml($data['reference']); ?></td>
32
+ </tr>
33
+ <tr>
34
+ <td><?php echo $this->__('Payment method'); ?></td>
35
+ <td><img alt="<?php echo $this->escapeHtml($this->getCardImageLabel()); ?>" src="<?php echo $this->escapeHtml($this->getCardImageUrl()); ?>"/></td>
36
+ </tr>
37
+ <?php if (isset($data['ip'])): ?>
38
+ <tr>
39
+ <td><?php echo $this->__('Country of IP'); ?></td>
40
+ <td><?php echo $this->escapeHtml($data['ip']); ?></td>
41
+ </tr>
42
+ <?php endif; ?>
43
+ <tr>
44
+ <td><?php echo $this->__('Processing date'); ?></td>
45
+ <td><?php echo $this->escapeHtml(preg_replace('/^([0-9]{2})([0-9]{2})([0-9]{4})$/', '$1/$2/$3', $data['date'])); ?></td>
46
+ </tr>
47
+ <?php if (!is_null($debitType)): ?>
48
+ <tr>
49
+ <td><?php echo $this->__('Debit type'); ?></td>
50
+ <td><?php echo $this->escapeHtml($debitType); ?></td>
51
+ </tr>
52
+ <?php endif; ?>
53
+ <?php if (!is_null($threeTime)): ?>
54
+ <tr>
55
+ <td><?php echo $this->__('First debit'); ?></td>
56
+ <td><?php echo $this->escapeHtml($threeTime['first']); ?></td>
57
+ </tr>
58
+ <tr>
59
+ <td><?php echo $this->__('Second debit'); ?></td>
60
+ <td><?php echo $this->escapeHtml($threeTime['second']); ?></td>
61
+ </tr>
62
+ <tr>
63
+ <td><?php echo $this->__('Third debit'); ?></td>
64
+ <td><?php echo $this->escapeHtml($threeTime['third']); ?></td>
65
+ </tr>
66
+ <?php endif; ?>
67
+ <?php if (isset($data['country'])): ?>
68
+ <tr>
69
+ <td><?php echo $this->__('Card country'); ?></td>
70
+ <td><?php echo $this->escapeHtml($data['country']); ?></td>
71
+ </tr>
72
+ <?php endif; ?>
73
+ <?php if (isset($data['firstNumbers']) && isset($data['lastNumbers'])): ?>
74
+ <tr>
75
+ <td><?php echo $this->__('Card numbers'); ?></td>
76
+ <td><?php echo $this->escapeHtml($data['firstNumbers'].'...'.$data['lastNumbers']); ?></td>
77
+ </tr>
78
+ <?php endif; ?>
79
+ <?php if (isset($data['validity'])): ?>
80
+ <tr>
81
+ <td><?php echo $this->__('Validity date'); ?></td>
82
+ <td><?php echo $this->escapeHtml(preg_replace('/^([0-9]{2})([0-9]{2})$/', '$2/$1', $data['validity'])); ?></td>
83
+ </tr>
84
+ <?php endif; ?></table>
85
+ <?php if (($controllerName == 'sales_order') && $this->canCapture()): ?>
86
+ <button type="button" class="scalable" title="<?php $this->__('Total Debit'); ?>" id="invoicetotal" onclick="setLocation('<?php echo $this->escapeHtml($this->getCaptureUrl()); ?>')">
87
+ <span>
88
+ <span><?php echo $this->__('Total Debit'); ?></span>
89
+ </span>
90
+ </button>
91
+ <button type="button" title="<?php echo $this->__('Partial debit'); ?>" class="scalable" onclick="setLocation('<?php echo $this->escapeHtml($this->getPartialCaptureUrl()); ?>')">
92
+ <span>
93
+ <span><?php echo $this->__('Partial debit'); ?></span>
94
+ </span>
95
+ </button>
96
+ <?php endif; ?>
97
+ <?php
98
+ if (($controllerName == 'sales_order') && $this->canRefund()):
99
+ $url = $this->getRefundUrl();
100
+ if (!is_null($url)):
101
+ ?>
102
+ <button type="button" class="scalable" title="<?php echo $this->__('Refund'); ?>" id="invoicetotal" onclick="setLocation('<?php echo $this->escapeHtml($url); ?>')">
103
+ <span>
104
+ <span><?php echo $this->__('Refund'); ?></span>
105
+ </span>
106
+ </button>
107
+ <?php endif; ?>
108
+ <?php endif; ?>
109
+ <?php endif; ?>
110
+ <?php echo $this->getChildHtml()?>
app/design/adminhtml/default/default/template/pbxep/presentation/en.phtml ADDED
@@ -0,0 +1 @@
 
1
+ TODO
app/design/adminhtml/default/default/template/pbxep/presentation/fr.phtml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style type="text/css">
2
+ div#paybox-pres p {
3
+ margin-top: 15px;
4
+ }
5
+ div#paybox-pres h3 {
6
+ margin-top: 20px;
7
+ margin-bottom: 10px;
8
+ }
9
+ div#paybox-pres p.before-list {
10
+ margin-bottom: 0px;
11
+ }
12
+ div#paybox-pres strong {
13
+ color: #ea7601;
14
+ }
15
+ div#paybox-pres ul.check-list {
16
+ list-style-image: none;
17
+ margin-left: 20px;
18
+ }
19
+ div#paybox-pres ul.check-list em {
20
+ color: #ea7601;
21
+ padding-right: 10px;
22
+ }
23
+ div#paybox-pres ol {
24
+ margin-left: 40px;
25
+ list-style: decimal;
26
+ color : #000;
27
+ }
28
+ div#paybox-pres ol span {
29
+ color : #000;
30
+ }
31
+ div#paybox-pres thead {
32
+ background-color: #ea7601;
33
+ height: 50px;
34
+ color : #FFFFFF;
35
+ font-style: italic;
36
+ }
37
+ div#paybox-pres thead th {
38
+ text-align: center;
39
+ vertical-align: middle;
40
+ }
41
+ div#paybox-pres tr.grisfonce {
42
+ background-color: #E4E5E5;
43
+ }
44
+ div#paybox-pres tr.grisclair {
45
+ background-color: #F2F2F2;
46
+ }
47
+ div#paybox-pres td {
48
+ padding: 3px;
49
+ }
50
+ div#paybox-pres th {
51
+ padding: 2px 6px;
52
+ }
53
+ div#paybox-pres td.check {
54
+ text-align: center;
55
+ color: #ea7601;
56
+ vertical-align: middle;
57
+ }
58
+ div#paybox-pres td.option {
59
+ text-align: center;
60
+ font-style: italic;
61
+ font-weight: bold;
62
+ vertical-align: middle;
63
+ }
64
+ div#paybox-pres td.dash {
65
+ text-align: center;
66
+ vertical-align: middle;
67
+ }
68
+ div#paybox-pres div.blocks {
69
+ width: 840px;
70
+ margin: auto;
71
+ }
72
+ div#paybox-pres div.blocks div {
73
+ width: 380px;
74
+ float: left;
75
+ height: 100px;
76
+ border: 1px solid black;
77
+ padding: 6px;
78
+ margin: 4px;
79
+ }
80
+ div#paybox-pres div.blocks p {
81
+ padding: 0;
82
+ margin: 0;
83
+ }
84
+ div#paybox-pres div.blocks ul {
85
+ list-style: none;
86
+ margin-left: 20px;
87
+ }
88
+ div#paybox-pres div.blocks .clear {
89
+ clear: both;
90
+ }
91
+ </style>
92
+ <div id="paybox-pres"> <div class="col-xs-4 col-md-3 col-lg-2"> <img width="20%" height="20%" src="<?php echo Mage::getBaseUrl ('skin'); ?>/adminhtml/default/default/images/paybox/paybox-lg.png"> </div></div> <div class="pbx_clear">&nbsp;</div><div id="paybox-pres"> <div class="col-lg-6"> <p><em>Avec Paybox, proposez de nombreux moyens de paiement en une seule installation, disposez d’une page de paiement sécurisée personnalisée, multi-langues et multi-devises et proposez du débit à validation de commande ou à l’expédition et du 3 fois sans frais à vos clients.</em></p> <h2>Paybox vous propose</h2> <ul class="check-list"> <li><em>&#10004;</em><strong>La liberté de choix de votre banque</strong> pour créditer vos ventes, en France et dans de nombreux pays européens.</li> <li><em>&#10004;</em><strong>De nombreux moyens de paiement</strong>, sans module complémentaire à installer : CB, Visa, Mastercard, American Express, Paypal, Kwixo, Leetchi, Bancontact/Mistercash, Maestro, Cofinoga, iDeal, etc.</li> <li><em>&#10004;</em><strong>Une flexibilité de débit</strong> partiel / total à la validation de commande / à l’expédition , depuis le Back-Office Magento.</li> <li><em>&#10004;</em><strong>Une fonction de remboursement</strong> partiel ou total d’une commande à partir du Back-Office Magento</li> <li><em>&#10004;</em><strong>Des outils anti-fraude</strong> à la carte : <strong>3-D Secure sélectif selon montant</strong>, Filtres sur nationalités Carte ou de l'IP.</li> <li><em>&#10004;</em>La possibilité de <strong>prise de paiement par téléphone</strong> (via le Back-Office Paybox).</li> <li><em>&#10004;</em>La fonctionnalité de <strong>paiement en 3 fois sans frais selon montant de commande</strong> pour vos clients </li> <li><em>&#10004;</em><strong>Un accès Back-Office Paybox</strong> avec des fonctions de reporting : suivi transactions temps réel et export de journaux d’encaissement.</li> </ul> <br><h2>Comment souscrire ?</h2> <ol> <li>Demander <strong>un contrat VAD</strong> à la banque de votre choix.</li> <li>Accéder à <strong>un compte test</strong> gratuit via le module.</li> <li>Migrer du compte de test à votre <strong>compte en production</strong> avec les identifiants que vous communiquera Paybox à l’ouverture de votre compte</li> </ol> <div class="col-sm-6"><div class="pbx_bloc"> <br><h2>Une question ?</h2> L'équipe Paybox est à votre écoute du lundi au vendredi de 9h à 18h : <ul> <li>Par téléphone : <strong>01 61 37 05 70</strong></li> <li>Par email : <a href="mailto:contact@paybox.com">contact@paybox.com</a></li> <li>Via le formulaire de contact sur le site <a href="http://www.paybox.com/">http://www.paybox.com/</a></li> </ul> Support module : <a href="mailto:magento@paybox.com">magento@paybox.com</a> </div></div> <div class="col-sm-6"><div class="pbx_bloc"> <br><h2>Nouveauté !</h2> <p>Pilotez vos débits et remboursements de commande directement depuis votre Back-Office Magento ! <br>Ce service est disponible dans le Pack Flexible (Paybox System + Paybox Direct).</p> </div></div> </div> <div class="col-lg-6"> <table class="pbx_offers"> <thead> <tr> <th>MODULE PAYBOX<br/>pour Magento</th> <th class="pbx_pack">Pack Essentiel<br/>(Paybox System)</th> <th class="pbx_pack">Pack Flexible<br/>(Paybox System + Paybox Direct)</th> </tr> </thead> <tbody> <tr class="grisclair"> <td><h4>100 transactions offertes chaque mois</h4></td> <td class="check">&#10004;</td> <td class="check">&#10004;</td> </tr> <tr class="grisfonce"> <td><strong>Page de paiement Web & Mobile</strong></td> <td class="check">&#10004;</td> <td class="check">&#10004;</td> </tr> <tr class="grisclair"> <td>Acceptation <strong>CB, Visa, Mastercard</strong> (Contrat VAD toute banque) et <strong>changement de banque gratuit</strong></td> <td class="check">&#10004;</td> <td class="check">&#10004;</td> </tr> <tr class="grisfonce"> <td><strong>Personnalisation page de paiement</strong> (logo, boutons, langues, devises)</td> <td class="check">&#10004;</td> <td class="check">&#10004;</td> </tr> <tr class="grisclair"> <td><strong>Back-Office Paybox</strong></td> <td class="check">&#10004;</td> <td class="check">&#10004;</td> </tr> <tr class="grisfonce"> <td><strong>Module anti-fraude</strong>&nbsp;: 3-D Secure sélectif (à partir d'un montant de commande)<br/>filtres sur nationalités carte et IP</td> <td class="check">&#10004;</td> <td class="check">&#10004;</td> </tr> <tr class="grisclair"> <td><strong>Paiement en 3 fois sans frais</strong> (à partir d'un montant de commande)</td> <td class="option">Option</td> <td class="check">&#10004;</td> </tr> <tr class="grisfonce"> <td><strong>Débit total / partiel</strong> à validation de commande</td> <td class="dash">-</td> <td class="check">&#10004;</td> </tr> <tr class="grisclair"> <td><strong>Fonctionnalités avancées, depuis le Back-Office Magento</strong> : <br/>-Débit au changement de statut commande <br/>-Débit partiel / total <br/>-Remboursement partiel / total</td> <td class="dash">-</td> <td class="check">&#10004;</td> </tr> <tr class="grisfonce"> <td><strong>Moyens de paiement complémentaires</strong> :<br/>American Express, JCB, Diners, Paypal, Leetchi, Bancontact/Mistercash, Maestro, Cofinoga, etc.</td> <td class="option">Option</td> <td class="option">Option</td> </tr> </tbody> </table> </div> <h3>Les solutions Paybox</h3> <p>Paybox met à votre disposition des solutions de paiement sécurisées quels que soient vos canaux de vente :</p> <img src="<?php echo Mage::getBaseUrl ('skin'); ?>/adminhtml/default/default/images/paybox/multicanal.png"></div>
app/design/frontend/base/default/layout/pbxep.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <!--
4
+ Default layout, loads most of the pages
5
+ -->
6
+
7
+ <pbxep_payment_redirect>
8
+ <remove name="right" />
9
+ <remove name="left" />
10
+ <reference name="content">
11
+ <block type="pbxep/redirect" template="pbxep/redirect.phtml" />
12
+ </reference>
13
+ </pbxep_payment_redirect>
14
+ </layout>
app/design/frontend/base/default/template/pbxep/checkout-payment.phtml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ $cards = $this->getCreditCards();
14
+ $current = $this->getInfoData('cc_type');
15
+ $hasCctypes = $this->getMethod()->getHasCctypes();
16
+ $methodCode = $this->getMethod()->getCode();
17
+ ?>
18
+ <ul class="form-list pbxep-payment-detail"
19
+ id="payment_form_<?php echo $this->getMethodCode(); ?>"
20
+ style="display: none">
21
+ <li>
22
+ <?php
23
+ // No card selection
24
+ if (!$hasCctypes):
25
+ ?>
26
+ <p><?php echo $this->__('After confirmation of your order you will be redirected to the payment page.'); ?></p>
27
+ <?php
28
+
29
+ // Card selection but only one card allowed
30
+ elseif (count($cards) == 1):
31
+ ?>
32
+ <p><?php echo $this->__('After confirmation of your order you will be redirected to the payment page.'); ?></p>
33
+ <?php
34
+ foreach($cards as $code => $card):
35
+ $id = $this->htmlEscape('cc_type_'.$methodCode.'_'.preg_replace('#[^a-zA-Z0-9]#', '', strtolower($code)));
36
+ $value = $this->htmlEscape($code);
37
+ ?>
38
+ <input type="hidden" name="payment[cc_type]" value="<?php echo $value; ?>" id="<?php echo $id; ?>"/>
39
+ <?php endforeach; ?>
40
+ <?php
41
+
42
+ // Otherwise
43
+ else:
44
+ ?>
45
+ <p><?php echo $this->__('Click to your card\'s logo, after confirmation of your order you will be redirected to the payment page.'); ?></p>
46
+ <div class="pbxep-payment-cards">
47
+ <?php
48
+ foreach($cards as $code => $card):
49
+ $label = $this->__($card['label']);
50
+ $image = $this->getSkinUrl($card['image']);
51
+ $id = $this->htmlEscape('cc_type_'.$methodCode.'_'.preg_replace('#[^a-zA-Z0-9]#', '', strtolower($code)));
52
+ $selected = ($current == $code ? ' selected="selected"' : '');
53
+ $value = $this->htmlEscape($code);
54
+ ?>
55
+ <span class="pbxep-payment-card">
56
+ <label for="<?php echo $id; ?>">
57
+ <img src="<?php echo $image; ?>" alt="<?php echo $label; ?>" title="<?php echo $label; ?>" />
58
+ </label>
59
+ <input type="radio" name="payment[cc_type]" value="<?php echo $value; ?>" id="<?php echo $id; ?>"<?php echo $selected; ?> />
60
+ </span>
61
+ <?php endforeach; ?>
62
+ </div>
63
+ <?php endif; ?>
64
+ </li>
65
+ </ul>
app/design/frontend/base/default/template/pbxep/info/default.phtml ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ /**
14
+ * @see Mage_Payment_Block_Info
15
+ */
16
+ $method = $this->getMethod();
17
+ $info = $this->getInfo();
18
+ $data = $this->getPayboxData();
19
+ $debitType = $this->getDebitTypeLabel();
20
+ $threeTime = $this->getThreeTimeLabels();
21
+ ?>
22
+ <p><strong><?php echo $this->htmlEscape($method->getTitle()); ?></strong></p>
23
+ <?php if ($this->isAuthorized() && $this->getShowInfoToCustomer()): ?>
24
+ <table><tbody>
25
+ <tr>
26
+ <th><?php echo $this->__('Payment method'); ?></th>
27
+ </tr>
28
+ <tr>
29
+ <td><img alt="<?php echo $this->escapeHtml($this->getCardImageLabel()); ?>" src="<?php echo $this->escapeHtml($this->getCardImageUrl()); ?>"/></td>
30
+ </tr>
31
+ <?php if (isset($data['ip'])): ?>
32
+ <tr>
33
+ <th><?php echo $this->__('Country of IP'); ?></th>
34
+ </tr>
35
+ <tr>
36
+ <td><?php echo $this->escapeHtml($data['ip']); ?></td>
37
+ </tr>
38
+ <?php endif; ?>
39
+ <tr>
40
+ <th><?php echo $this->__('Processing date'); ?></th>
41
+ </tr>
42
+ <tr>
43
+ <td><?php echo $this->escapeHtml(preg_replace('/^([0-9]{2})([0-9]{2})([0-9]{4})$/', '$1/$2/$3', $data['date'])); ?></td>
44
+ </tr>
45
+ <?php if (!is_null($debitType)): ?>
46
+ <tr>
47
+ <th><?php echo $this->__('Debit type'); ?></th>
48
+ </tr>
49
+ <tr>
50
+ <td><?php echo $this->escapeHtml($debitType); ?></td>
51
+ </tr>
52
+ <?php endif; ?>
53
+ <?php if (!is_null($threeTime)): ?>
54
+ <tr>
55
+ <th><?php echo $this->__('First debit'); ?></th>
56
+ </tr>
57
+ <tr>
58
+ <td><?php echo $this->escapeHtml($threeTime['first']); ?></td>
59
+ </tr>
60
+ <tr>
61
+ <th><?php echo $this->__('Second debit'); ?></th>
62
+ </tr>
63
+ <tr>
64
+ <td><?php echo $this->escapeHtml($threeTime['second']); ?></td>
65
+ </tr>
66
+ <tr>
67
+ <th><?php echo $this->__('Third debit'); ?></th>
68
+ </tr>
69
+ <tr>
70
+ <td><?php echo $this->escapeHtml($threeTime['third']); ?></td>
71
+ </tr>
72
+ <?php endif; ?>
73
+ <?php if (isset($data['country'])): ?>
74
+ <tr>
75
+ <th><?php echo $this->__('Card country'); ?></th>
76
+ </tr>
77
+ <tr>
78
+ <td><?php echo $this->escapeHtml($data['country']); ?></td>
79
+ </tr>
80
+ <?php endif; ?>
81
+ <?php if (isset($data['firstNumbers']) && isset($data['lastNumbers'])): ?>
82
+ <tr>
83
+ <th><?php echo $this->__('Card numbers'); ?></th>
84
+ </tr>
85
+ <tr>
86
+ <td><?php echo $this->escapeHtml($data['firstNumbers'].'...'.$data['lastNumbers']); ?></td>
87
+ </tr>
88
+ <?php endif; ?>
89
+ <?php if (isset($data['validity'])): ?>
90
+ <tr>
91
+ <th><?php echo $this->__('Validity date'); ?></th>
92
+ </tr>
93
+ <tr>
94
+ <td><?php echo $this->escapeHtml(preg_replace('/^([0-9]{2})([0-9]{2})$/', '$2/$1', $data['validity'])); ?></td>
95
+ </tr>
96
+ <?php endif; ?>
97
+ </tbody></table>
98
+ <?php endif; ?>
99
+ <?php echo $this->getChildHtml()?>
app/design/frontend/base/default/template/pbxep/redirect.phtml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Paybox Epayment module for Magento
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * available at : http://opensource.org/licenses/osl-3.0.php
7
+ *
8
+ * @package Paybox_Epayment
9
+ * @copyright Copyright (c) 2013-2014 Paybox
10
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
11
+ */
12
+
13
+ $values = $this->getFormFields();
14
+ $helper = $this->helper('core');
15
+ try {
16
+ if ($values['PBX_TYPEPAIEMENT'] == 'KWIXO') {
17
+ $url = $helper->escapeUrl($this->getKwixoUrl());
18
+ }
19
+ else if (Mage::helper('pbxep/mobile')->isMobile()) {
20
+ $url = $helper->escapeUrl($this->getMobileUrl());
21
+ }
22
+ else {
23
+ $url = $helper->escapeUrl($this->getSystemUrl());
24
+ }
25
+ $type = $helper->escapeUrl($this->getInputType());
26
+ }
27
+ catch (Exception $e) {
28
+ $error = $e;
29
+ }
30
+
31
+ if (isset($error)) {
32
+ ?>
33
+ <p><center><?php echo $error->getMessage(); ?></center></p>
34
+ <?php
35
+ }
36
+ else {
37
+ ?>
38
+ <form id="pbxep_form" method="post" action="<?php echo $url; ?>" enctype="application/x-www-form-urlencoded">
39
+ <?php if ($type != 'hidden'): ?>
40
+ <p>
41
+ <?php echo $this->__('This is a debug view. Click continue to be redirected to Paybox payment page.'); ?>
42
+ </p>
43
+ <?php else: ?>
44
+ <p>
45
+ <?php echo $this->__('You will be redirected to the Paybox payment page. If not, please use the button bellow.'); ?>
46
+ </p>
47
+ <?php endif; ?>
48
+ <center><button><?php echo $this->__('Continue...'); ?></button></center>
49
+ <?php
50
+ foreach ($values as $name => $value):
51
+ $name = $helper->escapeHtml($name);
52
+ $value = $helper->escapeHtml($value);
53
+ if ($type != 'hidden'):
54
+ ?>
55
+ <p><label for="<?php echo $name; ?>"><?php echo $name; ?></label>
56
+ <?php endif; ?>
57
+ <input type="<?php echo $type; ?>" id="<?php echo $name; ?>" name="<?php echo $name; ?>" value="<?php echo $value; ?>" />
58
+ <?php if ($type != 'hidden'): ?>
59
+ </p>
60
+ <?php endif; ?>
61
+ <?php endforeach; ?>
62
+ </form>
63
+ <?php if ($type == 'hidden'): ?>
64
+ <script type="text/javascript">
65
+ window.setTimeout(function() {
66
+ document.getElementById('pbxep_form').submit();
67
+ }, 1);
68
+ </script>
69
+ <?php endif;
70
+ }
app/etc/modules/Paybox_Epayment.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <Paybox_Epayment>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Paybox_Epayment>
8
+ </modules>
9
+ </config>
app/locale/fr_FR/Paybox_Epayment.csv ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Yes","Oui"
2
+ "No","Non"
3
+ "Title","Titre"
4
+ "Sort Order","Ordre de tri"
5
+
6
+ "<span style=""color:red"">Do not use the ""test"" environment on production site. Payments will <strong>not</strong> be satisfied.</span>","<span style=""color:red"">Ne pas utiliser l'environnement ""test"" sur le site de production. Les paiements ne se feront <strong>pas</strong>."
7
+ "Merchant information","Information sur le commer&ccedil;ant"
8
+ "Pending Payment","Paiement en attente"
9
+ "Awaiting payment","En attente de paiement"
10
+ "Payment Validated Status","Statut du paiement validé"
11
+ "Payment Refused Status","Statut du paiement refusé"
12
+ "Payment Error Status","Statut du paiement en erreur"
13
+ "On Hold","En attente"
14
+ "Bank card payment","Paiement par carte bancaire"
15
+ "Payment action","Exécution du paiement"
16
+ "Manual debit","Débit manuel"
17
+ "Automatic debit","Débit automatique"
18
+ "Automatic capture status","Statut de commande déclanchant la capture"
19
+ "Manual capture only","Capture manuelle seulement"
20
+ "Status","Statut"
21
+ "Payment from Applicable Countries","Mode de paiement autorisé pour"
22
+ "Payment from Specific Countries","Mode de paiement autorisé pour les pays spécifiques"
23
+ "Specific Countries","Certains pays"
24
+ "All Allowed Countries","Tous les pays autorisés"
25
+ "3-D Secure Card validation","Validation de carte 3-D Secure"
26
+ "<span style=""color: red;"">Warning: your bank may enforce 3-D Secure.<br/>Make sure your setup is coherent with your bank, Paybox and Magento module.</span>","<span style=""color: red;"">Attention : votre banque peut vous imposer 3-D Secure.<br/>Assurez-vous que le paramétrage est cohérent entre votre Banque, Paybox et le module Magento.</span>"
27
+ "Never","Jamais"
28
+ "Always","Toujours"
29
+ "Conditional","Conditionnel"
30
+ "Paypal payment","Paiement par Paypal"
31
+ "This payment method is only available if you have subscribed to Paybox System.","Cette méthode de paiement n'est utilisable que si vous avez souscrit &agrave; Paybox System"
32
+ "Payment delay","Délai de paiement"
33
+ "Immediate","Immédiat"
34
+ "Other cards","Autres cartes"
35
+ "This payment method is only available if you have subscribed to Paybox Direct.","Cette méthode de paiement n'est utilisable que si vous avez souscrit &agrave; Paybox Direct"
36
+ "Minimum Order Total","Montant minimum de commande"
37
+ "Maximum Order Total","Montant maximum de commande"
38
+ "Number of orders","Nombre de commandes"
39
+ "Leetchi payment","Paiement par cagnotte Leetchi"
40
+
41
+ "Not achieved","Non réalisé"
42
+ "%s the %s","%s le %s"
43
+ "Transaction number","Numéro de transaction"
44
+ "Paybox Back Office Reference","Référence du Back-Office Paybox"
45
+ "Payment method","Moyen de paiement"
46
+ "Country of IP","Pays de l'IP"
47
+ "Processing date","Date de traitement"
48
+ "Debit type","Type de débit"
49
+ "First debit","Premier débit"
50
+ "Second debit","Deuxième débit"
51
+ "Third debit","Troisième débit"
52
+ "Card country","Pays de la carte"
53
+ "Card numbers","Numéros de la carte"
54
+ "Validity date","Date de validité"
55
+ "Total Debit","Débit total"
56
+ "Partial debit","Débit partiel"
57
+ "Refund","Remboursement"
58
+
59
+ "This is a debug view. Click continue to be redirected to Paybox payment page.","Ceci est une vue de débogage. Cliquez sur le bouton pour être redirigé vers la page de paiement de Paybox."
60
+ "You will be redirected to the Paybox payment page. If not, please use the button bellow.","Vous allez être automatiquement redirigé vers la page de paiement de Paybox. Si la redirection n'a pas lieu rapidement, veuillez utiliser le bouton ci-dessous."
61
+ "Continue...","Continuer..."
62
+
63
+ "Secrete HMAC key to create using the Paybox interface.","Clé secrète HMAC &agrave; générer depuis le Back-Office Paybox."
64
+ "By enabling this feature, an invoice is automatically generated when the payment is accepted by Paybox","En activant cette fonctionnalité, une facture est automatiquement génér&eacute;e quand le paiement est accept&eacute; par Paybox."
65
+ "In test mode your payments will not be sent to the bank.","En mode test vos paiements ne sont pas envoyés en banque."
66
+ "Ex: if you enter ""1"", 3-D Secure will be disabled starting from the second order","Ex : si vous saisissez ""1"", alors 3-D Secure sera désactivé &agrave; partir de la deuxième commande."
67
+ "Internal login provided by Paybox.","Identifiant interne délivré par Paybox."
68
+ "Back Office password provided by Paybox.","Mot de passe du Back-Office délivé par Paybox."
69
+ "Rank number provided by Paybox (last 2 digits).","Numéro de rang délivré par Paybox (les 2 derniers chiffres)."
70
+ "Site number provided by Paybox.","Numéro de site délivré par Paybox."
71
+ "If you disable E-Carte Bleu, contact the Paybox support","Si vous désactivez E-Carte bleue, veuillez contacter le support Paybox (cf. documentation)."
72
+ "Paybox module can show payment information to customer. You can disable this feature here.","Le module Paybox peut afficher les informations de paiement aux clients. Vous pouvez désactiver cette fonctionnalité ici."
73
+
74
+ "3-D Secure","3-D Secure"
75
+ "3-D Secure is mandatory for this payment method.","3-D Secure est obligatoire pour ce moyen de paiement."
76
+ "Enable","Activer"
77
+ "Enable 3-D Secure until X orders","Activer 3-D Secure jusqu'&agrave; X commandes"
78
+ "Enable 3-D Secure","Activer le 3-D Secure"
79
+ "Billing and shipping addresses","Adresses de facturation et de livraison"
80
+ "Once authorized","Après autorisation"
81
+ "Once paid","Après paiement"
82
+ "Check your Paybox contract before enabling this option.","Assurez-vous d'avoir activé cette option auprès de Paybox."
83
+ "Conditions","Conditions"
84
+ "Make sure that the contract signed with your bank allows 3-D Secure before proceeding with setup.","En amont, assurez vous du paramétrage 3-D Secure de votre contrat auprès de votre banque et auprès de Paybox."
85
+ "Environment","Environnement"
86
+ "Automatic invoice","Facturer automatiquement"
87
+ "Other options","Option supplémentaire"
88
+ "Show payment information to customers","Afficher les informations de paiement aux clients"
89
+ "HMAC","HMAC"
90
+ "Login","Identifiant"
91
+ "Delay","Jours de différé"
92
+ "Minimum Order Amount","Montant mini de la commande"
93
+ "Paybox Back Office password","Mot de passe du Back-Office Paybox"
94
+ "Payment methods","Moyens de paiement"
95
+ "Rank number","Numéro de rang"
96
+ "Site number","Numéro de site"
97
+ "Pay by Card Three Times","Paiement en trois fois par carte bancaire"
98
+ "Pay by Bancontact Mister Cash","Paiement par Bancontact/Mistercash"
99
+ "Pay by Buyster","Paiement par Buyster"
100
+ "Pay by Saving or Prepaid Ticket","Paiement par cagnotte ou ticket prépayé"
101
+ "Pay by Bank Card","Paiement par carte bancaire"
102
+ "Pay by Card and Means of Financing","Paiement par carte et moyen de financement"
103
+ "Pay by Maestro","Paiement par carte Maestro"
104
+ "Pay by Private Card","Paiement par carte privative"
105
+ "Pay by Paybutton","Paiement par Paybutton"
106
+ "Pay by Paypal","Paiement par Paypal"
107
+ "Account settings","Paramètres du compte"
108
+ "Paybox","Paybox"
109
+ "Presentation","Présentation"
110
+ "Subscribed Paybox Solution","Solution Paybox souscrite"
111
+ "Payment status","Statuts de commande"
112
+ "Debit type","Type de débit"
113
+ "Card type","Types de carte"
114
+
115
+ "Technical options","Réglages techniques"
116
+ "Debug","Débogage"
117
+ "Allowed IPs","IPs autorisées"
118
+ "Paybox System test URLs","URL de test Paybox System"
119
+ "Paybox System production URLs","URL de production Paybox System"
120
+ "Paybox Direct test URLs","URL de test Paybox Direct"
121
+ "Paybox Direct production URLs","URL de production Paybox Direct"
122
+ "A comma separated list of URLs.","Une liste d'URLs séparées par des virgules."
123
+ "A coma separated list of Paybox IPs.","Une liste des IPs Paybox séparées par des virgules."
124
+ "Enable some debugging information.","Active l'affichage d'informations de débogage supplémentaires."
125
+
126
+ "Paybox System (Essential Pack)","Pack Essentiel (Paybox System)"
127
+ "Paybox System + Paybox Direct (Flexible Pack)","Pack Flexible (Paybox System + Paybox Direct)"
128
+ "Production","Production"
129
+ "Test","Test"
130
+ "Conditionnal","Sélectif"
131
+ "Same","Identiques"
132
+ "Different","Différentes"
133
+ "Paid Immediatly","Débit immédiat"
134
+ "Defered payment","Débit différé"
135
+ "Paid shipping","Débit &agrave; l'expédition"
136
+
137
+ "Please select a valid credit card type","Veuillez choisir une carte."
138
+ "After confirmation of your order you will be redirected to the payment page.","Vous serez redirigé sur la page de paiement après confirmation de votre commande."
139
+ "Click to your card's logo, after confirmation of your order you will be redirected to the payment page.","Cliquez sur le logo correspondant &agrave; votre carte, vous serez redirigé sur la page de paiement après confirmation de votre commande."
140
+
141
+ "An unexpected error in Paybox call has occured.","Une erreur imprévue s'est produite lors du traitement de la réponse de Paybox."
142
+ "Paybox returned an unexpected error","Paybox a retourné une erreur."
143
+ "Payment canceled by user","Le paiement a été annulé par l'utilisateur."
144
+ "IPN call from %s not allowed.","L'appel &agrave; l'IPN par l'IP %s n'est pas permise."
145
+ "Unable to create an invoice.","Impossible de créer une facture."
146
+ "Payment was authorized and captured by Paybox.","Le paiement a été autorisé et captur&eacute; par Paybox."
147
+ "Second payment was captured by Paybox.","Le deuxième paiement a été capturé par Paybox."
148
+ "Third payment was captured by Paybox.","Le troisième paiement a été capturé par Paybox."
149
+ "No transaction found.","Aucune transaction trouvé."
150
+ "Payment never authorized.","Le paiement n'a pas été autorisé."
151
+ "Unexpected condition.","Une erreur imprévue s'est produite."
152
+ "Payment was captured by Paybox.","Le paiement a été capturé par Paybox."
153
+ "Paybox direct error","Erreur de Paybox Direct"
154
+ "Payment was canceled by user on Paybox payment page.","Le paiement a été annulé par l'utilisateur sur la page de paiement de Paybox."
155
+ "Customer is back from Paybox payment page.","Le client est de retour de la page de paiement de Paybox."
156
+ "Redirecting customer to Paybox payment page.","Le client est redirigé vers la page de paiement de Paybox."
157
+ "An unexpected error have occured while processing Paybox payment (%s).","Une erreur imprévue s'est produite durant le traitement du paiement par Paybox (%s)."
158
+ "Payment was refused by Paybox (%s).","Le paiement a été refusé par Paybox (%s)."
159
+ "Payment was authorized by Paybox.","Le paiement a été autorisé par Paybox."
160
+ "Invoice automatically created by Paybox payment module.","Une facture a été automatiquement crée par le module de paiement Paybox."
161
+
162
+ "Paybox not available. Please try again later.","Paybox n'est actuellement pas disponible. Veuillez réessayer ultérieurement."
package.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Paybox_epayment</name>
4
+ <version>2.0.0.3</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>En une seule int&#xE9;gration, proposez de nombreux moyens de paiement, disposez d&#x2019;une page de paiement s&#xE9;curis&#xE9;e personnalis&#xE9;e, multi-langues et multi-devises et proposez du d&#xE9;bit &#xE0; validation de commande, &#xE0; l&#x2019;exp&#xE9;dition ou encore en 3 fois sans frais &#xE0; vos clients.</summary>
10
+ <description>De nombreux moyens de paiement, sans modules compl&#xE9;mentaires &#xE0; installer : Visa, Mastercard, American Express, Paypal, Buyster, Wexpay, Leetchi, Bancontact/Mistercash, Maestro, Cofinoga, etc.&#xD;
11
+ Une flexibilit&#xE9; de d&#xE9;bit &#xE0; la validation de commande / &#xE0; l&#x2019;exp&#xE9;dition / en partiel ou total.&#xD;
12
+ Une fonction de remboursement partiel ou total d&#x2019;une commande.&#xD;
13
+ Des outils anti-fraude &#xE0; la carte : 3D Secure, Filtres sur nationalit&#xE9;s Carte / IP, alerte paiements multiples.&#xD;
14
+ La possibilit&#xE9; de prise de paiement par t&#xE9;l&#xE9;phone&#xD;
15
+ Un acc&#xE8;s Back Office Paybox avec des fonctions de reporting : suivi transactions temps r&#xE9;el et export de journaux d&#x2019;encaissement</description>
16
+ <notes>Stable version</notes>
17
+ <authors><author><name>Paybox</name><user>paybox</user><email>magento@paybox.com</email></author></authors>
18
+ <date>2014-11-24</date>
19
+ <time>09:58:14</time>
20
+ <contents><target name="magecommunity"><dir name="Paybox"><dir name="Epayment"><dir name="Block"><dir name="Admin"><dir name="Field"><file name="Checkboxes.php" hash="f10a43c88ce173c1a81fc92ef295d01e"/><file name="Select.php" hash="47048afb9d19029bed51e128614bbab9"/></dir><file name="Info.php" hash="b3c111361975299f954637aa9fb61a42"/><dir name="Kwixo"><file name="Shipping.php" hash="26dbd51618d76aba0668a80e67c80024"/></dir><file name="Presentation.php" hash="749f2cc04ed63c456ffdc1f2d10c6097"/></dir><dir name="Checkout"><file name="Payment.php" hash="099e835531c95a8cd07996a7b8c7cd39"/></dir><file name="Info.php" hash="1595639a592fdeff77362da834d6ae55"/><file name="Redirect.php" hash="456be09c18292eb5b7dfdf861d8eb30f"/></dir><dir name="Helper"><file name="Data.php" hash="63aee310d956379973b0f6873bef95d7"/><file name="Mobile.php" hash="ed502b97b0798bdd72b045efa9ff6c64"/></dir><dir name="Model"><dir name="Admin"><dir name="Cards"><file name="Abstract.php" hash="0dd5c4d19e85e704c215850817b7868c"/><file name="Cb.php" hash="40ee3c428b9a3287b46f349c19a09384"/><file name="Financial.php" hash="1842828d4dbf9d105bbef6ce34c6762a"/><file name="Paybuttons.php" hash="c0cac798dd7f116c78237782de7fb5ba"/><file name="Prepaid.php" hash="c3b16410c3226c778ed98aad41846371"/><file name="Private.php" hash="478a27fa055fad28ae8d8dcbb0414105"/><file name="Threetime.php" hash="9832b41bb7728e536ab39da54d81ce52"/></dir><file name="Environment.php" hash="fb16443891a22661f43576cdbc4d6793"/><dir name="Fianet"><file name="Categories.php" hash="67910c9587cd14a31c8f7b5698057786"/><file name="DeliverySpeeds.php" hash="96e7cf8ad7f90efcd7c9f7afd695d779"/><file name="ShippingTypes.php" hash="88eef7865f4296bb424f821f2f06ddf7"/></dir><dir name="Order"><dir name="Status"><file name="Autocapture.php" hash="cd5501b431651e3cedd62c98baa2f255"/><file name="Canceled.php" hash="a82ebe85febab87dd6b5b7f73a0983e7"/><file name="Holded.php" hash="369b3baa50b8eccaf4158feca1a74f4e"/><file name="New.php" hash="26595474b91e26ab611475e9652f7017"/><file name="Pending.php" hash="898905e3d6e756de151dad29451e80d0"/><file name="Pendingpayment.php" hash="ae889edbbbad44078ebc1cd2944271d6"/><file name="Processing.php" hash="d3b4baf5eac6f131db0dc07ed70ffc07"/></dir></dir><dir name="Payment"><file name="Action.php" hash="618fb1d04f4085ddf1e466e40a138e1d"/><file name="Actionpaypal.php" hash="17a0b172218b60902f956ae6ac00248c"/><file name="Delays.php" hash="38151dc35efee312bad036862912cb32"/><file name="Same.php" hash="0f1737a05d5431ab1f4dd3d9146c2514"/><file name="Use3ds.php" hash="9b02555cbce8f70c779224fb73722a1b"/></dir><file name="Subscription.php" hash="fc9d80675690c7a69748178bf3aa8072"/></dir><file name="Config.php" hash="863768ce4610cd7fd54a41a3b865dd72"/><file name="Context.php" hash="0a25db2efb1e508d217371f757ce3698"/><file name="Iso4217Currency.php" hash="56df63960effa512f2ebcfe4f6f4f88f"/><file name="Kwixo.php" hash="b0a55d50f0fb4ac016a9e9949a496bb2"/><dir name="Observer"><file name="AdminCreateOrder.php" hash="80d7d9fa006b836a7545c978d698e24a"/></dir><file name="Observer.php" hash="6171bf08addbf7999bff9e34a8013def"/><file name="Paybox.php" hash="5f743d36c320dae3424cf70b51bc5ff1"/><dir name="Payment"><file name="Abstract.php" hash="1da0ad062042d8d839d10d3fc2dd0fe8"/><file name="Bcmc.php" hash="19f45f87cbe5fff394d0354e8af1191b"/><file name="Cb.php" hash="73edf4938a64722fe3ecbc43bfcff230"/><file name="Financial.php" hash="c1902902df246faa3e97a27ac3c1b3af"/><dir name="Kwixo"><file name="Credit.php" hash="b9d759bcebfbe61751cda45ae1c1443b"/><file name="Onexrnp.php" hash="abc51c0459bf1c08c9230ab261aebe5e"/><file name="Standard.php" hash="76f24bc9223646c8be8de7750ce7d603"/></dir><file name="Maestro.php" hash="be7cc8cac0002e15c320b8dac77b3893"/><file name="Paybuttons.php" hash="9f3c102def1dabc10d8ebcdc77ab1489"/><file name="Paypal.php" hash="5e00be9ff34a323f3742d01f8da5aaad"/><file name="Prepaid.php" hash="82b2be70957d9d1664d8a47cb0befa32"/><file name="Private.php" hash="d0421a3ecf113f49800ff79bd23c4334"/><file name="Threetime.php" hash="c389c6292aa726fefd970e161188b62d"/></dir><dir name="Resource"><file name="Setup.php" hash="2f210fe03445e185e2044f62f6fb9f7b"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PbxepController.php" hash="e81b789b06d6c6fc490cf59d36b5806c"/></dir><file name="PaymentController.php" hash="f52d1090e7ce09fe8231906d766727b0"/></dir><dir name="etc"><file name="adminhtml.xml" hash="479ca80d7b7b7e649e000b25c5b0f9ed"/><file name="config.xml" hash="47d3be94e9c5d9d122b37785a27f7ade"/><file name="pubkey.pem" hash="d534e7a4f811f41497b614d0e83979a4"/><file name="system.xml" hash="dae2e4648274b5d8937f28e47379ee7f"/></dir><dir name="sql"><dir name="pbxep_setup"><file name="mysql4-install-0.1.0.php" hash="e115180663f53e53f777a1f21e5b63d0"/><file name="mysql4-upgrade-0.1.0-0.3.0.php" hash="164d76bf68c900e751086e6efa76ac7e"/><file name="mysql4-upgrade-0.8.3.3-0.8.4.php" hash="3e4f6e85b212f768427f9cf4ae6b4ecb"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pbxep.xml" hash="d36bae8489b1f81a932bfadd93d59c5e"/></dir><dir name="template"><dir name="pbxep"><dir name="info"><file name="default.phtml" hash="1a3e9f8f9b5a04d2e0f8201493700d50"/></dir><dir name="presentation"><file name="en.phtml" hash="b7b1e314614cf326c6e2b6eba1540682"/><file name="fr.phtml" hash="b7392fc37b393166115db01bb3f1d62f"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pbxep.xml" hash="d70470f6bca63a5b9706a494340cb717"/></dir><dir name="template"><dir name="pbxep"><file name="checkout-payment.phtml" hash="a694f4686f13d1a8da79a63d5ac363fb"/><dir name="info"><file name="default.phtml" hash="5ae6adf25f30e161936fcf2dbc20bafb"/></dir><file name="redirect.phtml" hash="15e16ea3d91f2b851ce977250b99fe96"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Paybox_Epayment.xml" hash="d7b945fe6506ead3570a06979580a12e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="pbxep"><file name="1euro.45.png" hash="e3b636313158afb8c2f9af5f428be779"/><file name="amex.45.png" hash="ea2ab18feb39ffddd2bff4335d1c258a"/><file name="aurore.45.png" hash="69008cca86472e625a085594251a6cf2"/><file name="bcmc.45.png" hash="d6d01eea67100cf157557f2174cc68c4"/><file name="buyster.45.png" hash="544917376c4743bdef5a9daa2401d2a7"/><file name="cashticket.45.png" hash="460882095aae2fd81c4151b1259421f0"/><file name="cb.45.png" hash="3e3b08f1c078cbf1103ceb097a526a4f"/><file name="cofinoga.45.png" hash="fe526fe56555a860937d6b4813fdcde6"/><file name="diners.45.png" hash="af58b260b52260e64f184a72d73dd3d3"/><file name="ecartebleue.45.png" hash="96a42041c74aa41d0d6dabe25065d9cc"/><file name="ideal.45.png" hash="affbc207d2588593aa641713d618c8d8"/><file name="jcb.45.png" hash="d4ef8e26b0f1dd216992fc5ae9838dbf"/><file name="kadeos.45.png" hash="d97a5d875efbaa4ce076088cab51195d"/><file name="leetchi.45.png" hash="a0bfae2c382aa5a5a65c6fe5b4a7e26b"/><file name="maestro.png" hash="83dfc84b3600447999eae742dfcb3fdb"/><file name="mastercard.45.png" hash="9061669d6bd53da477d7e9cffd9bc546"/><file name="paybutting.45.png" hash="e108629fd76ba2ba6e830530197a9022"/><file name="paypal.45.png" hash="9245237b802bb7d6b8ce8e085a2dd7aa"/><file name="paysafecard.45.png" hash="63c48cbde81ee1b0aa73fa90ceba7695"/><file name="visa.45.png" hash="05b965f45c9b207582efdb04553b58ee"/><file name="wexpay.45.png" hash="ef1ecbd23625784f9292bec537c76e52"/></dir></dir><dir name="css"><dir name="pbxep"><file name="styles.css" hash="317c1a8247b0696c22adbfacaa860f02"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="paybox"><file name="1euro.45.png" hash="e3b636313158afb8c2f9af5f428be779"/><file name="amex.45.png" hash="ea2ab18feb39ffddd2bff4335d1c258a"/><file name="aurore.45.png" hash="69008cca86472e625a085594251a6cf2"/><file name="bcmc.45.png" hash="d6d01eea67100cf157557f2174cc68c4"/><file name="buyster.45.png" hash="544917376c4743bdef5a9daa2401d2a7"/><file name="cashticket.45.png" hash="460882095aae2fd81c4151b1259421f0"/><file name="cb.45.png" hash="3e3b08f1c078cbf1103ceb097a526a4f"/><file name="checkmark-blue.png" hash="373a777f58c70b502f372c5d5f9fdaa4"/><file name="checkmark.gif" hash="d59def45c447c149eec190e24d7bbc19"/><file name="cofinoga.45.png" hash="fe526fe56555a860937d6b4813fdcde6"/><file name="diners.45.png" hash="af58b260b52260e64f184a72d73dd3d3"/><file name="ecartebleue.45.png" hash="96a42041c74aa41d0d6dabe25065d9cc"/><file name="ideal.45.png" hash="affbc207d2588593aa641713d618c8d8"/><file name="jcb.45.png" hash="d4ef8e26b0f1dd216992fc5ae9838dbf"/><file name="kadeos.45.png" hash="d97a5d875efbaa4ce076088cab51195d"/><file name="leetchi.45.png" hash="a0bfae2c382aa5a5a65c6fe5b4a7e26b"/><file name="maestro.png" hash="83dfc84b3600447999eae742dfcb3fdb"/><file name="mastercard.45.png" hash="9061669d6bd53da477d7e9cffd9bc546"/><file name="multicanal.png" hash="9e5e255d1104b4041dee47010a109597"/><file name="paybox-lg.png" hash="7a817215b8ce0bd83e0645425a2e7d6c"/><file name="paybutting.45.png" hash="e108629fd76ba2ba6e830530197a9022"/><file name="paypal.45.png" hash="9245237b802bb7d6b8ce8e085a2dd7aa"/><file name="paysafecard.45.png" hash="63c48cbde81ee1b0aa73fa90ceba7695"/><file name="visa.45.png" hash="3bdae7643b5eea3bc6f9f23b2caafde7"/><file name="wexpay.45.png" hash="ef1ecbd23625784f9292bec537c76e52"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Paybox_Epayment.csv" hash="e36141694279ba224df3c3a7c4175eaa"/></dir></target></contents>
21
+ <compatible/>
22
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>openssl</name><min></min><max></max></extension></required></dependencies>
23
+ </package>
skin/adminhtml/default/default/images/paybox/1euro.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/amex.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/aurore.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/bcmc.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/buyster.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/cashticket.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/cb.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/checkmark-blue.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/checkmark.gif ADDED
Binary file
skin/adminhtml/default/default/images/paybox/cofinoga.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/diners.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/ecartebleue.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/ideal.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/jcb.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/kadeos.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/leetchi.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/maestro.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/mastercard.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/multicanal.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/paybox-lg.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/paybutting.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/paypal.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/paysafecard.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/visa.45.png ADDED
Binary file
skin/adminhtml/default/default/images/paybox/wexpay.45.png ADDED
Binary file
skin/frontend/base/default/css/pbxep/styles.css ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ .pbxep-payment-cards{text-align:center;}
2
+ .pbxep-payment-card{display:inline-block;margin:0 30px;padding:3px;text-align:center}
3
+ .pbxep-payment-card label{display:block;float:none;}
4
+ .pbxep-payment-label{float:right;}
5
+ .pbxep-payment-logo{height:20px;}
skin/frontend/base/default/images/pbxep/1euro.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/amex.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/aurore.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/bcmc.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/buyster.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/cashticket.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/cb.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/cofinoga.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/diners.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/ecartebleue.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/ideal.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/jcb.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/kadeos.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/leetchi.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/maestro.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/mastercard.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/paybutting.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/paypal.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/paysafecard.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/visa.45.png ADDED
Binary file
skin/frontend/base/default/images/pbxep/wexpay.45.png ADDED
Binary file