Fianet_Sac - Version 1.1.0

Version Notes

Official commit

Download this release

Release Info

Developer Magento Core Team
Extension Fianet_Sac
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.5 to 1.1.0

Files changed (34) hide show
  1. app/code/community/Fianet/Sac/Block/Adminhtml/Payment/Configuration.php +1 -1
  2. app/code/community/Fianet/Sac/Block/Adminhtml/Payment/Edit/Form.php +1 -1
  3. app/code/community/Fianet/Sac/Helper/Data.php +1 -1
  4. app/code/community/Fianet/Sac/Helper/Order.php +39 -28
  5. app/code/community/Fianet/Sac/Model/Action.php +10 -10
  6. app/code/community/Fianet/Sac/Model/Fianet/Order/Info/Sac.php +1 -1
  7. app/code/community/Fianet/Sac/Model/Fianet/Order/Sac.php +88 -18
  8. app/code/community/Fianet/Sac/Model/Mysql4/Payment/Association.php +1 -1
  9. app/code/community/Fianet/Sac/Model/Mysql4/Payment/Association/Collection.php +1 -1
  10. app/code/community/Fianet/Sac/Model/Observer.php +3 -3
  11. app/code/community/Fianet/Sac/Model/Payment/Association.php +1 -1
  12. app/code/community/Fianet/Sac/Model/Product.php +1 -1
  13. app/code/community/Fianet/Sac/Model/Source/Statut.php +1 -1
  14. app/code/community/Fianet/Sac/Model/Source/Type.php +2 -1
  15. app/code/community/Fianet/Sac/controllers/Adminhtml/PaymentController.php +1 -1
  16. app/code/community/Fianet/Sac/etc/adminhtml.xml +1 -1
  17. app/code/community/Fianet/Sac/etc/config.xml +2 -2
  18. app/code/community/Fianet/Sac/etc/system.xml +41 -25
  19. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-install-0.0.1.php +1 -1
  20. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.1-0.0.2.php +1 -1
  21. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.10-0.0.11.php +1 -1
  22. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.11-0.0.12.php +1 -1
  23. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.12-0.0.13.php +1 -1
  24. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.13-1.0.0.php +1 -1
  25. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.2-0.0.3.php +1 -1
  26. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.3-0.0.4.php +1 -1
  27. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.4-0.0.5.php +1 -1
  28. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.0-1.0.1.php +1 -1
  29. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.3-1.0.4.php +1 -1
  30. app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.5-1.1.0.php +29 -0
  31. app/design/adminhtml/default/default/layout/sac.xml +1 -1
  32. app/etc/modules/Fianet_Sac.xml +2 -2
  33. app/locale/fr_FR/Fianet_Sac.csv +10 -3
  34. package.xml +5 -5
