Ferratum_Ferbuy - Version 1.4.0

Version Notes

v1.4.0:
Fixing configuration errors.
Adding Pre-Check link option.
Adding TransactionID after the payment.
Adding API MarkAsShipped.

v1.3.2:
Minor bug fixes in Demo mode.

v1.3.1:
Adding Bulgarian localisation
Adding Czech localisation
Adding Polish localisation

v1.3.0:
Adding localisation support

Download this release

Release Info

Developer Fer Buy
Extension Ferratum_Ferbuy
Version 1.4.0
Comparing to
See all releases


Code changes from version 1.3.2 to 1.4.0

app/code/local/Ferratum/Ferbuy/Block/Form.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento Ferbuy payment extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Mage
13
+ * @package Ferratum_Ferbuy
14
+ * @author FerBuy, <info@ferbuy.com>
15
+ * @copyright Copyright (c) 2015 (http://www.ferbuy.com)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+ class Ferratum_Ferbuy_Block_Form extends Mage_Payment_Block_Form
20
+ {
21
+
22
+ /**
23
+ * Payment method code
24
+ * @var string
25
+ */
26
+ protected $_methodCode = 'ferbuy';
27
+
28
+ /**
29
+ * Set template and redirect message
30
+ */
31
+ protected function _construct()
32
+ {
33
+ $mark = Mage::getConfig()->getBlockClassName('core/template');
34
+ $mark = new $mark;
35
+ $mark->setTemplate('ferbuy/mark.phtml');
36
+ $this->setTemplate('ferbuy/info.phtml')
37
+ ->setRedirectMessage(
38
+ Mage::helper('ferbuy')->__('You will be redirected to the FerBuy website when you place an order.')
39
+ )
40
+ ->setMethodTitle('') // Output FerBuy mark, omit title
41
+ ->setMethodLabelAfterHtml($mark->toHtml())
42
+ ;
43
+ return parent::_construct();
44
+ }
45
+
46
+ /**
47
+ * Payment method code getter
48
+ * @return string
49
+ */
50
+ public function getMethodCode()
51
+ {
52
+ return $this->_methodCode;
53
+ }
54
+ }
app/code/local/Ferratum/Ferbuy/Helper/Data.php CHANGED
@@ -21,6 +21,7 @@ class Ferratum_Ferbuy_Helper_Data extends Mage_Core_Helper_Abstract
21
  const XML_PATH_LIVE_MODE = 'ferbuy/settings/live_mode';
22
  const XML_PATH_SITE_ID = 'ferbuy/settings/site_id';
23
  const XML_PATH_HASH_KEY = 'ferbuy/settings/hash_key';
 
24
  const XML_PATH_AUTOCREATE_INVOICE = 'ferbuy/settings/autocreate_invoice';
25
  const XML_PATH_MAIL_INVOICE = 'ferbuy/settings/mail_invoice';
26
  const XML_PATH_INVOICING_FAILED = 'ferbuy/settings/invoicing_failed';
@@ -71,6 +72,16 @@ class Ferratum_Ferbuy_Helper_Data extends Mage_Core_Helper_Abstract
71
  return Mage::getStoreConfig(self::XML_PATH_HASH_KEY);
72
  }
73
 
 
 
 
 
 
 
 
 
 
 
74
  /**
75
  * getAutocreateInvoice
76
  *
@@ -249,8 +260,8 @@ class Ferratum_Ferbuy_Helper_Data extends Mage_Core_Helper_Abstract
249
  */
250
  public function log($msg)
251
  {
252
- if ($this->getIsDebug()) {
253
- Mage::log($msg, null, $this->_logFileName);
254
  }
255
  }
256
 
21
  const XML_PATH_LIVE_MODE = 'ferbuy/settings/live_mode';
22
  const XML_PATH_SITE_ID = 'ferbuy/settings/site_id';
23
  const XML_PATH_HASH_KEY = 'ferbuy/settings/hash_key';
24
+ const XML_PATH_PRECHECK_LINK = 'ferbuy/settings/precheck_link';
25
  const XML_PATH_AUTOCREATE_INVOICE = 'ferbuy/settings/autocreate_invoice';
26
  const XML_PATH_MAIL_INVOICE = 'ferbuy/settings/mail_invoice';
27
  const XML_PATH_INVOICING_FAILED = 'ferbuy/settings/invoicing_failed';
72
  return Mage::getStoreConfig(self::XML_PATH_HASH_KEY);
73
  }
74
 
75
+ /**
76
+ * getPrecheckLink
77
+ *
78
+ * @return string
79
+ */
80
+ public function getPrecheckLink()
81
+ {
82
+ return Mage::getStoreConfig(self::XML_PATH_PRECHECK_LINK);
83
+ }
84
+
85
  /**
86
  * getAutocreateInvoice
87
  *
260
  */
261
  public function log($msg)
262
  {
263
+ if ($this->getIsDebug() == '1') {
264
+ Mage::log($msg, null, $this->_logFileName, true);
265
  }
266
  }
267
 
app/code/local/Ferratum/Ferbuy/Model/Api.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento Ferbuy payment extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Mage
13
+ * @package Ferratum_Ferbuy
14
+ * @author FerBuy, <info@ferbuy.com>
15
+ * @copyright Copyright (c) 2015 (http://www.ferbuy.com)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+ class Ferratum_Ferbuy_Model_Api extends Varien_Object
20
+ {
21
+ /* @var string Webservice's URL */
22
+ const SERVICE_URL = "https://gateway.ferbuy.com/api/";
23
+
24
+ private $_response;
25
+ private $_action;
26
+ private $_transactionId;
27
+ private $_command;
28
+
29
+ /**
30
+ * @param $transactionId
31
+ * @param $command
32
+ * @return stdClass|false
33
+ */
34
+ public function markAsShipped($transactionId, $command)
35
+ {
36
+ $this->_action = "MarkOrderShipped";
37
+ $this->_transactionId = $transactionId;
38
+ $this->_command = $command;
39
+ return $this->request();
40
+ }
41
+
42
+ /**
43
+ * Calls the webservice with the required parameters
44
+ *
45
+ * @return stdClass|false
46
+ */
47
+ protected function request()
48
+ {
49
+ // Perform the request
50
+ $ch = curl_init();
51
+ curl_setopt($ch, CURLOPT_URL, self::SERVICE_URL . $this->_action);
52
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
53
+ curl_setopt($ch, CURLOPT_POST, 0);
54
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
55
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
56
+
57
+ $postData = array(
58
+ 'site_id' => Mage::helper('ferbuy')->getSiteId(),
59
+ 'transaction_id' => $this->_transactionId,
60
+ 'command' => $this->_command,
61
+ 'output_type' => 'json',
62
+ );
63
+ $postData['checksum'] = sha1(join("&", array(
64
+ $postData['site_id'],
65
+ $postData['transaction_id'],
66
+ $postData['command'],
67
+ $postData['output_type'],
68
+ Mage::helper('ferbuy')->getHashKey()
69
+ )));
70
+
71
+ // Add post data to curl request
72
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
73
+ $response = curl_exec($ch);
74
+
75
+ if ($response === false) {
76
+ return false;
77
+ }
78
+
79
+ // Close handle
80
+ curl_close($ch);
81
+
82
+ $this->_response = json_decode($response);
83
+ return $this->_response;
84
+ }
85
+
86
+ }
app/code/local/Ferratum/Ferbuy/Model/Base.php CHANGED
@@ -44,7 +44,7 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
44
  if ($field === null) {
45
  return $this->_callback;
46
  } else {
47
- return (in_array($field, $this->_callback)) ? $this->_callback[$field] : '';
48
  }
49
  }
50
 
@@ -123,11 +123,10 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
123
  }
124
 
125
  $statusMessage = $mail_invoice ? "Invoice # %s created and send to customer." : "Invoice # %s created.";
126
- $order->addStatusToHistory(
127
  $order->getStatus(),
128
- Mage::helper("ferbuy")->__($statusMessage, $invoice->getIncrementId(),
129
- $mail_invoice)
130
- );
131
 
132
  return true;
133
  }
@@ -173,7 +172,7 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
173
  if (($amountInCents != $callbackAmount) && (abs($callbackAmount - $amountInCents) > 1)) {
174
  Mage::helper('ferbuy')->log("OrderID: {$order->getId()} do not match amounts. Sent $amountInCents, Received: $callbackAmount");
175
  $statusMessage = Mage::helper("ferbuy")->__("Hacker attempt: Order total amount does not match FerBuy's gross total amount!");
176
- $order->addStatusToHistory($order->getStatus(), $statusMessage);
177
  $order->save();
178
  return false;
179
  }
@@ -189,8 +188,9 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
189
  public function processCallback()