app/code/community/Fianet/Sac/Block/Adminhtml/Payment/Configuration.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Block_Adminhtml_Payment_Configuration extends Mage_Adminhtml_Block_Widget_Form_Container {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Block_Adminhtml_Payment_Configuration extends Mage_Adminhtml_Block_Widget_Form_Container {
app/code/community/Fianet/Sac/Block/Adminhtml/Payment/Edit/Form.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Block_Adminhtml_Payment_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Block_Adminhtml_Payment_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
app/code/community/Fianet/Sac/Helper/Data.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Helper_Data extends Mage_Core_Helper_Abstract {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Helper_Data extends Mage_Core_Helper_Abstract {
app/code/community/Fianet/Sac/Helper/Order.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
@@ -68,7 +68,7 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
68
  $this->_tables[] = $orderGrid;
69
  }
70
 
71
- public function canSendOrder($order, $orderId = 0, $isMissingOrder = false) {
72
  //Récupération des Status définis dans les paramétrages du module
73
  $myarray = Mage::getStoreConfig('sac/sacconfg/procasso', '0');
74
  if ($myarray)
@@ -82,22 +82,29 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
82
  return false;
83
  }
84
 
85
- //Pas d'envoi si le module n'est pas activé
86
- if($order->getStatus() != '' && Mage::getStoreConfig('sac/sacconfg/active') == 0){
87
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: module disabled, order #%s not sent.', $order->getIncrementId()));
88
- return false;
89
- }
90
-
91
- // Pas d'envoi si la commande n'est pas dans un statut défini dans les paramétrages du module
92
- if (!in_array($order->getStatus(), $modeArray)) {
93
- // Si la commande ne vient pas d'être passée
94
- if($order->getStatus() != '' && $order->getState()!='new') {
95
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - status: %s not selected.', $order->getIncrementId(), $order->getStatus()));
96
- } else if($order->getStatus() != '') {
97
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - state: %s.', $order->getIncrementId(), $order->getState()));
 
 
 
 
 
 
 
 
98
  }
99
- return false;
100
- }
101
 
102
  // Pas d'envoi sur les paiements RNP et Kwixo
103
  if ($order->getStatus() != '' && (preg_match('/receiveandpay/i', $order->getPayment()->getMethod()) || preg_match('/kwx/i', $order->getPayment()->getMethod()) || preg_match('/kwixo/i', $order->getPayment()->getMethod()))) {
@@ -143,13 +150,12 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
143
  return false;
144
  }
145
  }
146
-
147
- $billingAddressCounrty = $order->getBillingAddress()->getCountry();
148
- $shippingAddressCounrty = $order->getShippingAddress()->getCountry();
149
-
150
  // Pas d'envoi sur les paiements ayant pour adresse un pays non géré par Certissim
151
- if (!(in_array($billingAddressCounrty, $this->_allowedCountries) && in_array($shippingAddressCounrty, $this->_allowedCountries))) {
152
- Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - billing country: %s - shipping country: %s.', $order->getIncrementId(), $billingAddressCounrty, $shippingAddressCounrty));
153
  return false;
154
  }
155
 
@@ -162,6 +168,8 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
162
 
163
  // On indique que la commande a été envoyée
164
  foreach ($orderIds as $orderId) {
 
 
165
  // Plus rapide par requête directe
166
  $queryR = "SELECT `store_id` FROM `{$this->_resource->getTableName('sales/order')}` WHERE `entity_id` = '{$orderId}' LIMIT 0,1;";
167
  $results = $this->_readConnection->fetchAll($queryR);
@@ -170,11 +178,11 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
170
  continue; // Pas de résultat trouvé
171
 
172
  foreach ($results as $result) {
173
- $sotreId = $result['store_id'];
174
  }
175
-
176
- $mode = Mage::getStoreConfig('sac/sacconfg/mode', $sotreId);
177
- if ($mode == null && $sotreId > 0)
178
  $mode = Mage::getStoreConfig('sac/sacconfg/mode', '0');
179
 
180
  if ($mode == Fianet_Core_Model_Source_Mode::MODE_PRODUCTION) {
@@ -182,12 +190,15 @@ class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
182
  } else {
183
  $mode = 'TEST';
184
  }
 
 
185
 
186
  // Mise à jour par SQL sinon boucle infinie
187
  foreach ($this->_tables as $table) {
188
  $queryW = "UPDATE `{$table}` ";
189
  $queryW .= "SET `fianet_sac_sent` = '1', ";
190
- $queryW .= "`fianet_sac_mode` = '{$mode}' ";
 
191
  $queryW .= "WHERE `entity_id` = '{$orderId}';";
192
  $this->_writeConnection->query($queryW);
193
  }
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Helper_Order extends Mage_Core_Helper_Abstract {
68
  $this->_tables[] = $orderGrid;
69
  }
70
 
71
+ public function canSendOrder($order, $orderId = 0, $isMissingOrder = false) {
72
  //Récupération des Status définis dans les paramétrages du module
73
  $myarray = Mage::getStoreConfig('sac/sacconfg/procasso', '0');
74
  if ($myarray)
82
  return false;
83
  }
84
 
85
+ //Pas d'envoi si le module n'est pas activé et si l'ID FIA-NET n'est pas indiqué
86
+ if ($order->getStatus() != '') {
87
+ //Si le type de paiement est Franfinance, alors on vérifie l'activation de "activefranfinance", sinon de "active"
88
+ if (($order->getPayment()->getMethod() == "atos3xweb_web" || $order->getPayment()->getMethod() == "atos3s_sprint")) {
89
+ if (Mage::getStoreConfig('sac/sacconfg/activefranfinance') == 0) {
90
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: Franfinance mode disabled, order #%s not sent.', $order->getIncrementId()));
91
+ return false;
92
+ }
93
+ if (Mage::getStoreConfig('sac/sacconfg/idfranfinance') == "") {
94
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: Franfinance Certissim ID not specified, order #%s not sent.', $order->getIncrementId()));
95
+ return false;
96
+ }
97
+ } else {
98
+ if (Mage::getStoreConfig('sac/sacconfg/active') == 0) {
99
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: module disabled, order #%s not sent.', $order->getIncrementId()));
100
+ return false;
101
+ }
102
+ if (Mage::getStoreConfig('sac/sacconfg/siteid') == "") {
103
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: SiteID not specified, order #%s not sent.', $order->getIncrementId()));
104
+ return false;
105
+ }
106
  }
107
+ }
 
108
 
109
  // Pas d'envoi sur les paiements RNP et Kwixo
110
  if ($order->getStatus() != '' && (preg_match('/receiveandpay/i', $order->getPayment()->getMethod()) || preg_match('/kwx/i', $order->getPayment()->getMethod()) || preg_match('/kwixo/i', $order->getPayment()->getMethod()))) {
150
  return false;
151
  }
152
  }
153
+
154
+ $billingAddressCountry = $order->getBillingAddress()->getCountry();
155
+ $shippingAddressCountry = ($order->getShippingAddress()) ? $order->getShippingAddress()->getCountry() : $order->getBillingAddress()->getCountry();
 
156
  // Pas d'envoi sur les paiements ayant pour adresse un pays non géré par Certissim
157
+ if (!(in_array($billingAddressCountry, $this->_allowedCountries) && in_array($shippingAddressCountry, $this->_allowedCountries))) {
158
+ Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: order #%s not sent - billing country: %s - shipping country: %s.', $order->getIncrementId(), $billingAddressCountry, $shippingAddressCountry));
159
  return false;
160
  }
161
 
168
 
169
  // On indique que la commande a été envoyée
170
  foreach ($orderIds as $orderId) {
171
+ $order = Mage::getModel('sales/order')->load($orderId);
172
+
173
  // Plus rapide par requête directe
174
  $queryR = "SELECT `store_id` FROM `{$this->_resource->getTableName('sales/order')}` WHERE `entity_id` = '{$orderId}' LIMIT 0,1;";
175
  $results = $this->_readConnection->fetchAll($queryR);
178
  continue; // Pas de résultat trouvé
179
 
180
  foreach ($results as $result) {
181
+ $storeId = $result['store_id'];
182
  }
183
+
184
+ $mode = Mage::getStoreConfig('sac/sacconfg/mode', $storeId);
185
+ if ($mode == null && $storeId > 0)
186
  $mode = Mage::getStoreConfig('sac/sacconfg/mode', '0');
187
 
188
  if ($mode == Fianet_Core_Model_Source_Mode::MODE_PRODUCTION) {
190
  } else {
191
  $mode = 'TEST';
192
  }
193
+
194
+ $franfinancePayment = ($order->getPayment()->getMethod() == "atos3xweb_web" || $order->getPayment()->getMethod() == "atos3s_sprint") ? 1 : 0;
195
 
196
  // Mise à jour par SQL sinon boucle infinie
197
  foreach ($this->_tables as $table) {
198
  $queryW = "UPDATE `{$table}` ";
199
  $queryW .= "SET `fianet_sac_sent` = '1', ";
200
+ $queryW .= "`fianet_sac_mode` = '{$mode}', ";
201
+ $queryW .= "`fianet_sac_franfinance` = '{$franfinancePayment}'";
202
  $queryW .= "WHERE `entity_id` = '{$orderId}';";
203
  $this->_writeConnection->query($queryW);
204
  }
app/code/community/Fianet/Sac/Model/Action.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Action {
@@ -33,7 +33,7 @@ class Fianet_Sac_Model_Action {
33
  }
34
 
35
  public static function sendMissingOrders() {
36
- $nb = 0;
37
  $date = Zend_Date::now();
38
 
39
  $collection = Mage::getResourceModel('sales/order_collection')
@@ -49,7 +49,7 @@ class Fianet_Sac_Model_Action {
49
  foreach ($collection as $object) {
50
  $orderId = (int) $object->getEntityId();
51
  $order = Mage::getModel('sales/order')->load($orderId);
52
-
53
  if (!Mage::helper('sac/order')->canSendOrder($order, $orderId, true)) {
54
  continue;
55
  }
@@ -60,14 +60,14 @@ class Fianet_Sac_Model_Action {
60
  if ($statut == null && $storeId > 0) {
61
  $statut = Mage::getStoreConfig('sac/sacconfg/active', '0');
62
  }
63
-
64
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: new send evaluation request.'));
65
-
66
  try {
67
  $payment_type = Mage::getModel('sac/payment_association')->load($order->getPayment()->getMethod())->getValue();
68
  $message = "Certissim: sending missing order #%s, payment type is %s.";
69
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__($message, $order->getIncrementId(), $payment_type));
70
- $SacOrder = Fianet_Sac_Model_Fianet_Order_Sac::GenerateSacOrder($order);
71
  $sender = Mage::getModel('fianet/fianet_sender');
72
  $sender->addOrder($SacOrder);
73
  $response = $sender->send();
@@ -92,7 +92,7 @@ class Fianet_Sac_Model_Action {
92
  public static function getEvaluation($orderIds = array()) {
93
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: attempt to retrieve evaluation...'));
94
  $nb = 0;
95
-
96
  $collection = Mage::getResourceModel('sales/order_collection')
97
  ->addAttributeToSelect('increment_id')
98
  ->addAttributeToSelect('store_id')
@@ -100,7 +100,8 @@ class Fianet_Sac_Model_Action {
100
  ->addAttributeToSelect('fianet_sac_evaluation')
101
  ->addAttributeToSelect('fianet_sac_statutcoex')
102
  ->addAttributeToSelect('fianet_sac_mode')
103
- ->addAttributeToFilter('fianet_sac_sent', 1) // uniquement les commandes déjà envoyée
 
104
  ->addAttributeToFilter('fianet_sac_statutcoex',
105
  array(
106
  'or' => array(
@@ -115,9 +116,7 @@ class Fianet_Sac_Model_Action {
115
  $collection->addAttributeToFilter('entity_id', array('in' => $orderIds));
116
 
117
  $collection->load();
118
-
119
  $order_list = array();
120
-
121
  foreach ($collection as $order) {
122
  $fromstoreid = $order->getStoreId();
123
 
@@ -138,6 +137,7 @@ class Fianet_Sac_Model_Action {
138
  $order_list[$siteid]['mode'] = $order->getFianetSacMode();
139
  $order_list[$siteid]['orders'][] = $order->getIncrementId();
140
  }
 
141
  // Récupération des évaluations des commandes
142
  $evaluations = Mage::getModel('fianet/fianet_sender')->getEvaluations($order_list);
143
  self::_initConnections();
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Action {
33
  }
34
 
35
  public static function sendMissingOrders() {
36
+ $nb = 0;
37
  $date = Zend_Date::now();
38
 
39
  $collection = Mage::getResourceModel('sales/order_collection')
49
  foreach ($collection as $object) {
50
  $orderId = (int) $object->getEntityId();
51
  $order = Mage::getModel('sales/order')->load($orderId);
52
+
53
  if (!Mage::helper('sac/order')->canSendOrder($order, $orderId, true)) {
54
  continue;
55
  }
60
  if ($statut == null && $storeId > 0) {
61
  $statut = Mage::getStoreConfig('sac/sacconfg/active', '0');
62
  }
63
+
64
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: new send evaluation request.'));
65
+
66
  try {
67
  $payment_type = Mage::getModel('sac/payment_association')->load($order->getPayment()->getMethod())->getValue();
68
  $message = "Certissim: sending missing order #%s, payment type is %s.";
69
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__($message, $order->getIncrementId(), $payment_type));
70
+ $SacOrder = Mage::getModel('sac/fianet_order_sac')->generateSacOrder($order);
71
  $sender = Mage::getModel('fianet/fianet_sender');
72
  $sender->addOrder($SacOrder);
73
  $response = $sender->send();
92
  public static function getEvaluation($orderIds = array()) {
93
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__('Certissim: attempt to retrieve evaluation...'));
94
  $nb = 0;
95
+
96
  $collection = Mage::getResourceModel('sales/order_collection')
97
  ->addAttributeToSelect('increment_id')
98
  ->addAttributeToSelect('store_id')
100
  ->addAttributeToSelect('fianet_sac_evaluation')
101
  ->addAttributeToSelect('fianet_sac_statutcoex')
102
  ->addAttributeToSelect('fianet_sac_mode')
103
+ ->addAttributeToFilter('fianet_sac_sent', 1) // Uniquement les commandes déjà envoyée
104
+ ->addAttributeToFilter('fianet_sac_franfinance', 0) // On ne récupère pas les évaluations des commandes Franfinance
105
  ->addAttributeToFilter('fianet_sac_statutcoex',
106
  array(
107
  'or' => array(
116
  $collection->addAttributeToFilter('entity_id', array('in' => $orderIds));
117
 
118
  $collection->load();
 
119
  $order_list = array();
 
120
  foreach ($collection as $order) {
121
  $fromstoreid = $order->getStoreId();
122
 
137
  $order_list[$siteid]['mode'] = $order->getFianetSacMode();
138
  $order_list[$siteid]['orders'][] = $order->getIncrementId();
139
  }
140
+
141
  // Récupération des évaluations des commandes
142
  $evaluations = Mage::getModel('fianet/fianet_sender')->getEvaluations($order_list);
143
  self::_initConnections();
app/code/community/Fianet/Sac/Model/Fianet/Order/Info/Sac.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Fianet_Order_Info_Sac {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Fianet_Order_Info_Sac {
app/code/community/Fianet/Sac/Model/Fianet/Order/Sac.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Fianet_Order_Sac {
@@ -49,7 +49,7 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
49
  public function getXml($display_signature = false) {
50
  $xml = '';
51
  if ($display_signature) {
52
- $xml .= '<?xml version="1.0" encoding="' . $this->encoding . '" ?>' . "\n";
53
  }
54
  $xml .= '<control fianetmodule="Magento_SAC" version="' . $this->version . '">' . "\n";
55
  $xml .= $this->billing_user->getXml();
@@ -71,7 +71,6 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
71
  $xml .= $this->info_commande->getXml();
72
  $xml .= $this->payment->getXml();
73
  $xml .= '</control>';
74
-
75
  return ($xml);
76
  }
77
 
@@ -79,13 +78,16 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
79
  $scope_field = "store_id";
80
  $id = $order->getStore()->getId();
81
 
 
 
 
82
  $sacOrder = Mage::getModel('sac/fianet_order_sac');
83
 
84
  $sacOrder->scope_field = $scope_field;
85
  $sacOrder->scope_id = $id;
86
 
87
  $billing_address = $order->getBillingAddress();
88
- $shipping_address = $order->getShippingAddress();
89
 
90
  $sacOrder->billing_user->titre = $billing_address->getPrefix();
91
  $sacOrder->billing_user->nom = $billing_address->getLastname();
@@ -113,7 +115,7 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
113
  $sacOrder->delivery_user->prenom = $shipping_address->getFirstname();
114
  $sacOrder->delivery_user->telhome = preg_replace("/[^0-9]/", "", $shipping_address->getTelephone());
115
  $sacOrder->delivery_user->telfax = preg_replace("/[^0-9]/", "", $shipping_address->getFax());
116
- $sacOrder->delivery_user->email = $shipping_address->getEmail();
117
  $sacOrder->delivery_user->societe = $shipping_address->getCompany();
118
 
119
  $sacOrder->info_commande->refid = $order->getRealOrderId();
@@ -123,26 +125,29 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
123
  $sacOrder->info_commande->ip = (!$order->getRemoteIp()) ? $_SERVER['REMOTE_ADDR'] : $order->getRemoteIp();
124
  //La fonction $order->created_at de Magento retourne l'heure UTC peu importe la config. Pour obtenir celle de la boutique, il est donc n�cessaire d'appliquer la m�thode ci-dessous
125
  $sacOrder->info_commande->timestamp = Mage::getModel('core/date')->date(null,strtotime($order->created_at));
126
- $sacOrder->info_commande->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', $id);
127
- if ($sacOrder->info_commande->siteid == null && $id != 0)
128
- $sacOrder->info_commande->siteid = Mage::getStoreConfig('sac/sacconfg/siteid', '0');
 
129
 
130
- $shipping_code = $order->getShippingCarrier()->getCarrierCode();
131
- $shipping = Mage::getModel('fianet/shipping_association')->load($shipping_code);
 
 
132
 
133
  //initialisation du type de transport
134
  $type_transporteur = '';
135
  $nom_transporteur = '';
136
  $rapidite_transporteur = '';
137
 
138
- //Traitement particulier si la m�thode de livraison est So Colissimo Simplicit�
139
- if ($shipping_code == "socolissimosimplicite") {
140
- $nom_transporteur = 'So Colissimo Simplicite';
141
  $rapidite_transporteur = '2';
142
  //R�cup�ration du num tel demand� par SoColissimo
143
  if ($order->getSocoPhoneNumber())
144
  $sacOrder->delivery_user->telmobile = $order->getSocoPhoneNumber();
145
-
146
  switch ($order->getSocoProductCode()) {
147
  case "A2P";
148
  case "CMT";
@@ -162,6 +167,7 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
162
  $sacOrder->info_commande->transport->adresse = $transport_adress;
163
  break;
164
  case "DOM";
 
165
  case "RDV":
166
  $type_transporteur = '4';
167
  break;
@@ -171,6 +177,19 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
171
  Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__("Certissim: order #%s. Error with SoColissimo's return. Product Code %s was not recognized.", $order->getRealOrderId(), $order->getSocoProductCode()));
172
  break;
173
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  } elseif ($shipping_code == "envoimoinscher") {//Traitement particulier si la m�thode de livraison est Envoimoinscher
175
  $nom_transporteur = $shipping->getConveyorName();
176
  $rapidite_transporteur = $shipping->getDeliveryTimes();
@@ -197,15 +216,50 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
197
  } else {
198
  $type_transporteur = '4';
199
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  } else { //Pour tous les autres cas
201
  if ($shipping) {
202
  $type_transporteur = $shipping->getFianetShippingType();
203
  $nom_transporteur = $shipping->getConveyorName();
204
  $rapidite_transporteur = $shipping->getDeliveryTimes();
205
 
206
- if ($type_transporteur == "1") //si r�cup�ration du colis chez le marchand
207
  $sacOrder->info_commande->transport->enseigne = Mage::getStoreConfig('general/store_information/name');
208
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  if ($type_transporteur == "2") { //si transport en point relais
210
  //si module de point relais particulier, l'inscrire ici...
211
  }
@@ -250,8 +304,24 @@ class Fianet_Sac_Model_Fianet_Order_Sac {
250
  $product->ref = $pSku;
251
  $sacOrder->info_commande->list->addProduct($product);
252
  }
253
- $sacOrder->payment->type = Mage::getModel('sac/payment_association')->load($order->getPayment()->getMethod())->getValue();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  return ($sacOrder);
255
  }
256
-
257
  }
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Fianet_Order_Sac {
49
  public function getXml($display_signature = false) {
50
  $xml = '';
51
  if ($display_signature) {
52
+ $xml .= '<?xml version="1.0" encoding="' . $this->encoding . '"?>' . "\n";
53
  }
54
  $xml .= '<control fianetmodule="Magento_SAC" version="' . $this->version . '">' . "\n";
55
  $xml .= $this->billing_user->getXml();
71
  $xml .= $this->info_commande->getXml();
72
  $xml .= $this->payment->getXml();
73
  $xml .= '</control>';
 
74
  return ($xml);
75
  }
76
 
78
  $scope_field = "store_id";
79
  $id = $order->getStore()->getId();
80
 
81
+ //On v�rifie si le type de paiement est Franfinance
82
+ $franfinancePayment = ($order->getPayment()->getMethod() == "atos3xweb_web" || $order->getPayment()->getMethod() == "atos3s_sprint") ? true : false;
83
+
84
  $sacOrder = Mage::getModel('sac/fianet_order_sac');
85
 
86
  $sacOrder->scope_field = $scope_field;
87
  $sacOrder->scope_id = $id;
88
 
89
  $billing_address = $order->getBillingAddress();
90
+ $shipping_address = ($order->getShippingAddress()) ? $order->getShippingAddress() : $order->getBillingAddress();
91
 
92
  $sacOrder->billing_user->titre = $billing_address->getPrefix();
93
  $sacOrder->billing_user->nom = $billing_address->getLastname();
115
  $sacOrder->delivery_user->prenom = $shipping_address->getFirstname();
116
  $sacOrder->delivery_user->telhome = preg_replace("/[^0-9]/", "", $shipping_address->getTelephone());
117
  $sacOrder->delivery_user->telfax = preg_replace("/[^0-9]/", "", $shipping_address->getFax());
118
+ $sacOrder->delivery_user->email = ($shipping_address->getEmail() != $billing_address->getEmail()) ? $shipping_address->getEmail() : "";
119
  $sacOrder->delivery_user->societe = $shipping_address->getCompany();
120
 
121
  $sacOrder->info_commande->refid = $order->getRealOrderId();
125
  $sacOrder->info_commande->ip = (!$order->getRemoteIp()) ? $_SERVER['REMOTE_ADDR'] : $order->getRemoteIp();
126
  //La fonction $order->created_at de Magento retourne l'heure UTC peu importe la config. Pour obtenir celle de la boutique, il est donc n�cessaire d'appliquer la m�thode ci-dessous
127
  $sacOrder->info_commande->timestamp = Mage::getModel('core/date')->date(null,strtotime($order->created_at));
128
+ //R�cup�ration du SiteID. Si le type de paiement est Franfinance, alors on r�cup�re l'ID Franfinance
129
+ $sacOrder->info_commande->siteid = ($franfinancePayment) ? Mage::getStoreConfig('sac/sacconfg/idfranfinance', $id) : Mage::getStoreConfig('sac/sacconfg/siteid', $id);
130
+ if ($sacOrder->info_commande->siteid == null && $id != 0)
131
+ $sacOrder->info_commande->siteid = ($franfinancePayment) ? Mage::getStoreConfig('sac/sacconfg/idfranfinance', '0') : Mage::getStoreConfig('sac/sacconfg/siteid', '0');
132
 
133
+ if ($order->getShippingCarrier()) {
134
+ $shipping_code = $order->getShippingCarrier()->getCarrierCode();
135
+ $shipping = Mage::getModel('fianet/shipping_association')->load($shipping_code);
136
+ }
137
 
138
  //initialisation du type de transport
139
  $type_transporteur = '';
140
  $nom_transporteur = '';
141
  $rapidite_transporteur = '';
142
 
143
+ //Traitement particulier si la m�thode de livraison est So Colissimo
144
+ if ($shipping_code == "socolissimo" || $shipping_code == "socolissimosimplicite") {
145
+ $nom_transporteur = 'So Colissimo';
146
  $rapidite_transporteur = '2';
147
  //R�cup�ration du num tel demand� par SoColissimo
148
  if ($order->getSocoPhoneNumber())
149
  $sacOrder->delivery_user->telmobile = $order->getSocoPhoneNumber();
150
+
151
  switch ($order->getSocoProductCode()) {
152
  case "A2P";
153
  case "CMT";
167
  $sacOrder->info_commande->transport->adresse = $transport_adress;
168
  break;
169
  case "DOM";
170
+ case "DOS";
171
  case "RDV":
172
  $type_transporteur = '4';
173
  break;
177
  Mage::getModel('fianet/log')->Log(Mage::helper('fianet')->__("Certissim: order #%s. Error with SoColissimo's return. Product Code %s was not recognized.", $order->getRealOrderId(), $order->getSocoProductCode()));
178
  break;
179
  }
180
+ } elseif ($shipping_code == "relaypoint") {//Traitement particulier si la m�thode de livraison est Icirelais
181
+ $nom_transporteur = $shipping->getConveyorName();
182
+ $rapidite_transporteur = $shipping->getDeliveryTimes();
183
+ $type_transporteur = '2';
184
+
185
+ if ($billing_address->getStreet(1) != $shipping_address->getStreet(1)) {//v�rification de s�curit�
186
+ $transport_adress = Mage::getModel('fianet/fianet_order_address_transport');
187
+ $transport_adress->rue1 = $shipping_address->getStreet(1);
188
+ $transport_adress->cpostal = $shipping_address->getPostcode();
189
+ $transport_adress->ville = $shipping_address->getCity();
190
+ $transport_adress->pays = (preg_match('/^97/', $shipping_address->getPostcode()))? 'FR' : $shipping_address->getCountry();
191
+ $sacOrder->info_commande->transport->adresse = $transport_adress;
192
+ }
193
  } elseif ($shipping_code == "envoimoinscher") {//Traitement particulier si la m�thode de livraison est Envoimoinscher
194
  $nom_transporteur = $shipping->getConveyorName();
195
  $rapidite_transporteur = $shipping->getDeliveryTimes();
216
  } else {
217
  $type_transporteur = '4';
218
  }
219
+ } elseif ($shipping_code == "gls") {//Traitement particulier si la m�thode de livraison est GLS
220
+ $nom_transporteur = $shipping->getConveyorName();
221
+ $rapidite_transporteur = $shipping->getDeliveryTimes();
222
+
223
+ if ($order->getShippingMethod() == "gls_relay_fr") {
224
+ $type_transporteur = '2';
225
+ $transport_adress = Mage::getModel('fianet/fianet_order_address_transport');
226
+ $transport_adress->rue1 = $shippingAddress->getStreet(1);
227
+ $transport_adress->cpostal = $shippingAddress->getPostcode();
228
+ $transport_adress->ville = $shippingAddress->getCity();
229
+ $transport_adress->pays = (preg_match('/^97/', $shippingAddress->getPostcode()))? 'FR' : $shippingAddress->getCountry();
230
+
231
+ $sacOrder->info_commande->transport->enseigne = $shippingAddress->getCompany();
232
+ $sacOrder->info_commande->transport->adresse = $transport_adress;
233
+ } else {
234
+ $type_transporteur = '4';
235
+ }
236
  } else { //Pour tous les autres cas
237
  if ($shipping) {
238
  $type_transporteur = $shipping->getFianetShippingType();
239
  $nom_transporteur = $shipping->getConveyorName();
240
  $rapidite_transporteur = $shipping->getDeliveryTimes();
241
 
242
+ if ($type_transporteur == "1") { //si r�cup�ration du colis chez le marchand
243
  $sacOrder->info_commande->transport->enseigne = Mage::getStoreConfig('general/store_information/name');
244
+
245
+ //r�cup�ration des informations de la boutique
246
+ $Collection = Mage::getModel('fianet/store_information')->getCollection()->load();
247
+ $storeInformation = true;
248
+ foreach ($Collection as $information) {
249
+ $key = $information->getInformation();
250
+ if (!$information->getValue()) $storeInformation = false;
251
+ else $$key = $information->getValue();
252
+ }
253
+
254
+ if($storeInformation) {
255
+ $transport_adress = Mage::getModel('fianet/fianet_order_address_transport');
256
+ $transport_adress->rue1 = $store_address;
257
+ $transport_adress->cpostal = $store_postal_code;
258
+ $transport_adress->ville = $store_city;
259
+ $transport_adress->pays = (preg_match('/^97/', $store_postal_code))? 'FR' : $store_country;
260
+ $sacOrder->info_commande->transport->adresse = $transport_adress;
261
+ }
262
+ }
263
  if ($type_transporteur == "2") { //si transport en point relais
264
  //si module de point relais particulier, l'inscrire ici...
265
  }
304
  $product->ref = $pSku;
305
  $sacOrder->info_commande->list->addProduct($product);
306
  }
307
+
308
+ $auth = "";
309
+ $paymentType = Mage::getModel('sac/payment_association')->load($order->getPayment()->getMethod())->getValue();
310
+ if ($paymentType == "carte + 3DS") {
311
+ $auth = "3DS";
312
+ $paymentType = "carte";
313
+ }
314
+ //$sacOrder->payment->auth = $auth;
315
+ $sacOrder->payment->type = $paymentType;
316
+
317
+ if ($franfinancePayment) {
318
+ if ($order->getPayment()->getMethod() == "atos3s_sprint")
319
+ $sacOrder->payment->nom = "SPRINT SECURE";
320
+ if ($order->getPayment()->getMethod() == "atos3xweb_web")
321
+ $sacOrder->payment->nom = "3xWEB";
322
+ //$sacOrder->payment->fraction = "fraction";
323
+ }
324
+
325
  return ($sacOrder);
326
  }
 
327
  }
app/code/community/Fianet/Sac/Model/Mysql4/Payment/Association.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Mysql4_Payment_Association extends Fianet_Core_Model_Mysql4_Abstract {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Mysql4_Payment_Association extends Fianet_Core_Model_Mysql4_Abstract {
app/code/community/Fianet/Sac/Model/Mysql4/Payment/Association/Collection.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Mysql4_Payment_Association_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Mysql4_Payment_Association_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
app/code/community/Fianet/Sac/Model/Observer.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Observer {
@@ -23,7 +23,7 @@ class Fianet_Sac_Model_Observer {
23
  return $this;
24
  }
25
  $order = Mage::getModel('sales/order')->load((int) $object->getEntityId());
26
-
27
  if (!Mage::helper('sac/order')->canSendOrder($order, (int) $object->getEntityId())) {
28
  return $this;
29
  }
@@ -41,7 +41,7 @@ class Fianet_Sac_Model_Observer {
41
  $payment_type = Mage::getModel('sac/payment_association')->load($order->getPayment()->getMethod())->getValue();
42
  $message = "Certissim: automatic sending order #%s, payment type is %s.";
43
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__($message, $order->getIncrementId(), $payment_type));
44
- $SacOrder = Fianet_Sac_Model_Fianet_Order_Sac::GenerateSacOrder($order);
45
  $sender = Mage::getModel('fianet/fianet_sender');
46
  $sender->addOrder($SacOrder);
47
  $response = $sender->send();
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Observer {
23
  return $this;
24
  }
25
  $order = Mage::getModel('sales/order')->load((int) $object->getEntityId());
26
+
27
  if (!Mage::helper('sac/order')->canSendOrder($order, (int) $object->getEntityId())) {
28
  return $this;
29
  }
41
  $payment_type = Mage::getModel('sac/payment_association')->load($order->getPayment()->getMethod())->getValue();
42
  $message = "Certissim: automatic sending order #%s, payment type is %s.";
43
  Mage::getModel('fianet/log')->log(Mage::helper('fianet')->__($message, $order->getIncrementId(), $payment_type));
44
+ $SacOrder = Mage::getModel('sac/fianet_order_sac')->generateSacOrder($order);
45
  $sender = Mage::getModel('fianet/fianet_sender');
46
  $sender->addOrder($SacOrder);
47
  $response = $sender->send();
app/code/community/Fianet/Sac/Model/Payment/Association.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Payment_Association extends Mage_Core_Model_Abstract {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Payment_Association extends Mage_Core_Model_Abstract {
app/code/community/Fianet/Sac/Model/Product.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Product extends Fianet_Core_Model_Product {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Product extends Fianet_Core_Model_Product {
app/code/community/Fianet/Sac/Model/Source/Statut.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Source_Statut {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Source_Statut {
app/code/community/Fianet/Sac/Model/Source/Type.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Source_Type {
@@ -20,6 +20,7 @@ class Fianet_Sac_Model_Source_Type {
20
  public function toOptionArray() {
21
  return array(
22
  array('value' => 'carte', 'label' => Mage::helper('fianet')->__('Credit card')),
 
23
  array('value' => 'cheque', 'label' => Mage::helper('fianet')->__('Money order')),
24
  array('value' => 'contre-remboursement', 'label' => Mage::helper('fianet')->__('Against repayment')),
25
  array('value' => 'virement', 'label' => Mage::helper('fianet')->__('Transfer')),
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Model_Source_Type {
20
  public function toOptionArray() {
21
  return array(
22
  array('value' => 'carte', 'label' => Mage::helper('fianet')->__('Credit card')),
23
+ //array('value' => 'carte + 3DS', 'label' => Mage::helper('fianet')->__('Credit card + 3DS')),
24
  array('value' => 'cheque', 'label' => Mage::helper('fianet')->__('Money order')),
25
  array('value' => 'contre-remboursement', 'label' => Mage::helper('fianet')->__('Against repayment')),
26
  array('value' => 'virement', 'label' => Mage::helper('fianet')->__('Transfer')),
app/code/community/Fianet/Sac/controllers/Adminhtml/PaymentController.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Adminhtml_PaymentController extends Mage_Adminhtml_Controller_Action {
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  class Fianet_Sac_Adminhtml_PaymentController extends Mage_Adminhtml_Controller_Action {
app/code/community/Fianet/Sac/etc/adminhtml.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
app/code/community/Fianet/Sac/etc/config.xml CHANGED
@@ -12,14 +12,14 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
19
  <config>
20
  <modules>
21
  <Fianet_Sac>
22
- <version>1.0.5</version>
23
  </Fianet_Sac>
24
  </modules>
25
  <admin>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
19
  <config>
20
  <modules>
21
  <Fianet_Sac>
22
+ <version>1.1.0</version>
23
  </Fianet_Sac>
24
  </modules>
25
  <admin>
app/code/community/Fianet/Sac/etc/system.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
@@ -38,7 +38,7 @@
38
  <fields>
39
  <!-- New fields go here -->
40
  <active translate="label">
41
- <label>Enabled</label>
42
  <frontend_type>select</frontend_type>
43
  <source_model>adminhtml/system_config_source_yesno</source_model>
44
  <sort_order>1</sort_order>
@@ -46,47 +46,63 @@
46
  <show_in_website>1</show_in_website>
47
  <show_in_store>0</show_in_store>
48
  </active>
49
- <mode translate="label">
50
- <label>Test or production mode</label>
51
- <frontend_type>select</frontend_type>
52
- <source_model>fianet/source_mode</source_model>
53
- <sort_order>2</sort_order>
54
- <show_in_default>1</show_in_default>
55
- <show_in_website>1</show_in_website>
56
- <show_in_store>0</show_in_store>
57
- </mode>
58
  <siteid translate="label, comment">
59
  <label>Site ID</label>
60
- <comment><![CDATA[The site ID is provided in your Certissim account]]></comment>
61
  <frontend_type>text</frontend_type>
62
- <sort_order>3</sort_order>
63
  <show_in_default>1</show_in_default>
64
  <show_in_website>1</show_in_website>
65
  <show_in_store>0</show_in_store>
66
  </siteid>
67
  <compte translate="label, comment">
68
- <label>Login</label>
69
- <comment><![CDATA[The Login is provided in your Certissim account]]></comment>
70
  <frontend_type>text</frontend_type>
71
- <sort_order>4</sort_order>
72
  <show_in_default>1</show_in_default>
73
  <show_in_website>1</show_in_website>
74
  <show_in_store>0</show_in_store>
75
  </compte>
76
- <password translate="label">
77
  <label>Password</label>
78
- <comment><![CDATA[The Password is provided in your Certissim account]]></comment>
79
  <frontend_type>text</frontend_type>
80
- <sort_order>5</sort_order>
81
  <show_in_default>1</show_in_default>
82
  <show_in_website>1</show_in_website>
83
  <show_in_store>0</show_in_store>
84
  </password>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  <encryptmode translate="label">
86
  <label>Encryption mode</label>
87
  <frontend_type>select</frontend_type>
88
  <source_model>fianet/source_crypt</source_model>
89
- <sort_order>6</sort_order>
90
  <show_in_default>1</show_in_default>
91
  <show_in_website>0</show_in_website>
92
  <show_in_store>0</show_in_store>
@@ -95,7 +111,7 @@
95
  <label>Charset</label>
96
  <frontend_type>select</frontend_type>
97
  <source_model>fianet/source_charset</source_model>
98
- <sort_order>7</sort_order>
99
  <show_in_default>1</show_in_default>
100
  <show_in_website>0</show_in_website>
101
  <show_in_store>0</show_in_store>
@@ -104,7 +120,7 @@
104
  <label>Default product type</label>
105
  <frontend_type>select</frontend_type>
106
  <source_model>fianet/source_productType</source_model>
107
- <sort_order>8</sort_order>
108
  <show_in_default>1</show_in_default>
109
  <show_in_website>1</show_in_website>
110
  <show_in_store>0</show_in_store>
@@ -113,7 +129,7 @@
113
  <label>Maximum delay to sending commands (in day)</label>
114
  <comment><![CDATA[Orders placed before this time will not be sent to CERTISSIM]]></comment>
115
  <frontend_type>text</frontend_type>
116
- <sort_order>9</sort_order>
117
  <show_in_default>1</show_in_default>
118
  <show_in_website>1</show_in_website>
119
  <show_in_store>0</show_in_store>
@@ -123,7 +139,7 @@
123
  <comment><![CDATA[Select the status for which the transaction will be sent to CERTISSIM system (multiple selections possible)]]></comment>
124
  <frontend_type>multiselect</frontend_type>
125
  <source_model>sac/source_statut</source_model>
126
- <sort_order>10</sort_order>
127
  <show_in_default>1</show_in_default>
128
  <show_in_website>1</show_in_website>
129
  <show_in_store>0</show_in_store>
@@ -132,7 +148,7 @@
132
  <label>Activate management of downloadable/virtual products</label>
133
  <frontend_type>select</frontend_type>
134
  <source_model>adminhtml/system_config_source_yesno</source_model>
135
- <sort_order>11</sort_order>
136
  <show_in_default>1</show_in_default>
137
  <show_in_website>1</show_in_website>
138
  <show_in_store>0</show_in_store>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
38
  <fields>
39
  <!-- New fields go here -->
40
  <active translate="label">
41
+ <label>Activate Certissim</label>
42
  <frontend_type>select</frontend_type>
43
  <source_model>adminhtml/system_config_source_yesno</source_model>
44
  <sort_order>1</sort_order>
46
  <show_in_website>1</show_in_website>
47
  <show_in_store>0</show_in_store>
48
  </active>
 
 
 
 
 
 
 
 
 
49
  <siteid translate="label, comment">
50
  <label>Site ID</label>
 
51
  <frontend_type>text</frontend_type>
52
+ <sort_order>2</sort_order>
53
  <show_in_default>1</show_in_default>
54
  <show_in_website>1</show_in_website>
55
  <show_in_store>0</show_in_store>
56
  </siteid>
57
  <compte translate="label, comment">
58
+ <label>FIA-NET Login</label>
 
59
  <frontend_type>text</frontend_type>
60
+ <sort_order>3</sort_order>
61
  <show_in_default>1</show_in_default>
62
  <show_in_website>1</show_in_website>
63
  <show_in_store>0</show_in_store>
64
  </compte>
65
+ <password translate="label, comment">
66
  <label>Password</label>
67
+ <comment><![CDATA[Site ID, Login and Password are provided in your Certissim account]]></comment>
68
  <frontend_type>text</frontend_type>
69
+ <sort_order>4</sort_order>
70
  <show_in_default>1</show_in_default>
71
  <show_in_website>1</show_in_website>
72
  <show_in_store>0</show_in_store>
73
  </password>
74
+ <activefranfinance translate="label">
75
+ <label>Activate Franfinance</label>
76
+ <frontend_type>select</frontend_type>
77
+ <source_model>adminhtml/system_config_source_yesno</source_model>
78
+ <sort_order>5</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>1</show_in_website>
81
+ <show_in_store>0</show_in_store>
82
+ </activefranfinance>
83
+ <idfranfinance translate="label, comment">
84
+ <label>Certissim Franfinance ID</label>
85
+ <comment><![CDATA[Franfinance ID is provided in your Certissim account]]></comment>
86
+ <frontend_type>text</frontend_type>
87
+ <sort_order>6</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>1</show_in_website>
90
+ <show_in_store>0</show_in_store>
91
+ </idfranfinance>
92
+ <mode translate="label">
93
+ <label>Test or production mode</label>
94
+ <frontend_type>select</frontend_type>
95
+ <source_model>fianet/source_mode</source_model>
96
+ <sort_order>7</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>0</show_in_store>
100
+ </mode>
101
  <encryptmode translate="label">
102
  <label>Encryption mode</label>
103
  <frontend_type>select</frontend_type>
104
  <source_model>fianet/source_crypt</source_model>
105
+ <sort_order>8</sort_order>
106
  <show_in_default>1</show_in_default>
107
  <show_in_website>0</show_in_website>
108
  <show_in_store>0</show_in_store>
111
  <label>Charset</label>
112
  <frontend_type>select</frontend_type>
113
  <source_model>fianet/source_charset</source_model>
114
+ <sort_order>9</sort_order>
115
  <show_in_default>1</show_in_default>
116
  <show_in_website>0</show_in_website>
117
  <show_in_store>0</show_in_store>
120
  <label>Default product type</label>
121
  <frontend_type>select</frontend_type>
122
  <source_model>fianet/source_productType</source_model>
123
+ <sort_order>10</sort_order>
124
  <show_in_default>1</show_in_default>
125
  <show_in_website>1</show_in_website>
126
  <show_in_store>0</show_in_store>
129
  <label>Maximum delay to sending commands (in day)</label>
130
  <comment><![CDATA[Orders placed before this time will not be sent to CERTISSIM]]></comment>
131
  <frontend_type>text</frontend_type>
132
+ <sort_order>11</sort_order>
133
  <show_in_default>1</show_in_default>
134
  <show_in_website>1</show_in_website>
135
  <show_in_store>0</show_in_store>
139
  <comment><![CDATA[Select the status for which the transaction will be sent to CERTISSIM system (multiple selections possible)]]></comment>
140
  <frontend_type>multiselect</frontend_type>
141
  <source_model>sac/source_statut</source_model>
142
+ <sort_order>12</sort_order>
143
  <show_in_default>1</show_in_default>
144
  <show_in_website>1</show_in_website>
145
  <show_in_store>0</show_in_store>
148
  <label>Activate management of downloadable/virtual products</label>
149
  <frontend_type>select</frontend_type>
150
  <source_model>adminhtml/system_config_source_yesno</source_model>
151
+ <sort_order>13</sort_order>
152
  <show_in_default>1</show_in_default>
153
  <show_in_website>1</show_in_website>
154
  <show_in_store>0</show_in_store>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-install-0.0.1.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.1-0.0.2.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.10-0.0.11.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.11-0.0.12.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.12-0.0.13.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.13-1.0.0.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.2-0.0.3.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.3-0.0.4.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-0.0.4-0.0.5.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.0-1.0.1.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.3-1.0.4.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  ?>
app/code/community/Fianet/Sac/sql/sac_setup/mysql4-upgrade-1.0.5-1.1.0.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * 2000-2014 FIA-NET
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0) that is available
9
+ * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
10
+ * If you are unable to obtain it through the world-wide-web, please contact us
11
+ * via http://www.fia-net-group.com/formulaire.php so we can send you a copy immediately.
12
+ *
13
+ * @author FIA-NET <support-boutique@fia-net.com>
14
+ * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
+ * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
+ */
18
+ ?>
19
+ <?php
20
+ $installer = $this;
21
+ $installer->startSetup();
22
+ //ajout de la colonne fianet_sac_franfinance suite � l'�volution du produit Certissim
23
+ $installer->addAttribute('order', 'fianet_sac_franfinance', array('type' => 'int', 'visible' => false, 'required' => false, 'default_value' => 0));
24
+
25
+ if (!(Mage::helper('fianet')->getMagentoVersion() < 140)) {
26
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_order_grid'), 'fianet_sac_franfinance', 'int(11) default 0');
27
+ }
28
+
29
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/sac.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
app/etc/modules/Fianet_Sac.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
- * @version Release: $Revision: 1.0.5 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
@@ -24,7 +24,7 @@
24
  <depends>
25
  <Fianet_Core />
26
  </depends>
27
- <version>1.0.5</version>
28
  </Fianet_Sac>
29
  </modules>
30
  </config>
12
  *
13
  * @author FIA-NET <support-boutique@fia-net.com>
14
  * @copyright 2000-2014 FIA-NET
15
+ * @version Release: $Revision: 1.1.0 $
16
  * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
17
  */
18
  -->
24
  <depends>
25
  <Fianet_Core />
26
  </depends>
27
+ <version>1.1.0</version>
28
  </Fianet_Sac>
29
  </modules>
30
  </config>
app/locale/fr_FR/Fianet_Sac.csv CHANGED
@@ -1,15 +1,18 @@
 
 
1
  "Payments configuration","Configuration des moyens de paiement"
2
  "Payment methods","Méthodes de paiement"
3
  "Credit card","Carte bancaire"
 
4
  "Money order","Chèque"
5
  "Against repayment","Contre-remboursement"
6
  "Transfer","Virement"
7
  "Credit card in x times","Carte bancaire en plusieurs fois"
8
  "Paypal","Paypal"
9
 
10
- "The site ID is provided in your Certissim account","Le Site ID est fourni dans votre compte Certissim"
11
- "The Login is provided in your Certissim account","Le Login est fourni dans votre compte Certissim"
12
- "The Password is provided in your Certissim account","Le Mot de passe est fourni dans votre compte Certissim"
13
  "Maximum delay to sending commands (in day)","Délai maximum d'envoi des commandes (en jours)"
14
  "Orders placed before this time will not be sent to CERTISSIM","Les commandes passées il y a plus de X jours ne seront pas soumises au système Certissim"
15
  "List of Magento's Statuses","Liste des Statuts Magento"
@@ -23,10 +26,14 @@
23
  "Check XML","Page de vérification du flux XML"
24
  "Activate management of downloadable/virtual products","Activer la gestion des produits téléchargeables/virtuels"
25
 
 
26
  "Certissim: order #%s. Error with SoColissimo's return. Product Code %s was not recognized.","Certissim : commande #%s. Erreur de retour SoColissimo. Le Code Product %s n'a pas été reconnu."
27
  "Certissim: invalid form data.","Certissim : données de formulaire invalides."
28
  "Certissim: invalid order #%s.","Certissim : commande #%s invalide."
29
  "Certissim: module disabled, order #%s not sent.","Certissim : module désactivé, commande #%s non envoyée."
 
 
 
30
  "Certissim: order #%s is too old (%s day max).","Certissim : commande #%s trop ancienne (max %s jours d'ancienneté)."
31
  "Certissim: order #%s has a total of %s.","Certissim : commande #%s a un montant total de %s€."
32
  "Certissim: order #%s already sent.","Certissim : commande #%s déjà envoyée."
1
+ "Activate Certissim","Activer Certissim"
2
+ "Activate Franfinance","Activer Franfinance"
3
  "Payments configuration","Configuration des moyens de paiement"
4
  "Payment methods","Méthodes de paiement"
5
  "Credit card","Carte bancaire"
6
+ "Credit card + 3DS","Carte bancaire + 3DS"
7
  "Money order","Chèque"
8
  "Against repayment","Contre-remboursement"
9
  "Transfer","Virement"
10
  "Credit card in x times","Carte bancaire en plusieurs fois"
11
  "Paypal","Paypal"
12
 
13
+ "Certissim Franfinance ID","ID Franfinance Certissim"
14
+ "Site ID, Login and Password are provided in your Certissim account","Le Site ID, Login et Mot de passe sont ceux fournis par Certissim"
15
+ "Franfinance ID is provided in your Certissim account","L'ID Franfinance est fourni par Certissim"
16
  "Maximum delay to sending commands (in day)","Délai maximum d'envoi des commandes (en jours)"
17
  "Orders placed before this time will not be sent to CERTISSIM","Les commandes passées il y a plus de X jours ne seront pas soumises au système Certissim"
18
  "List of Magento's Statuses","Liste des Statuts Magento"
26
  "Check XML","Page de vérification du flux XML"
27
  "Activate management of downloadable/virtual products","Activer la gestion des produits téléchargeables/virtuels"
28
 
29
+ "Certissim: %s order(s) successfully sent to FIA-NET","Certissim : %s commande(s) envoyée(s) avec succès à FIA-NET"
30
  "Certissim: order #%s. Error with SoColissimo's return. Product Code %s was not recognized.","Certissim : commande #%s. Erreur de retour SoColissimo. Le Code Product %s n'a pas été reconnu."
31
  "Certissim: invalid form data.","Certissim : données de formulaire invalides."
32
  "Certissim: invalid order #%s.","Certissim : commande #%s invalide."
33
  "Certissim: module disabled, order #%s not sent.","Certissim : module désactivé, commande #%s non envoyée."
34
+ "Certissim: SiteID not specified, order #%s not sent.","Certissim : SiteID non indiqué, commande #%s non envoyée."
35
+ "Certissim: Franfinance mode disabled, order #%s not sent.","Certissim : mode Franfinance désactivé, commande #%s non envoyée."
36
+ "Certissim: Certissim Franfinance ID not specified, order #%s not sent.","Certissim : ID Franfinance Certissim non indiqué, commande #%s non envoyée."
37
  "Certissim: order #%s is too old (%s day max).","Certissim : commande #%s trop ancienne (max %s jours d'ancienneté)."
38
  "Certissim: order #%s has a total of %s.","Certissim : commande #%s a un montant total de %s€."
39
  "Certissim: order #%s already sent.","Certissim : commande #%s déjà envoyée."
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fianet_Sac</name>
4
- <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/OSL-3.0">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FIA-NET Certissim</summary>
10
  <description>Anti-Fraud System</description>
11
- <notes>sixth official commit</notes>
12
  <authors><author><name>FIA-NET</name><user>auto-converted</user><email>support-boutique@fia-net.com</email></author></authors>
13
- <date>2014-03-03</date>
14
- <time>14:13:22</time>
15
- <contents><target name="magecommunity"><dir name="Fianet"><dir name="Sac"><dir name="Block"><dir name="Adminhtml"><dir name="Payment"><dir name="Edit"><file name="Form.php" hash="5b03d1637b41ead37f0182d3343554fc"/></dir><file name="Configuration.php" hash="e276dd64c0e54677b2576fef37decefc"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="333de7c17f3898dcd9fc39537dbc4b0c"/><file name="Order.php" hash="6f9cc36a58b4889255ffa34ca81309b7"/></dir><dir name="Model"><dir name="Fianet"><dir name="Order"><dir name="Info"><file name="Sac.php" hash="3dac680358f262632ca9344130983370"/></dir><file name="Sac.php" hash="84a7b1175664c48853c8011d4c0e7598"/></dir></dir><dir name="Mysql4"><dir name="Payment"><dir name="Association"><file name="Collection.php" hash="275c40f666526ecfc83c8c06904b0dc9"/></dir><file name="Association.php" hash="597e3bcd156d09ba9d8cbbd4f71fbf8a"/></dir></dir><dir name="Payment"><file name="Association.php" hash="98c8cda09cde295995e2c3023ab88eaf"/></dir><dir name="Source"><file name="Statut.php" hash="364d2670ed858deaf32913f56726dc5f"/><file name="Type.php" hash="5b8b51b44fbadc1d74fa88a62c748263"/></dir><file name="Action.php" hash="8a679e61e208cd2290dc0a0b1fead509"/><file name="Observer.php" hash="846c4c3878298e683c2a2e6b67fd2ad6"/><file name="Product.php" hash="8f2e6ae2371474cf8d5ebd091008f6b1"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PaymentController.php" hash="be55fdaee1e923ac0cb8209d5434d44d"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="829ae283570e4c7dbf4ace1fa928a6d9"/><file name="config.xml" hash="fd413b93774706fcdcac9227f35bd456"/><file name="system.xml" hash="db86cc22e90a8db83b97d3701dfb1a70"/></dir><dir name="sql"><dir name="sac_setup"><file name="mysql4-install-0.0.1.php" hash="6d614fc38e4a5e053e64b3ea8f042615"/><file name="mysql4-upgrade-0.0.1-0.0.2.php" hash="4d4242c59175105ebd081958c7bc1775"/><file name="mysql4-upgrade-0.0.10-0.0.11.php" hash="8c9ef7e3d797f8511574341a708cfaa2"/><file name="mysql4-upgrade-0.0.11-0.0.12.php" hash="4dd0fab235a751eaf8a809de9aa5a398"/><file name="mysql4-upgrade-0.0.12-0.0.13.php" hash="abed007ccba9ec338a19c87ad0d302fe"/><file name="mysql4-upgrade-0.0.13-1.0.0.php" hash="b3147dd85a32f408d900a3768d018a45"/><file name="mysql4-upgrade-0.0.2-0.0.3.php" hash="505d50085746268c11b2855c1ff72b74"/><file name="mysql4-upgrade-0.0.3-0.0.4.php" hash="424ea163b462a86dc79a42f1eca3dc28"/><file name="mysql4-upgrade-0.0.4-0.0.5.php" hash="e76268640cd7056b6bc68a64e09a8d5a"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="d500c2772e3e8845d709b988b9c18354"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="f9ed9f7a8504802f414bc972062fb6c8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="sac.xml" hash="098c90f8624cd707a97f71314ec42d66"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fianet_Sac.xml" hash="29915233e7b18bdf94b54760f4c3b266"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Fianet_Sac.csv" hash="2d38ebfce19c7e6476dde62360226c6a"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="fianet"><file name="attention.gif" hash="d85cab75ed2cba677829db26b1f0a6c2"/><file name="fianet_SAC_icon.gif" hash="be9ce72c9a2bd81611a9e82537a8e15a"/><file name="rond_rouge.gif" hash="c605401e88cd234a31691dc9e4a38b05"/><file name="rond_vert.gif" hash="ce704184ee159f7008f81af51a747e71"/><file name="rond_vertclair.gif" hash="b0310ca593cd539b88463d720df3cd60"/><file name="rond_orange.gif" hash="b97b309b0b0dc155ee07b0198209d21e"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><package><name>Fianet_Core</name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Fianet_Sac</name>
4
+ <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/OSL-3.0">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FIA-NET Certissim</summary>
10
  <description>Anti-Fraud System</description>
11
+ <notes>Official commit</notes>
12
  <authors><author><name>FIA-NET</name><user>auto-converted</user><email>support-boutique@fia-net.com</email></author></authors>
13
+ <date>2014-05-23</date>
14
+ <time>08:04:32</time>
15
+ <contents><target name="magecommunity"><dir name="Fianet"><dir name="Sac"><dir name="Block"><dir name="Adminhtml"><dir name="Payment"><dir name="Edit"><file name="Form.php" hash="54dd0b5c395492d6e7a90130c467a629"/></dir><file name="Configuration.php" hash="3c4ccfb27390b82c1f36aecc1fa76e01"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="4bbb8c61bd318299210b9e0ce6598574"/><file name="Order.php" hash="8d8fc41f6b505a1af17610184e3df15f"/></dir><dir name="Model"><dir name="Fianet"><dir name="Order"><dir name="Info"><file name="Sac.php" hash="0d702c69a6c86955a9e44e3f773b9290"/></dir><file name="Sac.php" hash="8280dcb28293fe60e87495ecd7c44ab5"/></dir></dir><dir name="Mysql4"><dir name="Payment"><dir name="Association"><file name="Collection.php" hash="128da8bd1cf68e4d338f1bb257adf624"/></dir><file name="Association.php" hash="8c30bc30177c60027a7f15f95cc8f336"/></dir></dir><dir name="Payment"><file name="Association.php" hash="7c768edbc23302faec731651e477a06d"/></dir><dir name="Source"><file name="Statut.php" hash="1aefe5e845a67033c6fac4d79503a487"/><file name="Type.php" hash="37d249a74102a564ff3ff3df1db5726f"/></dir><file name="Action.php" hash="d7c4c8c48843bd0a69656b31316046b5"/><file name="Observer.php" hash="5f78f1d5e4caafb518c1f1d851755f17"/><file name="Product.php" hash="dff55ff41969d31807dde8236fb81937"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PaymentController.php" hash="e6792213021dd08b2a195f63bc0ce138"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c8c6c65dba4595d82914f921eeeb7844"/><file name="config.xml" hash="92469a0afdba8d96183e7ff98f7e29da"/><file name="system.xml" hash="ba2cdfbed5b8042c731a0690ecdf1a22"/></dir><dir name="sql"><dir name="sac_setup"><file name="mysql4-install-0.0.1.php" hash="ba212dfd644e4878727a8d08d682d43b"/><file name="mysql4-upgrade-0.0.1-0.0.2.php" hash="f1cfb9a405904aa99d3621aaa3078c78"/><file name="mysql4-upgrade-0.0.10-0.0.11.php" hash="b8877da1253732a18989f11549da62b0"/><file name="mysql4-upgrade-0.0.11-0.0.12.php" hash="7f457f73200f377ef2aced914e0513ad"/><file name="mysql4-upgrade-0.0.12-0.0.13.php" hash="285b59efc4cfc933c5d643e49261c83d"/><file name="mysql4-upgrade-0.0.13-1.0.0.php" hash="c9933755523d6b0550f29f38eb1ea09b"/><file name="mysql4-upgrade-0.0.2-0.0.3.php" hash="68453a5d81342634b22adb66361ebd21"/><file name="mysql4-upgrade-0.0.3-0.0.4.php" hash="d2b7fca30faf2e24e1f5e28b4fb49e55"/><file name="mysql4-upgrade-0.0.4-0.0.5.php" hash="edacea4535673cf9997b63f60769b00d"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="2a3d6abab6b49a2bfa416f5008427f9b"/><file name="mysql4-upgrade-1.0.3-1.0.4.php" hash="bdee1585aa86d0815e941e253b6501c9"/><file name="mysql4-upgrade-1.0.5-1.1.0.php" hash="39024d837be1cc1f55f5d361e688ac55"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="sac.xml" hash="9bcb1dd4e7ae0fa9d179ff985b11d460"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fianet_Sac.xml" hash="3a87dd49e5e61a45ce91367e1ae29ad1"/></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Fianet_Sac.csv" hash="c1239405045a4f03b6ef6bf136078e47"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="fianet"><file name="attention.gif" hash="d85cab75ed2cba677829db26b1f0a6c2"/><file name="fianet_SAC_icon.gif" hash="be9ce72c9a2bd81611a9e82537a8e15a"/><file name="rond_rouge.gif" hash="c605401e88cd234a31691dc9e4a38b05"/><file name="rond_vert.gif" hash="ce704184ee159f7008f81af51a747e71"/><file name="rond_vertclair.gif" hash="b0310ca593cd539b88463d720df3cd60"/><file name="rond_orange.gif" hash="b97b309b0b0dc155ee07b0198209d21e"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><package><name>Fianet_Core</name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
  </package>