190
  {
191
  $id = $this->getCallbackData('reference');
192
- $order = Mage::getModel('sales/order');
193
- $order->loadByIncrementId($id);
 
194
 
195
  // Log callback data
196
  Mage::helper('ferbuy')->log('Receiving callback data:');
@@ -205,14 +205,14 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
205
  $statusComplete = Mage::helper('ferbuy')->getCompleteStatus();
206
  $statusFailed = Mage::helper('ferbuy')->getFailedStatus();
207
  $statusFraud = $this->getConfigData("fraud_status");
208
- $autocreateInvoice = Mage::helper('ferbuy')->getAutocreateInvoice();
209
  $evInvoicingFailed = $this->getConfigData("event_invoicing_failed");
210
 
211
  $complete = false;
212
  $canceled = false;
213
  $newState = null;
214
  $newStatus = true;
215
- $statusMessage = '';
216
 
217
  switch ($this->getCallbackData('status')) {
218
  case "200":
@@ -253,9 +253,9 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
253
 
254
  foreach ($order->getStatusHistoryCollection(true) as $_item) {
255
  // Don't update order status if the payment is complete
256
- if ($_item->getStatusLabel() == ucfirst($statusComplete)) {
257
  $canUpdate = false;
258
- // Uncancel an order if the payment is considered complete
259
  } elseif (($_item->getStatusLabel() == ucfirst($statusFailed)) ||
260
  ($_item->getStatusLabel() == ucfirst($statusFraud))) {
261
  $undoCancel = true;
@@ -265,7 +265,7 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
265
  // Lock
266
  $this->lock();
267
 
268
- // Uncancel order if necessary
269
  if ($undoCancel) {
270
  foreach($order->getAllItems() as $_item) {
271
  if ($_item->getQtyCanceled() > 0) $_item->setQtyCanceled(0)->save();
@@ -283,9 +283,16 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
283
  ->setTaxCanceled(0)
284
  ->setTotalCanceled(0);
285
  }
286
-
287
  // Update the status if changed
288
  if ($canUpdate && (($newState != $order->getState()) || ($newStatus != $order->getStatus()))) {
 
 
 
 
 
 
 
289
  // Set order state and status
290
  $order->setState($newState, $newStatus, $statusMessage);
291
  Mage::helper('ferbuy')->log("Changing state to '$newState' with message '$statusMessage' for order ID: $id.");
@@ -295,12 +302,9 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
295
  $order->setEmailSent(true);
296
  $order->sendNewOrderEmail();
297
  }
298
-
299
- // Save order status changes
300
- $order->save();
301
-
302
  // Create an invoice when the payment is completed
303
- if ($complete && !$canceled && $autocreateInvoice) {
304
  $invoiceCreated = $this->createInvoice($order);
305
  if ($invoiceCreated) {
306
  Mage::helper('ferbuy')->log("Creating invoice for order ID: $id.");
@@ -313,6 +317,9 @@ class Ferratum_Ferbuy_Model_Base extends Varien_Object
313
  $this->eventInvoicingFailed($order);
314
  }
315
  }
 
 
 
316
  }
317
 
318
  // Unlock
44
  if ($field === null) {
45
  return $this->_callback;
46
  } else {
47
+ return (array_key_exists($field, $this->_callback)) ? $this->_callback[$field] : '';
48
  }
49
  }
50
 
123
  }
124
 
125
  $statusMessage = $mail_invoice ? "Invoice # %s created and send to customer." : "Invoice # %s created.";
126
+ $order->addStatusHistoryComment(
127
  $order->getStatus(),
128
+ Mage::helper("ferbuy")->__($statusMessage, $invoice->getIncrementId()))
129
+ ->setIsCustomerNotified($mail_invoice);
 
130
 
131
  return true;
132
  }
172
  if (($amountInCents != $callbackAmount) && (abs($callbackAmount - $amountInCents) > 1)) {
173
  Mage::helper('ferbuy')->log("OrderID: {$order->getId()} do not match amounts. Sent $amountInCents, Received: $callbackAmount");
174
  $statusMessage = Mage::helper("ferbuy")->__("Hacker attempt: Order total amount does not match FerBuy's gross total amount!");
175
+ $this->addStatusHistoryComment($order->getStatus(), $statusMessage);
176
  $order->save();
177
  return false;
178
  }
188
  public function processCallback()
189
  {
190
  $id = $this->getCallbackData('reference');
191
+
192
+ /* @var $order Mage_Sales_Model_Order */
193
+ $order = Mage::getModel('sales/order')->loadByIncrementId($id);
194
 
195
  // Log callback data
196
  Mage::helper('ferbuy')->log('Receiving callback data:');
205
  $statusComplete = Mage::helper('ferbuy')->getCompleteStatus();
206
  $statusFailed = Mage::helper('ferbuy')->getFailedStatus();
207
  $statusFraud = $this->getConfigData("fraud_status");
208
+ $autoCreateInvoice = Mage::helper('ferbuy')->getAutocreateInvoice();
209
  $evInvoicingFailed = $this->getConfigData("event_invoicing_failed");
210
 
211
  $complete = false;
212
  $canceled = false;
213
  $newState = null;
214
  $newStatus = true;
215
+ $statusMessage = '';
216
 
217
  switch ($this->getCallbackData('status')) {
218
  case "200":
253
 
254
  foreach ($order->getStatusHistoryCollection(true) as $_item) {
255
  // Don't update order status if the payment is complete
256
+ if ($_item->getStatusLabel() == Mage_Sales_Model_Order::STATE_COMPLETE) {
257
  $canUpdate = false;
258
+ // Un-cancel an order if the payment is considered complete
259
  } elseif (($_item->getStatusLabel() == ucfirst($statusFailed)) ||
260
  ($_item->getStatusLabel() == ucfirst($statusFraud))) {
261
  $undoCancel = true;
265
  // Lock
266
  $this->lock();
267
 
268
+ // Un-cancel order if necessary
269
  if ($undoCancel) {
270
  foreach($order->getAllItems() as $_item) {
271
  if ($_item->getQtyCanceled() > 0) $_item->setQtyCanceled(0)->save();
283
  ->setTaxCanceled(0)
284
  ->setTotalCanceled(0);
285
  }
286
+
287
  // Update the status if changed
288
  if ($canUpdate && (($newState != $order->getState()) || ($newStatus != $order->getStatus()))) {
289
+
290
+ // Set payment transaction
291
+ $payment = $order->getPayment();
292
+ $payment->setTransactionId($this->getCallbackData('transaction_id'));
293
+ //$formattedPrice = (int) $this->getCallbackData('amount') / 100 . " " . $this->getCallbackData('currency');
294
+ $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER, null, false, $statusMessage);
295
+
296
  // Set order state and status
297
  $order->setState($newState, $newStatus, $statusMessage);
298
  Mage::helper('ferbuy')->log("Changing state to '$newState' with message '$statusMessage' for order ID: $id.");
302
  $order->setEmailSent(true);
303
  $order->sendNewOrderEmail();
304
  }
305
+
 
 
 
306
  // Create an invoice when the payment is completed
307
+ if ($complete && !$canceled && $autoCreateInvoice) {
308
  $invoiceCreated = $this->createInvoice($order);
309
  if ($invoiceCreated) {
310
  Mage::helper('ferbuy')->log("Creating invoice for order ID: $id.");
317
  $this->eventInvoicingFailed($order);
318
  }
319
  }
320
+
321
+ // Save order status changes
322
+ $order->save();
323
  }
324
 
325
  // Unlock
app/code/local/Ferratum/Ferbuy/Model/Ferbuy.php CHANGED
@@ -24,6 +24,7 @@ class Ferratum_Ferbuy_Model_Ferbuy extends Mage_Payment_Model_Method_Abstract
24
  * @var mixed
25
  */
26
  protected $_code = 'ferbuy';
 
27
 
28
  /**
29
  * FerBuy settings
@@ -31,19 +32,19 @@ class Ferratum_Ferbuy_Model_Ferbuy extends Mage_Payment_Model_Method_Abstract
31
  * @var mixed
32
  */
33
 
34
- protected $_supportedCurrencies = array('SGD', 'PLN', 'CZK', 'EUR');
35
 
36
  /**
37
  * Mage_Payment_Model settings
38
  *
39
  * @var bool
40
  */
41
- protected $_isGateway = true;
42
- protected $_canAuthorize = true;
43
- protected $_canCapture = true;
44
- protected $_canUseInternal = false;
45
- protected $_canUseCheckout = true;
46
- protected $_canUseForMultishipping = true;
47
 
48
  /**
49
  * Return Gateway Url
@@ -53,9 +54,25 @@ class Ferratum_Ferbuy_Model_Ferbuy extends Mage_Payment_Model_Method_Abstract
53
  public function getGatewayUrl()
54
  {
55
  $env = (Mage::helper('ferbuy')->getLiveMode() == 'live') ? 'live/' : 'demo/';
56
-
57
  return Mage::helper('ferbuy')->getGateway() . $env;
58
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
  /**
61
  * Get checkout session namespace
24
  * @var mixed
25
  */
26
  protected $_code = 'ferbuy';
27
+ protected $_formBlockType = 'ferbuy/form';
28
 
29
  /**
30
  * FerBuy settings
32
  * @var mixed
33
  */
34
 
35
+ protected $_supportedCurrencies = array('SGD', 'PLN', 'CZK', 'EUR', 'BGN');
36
 
37
  /**
38
  * Mage_Payment_Model settings
39
  *
40
  * @var bool
41
  */
42
+ protected $_isGateway = true;
43
+ protected $_canOrder = true;
44
+ protected $_canUseInternal = false;
45
+ protected $_canUseCheckout = true;
46
+ protected $_isInitializeNeeded = false;
47
+ protected $_canUseForMultishipping = true;
48
 
49
  /**
50
  * Return Gateway Url
54
  public function getGatewayUrl()
55
  {
56
  $env = (Mage::helper('ferbuy')->getLiveMode() == 'live') ? 'live/' : 'demo/';
 
57
  return Mage::helper('ferbuy')->getGateway() . $env;
58
  }
59
+
60
+ /**
61
+ * Retrieve information from payment configuration
62
+ *
63
+ * @param string $field
64
+ * @param int|string|null|Mage_Core_Model_Store $storeId
65
+ *
66
+ * @return mixed
67
+ */
68
+ public function getConfigData($field, $storeId = null)
69
+ {
70
+ if (null === $storeId) {
71
+ $storeId = $this->getStore();
72
+ }
73
+ $path = 'ferbuy/'.$this->getCode().'/'.$field;
74
+ return Mage::getStoreConfig($path, $storeId);
75
+ }
76
 
77
  /**
78
  * Get checkout session namespace
app/code/local/Ferratum/Ferbuy/Model/Observer.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento Ferbuy payment extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Mage
13
+ * @package Ferratum_Ferbuy
14
+ * @author FerBuy, <info@ferbuy.com>
15
+ * @copyright Copyright (c) 2015 (http://www.ferbuy.com)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+ class Ferratum_Ferbuy_Model_Observer extends Varien_Object
20
+ {
21
+
22
+ protected function _isValidShipment($shipment)
23
+ {
24
+ $trackingNumbers = array();
25
+ foreach ($shipment->getAllTracks() as $track) {
26
+ $trackingNumbers[] = $track->getTitle() . ":" . $track->getNumber();
27
+ };
28
+
29
+ // send shipment email only when carrier tracking info is added
30
+ if (count($trackingNumbers) > 0) {
31
+ return $trackingNumbers;
32
+ } else {
33
+ return array();
34
+ }
35
+ }
36
+
37
+ public function salesOrderShipmentSaveAfter(Varien_Event_Observer $observer)
38
+ {
39
+ /* @var $shipment Mage_Sales_Model_Order_Shipment */
40
+ $shipment = $observer->getEvent()->getShipment();
41
+
42
+ /* @var $order Mage_Sales_Model_Order */
43
+ $order = $shipment->getOrder();
44
+
45
+ /* @var $order Mage_Sales_Model_Order_Payment */
46
+ $payment = $order->getPayment();
47
+ $ferBuy = Mage::getModel('ferbuy/ferbuy');
48
+
49
+ // Only call API for FerBuy payments
50
+ if ($shipment && $payment && $payment->getMethod() == $ferBuy->getCode()) {
51
+
52
+ $trackingNumbers = $this->_isValidShipment($shipment);
53
+ if (count($trackingNumbers)) {
54
+ $command = $trackingNumbers[0];
55
+ } else {
56
+ $command = "None:None";
57
+ }
58
+
59
+ /* @var $api Ferratum_Ferbuy_Model_Api */
60
+ $api = Mage::getModel('ferbuy/api');
61
+ $transactionId = $payment->getLastTransId();
62
+
63
+ $result = $api->markAsShipped($transactionId, $command);
64
+ Mage::helper('ferbuy')->log("FerBuy API MarkOrderShipped with response: " . serialize($result));
65
+ }
66
+
67
+ return $this;
68
+ }
69
+ }
app/code/local/Ferratum/Ferbuy/controllers/PaymentController.php CHANGED
@@ -46,7 +46,7 @@ class Ferratum_Ferbuy_PaymentController extends Mage_Core_Controller_Front_Actio
46
  }
47
 
48
  /**
49
- * Reditect customer to the gateway using his prefered payment method
50
  */
51
  public function redirectAction()
52
  {
@@ -54,9 +54,7 @@ class Ferratum_Ferbuy_PaymentController extends Mage_Core_Controller_Front_Actio
54
  $session->setFerbuyQuoteId($session->getQuoteId());
55
 
56
  $this->loadLayout();
57
- $block = $this->getLayout()->createBlock(
58
- 'Ferratum_Ferbuy_Block_Redirect'
59
- );
60
 
61
  $this->getLayout()->getBlock('content')->append($block);
62
  $this->renderLayout();
@@ -143,4 +141,55 @@ class Ferratum_Ferbuy_PaymentController extends Mage_Core_Controller_Front_Actio
143
  // Display transaction_id and status
144
  echo $data['transaction_id'].'.'.$data['status'];
145
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  }
46
  }
47
 
48
  /**
49
+ * Redirect customer to the gateway using his prefered payment method
50
  */
51
  public function redirectAction()
52
  {
54
  $session->setFerbuyQuoteId($session->getQuoteId());
55
 
56
  $this->loadLayout();
57
+ $block = $this->getLayout()->createBlock('ferbuy/redirect');
 
 
58
 
59
  $this->getLayout()->getBlock('content')->append($block);
60
  $this->renderLayout();
141
  // Display transaction_id and status
142
  echo $data['transaction_id'].'.'.$data['status'];
143
  }
144
+
145
+ public function testAction()
146
+ {
147
+ /* @var $order Mage_Sales_Model_Order */
148
+ $order = Mage::getModel('sales/order')->loadByIncrementId(145000011);
149
+ $payment = $order->getPayment();
150
+ var_dump($payment->getLastTransId());
151
+
152
+ var_dump($payment->getMethod());
153
+
154
+ $method = Mage::getModel('ferbuy/ferbuy')->getCode();
155
+ var_dump($method);
156
+
157
+ $shipmentCollection = Mage::getResourceModel('sales/order_shipment_collection')
158
+ ->setOrderFilter($order)
159
+ ->load();
160
+
161
+ foreach ($shipmentCollection as $shipment) {
162
+ foreach ($shipment->getAllTracks() as $track) {
163
+ var_dump($track->getData());
164
+ }
165
+ }
166
+
167
+ var_dump(Mage::getStoreConfig('payment/ferbuy/sort_order', 1));
168
+ var_dump(Mage::getStoreConfig('ferbuy/ferbuy/sort_order', 1));
169
+
170
+ Mage::helper('ferbuy')->log("FerBuy API MarkOrderShipped with response:");
171
+
172
+ var_dump(Mage::helper('ferbuy')->getIsDebug());
173
+
174
+ /*$newStatus = Mage::helper('ferbuy')->getCompleteStatus();
175
+ $newState = Mage_Sales_Model_Order::STATE_PROCESSING;
176
+ $order->setState($newState, $newStatus, "Moving to processing");
177
+ $order->save();*/
178
+
179
+ try {
180
+ /*$payment->setTransactionId('2015111113475885');
181
+ $formattedPrice = "80 EUR";
182
+ $message = Mage::helper('ferbuy')->__('Ordered amount of %s.', $formattedPrice);
183
+ $payment->addTransaction( Mage_Sales_Model_Order_Payment_Transaction::TYPE_ORDER, null, false, $message);
184
+ $order->save();*/
185
+
186
+ //$order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage::helper('ferbuy')->getCompleteStatus(), "Message");
187
+ //$order->save();
188
+ /*$order->setNewTransactionId("FERBUY_123456");
189
+ $order->save();*/
190
+ }
191
+ catch(Exception $e) {
192
+ var_dump($e);
193
+ }
194
+ }
195
  }
app/code/local/Ferratum/Ferbuy/etc/adminhtml.xml DELETED
@@ -1,40 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- /**
4
- * Magento Ferbuy payment extension
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- *
13
- * @category Mage
14
- * @package Ferratum_Ferbuy
15
- * @author FerBuy, <info@ferbuy.com>
16
- * @copyright Copyright (c) 2015 (http://www.ferbuy.com)
17
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
- */
19
- -->
20
- <config>
21
- <acl>
22
- <resources>
23
- <admin>
24
- <children>
25
- <system>
26
- <children>
27
- <config>
28
- <children>
29
- <ferbuy>
30
- <title>Ferbuy Settings</title>
31
- </ferbuy>
32
- </children>
33
- </config>
34
- </children>
35
- </system>
36
- </children>
37
- </admin>
38
- </resources>
39
- </acl>
40
- </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Ferratum/Ferbuy/etc/config.xml CHANGED
@@ -20,7 +20,7 @@
20
  <config>
21
  <modules>
22
  <Ferratum_Ferbuy>
23
- <version>1.3.2</version>
24
  </Ferratum_Ferbuy>
25
  </modules>
26
 
@@ -89,9 +89,27 @@
89
  </admin>
90
  </resources>
91
  </acl>
 
 
 
 
 
 
 
 
 
 
 
92
  </adminhtml>
93
 
94
  <frontend>
 
 
 
 
 
 
 
95
  <routers>
96
  <ferbuy>
97
  <use>standard</use>
@@ -108,8 +126,6 @@
108
  <ferbuy>
109
  <active>1</active>
110
  <model>ferbuy/ferbuy</model>
111
- <title>FerBuy (Buy Now, Pay Later)</title>
112
- <allowspecific>0</allowspecific>
113
  </ferbuy>
114
  </payment>
115
 
@@ -123,14 +139,17 @@
123
  <invoicing_failed>0</invoicing_failed>
124
  <notification_email>general</notification_email>
125
  <live_mode>demo</live_mode>
126
- <debug>0</debug>
 
127
  </settings>
128
- tings <ferbuy>
129
  <active>1</active>
130
  <gateway><![CDATA[https://gateway.ferbuy.com/]]></gateway>
131
  <model>ferbuy/ferbuy</model>
132
  <title>FerBuy (Buy Now, Pay Later)</title>
133
  <allowspecific>0</allowspecific>
 
 
134
  </ferbuy>
135
  </ferbuy>
136
  </default>
20
  <config>
21
  <modules>
22
  <Ferratum_Ferbuy>
23
+ <version>1.4.0</version>
24
  </Ferratum_Ferbuy>
25
  </modules>
26
 
89
  </admin>
90
  </resources>
91
  </acl>
92
+ <events>
93
+ <sales_order_shipment_save_after>
94
+ <observers>
95
+ <ferbuy>
96
+ <type>singleton</type>
97
+ <class>ferbuy/observer</class>
98
+ <method>salesOrderShipmentSaveAfter</method>
99
+ </ferbuy>
100
+ </observers>
101
+ </sales_order_shipment_save_after>
102
+ </events>
103
  </adminhtml>
104
 
105
  <frontend>
106
+ <layout>
107
+ <updates>
108
+ <ferbuy>
109
+ <file>ferbuy.xml</file>
110
+ </ferbuy>
111
+ </updates>
112
+ </layout>
113
  <routers>
114
  <ferbuy>
115
  <use>standard</use>
126
  <ferbuy>
127
  <active>1</active>
128
  <model>ferbuy/ferbuy</model>
 
 
129
  </ferbuy>
130
  </payment>
131
 
139
  <invoicing_failed>0</invoicing_failed>
140
  <notification_email>general</notification_email>
141
  <live_mode>demo</live_mode>
142
+ <debug>1</debug>
143
+ <precheck_link>1</precheck_link>
144
  </settings>
145
+ <ferbuy>
146
  <active>1</active>
147
  <gateway><![CDATA[https://gateway.ferbuy.com/]]></gateway>
148
  <model>ferbuy/ferbuy</model>
149
  <title>FerBuy (Buy Now, Pay Later)</title>
150
  <allowspecific>0</allowspecific>
151
+ <payment_action>order</payment_action>
152
+ <sort_order>10</sort_order>
153
  </ferbuy>
154
  </ferbuy>
155
  </default>
app/code/local/Ferratum/Ferbuy/etc/system.xml CHANGED
@@ -66,6 +66,16 @@
66
  <show_in_website>1</show_in_website>
67
  <show_in_store>1</show_in_store>
68
  </hash_key>
 
 
 
 
 
 
 
 
 
 
69
  <autocreate_invoice translate="label comment">
70
  <label>Create invoice after payment</label>
71
  <frontend_type>select</frontend_type>
66
  <show_in_website>1</show_in_website>
67
  <show_in_store>1</show_in_store>
68
  </hash_key>
69
+ <precheck_link translate="label comment">
70
+ <label>Display Pre-Check</label>
71
+ <comment><![CDATA[Displays a special link where customers can pre-check the loan limit with FerBuy.]]></comment>
72
+ <frontend_type>select</frontend_type>
73
+ <source_model>adminhtml/system_config_source_yesno</source_model>
74
+ <sort_order>45</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>1</show_in_website>
77
+ <show_in_store>1</show_in_store>
78
+ </precheck_link>
79
  <autocreate_invoice translate="label comment">
80
  <label>Create invoice after payment</label>
81
  <frontend_type>select</frontend_type>
app/design/frontend/base/default/layout/ferbuy.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <layout>
2
+ <default>
3
+ <reference name="head">
4
+ <action method="addCss"><stylesheet>css/ferbuy.css</stylesheet></action>
5
+ </reference>
6
+ </default>
7
+ </layout>
app/design/frontend/base/default/template/ferbuy/info.phtml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @see Ferratum_Ferbuy_Block_Form
4
+ */
5
+ ?>
6
+
7
+ <ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
8
+ <li class="form-alt"><?php echo $this->getRedirectMessage() ?></li>
9
+ <li class="form-alt"><img src="//ferbuy.com/img/logo.png" alt="ferbuy" width="150"></li>
10
+ </ul>
app/design/frontend/base/default/template/ferbuy/mark.phtml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Note: This mark is a requirement of FerBuy
4
+ * @see Ferratum_Ferbuy_Block_Form
5
+ */
6
+
7
+ $locale = substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);
8
+
9
+ $precheckLink = Mage::helper('ferbuy')->getPrecheckLink();
10
+ $siteId = Mage::helper('ferbuy')->getSiteId();
11
+ $title = Mage::helper('ferbuy')->getTitle();
12
+ $magentoVersion = Mage::getVersion();
13
+
14
+ $utm_data = "utm_source=$siteId&utm_medium=plugin.Magento.$magentoVersion&utm_campaign=plugin.Magento.$siteId";
15
+ $url = "/?" . $utm_data;
16
+ if (strlen($locale) > 0) {
17
+ $url = "/" . $locale . "/?" . $utm_data;
18
+ }
19
+ ?>
20
+ <!-- FerBuy Logo -->
21
+ <img src="<?php echo $this->escapeHtml($this->getSkinUrl('images/ferbuy/logo-ferbuy.png'))?>" alt="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('ferbuy')->__('FerBuy (Buy Now, Pay Later)')) ?>" class="v-middle" />&nbsp;<?php echo $title; ?>&nbsp;
22
+ <?php if ($precheckLink == '1'): ?>
23
+ <a href="https://gateway.ferbuy.com/precheck<?php echo $url; ?>" onclick="javascript:window.open('https://gateway.ferbuy.com/precheck<?php echo $url; ?>','ferbuyprecheck','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=0, top=0, width=800, height=600'); return false;">
24
+ <?php echo Mage::helper('ferbuy')->__('Check your limit at FerBuy'); ?>
25
+ </a>
26
+ <?php endif; ?>
27
+ <!-- FerBuy Logo -->
app/locale/en_US/Ferratum_Ferbuy.csv CHANGED
@@ -39,3 +39,7 @@
39
  "Transaction canceled by user.","Transaction canceled by user."
40
  "Transaction started, waiting for payment.","Transaction started, waiting for payment."
41
  "You will be redirected to FerBuy to finish your transaction.","You will be redirected to FerBuy to finish your transaction."
 
 
 
 
39
  "Transaction canceled by user.","Transaction canceled by user."
40
  "Transaction started, waiting for payment.","Transaction started, waiting for payment."
41
  "You will be redirected to FerBuy to finish your transaction.","You will be redirected to FerBuy to finish your transaction."
42
+ "Display Pre-Check","Display Pre-Check"
43
+ "Displays a special link where customers can pre-check the loan limit with FerBuy.","Displays a special link where customers can pre-check the loan limit with FerBuy."
44
+ "Check your limit at FerBuy","Check your limit at FerBuy"
45
+ "You will be redirected to the FerBuy website when you place an order.","You will be redirected to the FerBuy website when you place an order."
package.xml CHANGED
@@ -1,14 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ferratum_Ferbuy</name>
4
- <version>1.3.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FerBuy Payment Module</summary>
10
  <description>FerBuy is a simple and safe payment solution based on the "buy now, pay later" concept. Through FerBuy you can shop from home and pay within 14 days. See below how simple this is.</description>
11
- <notes>v1.3.2:&#xD;
 
 
 
 
 
 
12
  Minor bug fixes in Demo mode.&#xD;
13
  &#xD;
14
  v1.3.1:&#xD;
@@ -19,9 +25,9 @@ v1.3.1:&#xD;
19
  v1.3.0:&#xD;
20
  Adding localisation support</notes>
21
  <authors><author><name>Fer Buy</name><user>FerBuy</user><email>info@ferbuy.com</email></author></authors>
22
- <date>2015-10-07</date>
23
- <time>10:10:33</time>
24
- <contents><target name="magelocal"><dir name="Ferratum"><dir name="Ferbuy"><dir name="Block"><file name="Redirect.php" hash="bdb59a1854ced707363d054ae1e9d4a4"/></dir><dir name="Helper"><file name="Data.php" hash="2bcbdb2fd52065d3b371f5c16fa44194"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Modes.php" hash="aa5f540849179c47ea6eed09aad77f6d"/></dir></dir></dir></dir><file name="Base.php" hash="132170d3ea2ba0d60d5a7cdb6dff6403"/><file name="Ferbuy.php" hash="9810747c25fb19634e48be3202543282"/></dir><dir name="controllers"><file name="PaymentController.php" hash="4ece51713291736392cfd7c0cd61cc1a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f37221cd0943f83ee38d554c0d339619"/><file name="config.xml" hash="1ce98af7fbcca53276c1cdc2b17b384a"/><file name="system.xml" hash="4c6dd29d4060adbee712cab274dece96"/></dir><file name=".DS_Store" hash="f6df0519f86804d0f045060ba3f31ea0"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ferratum_Ferbuy.xml" hash="eeaa05c490b6958c426577bcd3569cb6"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ferbuy.xml" hash="b5158397519eef21968f5ce26a433549"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ferbuy"><file name="redirect.phtml" hash="837f367951edbe379bc38ddd0acab8d4"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="ferbuy.css" hash="819549e60f84323f494ab42e8e52af68"/><dir name="images"><file name="ferbuy.png" hash="6f69778a6152cd21c6a6ec2fdc28d1d7"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="bg_BG"><file name="Ferratum_Ferbuy.csv" hash="825ea59e072564c66a4884be27b2a7c4"/></dir><dir name="cs_CZ"><file name="Ferratum_Ferbuy.csv" hash="398cba419470aa2de342a339f15a4e1c"/></dir><dir name="en_US"><file name="Ferratum_Ferbuy.csv" hash="56bf0579081bbfa96f6b4d7a2e4e5ebf"/></dir><dir name="pl_PL"><file name="Ferratum_Ferbuy.csv" hash="d9043ce3f33d401b006200d47e045a18"/></dir></target></contents>
25
  <compatible/>
26
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
27
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ferratum_Ferbuy</name>
4
+ <version>1.4.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FerBuy Payment Module</summary>
10
  <description>FerBuy is a simple and safe payment solution based on the "buy now, pay later" concept. Through FerBuy you can shop from home and pay within 14 days. See below how simple this is.</description>
11
+ <notes>v1.4.0:&#xD;
12
+ Fixing configuration errors.&#xD;
13
+ Adding Pre-Check link option.&#xD;
14
+ Adding TransactionID after the payment.&#xD;
15
+ Adding API MarkAsShipped.&#xD;
16
+ &#xD;
17
+ v1.3.2:&#xD;
18
  Minor bug fixes in Demo mode.&#xD;
19
  &#xD;
20
  v1.3.1:&#xD;
25
  v1.3.0:&#xD;
26
  Adding localisation support</notes>
27
  <authors><author><name>Fer Buy</name><user>FerBuy</user><email>info@ferbuy.com</email></author></authors>
28
+ <date>2015-11-12</date>
29
+ <time>14:15:49</time>
30
+ <contents><target name="magelocal"><dir name="Ferratum"><dir name="Ferbuy"><dir name="Block"><file name="Form.php" hash="7c4502b9148423ab05bf0ee457010465"/><file name="Redirect.php" hash="bdb59a1854ced707363d054ae1e9d4a4"/></dir><dir name="Helper"><file name="Data.php" hash="c72088c59b8907d51fc11b4b06c012a7"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Modes.php" hash="aa5f540849179c47ea6eed09aad77f6d"/></dir></dir></dir></dir><file name="Api.php" hash="a44d0a664a39cebb1c29c9cf3d857c49"/><file name="Base.php" hash="5642c425aef8f4b17b7df00b79da5bb1"/><file name="Ferbuy.php" hash="b0d9fda0ad74dedd63fc9a714bfc977b"/><file name="Observer.php" hash="7fe4bb6766018fdfa63ce4be61838399"/></dir><dir name="controllers"><file name="PaymentController.php" hash="9deb0d8c0d3c77c74ab1e07f05a5362a"/></dir><dir name="etc"><file name="config.xml" hash="42abedafbcf88135cf8476f934f966d2"/><file name="system.xml" hash="6e894d032d58bd91ea28859056a54a76"/></dir><file name=".DS_Store" hash="f6df0519f86804d0f045060ba3f31ea0"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ferratum_Ferbuy.xml" hash="eeaa05c490b6958c426577bcd3569cb6"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ferbuy"><file name="info.phtml" hash="f92a94e8ff9539e8024bf5fb1487b92a"/><file name="mark.phtml" hash="7c65c41dec52608974ab973b2230c9c5"/><file name="redirect.phtml" hash="837f367951edbe379bc38ddd0acab8d4"/></dir></dir><dir name="layout"><file name="ferbuy.xml" hash="1d525e887035a8169c7dc9c8e5a61844"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="ferbuy.xml" hash="b5158397519eef21968f5ce26a433549"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="ferbuy.css" hash="8fe4e272be171e2072187e7490ca5940"/><dir name="images"><dir name="ferbuy"><file name="logo-ferbuy.png" hash="6f69778a6152cd21c6a6ec2fdc28d1d7"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="ferbuy.css" hash="f57576556d81380d56ed21b832dcbcb8"/></dir><dir name="images"><dir name="ferbuy"><file name="logo-ferbuy.png" hash="6f69778a6152cd21c6a6ec2fdc28d1d7"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="bg_BG"><file name="Ferratum_Ferbuy.csv" hash="825ea59e072564c66a4884be27b2a7c4"/></dir><dir name="cs_CZ"><file name="Ferratum_Ferbuy.csv" hash="398cba419470aa2de342a339f15a4e1c"/></dir><dir name="en_US"><file name="Ferratum_Ferbuy.csv" hash="51917c005131d11b9eae4596208110cf"/></dir><dir name="pl_PL"><file name="Ferratum_Ferbuy.csv" hash="d9043ce3f33d401b006200d47e045a18"/></dir></target></contents>
31
  <compatible/>
32
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
33
  </package>
skin/adminhtml/default/default/ferbuy.css CHANGED
@@ -15,14 +15,14 @@
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
 
18
- h3.ferbuy-header { background:url(images/ferbuy.png) no-repeat 0 0; height:0; overflow:hidden; padding:22px 0 0; width:55px; }
19
 
20
  ul.tabs a.ferbuy-section,
21
  ul.tabs a.ferbuy-section:hover { background:url(images/tabs_span_bg.gif) repeat-x 0 100%; border-bottom:none; padding:0.5em 0.5em 0.5em 1.5em; }
22
  ul.tabs a.ferbuy-section:hover { background-color:#d8e6e6; }
23
  ul.tabs a.ferbuy-section.active, ul.tabs a.ferbuy-section.active:hover { background-color:#fff; }
24
  ul.tabs a.ferbuy-section span,
25
- ul.tabs a.ferbuy-section:hover span { background:url(images/ferbuy.png) no-repeat 0 0; height:0; overflow:hidden; padding:22px 0 0; width:55px; }
26
 
27
  .ferbuy-selection { border-collapse:collapse; width:100%; }
28
  .ferbuy-selection .ferbuy-selection-info { text-align:right; }
15
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
  */
17
 
18
+ h3.ferbuy-header { background:url(images/ferbuy/logo-ferbuy.png) no-repeat 0 0; height:0; overflow:hidden; padding:22px 0 0; width:55px; }
19
 
20
  ul.tabs a.ferbuy-section,
21
  ul.tabs a.ferbuy-section:hover { background:url(images/tabs_span_bg.gif) repeat-x 0 100%; border-bottom:none; padding:0.5em 0.5em 0.5em 1.5em; }
22
  ul.tabs a.ferbuy-section:hover { background-color:#d8e6e6; }
23
  ul.tabs a.ferbuy-section.active, ul.tabs a.ferbuy-section.active:hover { background-color:#fff; }
24
  ul.tabs a.ferbuy-section span,
25
+ ul.tabs a.ferbuy-section:hover span { background:url(images/ferbuy/logo-ferbuy.png) no-repeat 0 0; height:0; overflow:hidden; padding:22px 0 0; width:55px; }
26
 
27
  .ferbuy-selection { border-collapse:collapse; width:100%; }
28
  .ferbuy-selection .ferbuy-selection-info { text-align:right; }
skin/adminhtml/default/default/images/{ferbuy.png → ferbuy/logo-ferbuy.png} RENAMED
File without changes
skin/frontend/base/default/css/ferbuy.css ADDED
@@ -0,0 +1,2 @@
 
 
1
+ #p_method_ferbuy + label img { margin-right: 10px; }
2
+ #p_method_ferbuy + label a { float: none; }
skin/frontend/base/default/images/ferbuy/logo-ferbuy.png ADDED
Binary file