tig_buckaroo3extended - Version 4.13.0

Version Notes

==== 4.13.0 ====
==== Improvements ====
- Extra invulvelden verwijderd bij offline refunds voor Mr. Cash
- Offline refunds bij Mr. Cash ondersteunt nu ook deelrefunds
- Aangepaste styling van de betaalmethodes in OSC en OPC
- Storeview specifieke instellingen worden meegenomen voor PayperEmail
- Aanvullende informatie voor orders die afgewezen zijn door AfterPay in de ordercomments.

==== Bug fixes ====
- Fix voor de AfterPay afwijzingsmeldingen
- Correcte weergave van betaaltoeslagen onder 1 Euro
- De Billing Agreements pagina geeft geen foutmelding meer bij gebruik van de extensie

==== 4.12.0 ====
==== Improvements ====
- Tweede AfterPay betaalmethode toegevoegd. Zo kan een merchant zowel de digiaccept variant, als de acceptgiro variant tegelijk gebruiken.

==== Bug fixes ====
- Correcte weergave Buckaroo fee in transactionele e-mails
- Fix voor custom status bij pending orders

==== 4.11.0 ====
==== New features ====
- MasterPass betaalmethode toegevoegd.

==== Improvements ====
- IBAN veld bij Afterpay Digiaccept betaalmethode verwijderd

==== Bug fixes ====
- Paymentfee label in transactionele e-mail tonen

==== 4.10.1 ====
==== Improvements ====
- Added notification for declined payments for AfterPay payment method
- Compatibility with Onestepcheckout improved
- Giftcard functionality improved for Magento Enterprise
- Updated translations

==== Bug fixes ====
- PayperEmail is available again in the backend

==== 4.10.0 ====
==== New features ====
- Added the AfterPay payment method.
- Added the ability to refund Bancontact / Mr. Cash orders.

==== Improvements ====
- Completely rewrote the Buckaroo payment fee implementation in order to increase reliability and implement several much requested features.
- Removed the BIC field for Dutch orders.
- Improved validation for orders where multiple transactions are created.
- Improved error handling for back-end orders.

==== Bug fixes ====
- Fixed a problem where the order ID would stay reserved after a payment had failed, causing errors.

Download this release

Release Info

Developer TIG
Extension tig_buckaroo3extended
Version 4.13.0
Comparing to
See all releases


Code changes from version 4.12.0 to 4.13.0

Files changed (136) hide show
  1. app/code/community/TIG/Buckaroo3Extended/.DS_Store +0 -0
  2. app/code/community/TIG/Buckaroo3Extended/Block/Adminhtml/Sales/Order/Creditmemo/Create/RefundFields.php +12 -0
  3. app/code/community/TIG/Buckaroo3Extended/Block/Adminhtml/System/Config/Hint.php +7 -7
  4. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Afterpay/Adminhtml/System/Config/Advancedbtn.php +4 -4
  5. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Afterpay/Checkout/Form.php +1 -1
  6. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Amex/Adminhtml/System/Config/Advancedbtn.php +4 -4
  7. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Amex/Checkout/Form.php +1 -1
  8. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Bancontactmrcash/Adminhtml/System/Config/Advancedbtn.php +4 -4
  9. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Bancontactmrcash/Checkout/Form.php +1 -1
  10. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Cartebancaire/Adminhtml/System/Config/Advancedbtn.php +2 -2
  11. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Cartebancaire/Checkout/Form.php +1 -1
  12. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Cartebleue/Adminhtml/System/Config/Advancedbtn.php +4 -4
  13. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Cartebleue/Checkout/Form.php +1 -1
  14. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Checkout/Form/Abstract.php +8 -17
  15. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Directdebit/Adminhtml/System/Config/Advancedbtn.php +4 -4
  16. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Directdebit/Checkout/Form.php +9 -9
  17. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Empayment/Adminhtml/System/Config/Advancedbtn.php +5 -5
  18. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Empayment/Checkout/Form.php +1 -1
  19. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Eps/Adminhtml/System/Config/Advancedbtn.php +4 -4
  20. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Eps/Checkout/Form.php +1 -1
  21. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Giftcards/Adminhtml/System/Config/Advancedbtn.php +4 -4
  22. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Giftcards/Checkout/Form.php +1 -1
  23. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Giropay/Adminhtml/System/Config/Advancedbtn.php +4 -4
  24. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Giropay/Checkout/Form.php +1 -1
  25. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Ideal/Adminhtml/System/Config/Advancedbtn.php +4 -4
  26. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Ideal/Checkout/Form.php +1 -1
  27. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Maestro/Adminhtml/System/Config/Advancedbtn.php +4 -4
  28. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Maestro/Checkout/Form.php +1 -1
  29. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Mastercard/Adminhtml/System/Config/Advancedbtn.php +4 -4
  30. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Mastercard/Checkout/Form.php +1 -1
  31. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Masterpass/Adminhtml/System/Config/Advancedbtn.php +2 -2
  32. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Masterpass/Checkout/Form.php +1 -1
  33. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Onlinegiro/Adminhtml/System/Config/Advancedbtn.php +4 -4
  34. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Onlinegiro/Checkout/Form.php +1 -1
  35. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paymentguarantee/Adminhtml/System/Config/Advancedbtn.php +4 -4
  36. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paymentguarantee/Checkout/Form.php +1 -1
  37. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paypal/Adminhtml/System/Config/Advancedbtn.php +4 -4
  38. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paypal/Checkout/Form.php +1 -1
  39. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Payperemail/Adminhtml/System/Config/Advancedbtn.php +4 -4
  40. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Payperemail/Checkout/Form.php +1 -1
  41. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paysafecard/Adminhtml/System/Config/Advancedbtn.php +4 -4
  42. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paysafecard/Checkout/Form.php +1 -1
  43. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Sofortueberweisung/Adminhtml/System/Config/Advancedbtn.php +4 -4
  44. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Sofortueberweisung/Checkout/Form.php +1 -1
  45. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Transfer/Adminhtml/System/Config/Advancedbtn.php +4 -4
  46. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Transfer/Checkout/Form.php +1 -1
  47. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Visa/Adminhtml/System/Config/Advancedbtn.php +4 -4
  48. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Visa/Checkout/Form.php +1 -1
  49. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Visaelectron/Adminhtml/System/Config/Advancedbtn.php +4 -4
  50. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Visaelectron/Checkout/Form.php +1 -1
  51. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Vpay/Adminhtml/System/Config/Advancedbtn.php +4 -4
  52. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Vpay/Checkout/Form.php +1 -1
  53. app/code/community/TIG/Buckaroo3Extended/Helper/Data.php +128 -26
  54. app/code/community/TIG/Buckaroo3Extended/Model/Abstract.php +1037 -1038
  55. app/code/community/TIG/Buckaroo3Extended/Model/Adminhtml/System/Config/Backend/Buckaroo/Fee.php +25 -25
  56. app/code/community/TIG/Buckaroo3Extended/Model/Certificate/Certificate.php +34 -34
  57. app/code/community/TIG/Buckaroo3Extended/Model/Observer.php +34 -34
  58. app/code/community/TIG/Buckaroo3Extended/Model/Observer/Abstract.php +152 -152
  59. app/code/community/TIG/Buckaroo3Extended/Model/Observer/BackendOrder.php +15 -8
  60. app/code/community/TIG/Buckaroo3Extended/Model/OldPaymentMethods/OldPaymentMethod.php +6 -6
  61. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Afterpay/Observer.php +2 -2
  62. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Afterpay/PaymentMethod.php +52 -45
  63. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Amex/Observer.php +28 -28
  64. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Bancontactmrcash/Observer.php +9 -9
  65. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Bancontactmrcash/PaymentMethod.php +1 -1
  66. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Cartebancaire/Observer.php +8 -8
  67. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Cartebleue/Observer.php +40 -40
  68. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Giftcards/Observer.php +34 -34
  69. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Ideal/Observer.php +22 -22
  70. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Mastercard/Observer.php +41 -41
  71. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Masterpass/Observer.php +2 -2
  72. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/PaymentMethod.php +45 -40
  73. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Paymentguarantee/Observer.php +2 -2
  74. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Payperemail/Observer.php +3 -3
  75. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Payperemail/PaymentMethod.php +1 -0
  76. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Visa/Observer.php +43 -43
  77. app/code/community/TIG/Buckaroo3Extended/Model/Process.php +71 -71
  78. app/code/community/TIG/Buckaroo3Extended/Model/Refund/Creditmemo.php +69 -53
  79. app/code/community/TIG/Buckaroo3Extended/Model/Refund/Observer.php +37 -37
  80. app/code/community/TIG/Buckaroo3Extended/Model/Refund/Response/Abstract.php +25 -25
  81. app/code/community/TIG/Buckaroo3Extended/Model/Refund/Response/Push.php +302 -302
  82. app/code/community/TIG/Buckaroo3Extended/Model/Request/Abstract.php +3 -3
  83. app/code/community/TIG/Buckaroo3Extended/Model/Request/Availability.php +70 -70
  84. app/code/community/TIG/Buckaroo3Extended/Model/Response/Abstract.php +80 -81
  85. app/code/community/TIG/Buckaroo3Extended/Model/Response/BackendOrder.php +13 -13
  86. app/code/community/TIG/Buckaroo3Extended/Model/Response/Push.php +253 -340
  87. app/code/community/TIG/Buckaroo3Extended/Model/Response/Return.php +17 -17
  88. app/code/community/TIG/Buckaroo3Extended/Model/Sources/AcceptgiroDirectdebit.php +5 -5
  89. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Afterpay/AvailableCurrencies.php +3 -3
  90. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Afterpay2/AvailableCurrencies.php +1 -1
  91. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Amex/AvailableCurrencies.php +3 -3
  92. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Bancontactmrcash/AvailableCurrencies.php +3 -3
  93. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Cartebancaire/AvailableCurrencies.php +1 -1
  94. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Cartebleue/AvailableCurrencies.php +3 -3
  95. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Certificates.php +15 -15
  96. app/code/community/TIG/Buckaroo3Extended/Model/Sources/CultureType.php +6 -6
  97. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Directdebit/AvailableCurrencies.php +3 -3
  98. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Empayment/AvailableCurrencies.php +3 -3
  99. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Eps/AvailableCurrencies.php +3 -3
  100. app/code/community/TIG/Buckaroo3Extended/Model/Sources/FeePercentageMode.php +5 -5
  101. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Giftcards/AvailableCurrencies.php +3 -3
  102. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Giropay/AvailableCurrencies.php +3 -3
  103. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Ideal/AvailableCurrencies.php +3 -3
  104. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Ideal/ServiceVersion.php +3 -3
  105. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Maestro/AvailableCurrencies.php +3 -3
  106. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Mastercard/AvailableCurrencies.php +3 -3
  107. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Masterpass/AvailableCurrencies.php +1 -1
  108. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Onlinegiro/AvailableCurrencies.php +3 -3
  109. app/code/community/TIG/Buckaroo3Extended/Model/Sources/PaymentMethodArea.php +7 -7
  110. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Paymentguarantee/AvailableCurrencies.php +3 -3
  111. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Paypal/AvailableCurrencies.php +3 -3
  112. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Payperemail/AvailableCurrencies.php +3 -3
  113. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Paysafecard/AvailableCurrencies.php +3 -3
  114. app/code/community/TIG/Buckaroo3Extended/Model/Sources/ReminderLevel.php +8 -8
  115. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Sofortueberweisung/AvailableCurrencies.php +3 -3
  116. app/code/community/TIG/Buckaroo3Extended/Model/Sources/TestLive.php +6 -6
  117. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Transfer/AvailableCurrencies.php +3 -3
  118. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Visa/AvailableCurrencies.php +3 -3
  119. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Visaelectron/AvailableCurrencies.php +3 -3
  120. app/code/community/TIG/Buckaroo3Extended/Model/Sources/Vpay/AvailableCurrencies.php +3 -3
  121. app/code/community/TIG/Buckaroo3Extended/controllers/CheckoutController.php +3 -3
  122. app/code/community/TIG/Buckaroo3Extended/controllers/NotifyController.php +17 -20
  123. app/code/community/TIG/Buckaroo3Extended/etc/adminhtml.xml +27 -27
  124. app/code/community/TIG/Buckaroo3Extended/etc/config.xml +13 -3
  125. app/code/community/TIG/Buckaroo3Extended/etc/system.xml +5 -5
  126. app/code/community/TIG/Buckaroo3Extended/sql/buckaroo3extended_setup/mysql4-data-upgrade-4.12.0-4.13.0.php +73 -0
  127. app/code/community/TIG/Buckaroo3Extended/sql/buckaroo3extended_setup/mysql4-install-0.1.0.php +38 -38
  128. app/code/community/TIG/Buckaroo3Extended/sql/buckaroo3extended_setup/mysql4-upgrade-4.0.3-4.1.0.php +8 -8
  129. app/code/community/TIG/Buckaroo3Extended/sql/buckaroo3extended_setup/mysql4-upgrade-4.3.1-4.3.2.php +9 -9
  130. app/design/adminhtml/default/default/template/buckaroo3extended/sales/order/creditmemo/create/refund_fields.phtml +34 -28
  131. app/design/frontend/base/default/template/buckaroo3extended/ideal/checkout/form.phtml +17 -17
  132. app/locale/nl_NL/TIG_Buckaroo3Extended.csv +3 -3
  133. package.xml +32 -14
  134. skin/adminhtml/default/default/images/tig_buckaroo3extended/tig_logo_medium.png +0 -0
  135. skin/frontend/base/default/css/TIG/Buckaroo3Extended/styles_opc.css +6 -3
  136. skin/frontend/base/default/css/TIG/Buckaroo3Extended/styles_osc.css +6 -2
app/code/community/TIG/Buckaroo3Extended/.DS_Store DELETED
Binary file
app/code/community/TIG/Buckaroo3Extended/Block/Adminhtml/Sales/Order/Creditmemo/Create/RefundFields.php CHANGED
@@ -75,6 +75,18 @@ class TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Creditmemo_Create_Refund
75
  return $paymentMethod;
76
  }
77
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  /**
79
  * Check if a payment method can be found before rendering the template.
80
  *
75
  return $paymentMethod;
76
  }
77
 
78
+ /**
79
+ * Returns whether there's a transaction id on the invoice
80
+ *
81
+ * @return bool
82
+ */
83
+ public function isBuckarooInvoiced()
84
+ {
85
+ $invoiceId = Mage::app()->getRequest()->getParam('invoice_id');
86
+ $invoice = Mage::getModel('sales/order_invoice')->load($invoiceId);
87
+ return (bool)$invoice->getTransactionId();
88
+ }
89
+
90
  /**
91
  * Check if a payment method can be found before rendering the template.
92
  *
app/code/community/TIG/Buckaroo3Extended/Block/Adminhtml/System/Config/Hint.php CHANGED
@@ -21,11 +21,11 @@ class TIG_Buckaroo3Extended_Block_Adminhtml_System_Config_Hint
21
  'visa',
22
  'payperemail',
23
  'paymentguarantee',
24
- 'giftcards',
25
- 'empayment',
26
- 'maestro',
27
- 'visaelectron',
28
- 'vpay',
29
  'bancontactmrcash',
30
  'eps',
31
  'afterpay',
@@ -38,8 +38,8 @@ class TIG_Buckaroo3Extended_Block_Adminhtml_System_Config_Hint
38
  );
39
 
40
  public $config = array(
41
- 'advanced',
42
- 'certificate',
43
  );
44
 
45
  /**
21
  'visa',
22
  'payperemail',
23
  'paymentguarantee',
24
+ 'giftcards',
25
+ 'empayment',
26
+ 'maestro',
27
+ 'visaelectron',
28
+ 'vpay',
29
  'bancontactmrcash',
30
  'eps',
31
  'afterpay',
38
  );
39
 
40
  public $config = array(
41
+ 'advanced',
42
+ 'certificate',
43
  );
44
 
45
  /**
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Afterpay/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Afterpay_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/afterpay_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Afterpay_Adminhtml_System_Confi
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Afterpay_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/afterpay_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Afterpay/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Afterpay_Checkout_Form extends
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/afterpay/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
 
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/afterpay/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
 
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Amex/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Amex_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/amex_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Amex_Adminhtml_System_Config_Ad
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Amex_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/amex_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Amex/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Amex_Checkout_Form extends TIG_
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/amex/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/amex/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Bancontactmrcash/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Bancontactmrcash_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/bancontactmrcash_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Bancontactmrcash_Adminhtml_Syst
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Bancontactmrcash_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/bancontactmrcash_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Bancontactmrcash/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Bancontactmrcash_Checkout_Form
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/bancontactmrcash/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/bancontactmrcash/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Cartebancaire/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Cartebancaire_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/cartebancaire_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
1
  <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Cartebancaire_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/cartebancaire_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Cartebancaire/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Cartebancaire_Checkout_Form ext
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/cartebancaire/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/cartebancaire/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Cartebleue/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Cartebleue_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/cartebleue_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Cartebleue_Adminhtml_System_Con
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Cartebleue_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/cartebleue_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Cartebleue/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Cartebleue_Checkout_Form extend
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/cartebleue/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/cartebleue/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Checkout/Form/Abstract.php CHANGED
@@ -32,8 +32,6 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Checkout_Form_Abstract extends
32
 
33
  $code = $this->getMethod()->getCode();
34
 
35
-
36
-
37
  $quote = $this->getQuote();
38
  /** @todo generate the fee amount dynamic, based on TAX-settings */
39
  //$paymentFeeModel = Mage::getModel('buckaroo3extended/paymentFee_quote_address_total_fee');
@@ -43,28 +41,21 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Checkout_Form_Abstract extends
43
  $quote->getStoreId()
44
  );
45
 
46
- if($paymentFee < 1){
 
 
 
47
  return '';
48
  }
49
 
50
- $fee = str_replace(',', '.', $paymentFee);
51
-
52
  if (strpos($fee, '%') === false) {
53
  $fee = Mage::helper('core')->currency($fee, true, false);
54
  }
55
 
56
- $feeText = '';
57
 
58
  if ($useSpan) {
59
- $feeText .= '<span class="buckaroo_fee '
60
- . $code
61
- . '">';
62
- }
63
-
64
- $feeText .= '(+ ' . $fee . ')';
65
-
66
- if ($useSpan) {
67
- $feeText .= '</span>';
68
  }
69
 
70
  return $feeText;
@@ -130,8 +121,8 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Checkout_Form_Abstract extends
130
  {
131
  $gender = (int) $this->getSession()->getData($this->getMethodCode() . '_BPE_Customergender');
132
  if (!$gender) {
133
- $customerId = $this->getAddress()->getCustomerId();
134
- $customer = Mage::getModel('customer/customer')->load($customerId);
135
  $gender = (int) $customer->getGender();
136
  }
137
 
32
 
33
  $code = $this->getMethod()->getCode();
34
 
 
 
35
  $quote = $this->getQuote();
36
  /** @todo generate the fee amount dynamic, based on TAX-settings */
37
  //$paymentFeeModel = Mage::getModel('buckaroo3extended/paymentFee_quote_address_total_fee');
41
  $quote->getStoreId()
42
  );
43
 
44
+ $fee = str_replace(',', '.', $paymentFee);
45
+
46
+ // Check if the fee given rounds to 0.01+, if not, return nothing
47
+ if (number_format($fee, 2, '.', ',') == 0.00) {
48
  return '';
49
  }
50
 
 
 
51
  if (strpos($fee, '%') === false) {
52
  $fee = Mage::helper('core')->currency($fee, true, false);
53
  }
54
 
55
+ $feeText = '(+ ' . $fee . ')';
56
 
57
  if ($useSpan) {
58
+ $feeText = '<span class="buckaroo_fee ' . $code . '">' . $feeText . '</span>';
 
 
 
 
 
 
 
 
59
  }
60
 
61
  return $feeText;
121
  {
122
  $gender = (int) $this->getSession()->getData($this->getMethodCode() . '_BPE_Customergender');
123
  if (!$gender) {
124
+ $customerId = $this->getAddress()->getCustomerId();
125
+ $customer = Mage::getModel('customer/customer')->load($customerId);
126
  $gender = (int) $customer->getGender();
127
  }
128
 
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Directdebit/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Directdebit_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/directdebit_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Directdebit_Adminhtml_System_Co
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Directdebit_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/directdebit_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Directdebit/Checkout/Form.php CHANGED
@@ -3,25 +3,25 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Directdebit_Checkout_Form exten
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/directdebit/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
-
10
  public function getAccountOwner()
11
  {
12
- $accountHolder = $this->getSession()->getData('payment[account_owner]');
13
-
14
- if (!$accountHolder) {
15
- $accountHolder = $this->getName();
16
- }
17
  return $accountHolder;
18
  }
19
-
20
  public function getAccountNumber()
21
  {
22
  return $this->getSession()->getData('payment[account_number]');
23
  }
24
-
25
  public function getBankNumber()
26
  {
27
  return $this->getSession()->getData('payment[bank_number]');
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/directdebit/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
+
10
  public function getAccountOwner()
11
  {
12
+ $accountHolder = $this->getSession()->getData('payment[account_owner]');
13
+
14
+ if (!$accountHolder) {
15
+ $accountHolder = $this->getName();
16
+ }
17
  return $accountHolder;
18
  }
19
+
20
  public function getAccountNumber()
21
  {
22
  return $this->getSession()->getData('payment[account_number]');
23
  }
24
+
25
  public function getBankNumber()
26
  {
27
  return $this->getSession()->getData('payment[bank_number]');
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Empayment/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- class TIG_Buckaroo3Extended_Block_PaymentMethods_Empayment_Adminhtml_System_Config_Advancedbtn
3
  extends Mage_Adminhtml_Block_Abstract
4
- implements Varien_Data_Form_Element_Renderer_Interface
5
  {
6
- protected $_template = 'buckaroo3extended/empayment_system/config/advancedbtn.phtml';
7
 
8
  /**
9
  * Render fieldset html
@@ -13,7 +13,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Empayment_Adminhtml_System_Conf
13
  */
14
  public function render(Varien_Data_Form_Element_Abstract $element)
15
  {
16
-
17
  return $this->toHtml();
18
  }
19
  }
1
+ <?php
2
+ class TIG_Buckaroo3Extended_Block_PaymentMethods_Empayment_Adminhtml_System_Config_Advancedbtn
3
  extends Mage_Adminhtml_Block_Abstract
4
+ implements Varien_Data_Form_Element_Renderer_Interface
5
  {
6
+ protected $_template = 'buckaroo3extended/empayment_system/config/advancedbtn.phtml';
7
 
8
  /**
9
  * Render fieldset html
13
  */
14
  public function render(Varien_Data_Form_Element_Abstract $element)
15
  {
16
+
17
  return $this->toHtml();
18
  }
19
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Empayment/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Empayment_Checkout_Form extends
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/empayment/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/empayment/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Eps/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Eps_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/eps_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Eps_Adminhtml_System_Config_Adv
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Eps_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/eps_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Eps/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Eps_Checkout_Form extends TIG_B
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/eps/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/eps/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Giftcards/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Amex_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/amex_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Amex_Adminhtml_System_Config_Ad
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Amex_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/amex_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Giftcards/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Giftcards_Checkout_Form extends
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/giftcards/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/giftcards/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Giropay/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Giropay_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/giropay_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Giropay_Adminhtml_System_Config
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Giropay_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/giropay_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Giropay/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Giropay_Checkout_Form extends T
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/giropay/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/giropay/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Ideal/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Ideal_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/ideal_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Ideal_Adminhtml_System_Config_A
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Ideal_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/ideal_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Ideal/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Ideal_Checkout_Form extends TIG
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/ideal/checkout/form.phtml');
7
  $this->setIssuers();
8
  parent::_construct();
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/ideal/checkout/form.phtml');
7
  $this->setIssuers();
8
  parent::_construct();
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Maestro/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Maestro_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extendedmaestro_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Maestro_Adminhtml_System_Config
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Maestro_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extendedmaestro_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Maestro/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Maestro_Checkout_Form extends T
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/maestro/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/maestro/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Mastercard/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Mastercard_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/mastercard_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Mastercard_Adminhtml_System_Con
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Mastercard_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/mastercard_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Mastercard/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Mastercard_Checkout_Form extend
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/mastercard/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/mastercard/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Masterpass/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Masterpass_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/masterpass_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
1
  <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Masterpass_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/masterpass_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Masterpass/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Masterpass_Checkout_Form extend
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/masterpass/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/masterpass/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Onlinegiro/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Onlinegiro_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/onlinegiro_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Onlinegiro_Adminhtml_System_Con
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Onlinegiro_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/onlinegiro_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Onlinegiro/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Onlinegiro_Checkout_Form extend
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/onlinegiro/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/onlinegiro/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paymentguarantee/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Paymentguarantee_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/paymentguarantee_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Paymentguarantee_Adminhtml_Syst
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Paymentguarantee_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/paymentguarantee_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paymentguarantee/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Paymentguarantee_Checkout_Form
3
  {
4
  protected function _construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/paymentguarantee/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  protected function _construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/paymentguarantee/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paypal/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Paypal_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/paypal_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Paypal_Adminhtml_System_Config_
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Paypal_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/paypal_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paypal/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Paypal_Checkout_Form extends TI
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/paypal/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/paypal/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Payperemail/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Payperemail_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/payperemail_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Payperemail_Adminhtml_System_Co
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Payperemail_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/payperemail_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Payperemail/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Payperemail_Checkout_Form exten
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/payperemail/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/payperemail/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paysafecard/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Paysafecard_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/paysafecard_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Paysafecard_Adminhtml_System_Co
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Paysafecard_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/paysafecard_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Paysafecard/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Paysafecard_Checkout_Form exten
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/paysafecard/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/paysafecard/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Sofortueberweisung/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Sofortueberweisung_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/sofortueberweisung_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Sofortueberweisung_Adminhtml_Sy
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Sofortueberweisung_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/sofortueberweisung_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Sofortueberweisung/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Sofortueberweisung_Checkout_For
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/sofortueberweisung/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/sofortueberweisung/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Transfer/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Transfer_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/transfer_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Transfer_Adminhtml_System_Confi
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Transfer_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/transfer_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Transfer/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Transfer_Checkout_Form extends
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/transfer/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/transfer/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Visa/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Visa_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/visa_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Visa_Adminhtml_System_Config_Ad
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Visa_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/visa_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Visa/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Visa_Checkout_Form extends TIG_
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/visa/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/visa/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Visaelectron/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Visaelectron_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/visaelectron_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Visaelectron_Adminhtml_System_C
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Visaelectron_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/visaelectron_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Visaelectron/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Visaelectron_Checkout_Form exte
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/visaelectron/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/visaelectron/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Vpay/Adminhtml/System/Config/Advancedbtn.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Vpay_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
- implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
- protected $_template = 'buckaroo3extended/vpay_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
@@ -12,7 +12,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Vpay_Adminhtml_System_Config_Ad
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
-
16
  return $this->toHtml();
17
  }
18
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_PaymentMethods_Vpay_Adminhtml_System_Config_Advancedbtn extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
  {
5
+ protected $_template = 'buckaroo3extended/vpay_system/config/advancedbtn.phtml';
6
 
7
  /**
8
  * Render fieldset html
12
  */
13
  public function render(Varien_Data_Form_Element_Abstract $element)
14
  {
15
+
16
  return $this->toHtml();
17
  }
18
  }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Vpay/Checkout/Form.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Vpay_Checkout_Form extends TIG_
3
  {
4
  public function __construct()
5
  {
6
- $this->setTemplate('buckaroo3extended/vpay/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
3
  {
4
  public function __construct()
5
  {
6
+ $this->setTemplate('buckaroo3extended/vpay/checkout/form.phtml');
7
  parent::_construct();
8
  }
9
  }
app/code/community/TIG/Buckaroo3Extended/Helper/Data.php CHANGED
@@ -46,38 +46,49 @@ class TIG_Buckaroo3Extended_Helper_Data extends Mage_Core_Helper_Abstract
46
  */
47
  const XPATH_BUCKAROO_FEE_TAX_CLASS = 'tax/classes/buckaroo_fee';
48
 
 
 
 
 
 
 
 
 
 
 
 
49
  /**
50
  * @var TIG_Buckaroo3Extended_Model_PaymentFee_Service
51
  */
52
  protected $_serviceModel;
53
 
54
  public function isAdmin()
55
- {
56
- if(Mage::app()->getStore()->isAdmin()) {
57
- return true;
58
- }
59
-
60
- if(Mage::getDesign()->getArea() == 'adminhtml') {
61
- return true;
62
- }
63
-
64
- return false;
65
- }
66
-
67
- public function log($message, $force = false)
68
- {
69
- Mage::log($message, Zend_Log::DEBUG, 'TIG_B3E.log', $force);
70
- }
71
-
72
- public function logException($e)
73
- {
74
- if (is_string($e)) {
75
- Mage::log($e, Zend_Log::ERR, 'TIG_B3E_Exception.log', true);
76
- } else {
77
- Mage::log($e->getMessage(), Zend_Log::ERR, 'TIG_B3E_Exception.log', true);
78
- Mage::log($e->getTraceAsString(), Zend_Log::ERR, 'TIG_B3E_Exception.log', true);
79
- }
80
- }
81
 
82
  public function isOneStepCheckout()
83
  {
@@ -412,4 +423,95 @@ class TIG_Buckaroo3Extended_Helper_Data extends Mage_Core_Helper_Abstract
412
 
413
  return $this;
414
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  }
46
  */
47
  const XPATH_BUCKAROO_FEE_TAX_CLASS = 'tax/classes/buckaroo_fee';
48
 
49
+ /**
50
+ * Status codes for Buckaroo
51
+ */
52
+ const BUCKAROO_SUCCESS = 'BUCKAROO_SUCCESS';
53
+ const BUCKAROO_FAILED = 'BUCKAROO_FAILED';
54
+ const BUCKAROO_ERROR = 'BUCKAROO_ERROR';
55
+ const BUCKAROO_NEUTRAL = 'BUCKAROO_NEUTRAL';
56
+ const BUCKAROO_PENDING_PAYMENT = 'BUCKAROO_PENDING_PAYMENT';
57
+ const BUCKAROO_INCORRECT_PAYMENT = 'BUCKAROO_INCORRECT_PAYMENT';
58
+ const BUCKAROO_REJECTED = 'BUCKAROO_REJECTED';
59
+
60
  /**
61
  * @var TIG_Buckaroo3Extended_Model_PaymentFee_Service
62
  */
63
  protected $_serviceModel;
64
 
65
  public function isAdmin()
66
+ {
67
+ if(Mage::app()->getStore()->isAdmin()) {
68
+ return true;
69
+ }
70
+
71
+ if(Mage::getDesign()->getArea() == 'adminhtml') {
72
+ return true;
73
+ }
74
+
75
+ return false;
76
+ }
77
+
78
+ public function log($message, $force = false)
79
+ {
80
+ Mage::log($message, Zend_Log::DEBUG, 'TIG_B3E.log', $force);
81
+ }
82
+
83
+ public function logException($e)
84
+ {
85
+ if (is_string($e)) {
86
+ Mage::log($e, Zend_Log::ERR, 'TIG_B3E_Exception.log', true);
87
+ } else {
88
+ Mage::log($e->getMessage(), Zend_Log::ERR, 'TIG_B3E_Exception.log', true);
89
+ Mage::log($e->getTraceAsString(), Zend_Log::ERR, 'TIG_B3E_Exception.log', true);
90
+ }
91
+ }
92
 
93
  public function isOneStepCheckout()
94
  {
423
 
424
  return $this;
425
  }
426
+
427
+ public function getNewStates($code = null, $order = null, $method = null)
428
+ {
429
+ $return = array(null, null);
430
+ $states = array();
431
+
432
+ // All three parameters need to be available
433
+ if (!$code || !$order || !$method) {
434
+ return $return;
435
+ }
436
+
437
+ // Get the store Id
438
+ $storeId = $order->getStoreId();
439
+
440
+ // Get the states
441
+ $states['success']['state'] = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_success', $storeId);
442
+ $states['failure']['state'] = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_failed', $storeId);
443
+ $states['pending']['state'] = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_pendingpayment', $storeId);
444
+ $states['incorrect']['state'] = 'holded';
445
+
446
+ // Get the default status values
447
+ $states['success']['status'] = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_success', $storeId);
448
+ $states['failure']['status'] = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_failed', $storeId);
449
+ $states['pending']['status'] = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_pendingpayment', $storeId);
450
+ $states['incorrect']['status'] = 'buckaroo_incorrect_payment';
451
+
452
+ // Magento 1.4 compatibility
453
+ $version15 = '1.5.0.0';
454
+ $version14 = '1.4.0.0';
455
+ if (
456
+ version_compare(Mage::getVersion(), $version15, '<')
457
+ && version_compare(Mage::getVersion(), $version14, '>')
458
+ ) {
459
+ $states['incorrect']['status'] = 'payment_review';
460
+ }
461
+
462
+ // See if we even need to use custom statuses
463
+ $useStatus = Mage::getStoreConfig('buckaroo/' . $method . '/active_status', $storeId);
464
+
465
+ // Only look up custom statuses if we need to
466
+ if ($useStatus) {
467
+ $customSuccess = Mage::getStoreConfig('buckaroo/' . $method . '/order_status_success', $storeId);
468
+ $customFailure = Mage::getStoreConfig('buckaroo/' . $method . '/order_status_failed', $storeId);
469
+ $customPending = Mage::getStoreConfig('buckaroo/' . $method . '/order_status_pendingpayment', $storeId);
470
+
471
+ if (!empty($customSuccess)) {
472
+ $states['success']['status'] = $customSuccess;
473
+ }
474
+ if (!empty($customFailure)) {
475
+ $states['failure']['status'] = $customFailure;
476
+ }
477
+ if (!empty($customPending)) {
478
+ $states['pending']['status'] = $customPending;
479
+ }
480
+ }
481
+
482
+ // Now see what code we've been given and return the relevant bits
483
+ switch ($code) {
484
+
485
+ case self::BUCKAROO_SUCCESS:
486
+ $return = array(
487
+ $states['success']['state'],
488
+ $states['success']['status'],
489
+ );
490
+ break;
491
+
492
+ case self::BUCKAROO_ERROR:
493
+ case self::BUCKAROO_FAILED:
494
+ $return = array(
495
+ $states['failure']['state'],
496
+ $states['failure']['status'],
497
+ );
498
+ break;
499
+
500
+ case self::BUCKAROO_PENDING_PAYMENT:
501
+ $return = array(
502
+ $states['pending']['state'],
503
+ $states['pending']['status'],
504
+ );
505
+ break;
506
+
507
+ case self::BUCKAROO_INCORRECT_PAYMENT:
508
+ $return = array(
509
+ $states['incorrect']['state'],
510
+ $states['incorrect']['status'],
511
+ );
512
+ break;
513
+ }
514
+
515
+ return $return;
516
+ }
517
  }
app/code/community/TIG/Buckaroo3Extended/Model/Abstract.php CHANGED
@@ -22,7 +22,7 @@
22
 
23
  class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abstract
24
  {
25
- const BUCKAROO_SUCCESS = 'BUCKAROO_SUCCESS';
26
  const BUCKAROO_FAILED = 'BUCKAROO_FAILED';
27
  const BUCKAROO_ERROR = 'BUCKAROO_ERROR';
28
  const BUCKAROO_NEUTRAL = 'BUCKAROO_NEUTRAL';
@@ -30,143 +30,142 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
30
  const BUCKAROO_INCORRECT_PAYMENT = 'BUCKAROO_INCORRECT_PAYMENT';
31
  const BUCKAROO_REJECTED = 'BUCKAROO_REJECTED';
32
 
33
-
34
  /**
35
  * @var Mage_Sales_Model_Order $_order
36
  */
37
  protected $_order = '';
38
- protected $_debugEmail;
39
- protected $_billingInfo = '';
40
- protected $_session = '';
41
  protected $_storeId = '';
42
 
43
- /**
44
- * List of possible response codes sent by buckaroo.
45
- * This is the list for the BPE 3.0 gateway.
46
- */
47
- public $responseCodes = array(
48
- 190 => array(
49
- 'message' => 'Success',
50
- 'status' => self::BUCKAROO_SUCCESS,
51
- ),
52
- 490 => array(
53
- 'message' => 'Payment failure',
54
- 'status' => self::BUCKAROO_FAILED,
55
- ),
56
- 491 => array(
57
- 'message' => 'Validation error',
58
- 'status' => self::BUCKAROO_FAILED,
59
- ),
60
- 492 => array(
61
- 'message' => 'Technical error',
62
- 'status' => self::BUCKAROO_ERROR,
63
- ),
64
- 690 => array(
65
- 'message' => 'Payment rejected',
66
- 'status' => self::BUCKAROO_REJECTED,
67
- ),
68
- 790 => array(
69
- 'message' => 'Waiting for user input',
70
- 'status' => self::BUCKAROO_PENDING_PAYMENT,
71
- ),
72
- 791 => array(
73
- 'message' => 'Waiting for processor',
74
- 'status' => self::BUCKAROO_PENDING_PAYMENT,
75
- ),
76
- 792 => array(
77
- 'message' => 'Waiting on consumer action',
78
- 'status' => self::BUCKAROO_PENDING_PAYMENT,
79
- ),
80
- 793 => array(
81
- 'message' => 'Payment on hold',
82
- 'status' => self::BUCKAROO_PENDING_PAYMENT,
83
- ),
84
- 890 => array(
85
- 'message' => 'Cancelled by consumer',
86
- 'status' => self::BUCKAROO_FAILED,
87
- ),
88
- 891 => array(
89
- 'message' => 'Cancelled by merchant',
90
- 'status' => self::BUCKAROO_FAILED,
91
- ),
92
- );
93
-
94
- /**
95
- * Retrieves instance of the last used order
96
- */
97
- protected function _loadLastOrder()
98
- {
99
- if (!empty($this->_order)) {
100
- return;
101
- }
102
-
103
- $session = Mage::getSingleton('checkout/session');
104
- $orderId = $session->getLastRealOrderId();
105
- if (!empty($orderId)) {
106
  $this->_order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
107
- }
108
 
109
  return $this;
110
- }
111
 
112
- public function setOrder($order) {
113
- $this->_order = $order;
114
 
115
  return $this;
116
- }
117
 
118
- public function getOrder()
119
- {
120
- return $this->_order;
121
- }
122
 
123
- public function setLastOrder($order)
124
- {
125
- $this->_order = $order;
126
 
127
  return $this;
128
- }
129
 
130
- public function getLastOrder()
131
- {
132
- return $this->_order;
133
- }
134
 
135
- public function setDebugEmail($debugEmail)
136
- {
137
- $this->_debugEmail = $debugEmail;
138
 
139
  return $this;
140
- }
141
 
142
- public function getDebugEmail()
143
- {
144
- return $this->_debugEmail;
145
- }
146
 
147
- public function setBillingInfo($billingInfo)
148
- {
149
- $this->_billingInfo = $billingInfo;
150
 
151
  return $this;
152
- }
153
 
154
- public function getBillingInfo()
155
- {
156
- return $this->_billingInfo;
157
- }
158
 
159
- public function setSession($session)
160
- {
161
- $this->_session = $session;
162
 
163
  return $this;
164
- }
165
 
166
- public function getSession()
167
- {
168
- return $this->_session;
169
- }
170
 
171
  public function setStoreId($storeId)
172
  {
@@ -180,123 +179,123 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
180
  return $this->_storeId;
181
  }
182
 
183
- public function __construct($debugEmail = false)
184
- {
185
- if (strpos(dirname(__FILE__), DS .'Model') !== false) {
186
- $dir = str_replace(DS .'Model', DS .'certificate', dirname(__FILE__));
187
- } else {
188
- $dir = str_replace(
189
- DS
190
- .'includes'
191
- . DS
192
- . 'src',
193
- DS
194
- . 'app'
195
- . DS
196
- . 'code'
197
- . DS
198
- . 'community'
199
- . DS
200
- . 'TIG'
201
- . DS
202
- . 'Buckaroo3Extended'
203
- . DS
204
- . 'certificate',
205
- dirname(__FILE__)
206
- );
207
- }
208
-
209
- if (!defined('CERTIFICATE_DIR')) {
210
- define('CERTIFICATE_DIR', $dir);
211
- }
212
-
213
- $this->_loadLastOrder();
214
-
215
- if (!Mage::helper('buckaroo3extended')->isAdmin()) {
216
- $this->setSession(Mage::getSingleton('checkout/session'));
217
- } else {
218
- $this->setSession(Mage::getSingleton('core/session'));
219
- }
220
- $this->_setOrderBillingInfo();
221
-
222
- if ($debugEmail) {
223
- $this->setDebugEmail($debugEmail);
224
- } else {
225
- $this->setDebugEmail('');
226
- }
227
 
228
  if (!Mage::helper('buckaroo3extended')->isAdmin() && !Mage::registry('buckaroo_push-error')) {
229
- $this->_checkExpired();
230
- }
231
 
232
  if ($this->getOrder()) {
233
  $this->setStoreId($this->getOrder()->getStoreId());
234
  } else {
235
  $this->setStoreId(Mage::app()->getStore()->getId());
236
  }
237
- }
238
-
239
- /**
240
- * Checks if the order object is still there. Prevents errors when session has expired.
241
- */
242
- protected function _checkExpired()
243
- {
244
- if (empty($this->_order)) {
245
- $returnUrl = Mage::getUrl(Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/failure_redirect', $this->getStoreId()));
246
- header('location:' . $returnUrl);
247
- }
248
- }
249
 
250
  public function setOrderBillingInfo() {
251
  return $this->_setOrderBillingInfo();
252
  }
253
 
254
- /**
255
- * retrieve billing information from order
256
- *
257
- */
258
- protected function _setOrderBillingInfo()
259
- {
260
- if (empty($this->_order)) {
261
- return false;
262
- }
263
- $billingAddress = $this->_order->getBillingAddress();
264
-
265
- $firstname = $billingAddress->getFirstname();
266
- $lastname = $billingAddress->getLastname();
267
- $city = $billingAddress->getCity();
268
- $state = $billingAddress->getState();
269
- $address = $billingAddress->getStreetFull();
270
- $zip = $billingAddress->getPostcode();
271
- $email = $this->_order->getCustomerEmail();
272
- $telephone = $billingAddress->getTelephone();
273
- $fax = $billingAddress->getFax();
274
- $countryCode = $billingAddress->getCountry();
275
 
276
  $billingInfo = array(
277
- 'firstname' => $firstname,
278
- 'lastname' => $lastname,
279
- 'city' => $city,
280
- 'state' => $state,
281
- 'address' => $address,
282
- 'zip' => $zip,
283
- 'email' => $email,
284
- 'telephone' => $telephone,
285
- 'fax' => $fax,
286
- 'countryCode' => $countryCode
287
  );
288
 
289
  $this->setBillingInfo($billingInfo);
290
 
291
  return $this;
292
- }
293
 
294
- /**
295
- * Restores a previously closed quote so that the cart stays filled after an unsuccessfull order
296
- */
297
  public function restoreQuote()
298
  {
299
- $quoteId = $this->_order->getQuoteId();
300
 
301
  $quote = Mage::getModel('sales/quote')
302
  ->load($quoteId)
@@ -307,8 +306,8 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
307
  }
308
 
309
  /**
310
- * Empties the cart after a successfull order. To prevent the cart from staying filled when the user
311
- * has a modified shop that doesn't automatically clear the cart when placing an order.
312
  */
313
  public function emptyCart()
314
  {
@@ -335,85 +334,85 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
335
  * @return array
336
  */
337
  protected function _determineAmountAndCurrency()
338
- {
339
- $code = $this->_order->getPayment()->getMethod();
340
-
341
- // availability currency codes for this Payment Module
342
- switch($code)
343
- {
344
- case 'buckaroo3extended_ideal':
345
- case 'buckaroogiftcard':
346
- case 'buckaroo2012giftcard':
347
- case 'buckarooideal':
348
- case 'buckaroo':
349
- case 'buckaroo2012ideal': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_ideal_paymentMethod');
350
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_ideal/allowed_currencies', $this->getStoreId());
351
- break;
352
- case 'buckaroo3extended_visa':
353
- case 'buckaroocc':
354
- case 'buckaroo2012creditcard': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_visa_paymentMethod');
355
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_visa/allowed_currencies', $this->getStoreId());
356
- break;
357
- case 'buckaroo3extended_amex': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_amex_paymentMethod');
358
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_amex/allowed_currencies', $this->getStoreId());
359
- break;
360
- case 'buckaroo3extended_mastercard':
361
- case 'mastercard': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_mastercard_paymentMethod');
362
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_mastercard/allowed_currencies', $this->getStoreId());
363
- break;
364
- case 'buckaroo3extended_directdebit':
365
- case 'buckaroocollect':
366
- case 'buckaroo2012machtiging': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_directdebit_paymentMethod');
367
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_directdebit/allowed_currencies', $this->getStoreId());
368
- break;
369
- case 'buckaroo3extended_paypal':
370
- case 'buckaroopaypal':
371
- case 'buckaroo2012paypal': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_paypal_paymentMethod');
372
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_paypal/allowed_currencies', $this->getStoreId());
373
- break;
374
- case 'buckaroo3extended_transfer':
375
- case 'buckarootransfer':
376
- case 'buckaroo2012overschrijving': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_transfer_paymentMethod');
377
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_transfer/allowed_currencies', $this->getStoreId());
378
- break;
379
- case 'buckaroo3extended_paymentguarantee':
380
- case 'buckarootransfergarant':
381
- case 'buckaroo2012betaalgarant': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_paymentguarantee_paymentMethod');
382
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_paymentguarantee/allowed_currencies', $this->getStoreId());
383
- break;
384
- case 'buckaroo3extended_giropay':
385
- case 'buckaroogiropay':
386
- case 'buckaroo2012giropay': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_giropay_paymentMethod');
387
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_giropay/allowed_currencies', $this->getStoreId());
388
- break;
389
- case 'buckaroo3extended_paysafecard':
390
- case 'buckaroocashticket':
391
- case 'buckaroopaysafecard':
392
- case 'buckaroo2012cashticketpaysafecard': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_paysafecard_paymentMethod');
393
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_paysafecard/allowed_currencies', $this->getStoreId());
394
- break;
395
- case 'buckaroo3extended_payperemail':
396
- case 'buckaroopayperemail':
397
- case 'buckaroo2012payperemail': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_payperemail_paymentMethod');
398
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_payperemail/allowed_currencies', $this->getStoreId());
399
- break;
400
- case 'buckaroo3extended_sofortueberweisung': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_sofortueberweisung_paymentMethod');
401
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_sofortueberweisung/allowed_currencies', $this->getStoreId());
402
- break;
403
- default: $paymentMethod = null;
404
- $currenciesAllowedConfig = 'EUR';
405
- }
406
-
407
- if (!is_null($paymentMethod)) {
408
- $currenciesAllowed = $paymentMethod->allowedCurrencies;
409
- } else {
410
- $currenciesAllowed = array('EUR');
411
- }
412
- $currenciesAllowedConfig = explode(',', $currenciesAllowedConfig);
413
-
414
- $currentCurrency = Mage::app()->getStore()->getCurrentCurrencyCode();
415
-
416
- // currency is not available for this module
417
  if (in_array($currentCurrency, $currenciesAllowed)
418
  && in_array($currentCurrency, $currenciesAllowedConfig))
419
  {
@@ -424,25 +423,25 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
424
  $currency = $this->_order->getBaseCurrency()->getCode();
425
  }
426
 
427
- return array($currency, $totalAmount);
428
- }
429
-
430
- /**
431
- * get locale based on country
432
- * locale is formatted as language-LOCALE
433
- *
434
- * @return array
435
- */
436
- protected function _getLocale()
437
- {
438
  $country = $this->_order->getBillingAddress()->getCountry();
439
 
440
  $locale = Mage::getStoreConfig('general/locale/code', $this->_order->getStoreId());
441
  $locale = str_replace('_', '-', $locale);
442
  $lang = strtoupper(substr($locale, 0, 2));
443
 
444
- return array($country, $locale, $lang);
445
- }
446
 
447
 
448
 
@@ -455,17 +454,17 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
455
  *
456
  * @return array $returnArray
457
  */
458
- protected function _parseResponse()
459
- {
460
- $code = $this->_response->Status->Code->Code;
461
 
462
- if (!isset($this->responseCodes[$code]))
463
- {
464
  return array(
465
  'message' => 'Onbekende responsecode: ' . $code,
466
  'status' => self::BUCKAROO_NEUTRAL
467
  );
468
- }
469
 
470
  $returnArray = $this->responseCodes[$code];
471
  if (is_object($this->_response)
@@ -482,7 +481,7 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
482
  $returnArray['code'] = $code;
483
 
484
  return $returnArray;
485
- }
486
 
487
  /**
488
  * Retrieves an array with information related to a received response code.
@@ -494,43 +493,43 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
494
  * @return array|bool
495
  */
496
  protected function _parsePostResponse($code)
497
- {
498
- $isCorrect = $this->_checkCorrectAmount();
499
-
500
- if ($isCorrect !== true) {
501
- return $isCorrect;
502
- }
503
-
504
- if (isset($this->responseCodes[$code]))
505
- {
506
- $returnArray = $this->responseCodes[$code];
507
-
508
- if ($this->_response) {
509
- $returnArray['code'] = $code;
510
- }
511
-
512
- return $returnArray;
513
- } elseif (isset($this->oldResponseCodes[$code])) {
514
- return array(
515
- 'message' => $this->oldResponseCodes[$code]['*']['omschrijving'],
516
- 'status' => $this->oldResponseCodes[$code]['*']['code'],
517
- 'code' => $code
518
- );
519
- } else {
520
- return array(
521
- 'message' => 'Onbekende responsecode: ' . $code,
522
- 'status' => self::BUCKAROO_NEUTRAL,
523
- 'code' => $code,
524
- );
525
- }
526
- }
527
-
528
- /**
529
- * Checks if the correct amount has been paid.
530
- */
531
- protected function _checkCorrectAmount()
532
- {
533
- $amountPaid = $this->_postArray['brq_amount'];
534
 
535
  $this->_debugEmail .= 'Currency used is '
536
  . $this->_postArray['brq_currency']
@@ -538,40 +537,40 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
538
  . $this->_order->getOrderCurrencyCode()
539
  . ".\n";
540
 
541
- if ($this->_postArray['brq_currency'] == $this->_order->getOrderCurrencyCode()) {
542
- $this->_debugEmail .= "Currency used is same as order currency \n";
543
- $amountOrdered = $this->_order->getGrandTotal();
544
- } else {
545
  $this->_debugEmail .= "Currency used is different from order currency \n";
546
- $amountOrdered = $this->_order->getBaseGrandTotal();
547
- }
548
 
549
  $this->_debugEmail .= "Amount paid: {$amountPaid}. Amount ordered: {$amountOrdered} \n";
550
 
551
- if (($amountPaid - $amountOrdered) > 0.01 || ($amountPaid - $amountOrdered) < -0.01) {
552
- return array(
553
  'message' => 'Incorrect amount transfered',
554
  'status' => self::BUCKAROO_INCORRECT_PAYMENT,
555
- );
556
- } else {
557
- return true;
558
- }
559
- }
560
-
561
- /**
562
- * cleans all elements in the array per instructions from Buckaroo PSP
563
- *
564
- * @param array $array
565
- * @return array $cleanArray
566
- */
567
  public function _cleanArrayForSoap($array)
568
  {
569
- $cleanArray = array();
570
 
571
- foreach ($array as $key => $value) {
572
- $value = str_replace('\r', ' ', $value);
573
- $value = str_replace('\n', ' ', $value);
574
- $cleanArray[$key] = $value;
575
  }
576
 
577
  return $cleanArray;
@@ -580,53 +579,53 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
580
  /**
581
  * function which converts special characters to html numeric equivalents
582
  */
583
- public function htmlNumeric($string) {
584
- preg_match_all('/[^\!-\~\s]/', $string, $specialChars);
585
- if ($specialChars) {
586
- foreach ($specialChars[0] as $char) {
587
- $newChar = ord($char);
588
- $numericChars[] = '&#'.$newChar.';';
589
- $patterns[] = "/{$char}/";
590
- }
591
- if (isset($numericChars) && isset($patterns)) {
592
- $string = preg_replace($patterns, $numericChars, $string);
593
- }
594
- }
595
- return $string;
596
- }
597
-
598
- public function log($message, $force = false)
599
- {
600
- Mage::helper('buckaroo3extended')->log($message, $force);
601
- }
602
-
603
- public function logException($e)
604
- {
605
- Mage::helper('buckaroo3extended')->logException($e);
606
- }
607
-
608
- public function sendDebugEmail()
609
- {
610
- $debugEmailConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/debug_email', $this->getStoreId());
611
- if (empty($debugEmailConfig))
612
- {
613
- return;
614
- }
615
-
616
- $mail = $this->_debugEmail;
617
-
618
- $recipients = explode(',', Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/debug_email', $this->getStoreId()));
619
-
620
- foreach($recipients as $recipient) {
621
- mail(
622
- trim($recipient),
623
- 'Buckaroo 3 Extended Debug Email',
624
- $mail
625
- );
626
- }
627
- }
628
-
629
- public function buckarooSort($array)
630
  {
631
  $arrayToSort = array();
632
  $origArray = array();
@@ -646,637 +645,637 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
646
  return $sortedArray;
647
  }
648
 
649
- protected function _updateRefundedOrderStatus($success = false)
650
- {
651
- $successString = $success ? 'success' : 'failed';
652
  if (!is_object($this->_order)) {
653
  return $this;
654
  }
655
- $state = $this->_order->getState();
656
-
657
- if ($success) {
658
- $comment = 'Buckaroo refund request was successfully processed.';
659
- } else {
660
- $comment = 'Unfortunately the Buckaroo refund request could not be processed succesfully.';
661
- }
662
-
663
- if ($this->_order->getBaseGrandTotal() != $this->_order->getBaseTotalRefunded()) {
664
- $configField = "buckaroo/buckaroo3extended_refund/order_status_partial_{$state}_{$successString}";
665
- $status = Mage::getStoreConfig($configField);
666
- } else {
667
- $status = null;
668
- }
669
-
670
- if (!empty($status)) {
671
- $this->_order->setStatus($status)->save();
672
- $this->_order->addStatusHistoryComment($comment, $status)
673
- ->save();
674
- } else {
675
- $this->_order->addStatusHistoryComment($comment)
676
- ->save();
677
- }
678
- }
679
 
680
  /**
681
  * Long list of response codes used by BPE 2.0 gateway. Added here for backwards compatibility. Added
682
  * to the bottem of the page so it doesn't take up as much space
683
  */
684
- public $oldResponseCodes = array(
685
- 0 => array( '*'=>array( "omschrijving" => "De credit card transactie is pending.",
686
- "code" => self::BUCKAROO_NEUTRAL,
687
- "type" => "creditcard")),
688
- 001 => array( '*'=>array( "omschrijving" => "De credit card transactie is pending. De MPI-status van de klant wordt gecheckt.",
689
- "code" => self::BUCKAROO_NEUTRAL,
690
- "type" => "creditcard")),
691
- 070 => array( '*'=>array( "omschrijving" => "De refund is nog niet verwerkt.",
692
- "code" => self::BUCKAROO_NEUTRAL,
693
- "type" => "creditcard")),
694
- 071 => array( '*'=>array( "omschrijving" => "De refund is succesvol verwerkt.",
695
- "code" => self::BUCKAROO_NEUTRAL,
696
- "type" => "creditcard")),
697
- 072 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden bij het refunden.",
698
- "code" => self::BUCKAROO_NEUTRAL,
699
- "type" => "creditcard")),
700
- 073 => array( '*'=>array( "omschrijving" => "De refund is geannuleerd.",
701
- "code" => self::BUCKAROO_NEUTRAL,
702
- "type" => "creditcard")),
703
- 100 => array( '*'=>array( "omschrijving" => "De transactie is door de credit-maatschappij goedgekeurd.",
704
- "code" => self::BUCKAROO_SUCCESS,
705
- "type" => "creditcard")),
706
- 101 => array( '*'=>array( "omschrijving" => "De transactie is door de credit-maatschappij afgekeurd.",
707
- "code" => self::BUCKAROO_FAILED,
708
- "type" => "creditcard")),
709
- 102 => array( '*'=>array( "omschrijving" => "De transactie is mislukt. Er is een fout opgetreden in de verwerking bij de creditmaatschappij.",
710
- "code" => self::BUCKAROO_FAILED,
711
- "type" => "creditcard")),
712
- 103 => array( '*'=>array( "omschrijving" => "Deze creditcardtransactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
713
- "code" => self::BUCKAROO_FAILED,
714
- "type" => "creditcard")),
715
- 104 => array( '*'=>array( "omschrijving" => "De kaart is verlopen.",
716
- "code" => self::BUCKAROO_FAILED,
717
- "type" => "creditcard")),
718
- 120 => array( '*'=>array( "omschrijving" => "Deze PayPal transactie is nog niet volledig verwerkt.",
719
- "code" => self::BUCKAROO_NEUTRAL,
720
- "type" => "paypal")),
721
- 121 => array( '*'=>array( "omschrijving" => "Transactiestatus: autorisatie geslaagd.",
722
- "code" => self::BUCKAROO_SUCCESS,
723
- "type" => "paypal")),
724
- 122 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is door de consument geannuleerd.",
725
- "code" => self::BUCKAROO_FAILED,
726
- "type" => "paypal")),
727
- 123 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
728
- "code" => self::BUCKAROO_FAILED,
729
- "type" => "paypal")),
730
- 124 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is om onbekende reden bij PayPal mislukt.",
731
- "code" => self::BUCKAROO_FAILED,
732
- "type" => "paypal")),
733
- 125 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is niet geaccepteerd.",
734
- "code" => self::BUCKAROO_NEUTRAL,
735
- "type" => "paypal")),
736
- 126 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is in afwachting.",
737
- "code" => self::BUCKAROO_NEUTRAL,
738
- "type" => "paypal")),
739
- 135 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is nog niet volledig verwerkt.",
740
- "code" => self::BUCKAROO_NEUTRAL,
741
- "type" => "paypal")),
742
- 136 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij PayPal worden achterhaald. De transactie is mogelijk nog niet afgerond",
743
- "code" => self::BUCKAROO_NEUTRAL,
744
- "type" => "paypal")),
745
- 137 => array( '*'=>array( "omschrijving" => "De afschrijvingscode is ongeldig.",
746
- "code" => self::BUCKAROO_FAILED,
747
- "type" => "paypal")),
748
- 138 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden.",
749
- "code" => self::BUCKAROO_FAILED,
750
- "type" => "paypal")),
751
- 139 => array( '*'=>array( "omschrijving" => "Het PayPal transactie-ID is ongeldig of niet beschikbaar.",
752
- "code" => self::BUCKAROO_FAILED,
753
- "type" => "paypal")),
754
- 140 => array( '*'=>array( "omschrijving" => "Er kon geen transactie worden gevonden.",
755
- "code" => self::BUCKAROO_FAILED,
756
- "type" => "paypal")),
757
- 150 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is nog niet volledig verwerkt.",
758
- "code" => self::BUCKAROO_NEUTRAL,
759
- "type" => "paypal")),
760
- 151 => array( '*'=>array( "omschrijving" => "Transactiestatus: authorisatie geslaagd.",
761
- "code" => self::BUCKAROO_SUCCESS,
762
- "type" => "paypal")),
763
- 152 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is door de consument geannuleerd.",
764
- "code" => self::BUCKAROO_FAILED,
765
- "type" => "paypal")),
766
- 153 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
767
- "code" => self::BUCKAROO_FAILED,
768
- "type" => "paypal")),
769
- 155 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is niet geaccepteerd.",
770
- "code" => self::BUCKAROO_FAILED,
771
- "type" => "paypal")),
772
- 156 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is nog niet volledig verwerkt.",
773
- "code" => self::BUCKAROO_NEUTRAL,
774
- "type" => "paypal")),
775
- 157 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij Paysafecard worden achterhaald. De transactie is mogelijk nog niet afgerond.",
776
- "code" => self::BUCKAROO_NEUTRAL,
777
- "type" => "paypal")),
778
- 158 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden bij Paysafecard. Onze excuses voor het ongemak.",
779
- "code" => self::BUCKAROO_FAILED,
780
- "type" => "paypal")),
781
- 159 => array( '*'=>array( "omschrijving" => "Het Paysafecard transactie-id is ongeldig of niet beschikbaar.",
782
- "code" => self::BUCKAROO_FAILED,
783
- "type" => "paypal")),
784
- 170 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is nog niet volledig verwerkt.",
785
- "code" => self::BUCKAROO_NEUTRAL,
786
- "type" => "paypal")),
787
- 171 => array( '*'=>array( "omschrijving" => "Transactiestatus: authorisatie geslaagd",
788
- "code" => self::BUCKAROO_SUCCESS,
789
- "type" => "creditcard")),
790
- 172 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is door de consument geannuleerd.",
791
- "code" => self::BUCKAROO_FAILED,
792
- "type" => "creditcard")),
793
- 173 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
794
- "code" => self::BUCKAROO_FAILED,
795
- "type" => "creditcard")),
796
- 175 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is niet geaccepteerd.",
797
- "code" => self::BUCKAROO_FAILED,
798
- "type" => "creditcard")),
799
- 176 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is nog niet volledig verwerkt.",
800
- "code" => self::BUCKAROO_NEUTRAL,
801
- "type" => "creditcard")),
802
- 177 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij Cash-Ticket worden achterhaald. De transactie is mogelijk nog niet afgerond.",
803
- "code" => self::BUCKAROO_NEUTRAL,
804
- "type" => "creditcard")),
805
- 178 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden bij Cash-Ticket. Onze excuses voor het ongemak.",
806
- "code" => self::BUCKAROO_FAILED,
807
- "type" => "creditcard")),
808
- 179 => array( '*'=>array( "omschrijving" => "Het Cash-Ticket transactie-id is ongeldig of niet beschikbaar.",
809
- "code" => self::BUCKAROO_FAILED,
810
- "type" => "creditcard")),
811
- 201 => array( '*'=>array( "omschrijving" => "Er is timeout opgetreden bij het verwerken van de transactie.Gebruik de TransactionKey om de verwerkingsstatus nogmaals te controleren.",
812
- "code" => self::BUCKAROO_NEUTRAL,
813
- "type" => "creditcard")),
814
- 203 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. Het creditcardnummer is geblokkeerd.",
815
- "code" => self::BUCKAROO_FAILED,
816
- "type" => "creditcard")),
817
- 204 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. Het ip-adres is geblokkeerd",
818
- "code" => self::BUCKAROO_FAILED,
819
- "type" => "creditcard")),
820
- 205 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. Het land van uitgifte van deze creditcard is geblokkeerd",
821
- "code" => self::BUCKAROO_FAILED,
822
- "type" => "creditcard")),
823
- 206 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. De faktuur [waarde] wordt momenteel of is reeds betaald.",
824
- "code" => self::BUCKAROO_FAILED,
825
- "type" => "creditcard")),
826
- 207 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. Het maximaal aantal betaalpogingen voor faktuur [waarde] is overschreden.",
827
- "code" => self::BUCKAROO_FAILED,
828
- "type" => "creditcard")),
829
- 242 => array( '*'=>array( "omschrijving" => "Provisie BetaalGarant succesvol verwerkt.",
830
- "code" => self::BUCKAROO_SUCCESS,
831
- "type" => "garant")),
832
- 243 => array( '*'=>array( "omschrijving" => "Provisie incassobureau BetaalGarant succesvol verwerkt.",
833
- "code" => self::BUCKAROO_SUCCESS,
834
- "type" => "garant")),
835
- 244 => array( '*'=>array( "omschrijving" => "Provisie Buckaroo BetaalGarant succesvol verwerkt.",
836
- "code" => self::BUCKAROO_SUCCESS,
837
- "type" => "garant")),
838
- 245 => array( '*'=>array( "omschrijving" => "Toetskosten incassobureau BetaalGarant succesvol verwerkt.",
839
- "code" => self::BUCKAROO_SUCCESS,
840
- "type" => "garant")),
841
- 246 => array( '*'=>array( "omschrijving" => "Btw incassobureau BetaalGarant succesvol verwerkt.",
842
- "code" => self::BUCKAROO_SUCCESS,
843
- "type" => "garant")),
844
- 247 => array( '*'=>array( "omschrijving" => "Btw buckaroo BetaalGarant succesvol verwerkt.",
845
- "code" => self::BUCKAROO_SUCCESS,
846
- "type" => "garant")),
847
- 252 => array( '*'=>array( "omschrijving" => "Kredietwaardigheidcontrole resultaat negatief.",
848
- "code" => self::BUCKAROO_FAILED,
849
- "type" => "garant")),
850
- 254 => array( '*'=>array( "omschrijving" => "Betaalgarant verzoek succesvol verwerkt.",
851
- "code" => self::BUCKAROO_SUCCESS,
852
- "type" => "garant")),
853
- 260 => array( '*'=>array( "omschrijving" => "Kredietwaardigheidcontrole abonnement niet actief.",
854
- "code" => self::BUCKAROO_FAILED,
855
- "type" => "garant")),
856
- 261 => array( '*'=>array( "omschrijving" => "Technische fout opgetreden tijdens kredietwaardigheidcontrole.",
857
- "code" => self::BUCKAROO_FAILED,
858
- "type" => "garant")),
859
- 262 => array( '*'=>array( "omschrijving" => "Verplichte velden voor kredietwaardigheidcontrole ontbreken of zijn onjuist",
860
- "code" => self::BUCKAROO_FAILED,
861
- "type" => "garant")),
862
- 300 => array( '*'=>array("omschrijving" => "Betaling voor deze overschrijving wordt nog verwacht.",
863
- "code" => self::BUCKAROO_NEUTRAL,
864
- "type" => "transfer"),
865
- 'buckarootransfergarant'=>array("omschrijving" => "Uw bestelling is geaccepteerd.",
866
- "code" => self::BUCKAROO_SUCCESS,
867
- "type" => "transfer")),
868
- 301 => array( '*'=>array( "omschrijving" => "De overschrijving is ontvangen.",
869
- "code" => self::BUCKAROO_SUCCESS,
870
- "type" => "transfer")),
871
- 302 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd of afgewezen.",
872
- "code" => self::BUCKAROO_FAILED,
873
- "type" => "transfer")),
874
- 303 => array( '*'=>array( "omschrijving" => "De uiterste betaaldatum voor deze overschrijving is verstreken.",
875
- "code" => self::BUCKAROO_FAILED,
876
- "type" => "transfer")),
877
- 304 => array( '*'=>array( "omschrijving" => "De datum voor ingebrekestelling is verstreken.",
878
- "code" => self::BUCKAROO_NEUTRAL,
879
- "type" => "transfer")),
880
- 305 => array( '*'=>array( "omschrijving" => "Het ontvangen bedrag voor de overschrijving is lager dan het bedrag van de transactie.",
881
- "code" => 'BUCKAROO_INCORRECT_AMOUNT',
882
- "type" => "transfer")),
883
- 306 => array( '*'=>array( "omschrijving" => "Het ontvangen bedrag voor de overschrijving is groter dan het bedrag van de transactie.",
884
- "code" => 'BUCKAROO_INCORRECT_AMOUNT',
885
- "type" => "transfer")),
886
- 309 => array( '*'=>array( "omschrijving" => "De overschrijving is geannuleerd.",
887
- "code" => self::BUCKAROO_FAILED,
888
- "type" => "transfer")),
889
- 345 => array( '*'=>array( "omschrijving" => "Oorspronkelijk transactie-bedrag gedeeld.",
890
- "code" => self::BUCKAROO_FAILED,
891
- "type" => "transfer")),
892
- 371 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is verwerkt.",
893
- "code" => self::BUCKAROO_NEUTRAL,
894
- "type" => "creditcard")),
895
- 372 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is verwerkt.",
896
- "code" => self::BUCKAROO_NEUTRAL,
897
- "type" => "transfer")),
898
- 373 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is verwerkt.",
899
- "code" => self::BUCKAROO_NEUTRAL,
900
- "type" => "transfer")),
901
- 381 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is mislukt.",
902
- "code" => self::BUCKAROO_NEUTRAL,
903
- "type" => "transfer")),
904
- 382 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is mislukt.",
905
- "code" => self::BUCKAROO_NEUTRAL,
906
- "type" => "transfer")),
907
- 383 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is mislukt.",
908
- "code" => self::BUCKAROO_NEUTRAL,
909
- "type" => "transfer")),
910
- 390 => array( '*'=>array( "omschrijving" => "De transactie is buiten Buckaroo om met de klant afgehandeld.",
911
- "code" => self::BUCKAROO_SUCCESS,
912
- "type" => "transfer")),
913
- 392 => array( '*'=>array( "omschrijving" => "Anders betaald.",
914
- "code" => self::BUCKAROO_SUCCESS,
915
- "type" => "transfer")),
916
- 400 => array( '*'=>array( "omschrijving" => "De kadokaart-transactie is nog in behandeling",
917
- "code" => self::BUCKAROO_NEUTRAL,
918
- "type" => "giftcard")),
919
- 401 => array( '*'=>array( "omschrijving" => "De betaling middels kado-kaart is geslaagd.",
920
- "code" => self::BUCKAROO_SUCCESS,
921
- "type" => "giftcard")),
922
- 402 => array( '*'=>array( "omschrijving" => "Betaling middels de kadokaart is afgewezen.",
923
- "code" => self::BUCKAROO_FAILED,
924
- "type" => "giftcard")),
925
- 409 => array( '*'=>array( "omschrijving" => "Betaling middels de kadokaart is geannuleerd.",
926
- "code" => self::BUCKAROO_FAILED,
927
- "type" => "giftcard")),
928
- 403 => array( '*'=>array( "omschrijving" => "Deze Giftcard transactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
929
- "code" => self::BUCKAROO_FAILED,
930
- "type" => "giftcard")),
931
- 404 => array( '*'=>array( "omschrijving" => "Deze Giftcard transactie is om onbekende reden bij de kaartuitgever mislukt.",
932
- "code" => self::BUCKAROO_FAILED,
933
- "type" => "giftcard")),
934
- 409 => array( '*'=>array( "omschrijving" => "Betaling middels de kadokaart is geannuleerd.",
935
- "code" => self::BUCKAROO_FAILED,
936
- "type" => "giftcard")),
937
- 410 => array( '*'=>array( "omschrijving" => "De Merchant Account Code is ongeldig",
938
- "code" => self::BUCKAROO_FAILED,
939
- "type" => "giftcard")),
940
- 411 => array( '*'=>array( "omschrijving" => "De betaling middels kadokaart is voorlopig geaccepteerd.",
941
- "code" => 'BUCKAROO_PENDINGPAYMENT',
942
- "type" => "giftcard")),
943
- 414 => array( '*'=>array( "omschrijving" => "Er is een systeem-fout opgetreden.",
944
- "code" => self::BUCKAROO_FAILED,
945
- "type" => "giftcard")),
946
- 421 => array( '*'=>array( "omschrijving" => "Er is een onbekende Issuer voor de kado-kaart opgegeven.",
947
- "code" => self::BUCKAROO_FAILED,
948
- "type" => "giftcard")),
949
- 422 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden bij de Issuer. De betaling is mislukt. [waarde].",
950
- "code" => self::BUCKAROO_FAILED,
951
- "type" => "giftcard")),
952
- 425 => array( '*'=>array( "omschrijving" => "Niet genoeg saldo om deze transactie uit te voeren.",
953
- "code" => self::BUCKAROO_FAILED,
954
- "type" => "giftcard")),
955
- 461 => array( '*'=>array( "omschrijving" => "Transactie voltooid.",
956
- "code" => self::BUCKAROO_SUCCESS,
957
- "type" => "giftcard")),
958
- 462 => array( '*'=>array( "omschrijving" => "Transactie voltooid.",
959
- "code" => self::BUCKAROO_SUCCESS,
960
- "type" => "giftcard")),
961
- 463 => array( '*'=>array( "omschrijving" => "Transactie voltooid.",
962
- "code" => self::BUCKAROO_SUCCESS,
963
- "type" => "giftcard")),
964
- 464 => array( '*'=>array( "omschrijving" => "Transactie voltooid.",
965
- "code" => self::BUCKAROO_SUCCESS,
966
- "type" => "giftcard")),
967
- 468 => array( '*'=>array( "omschrijving" => "Originele factuur voor deze vordering niet gevonden.",
968
- "code" => self::BUCKAROO_FAILED,
969
- "type" => "giftcard")),
970
- 471 => array( '*'=>array( "omschrijving" => "De refund voor deze giftcardbetaling is verwerkt.",
971
- "code" => self::BUCKAROO_NEUTRAL,
972
- "type" => "giftcard")),
973
- 472 => array( '*'=>array( "omschrijving" => "De refund voor deze giftcardbetaling is mislukt.",
974
- "code" => self::BUCKAROO_NEUTRAL,
975
- "type" => "giftcard")),
976
- 500 => array( '*'=>array( "omschrijving" => "Paypermail: transactie pending",
977
- "code" => self::BUCKAROO_NEUTRAL,
978
- "type" => "paypermail")),
979
- 541 => array( '*'=>array( "omschrijving" => "Transactiekosten zijn verrekend met saldo.",
980
- "code" => self::BUCKAROO_NEUTRAL,
981
- "type" => "paypermail")),
982
- 550 => array( '*'=>array( "omschrijving" => "De uitbetaling is nog niet verwerkt.",
983
- "code" => self::BUCKAROO_NEUTRAL,
984
- "type" => "paypermail")),
985
- 551 => array( '*'=>array( "omschrijving" => "De uitbetaling is succesvol verwerkt.",
986
- "code" => self::BUCKAROO_SUCCESS,
987
- "type" => "paypermail")),
988
- 552 => array( '*'=>array( "omschrijving" => "Transactiekosten zijn verrekend met saldo.",
989
- "code" => self::BUCKAROO_NEUTRAL,
990
- "type" => "paypermail")),
991
- 553 => array( '*'=>array( "omschrijving" => "Transactiekosten zijn verrekend met saldo.",
992
- "code" => self::BUCKAROO_NEUTRAL,
993
- "type" => "paypermail")),
994
- 560 => array( '*'=>array( "omschrijving" => "Correctiebetaling uitgevoerd door Buckaroo.",
995
- "code" => self::BUCKAROO_NEUTRAL,
996
- "type" => "paypermail")),
997
- 581 => array( '*'=>array( "omschrijving" => "Overschrijving van of naar ander Buckaroo-account.",
998
- "code" => self::BUCKAROO_NEUTRAL,
999
- "type" => "paypermail")),
1000
- 600 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is nog niet verwerkt.",
1001
- "code" => self::BUCKAROO_NEUTRAL,
1002
- "type" => "collect")),
1003
- 601 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is met succes verwerkt.",
1004
- "code" => self::BUCKAROO_SUCCESS,
1005
- "type" => "collect")),
1006
- 602 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is door de bank afgewezen.",
1007
- "code" => self::BUCKAROO_FAILED,
1008
- "type" => "collect")),
1009
- 605 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is gestorneerd.",
1010
- "code" => self::BUCKAROO_FAILED,
1011
- "type" => "collect")),
1012
- 609 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is geannuleerd voordat incasso plaatsvond.",
1013
- "code" => self::BUCKAROO_FAILED,
1014
- "type" => "collect")),
1015
- 610 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is door de bank afgewezen. Rekening ongeldig.",
1016
- "code" => self::BUCKAROO_FAILED,
1017
- "type" => "collect")),
1018
- 612 => array( '*'=>array( "omschrijving" => "Terugboeking wegens Melding Onterechte Incasso",
1019
- "code" => self::BUCKAROO_FAILED,
1020
- "type" => "collect")),
1021
- 671 => array( '*'=>array( "omschrijving" => "De refund voor deze machtiging is verwerkt.",
1022
- "code" => self::BUCKAROO_NEUTRAL,
1023
- "type" => "collect")),
1024
- 672 => array( '*'=>array( "omschrijving" => "De refund voor deze machtiging is mislukt.",
1025
- "code" => self::BUCKAROO_NEUTRAL,
1026
- "type" => "collect")),
1027
- 700 => array( '*'=>array( "omschrijving" => "De betaalopdracht is geaccepteerd en wordt in behandeling genomen.",
1028
- "code" => self::BUCKAROO_NEUTRAL,
1029
- "type" => "batch")),
1030
- 701 => array( '*'=>array( "omschrijving" => "De betaalopdracht is verwerkt.",
1031
- "code" => self::BUCKAROO_SUCCESS,
1032
- "type" => "batch")),
1033
- 702 => array( '*'=>array( "omschrijving" => "De betaalopdracht is door de bank teruggestort wegens incorrecte rekeninggegevens.",
1034
- "code" => self::BUCKAROO_FAILED,
1035
- "type" => "batch")),
1036
- 703 => array( '*'=>array( "omschrijving" => "De betaalopdracht is afgewezen door Buckaroo.",
1037
- "code" => self::BUCKAROO_FAILED,
1038
- "type" => "batch")),
1039
- 704 => array( '*'=>array( "omschrijving" => "Betaalopdracht geannuleerd.",
1040
- "code" => self::BUCKAROO_FAILED,
1041
- "type" => "batch")),
1042
- 705 => array( '*'=>array( "omschrijving" => "De batch kon niet worden ingepland. Error: [waarde]",
1043
- "code" => self::BUCKAROO_FAILED,
1044
- "type" => "batch")),
1045
- 710 => array( '*'=>array( "omschrijving" => "Betaalopdracht nog niet geverifieerd.",
1046
- "code" => self::BUCKAROO_NEUTRAL,
1047
- "type" => "batch")),
1048
- 711 => array( '*'=>array( "omschrijving" => "De batch kon niet gevonden worden: [waarde].",
1049
- "code" => self::BUCKAROO_FAILED,
1050
- "type" => "batch")),
1051
- 712 => array( '*'=>array( "omschrijving" => "De batch is reeds verwerkt: [waarde].",
1052
- "code" => self::BUCKAROO_SUCCESS,
1053
- "type" => "batch")),
1054
- 720 => array( '*'=>array( "omschrijving" => "Er is voor deze batch-transactie geen klant-id opgegeven.",
1055
- "code" => self::BUCKAROO_FAILED,
1056
- "type" => "batch")),
1057
- 721 => array( '*'=>array( "omschrijving" => "Het opgegeven klant-id kon niet worden gevonden.",
1058
- "code" => self::BUCKAROO_FAILED,
1059
- "type" => "batch")),
1060
- 800 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is nog niet volledig verwerkt.",
1061
- "code" => self::BUCKAROO_NEUTRAL,
1062
- "type" => "ideal")),
1063
- 801 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is met succes verwerkt.",
1064
- "code" => self::BUCKAROO_SUCCESS,
1065
- "type" => "ideal")),
1066
- 802 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is door de consument geannuleerd. Trx: [waarde]",
1067
- "code" => self::BUCKAROO_FAILED,
1068
- "type" => "ideal")),
1069
- 803 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is niet binnen de maximale toegestane tijd uitgevoerd. Trx: [waarde]",
1070
- "code" => self::BUCKAROO_FAILED,
1071
- "type" => "ideal")),
1072
- 804 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is om onbekende reden bij de bank mislukt. Trx: [waarde]",
1073
- "code" => self::BUCKAROO_FAILED,
1074
- "type" => "ideal")),
1075
- 810 => array( '*'=>array( "omschrijving" => "Issuer (bank) is onbekend: [waarde]",
1076
- "code" => self::BUCKAROO_FAILED,
1077
- "type" => "ideal")),
1078
- 811 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij de bank worden achterhaald. De transactie is nog niet afgerond.",
1079
- "code" => self::BUCKAROO_NEUTRAL,
1080
- "type" => "ideal")),
1081
- 812 => array( '*'=>array( "omschrijving" => "De entrance-code [waarde] is ongeldig.",
1082
- "code" => self::BUCKAROO_FAILED,
1083
- "type" => "ideal")),
1084
- 813 => array( '*'=>array( "omschrijving" => "Acquirer-code is onbekend: [waarde].",
1085
- "code" => self::BUCKAROO_FAILED,
1086
- "type" => "ideal")),
1087
- 814 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden. We zullen deze zo snel mogelijk verhelpen. De status zal daarna worden herzien.",
1088
- "code" => self::BUCKAROO_NEUTRAL,
1089
- "type" => "ideal")),
1090
- 815 => array( '*'=>array( "omschrijving" => "Op dit moment is de betaalmethode iDEAL niet beschikbaar wegens een storing bij de bank.",
1091
- "code" => self::BUCKAROO_FAILED,
1092
- "type" => "ideal")),
1093
- 816 => array( '*'=>array( "omschrijving" => "Er kon geen transactie worden gevonden. Criteria: [waarde]",
1094
- "code" => self::BUCKAROO_FAILED,
1095
- "type" => "ideal")),
1096
- 820 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is nog niet volledig verwerkt.",
1097
- "code" => self::BUCKAROO_NEUTRAL,
1098
- "type" => "ideal")),
1099
- 821 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is met succes verwerkt.",
1100
- "code" => self::BUCKAROO_SUCCESS,
1101
- "type" => "ideal")),
1102
- 822 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is door de consument geannuleerd. Trx: [waarde]",
1103
- "code" => self::BUCKAROO_FAILED,
1104
- "type" => "ideal")),
1105
- 823 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is niet binnen de maximale toegestane tijd uitgevoerd. Trx: [waarde]",
1106
- "code" => self::BUCKAROO_FAILED,
1107
- "type" => "ideal")),
1108
- 824 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is door de bank afgewezen.",
1109
- "code" => self::BUCKAROO_FAILED,
1110
- "type" => "ideal")),
1111
- 830 => array( '*'=>array( "omschrijving" => "Issuer (bankleitzahl) is onbekend: [waarde]",
1112
- "code" => self::BUCKAROO_FAILED,
1113
- "type" => "ideal")),
1114
- 831 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij de bank worden achterhaald. De transactie is nog niet afgerond.",
1115
- "code" => self::BUCKAROO_NEUTRAL,
1116
- "type" => "ideal")),
1117
- 833 => array( '*'=>array( "omschrijving" => "De entrance-code [waarde] is ongeldig.",
1118
- "code" => self::BUCKAROO_FAILED,
1119
- "type" => "ideal")),
1120
- 834 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden. We zullen deze zo snel mogelijk verhelpen. De status zal daarna worden herzien.",
1121
- "code" => self::BUCKAROO_FAILED,
1122
- "type" => "ideal")),
1123
- 835 => array( '*'=>array( "omschrijving" => "Het Giropay transactie-id is ongeldig of niet beschikbaar.",
1124
- "code" => self::BUCKAROO_FAILED,
1125
- "type" => "ideal")),
1126
- 836 => array( '*'=>array( "omschrijving" => "Er kon geen transactie worden gevonden. Criteria: [waarde]",
1127
- "code" => self::BUCKAROO_FAILED,
1128
- "type" => "ideal")),
1129
- 871 => array( '*'=>array( "omschrijving" => "De refund voor deze iDeal-cardbetaling is verwerkt.",
1130
- "code" => self::BUCKAROO_NEUTRAL,
1131
- "type" => "ideal")),
1132
- 872 => array( '*'=>array( "omschrijving" => "De refund voor deze iDeal-cardbetaling is mislukt.",
1133
- "code" => self::BUCKAROO_NEUTRAL,
1134
- "type" => "ideal")),
1135
- 873 => array( '*'=>array( "omschrijving" => "De refund voor deze GiroPay-cardbetaling is verwerkt.",
1136
- "code" => self::BUCKAROO_NEUTRAL,
1137
- "type" => "ideal")),
1138
- 874 => array( '*'=>array( "omschrijving" => "De refund voor deze GiroPay-betaling is mislukt.",
1139
- "code" => self::BUCKAROO_NEUTRAL,
1140
- "type" => "ideal")),
1141
- 900 => array( '*'=>array( "omschrijving" => "Geen XML-bericht ontvangen.",
1142
- "code" => self::BUCKAROO_FAILED,
1143
- "type" => "xml")),
1144
- 901 => array( '*'=>array( "omschrijving" => "Ongeldig XML-bericht. [waarde]",
1145
- "code" => self::BUCKAROO_FAILED,
1146
- "type" => "xml")),
1147
- 910 => array( '*'=>array( "omschrijving" => "0 EUR transactie, Customergegevens opgeslagen.",
1148
- "code" => self::BUCKAROO_FAILED,
1149
- "type" => "xml")),
1150
- 931 => array( '*'=>array( "omschrijving" => "[nodetype] [element] ontbreekt.",
1151
- "code" => self::BUCKAROO_FAILED,
1152
- "type" => "xml")),
1153
- 932 => array( '*'=>array( "omschrijving" => "Teveel elementen type [element] (max. 1).",
1154
- "code" => self::BUCKAROO_FAILED,
1155
- "type" => "xml")),
1156
- 933 => array( '*'=>array( "omschrijving" => "Waarde [nodetype] [element] ontbreekt.",
1157
- "code" => self::BUCKAROO_FAILED,
1158
- "type" => "xml")),
1159
- 934 => array( '*'=>array( "omschrijving" => "Waarde [nodetype] [element] (occurance [occurance]) ontbreekt.",
1160
- "code" => self::BUCKAROO_FAILED,
1161
- "type" => "xml")),
1162
- 935 => array( '*'=>array( "omschrijving" => "Waarde attribuut [attribuut] ontbreekt in element [element].",
1163
- "code" => self::BUCKAROO_FAILED,
1164
- "type" => "xml")),
1165
- 940 => array( '*'=>array( "omschrijving" => "Ongeldig request: [waarde].",
1166
- "code" => self::BUCKAROO_FAILED,
1167
- "type" => "xml")),
1168
- 941 => array( '*'=>array( "omschrijving" => "Waarde veld [veld] ongeldig: [waarde].",
1169
- "code" => self::BUCKAROO_FAILED,
1170
- "type" => "xml")),
1171
- 942 => array( '*'=>array( "omschrijving" => "Waarde attribuut [veld] ongeldig: [waarde].",
1172
- "code" => self::BUCKAROO_FAILED,
1173
- "type" => "xml")),
1174
- 943 => array( '*'=>array( "omschrijving" => "Creditcard-type onbekend: [waarde]. (mastercard of visa)",
1175
- "code" => self::BUCKAROO_FAILED,
1176
- "type" => "xml")),
1177
- 944 => array( '*'=>array( "omschrijving" => "Kaartnummer ongeldig (Luhn-check): [waarde].",
1178
- "code" => self::BUCKAROO_FAILED,
1179
- "type" => "xml")),
1180
- 945 => array( '*'=>array( "omschrijving" => "Valuta onbekend ongeldig: [waarde].",
1181
- "code" => self::BUCKAROO_FAILED,
1182
- "type" => "xml")),
1183
- 946 => array( '*'=>array( "omschrijving" => "Bedrag is geen numerieke waarde: [waarde].",
1184
- "code" => self::BUCKAROO_FAILED,
1185
- "type" => "xml")),
1186
- 947 => array( '*'=>array( "omschrijving" => "Bedrag ongeldig: [waarde].",
1187
- "code" => self::BUCKAROO_FAILED,
1188
- "type" => "xml")),
1189
- 948 => array( '*'=>array( "omschrijving" => "CVC-code ongeldig: [waarde].",
1190
- "code" => self::BUCKAROO_FAILED,
1191
- "type" => "xml")),
1192
- 949 => array( '*'=>array( "omschrijving" => "Maand geldigheidsduur creditcard ongeldig: [waarde].",
1193
- "code" => self::BUCKAROO_FAILED,
1194
- "type" => "xml")),
1195
- 950 => array( '*'=>array( "omschrijving" => "Jaar geldigheidsduur creditcard ongeldig: [waarde].",
1196
- "code" => self::BUCKAROO_FAILED,
1197
- "type" => "xml")),
1198
- 951 => array( '*'=>array( "omschrijving" => "Taal onbekend of niet ondersteund: [waarde].",
1199
- "code" => self::BUCKAROO_FAILED,
1200
- "type" => "xml")),
1201
- 952 => array( '*'=>array( "omschrijving" => "Het factuurnummer ontbreekt. Dit veld is verplicht.",
1202
- "code" => self::BUCKAROO_FAILED,
1203
- "type" => "xml")),
1204
- 953 => array( '*'=>array( "omschrijving" => "Geblokkeerd door velocitycheck",
1205
- "code" => self::BUCKAROO_FAILED,
1206
- "type" => "xml")),
1207
- 954 => array( '*'=>array( "omschrijving" => "Het transactie-ID [waarde] is al in gebruik.",
1208
- "code" => self::BUCKAROO_FAILED,
1209
- "type" => "xml")),
1210
- 955 => array( '*'=>array( "omschrijving" => "Authenticatie voor deze creditcard betaling is afgewezen",
1211
- "code" => self::BUCKAROO_FAILED,
1212
- "type" => "xml")),
1213
- 956 => array( '*'=>array( "omschrijving" => "De enrolled status van de creditcard kon niet achterhaald worden.",
1214
- "code" => self::BUCKAROO_FAILED,
1215
- "type" => "xml")),
1216
- 960 => array( '*'=>array( "omschrijving" => "Klantnummer ongeldig: [waarde].",
1217
- "code" => self::BUCKAROO_FAILED,
1218
- "type" => "xml")),
1219
- 961 => array( '*'=>array( "omschrijving" => "Creditcard-type niet geactiveerd: [waarde].",
1220
- "code" => self::BUCKAROO_FAILED,
1221
- "type" => "xml")),
1222
- 962 => array( '*'=>array( "omschrijving" => "Gekozen valuta ongeldig voor Merchant: [waarde].",
1223
- "code" => self::BUCKAROO_FAILED,
1224
- "type" => "xml")),
1225
- 963 => array( '*'=>array( "omschrijving" => "Het transactie-id is ongeldig: [waarde]",
1226
- "code" => self::BUCKAROO_FAILED,
1227
- "type" => "xml")),
1228
- 964 => array( '*'=>array( "omschrijving" => "Er zijn geen betaalmethoden geactiveerd.",
1229
- "code" => self::BUCKAROO_FAILED,
1230
- "type" => "xml")),
1231
- 971 => array( '*'=>array( "omschrijving" => "Er is geen naam opgegeven.",
1232
- "code" => self::BUCKAROO_FAILED,
1233
- "type" => "xml")),
1234
- 972 => array( '*'=>array( "omschrijving" => "Er is geen adres opgegeven.",
1235
- "code" => self::BUCKAROO_FAILED,
1236
- "type" => "xml")),
1237
- 973 => array( '*'=>array( "omschrijving" => "Er is geen postcode ingevuld.",
1238
- "code" => self::BUCKAROO_FAILED,
1239
- "type" => "xml")),
1240
- 974 => array( '*'=>array( "omschrijving" => "Er is geen plaats ingevuld.",
1241
- "code" => self::BUCKAROO_FAILED,
1242
- "type" => "xml")),
1243
- 975 => array( '*'=>array( "omschrijving" => "Er is geen land ingevuld.",
1244
- "code" => self::BUCKAROO_FAILED,
1245
- "type" => "xml")),
1246
- 976 => array( '*'=>array( "omschrijving" => "Er is geen geslacht ingevuld.",
1247
- "code" => self::BUCKAROO_FAILED,
1248
- "type" => "xml")),
1249
- 977 => array( '*'=>array( "omschrijving" => "Mailadres ongeldig.",
1250
- "code" => self::BUCKAROO_FAILED,
1251
- "type" => "xml")),
1252
- 978 => array( '*'=>array( "omschrijving" => "De XML koppeling voor creditcards is nog niet geactiveerd.",
1253
- "code" => self::BUCKAROO_FAILED,
1254
- "type" => "xml")),
1255
- 980 => array( '*'=>array( "omschrijving" => "De betaalmethode [waarde] is niet geactiveerd.",
1256
- "code" => self::BUCKAROO_FAILED,
1257
- "type" => "xml")),
1258
- 981 => array( '*'=>array( "omschrijving" => "De datum van het abonnement is geen geldige datum.",
1259
- "code" => self::BUCKAROO_FAILED,
1260
- "type" => "xml")),
1261
- 982 => array( '*'=>array( "omschrijving" => "Het abonnement is nog niet ingegaan.",
1262
- "code" => self::BUCKAROO_FAILED,
1263
- "type" => "xml")),
1264
- 983 => array( '*'=>array( "omschrijving" => "Het abonnement is verlopen.",
1265
- "code" => self::BUCKAROO_FAILED,
1266
- "type" => "xml")),
1267
- 990 => array( '*'=>array( "omschrijving" => "De digitale handtekening is incorrect: [waarde].",
1268
- "code" => self::BUCKAROO_FAILED,
1269
- "type" => "xml")),
1270
- 991 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden bij het verwerken van de transactie. De Merchant Account Code kon niet worden gelocaliseerd.",
1271
- "code" => self::BUCKAROO_FAILED,
1272
- "type" => "xml")),
1273
- 992 => array( '*'=>array( "omschrijving" => "Er is fout opgetreden bij het verwerken van de response. We zullen de storing zo snel mogelijk verhelpen.",
1274
- "code" => self::BUCKAROO_FAILED,
1275
- "type" => "xml")),
1276
- 993 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden bij het verwerken van de transactie. We zullen de storing zo snel mogelijk verhelpen.",
1277
- "code" => self::BUCKAROO_FAILED,
1278
- "type" => "xml")),
1279
- 999 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden waarvan de oorzaak vooralsnog onbekend is. We zullen de storing zo snel mogelijk verhelpen.",
1280
- "code" => self::BUCKAROO_FAILED))
1281
- );
1282
  }
22
 
23
  class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abstract
24
  {
25
+ const BUCKAROO_SUCCESS = 'BUCKAROO_SUCCESS';
26
  const BUCKAROO_FAILED = 'BUCKAROO_FAILED';
27
  const BUCKAROO_ERROR = 'BUCKAROO_ERROR';
28
  const BUCKAROO_NEUTRAL = 'BUCKAROO_NEUTRAL';
30
  const BUCKAROO_INCORRECT_PAYMENT = 'BUCKAROO_INCORRECT_PAYMENT';
31
  const BUCKAROO_REJECTED = 'BUCKAROO_REJECTED';
32
 
 
33
  /**
34
  * @var Mage_Sales_Model_Order $_order
35
  */
36
  protected $_order = '';
37
+ protected $_debugEmail;
38
+ protected $_billingInfo = '';
39
+ protected $_session = '';
40
  protected $_storeId = '';
41
 
42
+ /**
43
+ * List of possible response codes sent by buckaroo.
44
+ * This is the list for the BPE 3.0 gateway.
45
+ */
46
+ public $responseCodes = array(
47
+ 190 => array(
48
+ 'message' => 'Success',
49
+ 'status' => self::BUCKAROO_SUCCESS,
50
+ ),
51
+ 490 => array(
52
+ 'message' => 'Payment failure',
53
+ 'status' => self::BUCKAROO_FAILED,
54
+ ),
55
+ 491 => array(
56
+ 'message' => 'Validation error',
57
+ 'status' => self::BUCKAROO_FAILED,
58
+ ),
59
+ 492 => array(
60
+ 'message' => 'Technical error',
61
+ 'status' => self::BUCKAROO_ERROR,
62
+ ),
63
+ 690 => array(
64
+ 'message' => 'Payment rejected',
65
+ 'status' => self::BUCKAROO_REJECTED,
66
+ ),
67
+ 790 => array(
68
+ 'message' => 'Waiting for user input',
69
+ 'status' => self::BUCKAROO_PENDING_PAYMENT,
70
+ ),
71
+ 791 => array(
72
+ 'message' => 'Waiting for processor',
73
+ 'status' => self::BUCKAROO_PENDING_PAYMENT,
74
+ ),
75
+ 792 => array(
76
+ 'message' => 'Waiting on consumer action',
77
+ 'status' => self::BUCKAROO_PENDING_PAYMENT,
78
+ ),
79
+ 793 => array(
80
+ 'message' => 'Payment on hold',
81
+ 'status' => self::BUCKAROO_PENDING_PAYMENT,
82
+ ),
83
+ 890 => array(
84
+ 'message' => 'Cancelled by consumer',
85
+ 'status' => self::BUCKAROO_FAILED,
86
+ ),
87
+ 891 => array(
88
+ 'message' => 'Cancelled by merchant',
89
+ 'status' => self::BUCKAROO_FAILED,
90
+ ),
91
+ );
92
+
93
+ /**
94
+ * Retrieves instance of the last used order
95
+ */
96
+ protected function _loadLastOrder()
97
+ {
98
+ if (!empty($this->_order)) {
99
+ return;
100
+ }
101
+
102
+ $session = Mage::getSingleton('checkout/session');
103
+ $orderId = $session->getLastRealOrderId();
104
+ if (!empty($orderId)) {
105
  $this->_order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
106
+ }
107
 
108
  return $this;
109
+ }
110
 
111
+ public function setOrder($order) {
112
+ $this->_order = $order;
113
 
114
  return $this;
115
+ }
116
 
117
+ public function getOrder()
118
+ {
119
+ return $this->_order;
120
+ }
121
 
122
+ public function setLastOrder($order)
123
+ {
124
+ $this->_order = $order;
125
 
126
  return $this;
127
+ }
128
 
129
+ public function getLastOrder()
130
+ {
131
+ return $this->_order;
132
+ }
133
 
134
+ public function setDebugEmail($debugEmail)
135
+ {
136
+ $this->_debugEmail = $debugEmail;
137
 
138
  return $this;
139
+ }
140
 
141
+ public function getDebugEmail()
142
+ {
143
+ return $this->_debugEmail;
144
+ }
145
 
146
+ public function setBillingInfo($billingInfo)
147
+ {
148
+ $this->_billingInfo = $billingInfo;
149
 
150
  return $this;
151
+ }
152
 
153
+ public function getBillingInfo()
154
+ {
155
+ return $this->_billingInfo;
156
+ }
157
 
158
+ public function setSession($session)
159
+ {
160
+ $this->_session = $session;
161
 
162
  return $this;
163
+ }
164
 
165
+ public function getSession()
166
+ {
167
+ return $this->_session;
168
+ }
169
 
170
  public function setStoreId($storeId)
171
  {
179
  return $this->_storeId;
180
  }
181
 
182
+ public function __construct($debugEmail = false)
183
+ {
184
+ if (strpos(dirname(__FILE__), DS .'Model') !== false) {
185
+ $dir = str_replace(DS .'Model', DS .'certificate', dirname(__FILE__));
186
+ } else {
187
+ $dir = str_replace(
188
+ DS
189
+ .'includes'
190
+ . DS
191
+ . 'src',
192
+ DS
193
+ . 'app'
194
+ . DS
195
+ . 'code'
196
+ . DS
197
+ . 'community'
198
+ . DS
199
+ . 'TIG'
200
+ . DS
201
+ . 'Buckaroo3Extended'
202
+ . DS
203
+ . 'certificate',
204
+ dirname(__FILE__)
205
+ );
206
+ }
207
+
208
+ if (!defined('CERTIFICATE_DIR')) {
209
+ define('CERTIFICATE_DIR', $dir);
210
+ }
211
+
212
+ $this->_loadLastOrder();
213
+
214
+ if (!Mage::helper('buckaroo3extended')->isAdmin()) {
215
+ $this->setSession(Mage::getSingleton('checkout/session'));
216
+ } else {
217
+ $this->setSession(Mage::getSingleton('core/session'));
218
+ }
219
+ $this->_setOrderBillingInfo();
220
+
221
+ if ($debugEmail) {
222
+ $this->setDebugEmail($debugEmail);
223
+ } else {
224
+ $this->setDebugEmail('');
225
+ }
226
 
227
  if (!Mage::helper('buckaroo3extended')->isAdmin() && !Mage::registry('buckaroo_push-error')) {
228
+ $this->_checkExpired();
229
+ }
230
 
231
  if ($this->getOrder()) {
232
  $this->setStoreId($this->getOrder()->getStoreId());
233
  } else {
234
  $this->setStoreId(Mage::app()->getStore()->getId());
235
  }
236
+ }
237
+
238
+ /**
239
+ * Checks if the order object is still there. Prevents errors when session has expired.
240
+ */
241
+ protected function _checkExpired()
242
+ {
243
+ if (empty($this->_order)) {
244
+ $returnUrl = Mage::getUrl(Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/failure_redirect', $this->getStoreId()));
245
+ header('location:' . $returnUrl);
246
+ }
247
+ }
248
 
249
  public function setOrderBillingInfo() {
250
  return $this->_setOrderBillingInfo();
251
  }
252
 
253
+ /**
254
+ * retrieve billing information from order
255
+ *
256
+ */
257
+ protected function _setOrderBillingInfo()
258
+ {
259
+ if (empty($this->_order)) {
260
+ return false;
261
+ }
262
+ $billingAddress = $this->_order->getBillingAddress();
263
+
264
+ $firstname = $billingAddress->getFirstname();
265
+ $lastname = $billingAddress->getLastname();
266
+ $city = $billingAddress->getCity();
267
+ $state = $billingAddress->getState();
268
+ $address = $billingAddress->getStreetFull();
269
+ $zip = $billingAddress->getPostcode();
270
+ $email = $this->_order->getCustomerEmail();
271
+ $telephone = $billingAddress->getTelephone();
272
+ $fax = $billingAddress->getFax();
273
+ $countryCode = $billingAddress->getCountry();
274
 
275
  $billingInfo = array(
276
+ 'firstname' => $firstname,
277
+ 'lastname' => $lastname,
278
+ 'city' => $city,
279
+ 'state' => $state,
280
+ 'address' => $address,
281
+ 'zip' => $zip,
282
+ 'email' => $email,
283
+ 'telephone' => $telephone,
284
+ 'fax' => $fax,
285
+ 'countryCode' => $countryCode
286
  );
287
 
288
  $this->setBillingInfo($billingInfo);
289
 
290
  return $this;
291
+ }
292
 
293
+ /**
294
+ * Restores a previously closed quote so that the cart stays filled after an unsuccessfull order
295
+ */
296
  public function restoreQuote()
297
  {
298
+ $quoteId = $this->_order->getQuoteId();
299
 
300
  $quote = Mage::getModel('sales/quote')
301
  ->load($quoteId)
306
  }
307
 
308
  /**
309
+ * Empties the cart after a successfull order. To prevent the cart from staying filled when the user
310
+ * has a modified shop that doesn't automatically clear the cart when placing an order.
311
  */
312
  public function emptyCart()
313
  {
334
  * @return array
335
  */
336
  protected function _determineAmountAndCurrency()
337
+ {
338
+ $code = $this->_order->getPayment()->getMethod();
339
+
340
+ // availability currency codes for this Payment Module
341
+ switch($code)
342
+ {
343
+ case 'buckaroo3extended_ideal':
344
+ case 'buckaroogiftcard':
345
+ case 'buckaroo2012giftcard':
346
+ case 'buckarooideal':
347
+ case 'buckaroo':
348
+ case 'buckaroo2012ideal': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_ideal_paymentMethod');
349
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_ideal/allowed_currencies', $this->getStoreId());
350
+ break;
351
+ case 'buckaroo3extended_visa':
352
+ case 'buckaroocc':
353
+ case 'buckaroo2012creditcard': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_visa_paymentMethod');
354
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_visa/allowed_currencies', $this->getStoreId());
355
+ break;
356
+ case 'buckaroo3extended_amex': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_amex_paymentMethod');
357
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_amex/allowed_currencies', $this->getStoreId());
358
+ break;
359
+ case 'buckaroo3extended_mastercard':
360
+ case 'mastercard': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_mastercard_paymentMethod');
361
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_mastercard/allowed_currencies', $this->getStoreId());
362
+ break;
363
+ case 'buckaroo3extended_directdebit':
364
+ case 'buckaroocollect':
365
+ case 'buckaroo2012machtiging': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_directdebit_paymentMethod');
366
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_directdebit/allowed_currencies', $this->getStoreId());
367
+ break;
368
+ case 'buckaroo3extended_paypal':
369
+ case 'buckaroopaypal':
370
+ case 'buckaroo2012paypal': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_paypal_paymentMethod');
371
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_paypal/allowed_currencies', $this->getStoreId());
372
+ break;
373
+ case 'buckaroo3extended_transfer':
374
+ case 'buckarootransfer':
375
+ case 'buckaroo2012overschrijving': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_transfer_paymentMethod');
376
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_transfer/allowed_currencies', $this->getStoreId());
377
+ break;
378
+ case 'buckaroo3extended_paymentguarantee':
379
+ case 'buckarootransfergarant':
380
+ case 'buckaroo2012betaalgarant': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_paymentguarantee_paymentMethod');
381
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_paymentguarantee/allowed_currencies', $this->getStoreId());
382
+ break;
383
+ case 'buckaroo3extended_giropay':
384
+ case 'buckaroogiropay':
385
+ case 'buckaroo2012giropay': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_giropay_paymentMethod');
386
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_giropay/allowed_currencies', $this->getStoreId());
387
+ break;
388
+ case 'buckaroo3extended_paysafecard':
389
+ case 'buckaroocashticket':
390
+ case 'buckaroopaysafecard':
391
+ case 'buckaroo2012cashticketpaysafecard': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_paysafecard_paymentMethod');
392
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_paysafecard/allowed_currencies', $this->getStoreId());
393
+ break;
394
+ case 'buckaroo3extended_payperemail':
395
+ case 'buckaroopayperemail':
396
+ case 'buckaroo2012payperemail': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_payperemail_paymentMethod');
397
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_payperemail/allowed_currencies', $this->getStoreId());
398
+ break;
399
+ case 'buckaroo3extended_sofortueberweisung': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_sofortueberweisung_paymentMethod');
400
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_sofortueberweisung/allowed_currencies', $this->getStoreId());
401
+ break;
402
+ default: $paymentMethod = null;
403
+ $currenciesAllowedConfig = 'EUR';
404
+ }
405
+
406
+ if (!is_null($paymentMethod)) {
407
+ $currenciesAllowed = $paymentMethod->allowedCurrencies;
408
+ } else {
409
+ $currenciesAllowed = array('EUR');
410
+ }
411
+ $currenciesAllowedConfig = explode(',', $currenciesAllowedConfig);
412
+
413
+ $currentCurrency = Mage::app()->getStore()->getCurrentCurrencyCode();
414
+
415
+ // currency is not available for this module
416
  if (in_array($currentCurrency, $currenciesAllowed)
417
  && in_array($currentCurrency, $currenciesAllowedConfig))
418
  {
423
  $currency = $this->_order->getBaseCurrency()->getCode();
424
  }
425
 
426
+ return array($currency, $totalAmount);
427
+ }
428
+
429
+ /**
430
+ * get locale based on country
431
+ * locale is formatted as language-LOCALE
432
+ *
433
+ * @return array
434
+ */
435
+ protected function _getLocale()
436
+ {
437
  $country = $this->_order->getBillingAddress()->getCountry();
438
 
439
  $locale = Mage::getStoreConfig('general/locale/code', $this->_order->getStoreId());
440
  $locale = str_replace('_', '-', $locale);
441
  $lang = strtoupper(substr($locale, 0, 2));
442
 
443
+ return array($country, $locale, $lang);
444
+ }
445
 
446
 
447
 
454
  *
455
  * @return array $returnArray
456
  */
457
+ protected function _parseResponse()
458
+ {
459
+ $code = $this->_response->Status->Code->Code;
460
 
461
+ if (!isset($this->responseCodes[$code]))
462
+ {
463
  return array(
464
  'message' => 'Onbekende responsecode: ' . $code,
465
  'status' => self::BUCKAROO_NEUTRAL
466
  );
467
+ }
468
 
469
  $returnArray = $this->responseCodes[$code];
470
  if (is_object($this->_response)
481
  $returnArray['code'] = $code;
482
 
483
  return $returnArray;
484
+ }
485
 
486
  /**
487
  * Retrieves an array with information related to a received response code.
493
  * @return array|bool
494
  */
495
  protected function _parsePostResponse($code)
496
+ {
497
+ $isCorrect = $this->_checkCorrectAmount();
498
+
499
+ if ($isCorrect !== true) {
500
+ return $isCorrect;
501
+ }
502
+
503
+ if (isset($this->responseCodes[$code]))
504
+ {
505
+ $returnArray = $this->responseCodes[$code];
506
+
507
+ if ($this->_response) {
508
+ $returnArray['code'] = $code;
509
+ }
510
+
511
+ return $returnArray;
512
+ } elseif (isset($this->oldResponseCodes[$code])) {
513
+ return array(
514
+ 'message' => $this->oldResponseCodes[$code]['*']['omschrijving'],
515
+ 'status' => $this->oldResponseCodes[$code]['*']['code'],
516
+ 'code' => $code
517
+ );
518
+ } else {
519
+ return array(
520
+ 'message' => 'Onbekende responsecode: ' . $code,
521
+ 'status' => self::BUCKAROO_NEUTRAL,
522
+ 'code' => $code,
523
+ );
524
+ }
525
+ }
526
+
527
+ /**
528
+ * Checks if the correct amount has been paid.
529
+ */
530
+ protected function _checkCorrectAmount()
531
+ {
532
+ $amountPaid = $this->_postArray['brq_amount'];
533
 
534
  $this->_debugEmail .= 'Currency used is '
535
  . $this->_postArray['brq_currency']
537
  . $this->_order->getOrderCurrencyCode()
538
  . ".\n";
539
 
540
+ if ($this->_postArray['brq_currency'] == $this->_order->getOrderCurrencyCode()) {
541
+ $this->_debugEmail .= "Currency used is same as order currency \n";
542
+ $amountOrdered = $this->_order->getGrandTotal();
543
+ } else {
544
  $this->_debugEmail .= "Currency used is different from order currency \n";
545
+ $amountOrdered = $this->_order->getBaseGrandTotal();
546
+ }
547
 
548
  $this->_debugEmail .= "Amount paid: {$amountPaid}. Amount ordered: {$amountOrdered} \n";
549
 
550
+ if (($amountPaid - $amountOrdered) > 0.01 || ($amountPaid - $amountOrdered) < -0.01) {
551
+ return array(
552
  'message' => 'Incorrect amount transfered',
553
  'status' => self::BUCKAROO_INCORRECT_PAYMENT,
554
+ );
555
+ } else {
556
+ return true;
557
+ }
558
+ }
559
+
560
+ /**
561
+ * cleans all elements in the array per instructions from Buckaroo PSP
562
+ *
563
+ * @param array $array
564
+ * @return array $cleanArray
565
+ */
566
  public function _cleanArrayForSoap($array)
567
  {
568
+ $cleanArray = array();
569
 
570
+ foreach ($array as $key => $value) {
571
+ $value = str_replace('\r', ' ', $value);
572
+ $value = str_replace('\n', ' ', $value);
573
+ $cleanArray[$key] = $value;
574
  }
575
 
576
  return $cleanArray;
579
  /**
580
  * function which converts special characters to html numeric equivalents
581
  */
582
+ public function htmlNumeric($string) {
583
+ preg_match_all('/[^\!-\~\s]/', $string, $specialChars);
584
+ if ($specialChars) {
585
+ foreach ($specialChars[0] as $char) {
586
+ $newChar = ord($char);
587
+ $numericChars[] = '&#'.$newChar.';';
588
+ $patterns[] = "/{$char}/";
589
+ }
590
+ if (isset($numericChars) && isset($patterns)) {
591
+ $string = preg_replace($patterns, $numericChars, $string);
592
+ }
593
+ }
594
+ return $string;
595
+ }
596
+
597
+ public function log($message, $force = false)
598
+ {
599
+ Mage::helper('buckaroo3extended')->log($message, $force);
600
+ }
601
+
602
+ public function logException($e)
603
+ {
604
+ Mage::helper('buckaroo3extended')->logException($e);
605
+ }
606
+
607
+ public function sendDebugEmail()
608
+ {
609
+ $debugEmailConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/debug_email', $this->getStoreId());
610
+ if (empty($debugEmailConfig))
611
+ {
612
+ return;
613
+ }
614
+
615
+ $mail = $this->_debugEmail;
616
+
617
+ $recipients = explode(',', Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/debug_email', $this->getStoreId()));
618
+
619
+ foreach($recipients as $recipient) {
620
+ mail(
621
+ trim($recipient),
622
+ 'Buckaroo 3 Extended Debug Email',
623
+ $mail
624
+ );
625
+ }
626
+ }
627
+
628
+ public function buckarooSort($array)
629
  {
630
  $arrayToSort = array();
631
  $origArray = array();
645
  return $sortedArray;
646
  }
647
 
648
+ protected function _updateRefundedOrderStatus($success = false)
649
+ {
650
+ $successString = $success ? 'success' : 'failed';
651
  if (!is_object($this->_order)) {
652
  return $this;
653
  }
654
+ $state = $this->_order->getState();
655
+
656
+ if ($success) {
657
+ $comment = 'Buckaroo refund request was successfully processed.';
658
+ } else {
659
+ $comment = 'Unfortunately the Buckaroo refund request could not be processed succesfully.';
660
+ }
661
+
662
+ if ($this->_order->getBaseGrandTotal() != $this->_order->getBaseTotalRefunded()) {
663
+ $configField = "buckaroo/buckaroo3extended_refund/order_status_partial_{$state}_{$successString}";
664
+ $status = Mage::getStoreConfig($configField);
665
+ } else {
666
+ $status = null;
667
+ }
668
+
669
+ if (!empty($status)) {
670
+ $this->_order->setStatus($status)->save();
671
+ $this->_order->addStatusHistoryComment($comment, $status)
672
+ ->save();
673
+ } else {
674
+ $this->_order->addStatusHistoryComment($comment)
675
+ ->save();
676
+ }
677
+ }
678
 
679
  /**
680
  * Long list of response codes used by BPE 2.0 gateway. Added here for backwards compatibility. Added
681
  * to the bottem of the page so it doesn't take up as much space
682
  */
683
+ public $oldResponseCodes = array(
684
+ 0 => array( '*'=>array( "omschrijving" => "De credit card transactie is pending.",
685
+ "code" => self::BUCKAROO_NEUTRAL,
686
+ "type" => "creditcard")),
687
+ 001 => array( '*'=>array( "omschrijving" => "De credit card transactie is pending. De MPI-status van de klant wordt gecheckt.",
688
+ "code" => self::BUCKAROO_NEUTRAL,
689
+ "type" => "creditcard")),
690
+ 070 => array( '*'=>array( "omschrijving" => "De refund is nog niet verwerkt.",
691
+ "code" => self::BUCKAROO_NEUTRAL,
692
+ "type" => "creditcard")),
693
+ 071 => array( '*'=>array( "omschrijving" => "De refund is succesvol verwerkt.",
694
+ "code" => self::BUCKAROO_NEUTRAL,
695
+ "type" => "creditcard")),
696
+ 072 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden bij het refunden.",
697
+ "code" => self::BUCKAROO_NEUTRAL,
698
+ "type" => "creditcard")),
699
+ 073 => array( '*'=>array( "omschrijving" => "De refund is geannuleerd.",
700
+ "code" => self::BUCKAROO_NEUTRAL,
701
+ "type" => "creditcard")),
702
+ 100 => array( '*'=>array( "omschrijving" => "De transactie is door de credit-maatschappij goedgekeurd.",
703
+ "code" => self::BUCKAROO_SUCCESS,
704
+ "type" => "creditcard")),
705
+ 101 => array( '*'=>array( "omschrijving" => "De transactie is door de credit-maatschappij afgekeurd.",
706
+ "code" => self::BUCKAROO_FAILED,
707
+ "type" => "creditcard")),
708
+ 102 => array( '*'=>array( "omschrijving" => "De transactie is mislukt. Er is een fout opgetreden in de verwerking bij de creditmaatschappij.",
709
+ "code" => self::BUCKAROO_FAILED,
710
+ "type" => "creditcard")),
711
+ 103 => array( '*'=>array( "omschrijving" => "Deze creditcardtransactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
712
+ "code" => self::BUCKAROO_FAILED,
713
+ "type" => "creditcard")),
714
+ 104 => array( '*'=>array( "omschrijving" => "De kaart is verlopen.",
715
+ "code" => self::BUCKAROO_FAILED,
716
+ "type" => "creditcard")),
717
+ 120 => array( '*'=>array( "omschrijving" => "Deze PayPal transactie is nog niet volledig verwerkt.",
718
+ "code" => self::BUCKAROO_NEUTRAL,
719
+ "type" => "paypal")),
720
+ 121 => array( '*'=>array( "omschrijving" => "Transactiestatus: autorisatie geslaagd.",
721
+ "code" => self::BUCKAROO_SUCCESS,
722
+ "type" => "paypal")),
723
+ 122 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is door de consument geannuleerd.",
724
+ "code" => self::BUCKAROO_FAILED,
725
+ "type" => "paypal")),
726
+ 123 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
727
+ "code" => self::BUCKAROO_FAILED,
728
+ "type" => "paypal")),
729
+ 124 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is om onbekende reden bij PayPal mislukt.",
730
+ "code" => self::BUCKAROO_FAILED,
731
+ "type" => "paypal")),
732
+ 125 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is niet geaccepteerd.",
733
+ "code" => self::BUCKAROO_NEUTRAL,
734
+ "type" => "paypal")),
735
+ 126 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is in afwachting.",
736
+ "code" => self::BUCKAROO_NEUTRAL,
737
+ "type" => "paypal")),
738
+ 135 => array( '*'=>array( "omschrijving" => "Deze PayPal-transactie is nog niet volledig verwerkt.",
739
+ "code" => self::BUCKAROO_NEUTRAL,
740
+ "type" => "paypal")),
741
+ 136 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij PayPal worden achterhaald. De transactie is mogelijk nog niet afgerond",
742
+ "code" => self::BUCKAROO_NEUTRAL,
743
+ "type" => "paypal")),
744
+ 137 => array( '*'=>array( "omschrijving" => "De afschrijvingscode is ongeldig.",
745
+ "code" => self::BUCKAROO_FAILED,
746
+ "type" => "paypal")),
747
+ 138 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden.",
748
+ "code" => self::BUCKAROO_FAILED,
749
+ "type" => "paypal")),
750
+ 139 => array( '*'=>array( "omschrijving" => "Het PayPal transactie-ID is ongeldig of niet beschikbaar.",
751
+ "code" => self::BUCKAROO_FAILED,
752
+ "type" => "paypal")),
753
+ 140 => array( '*'=>array( "omschrijving" => "Er kon geen transactie worden gevonden.",
754
+ "code" => self::BUCKAROO_FAILED,
755
+ "type" => "paypal")),
756
+ 150 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is nog niet volledig verwerkt.",
757
+ "code" => self::BUCKAROO_NEUTRAL,
758
+ "type" => "paypal")),
759
+ 151 => array( '*'=>array( "omschrijving" => "Transactiestatus: authorisatie geslaagd.",
760
+ "code" => self::BUCKAROO_SUCCESS,
761
+ "type" => "paypal")),
762
+ 152 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is door de consument geannuleerd.",
763
+ "code" => self::BUCKAROO_FAILED,
764
+ "type" => "paypal")),
765
+ 153 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
766
+ "code" => self::BUCKAROO_FAILED,
767
+ "type" => "paypal")),
768
+ 155 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is niet geaccepteerd.",
769
+ "code" => self::BUCKAROO_FAILED,
770
+ "type" => "paypal")),
771
+ 156 => array( '*'=>array( "omschrijving" => "Deze Paysafecard-transactie is nog niet volledig verwerkt.",
772
+ "code" => self::BUCKAROO_NEUTRAL,
773
+ "type" => "paypal")),
774
+ 157 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij Paysafecard worden achterhaald. De transactie is mogelijk nog niet afgerond.",
775
+ "code" => self::BUCKAROO_NEUTRAL,
776
+ "type" => "paypal")),
777
+ 158 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden bij Paysafecard. Onze excuses voor het ongemak.",
778
+ "code" => self::BUCKAROO_FAILED,
779
+ "type" => "paypal")),
780
+ 159 => array( '*'=>array( "omschrijving" => "Het Paysafecard transactie-id is ongeldig of niet beschikbaar.",
781
+ "code" => self::BUCKAROO_FAILED,
782
+ "type" => "paypal")),
783
+ 170 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is nog niet volledig verwerkt.",
784
+ "code" => self::BUCKAROO_NEUTRAL,
785
+ "type" => "paypal")),
786
+ 171 => array( '*'=>array( "omschrijving" => "Transactiestatus: authorisatie geslaagd",
787
+ "code" => self::BUCKAROO_SUCCESS,
788
+ "type" => "creditcard")),
789
+ 172 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is door de consument geannuleerd.",
790
+ "code" => self::BUCKAROO_FAILED,
791
+ "type" => "creditcard")),
792
+ 173 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
793
+ "code" => self::BUCKAROO_FAILED,
794
+ "type" => "creditcard")),
795
+ 175 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is niet geaccepteerd.",
796
+ "code" => self::BUCKAROO_FAILED,
797
+ "type" => "creditcard")),
798
+ 176 => array( '*'=>array( "omschrijving" => "Deze Cash-Ticket transactie is nog niet volledig verwerkt.",
799
+ "code" => self::BUCKAROO_NEUTRAL,
800
+ "type" => "creditcard")),
801
+ 177 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij Cash-Ticket worden achterhaald. De transactie is mogelijk nog niet afgerond.",
802
+ "code" => self::BUCKAROO_NEUTRAL,
803
+ "type" => "creditcard")),
804
+ 178 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden bij Cash-Ticket. Onze excuses voor het ongemak.",
805
+ "code" => self::BUCKAROO_FAILED,
806
+ "type" => "creditcard")),
807
+ 179 => array( '*'=>array( "omschrijving" => "Het Cash-Ticket transactie-id is ongeldig of niet beschikbaar.",
808
+ "code" => self::BUCKAROO_FAILED,
809
+ "type" => "creditcard")),
810
+ 201 => array( '*'=>array( "omschrijving" => "Er is timeout opgetreden bij het verwerken van de transactie.Gebruik de TransactionKey om de verwerkingsstatus nogmaals te controleren.",
811
+ "code" => self::BUCKAROO_NEUTRAL,
812
+ "type" => "creditcard")),
813
+ 203 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. Het creditcardnummer is geblokkeerd.",
814
+ "code" => self::BUCKAROO_FAILED,
815
+ "type" => "creditcard")),
816
+ 204 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. Het ip-adres is geblokkeerd",
817
+ "code" => self::BUCKAROO_FAILED,
818
+ "type" => "creditcard")),
819
+ 205 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. Het land van uitgifte van deze creditcard is geblokkeerd",
820
+ "code" => self::BUCKAROO_FAILED,
821
+ "type" => "creditcard")),
822
+ 206 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. De faktuur [waarde] wordt momenteel of is reeds betaald.",
823
+ "code" => self::BUCKAROO_FAILED,
824
+ "type" => "creditcard")),
825
+ 207 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd. Het maximaal aantal betaalpogingen voor faktuur [waarde] is overschreden.",
826
+ "code" => self::BUCKAROO_FAILED,
827
+ "type" => "creditcard")),
828
+ 242 => array( '*'=>array( "omschrijving" => "Provisie BetaalGarant succesvol verwerkt.",
829
+ "code" => self::BUCKAROO_SUCCESS,
830
+ "type" => "garant")),
831
+ 243 => array( '*'=>array( "omschrijving" => "Provisie incassobureau BetaalGarant succesvol verwerkt.",
832
+ "code" => self::BUCKAROO_SUCCESS,
833
+ "type" => "garant")),
834
+ 244 => array( '*'=>array( "omschrijving" => "Provisie Buckaroo BetaalGarant succesvol verwerkt.",
835
+ "code" => self::BUCKAROO_SUCCESS,
836
+ "type" => "garant")),
837
+ 245 => array( '*'=>array( "omschrijving" => "Toetskosten incassobureau BetaalGarant succesvol verwerkt.",
838
+ "code" => self::BUCKAROO_SUCCESS,
839
+ "type" => "garant")),
840
+ 246 => array( '*'=>array( "omschrijving" => "Btw incassobureau BetaalGarant succesvol verwerkt.",
841
+ "code" => self::BUCKAROO_SUCCESS,
842
+ "type" => "garant")),
843
+ 247 => array( '*'=>array( "omschrijving" => "Btw buckaroo BetaalGarant succesvol verwerkt.",
844
+ "code" => self::BUCKAROO_SUCCESS,
845
+ "type" => "garant")),
846
+ 252 => array( '*'=>array( "omschrijving" => "Kredietwaardigheidcontrole resultaat negatief.",
847
+ "code" => self::BUCKAROO_FAILED,
848
+ "type" => "garant")),
849
+ 254 => array( '*'=>array( "omschrijving" => "Betaalgarant verzoek succesvol verwerkt.",
850
+ "code" => self::BUCKAROO_SUCCESS,
851
+ "type" => "garant")),
852
+ 260 => array( '*'=>array( "omschrijving" => "Kredietwaardigheidcontrole abonnement niet actief.",
853
+ "code" => self::BUCKAROO_FAILED,
854
+ "type" => "garant")),
855
+ 261 => array( '*'=>array( "omschrijving" => "Technische fout opgetreden tijdens kredietwaardigheidcontrole.",
856
+ "code" => self::BUCKAROO_FAILED,
857
+ "type" => "garant")),
858
+ 262 => array( '*'=>array( "omschrijving" => "Verplichte velden voor kredietwaardigheidcontrole ontbreken of zijn onjuist",
859
+ "code" => self::BUCKAROO_FAILED,
860
+ "type" => "garant")),
861
+ 300 => array( '*'=>array("omschrijving" => "Betaling voor deze overschrijving wordt nog verwacht.",
862
+ "code" => self::BUCKAROO_NEUTRAL,
863
+ "type" => "transfer"),
864
+ 'buckarootransfergarant'=>array("omschrijving" => "Uw bestelling is geaccepteerd.",
865
+ "code" => self::BUCKAROO_SUCCESS,
866
+ "type" => "transfer")),
867
+ 301 => array( '*'=>array( "omschrijving" => "De overschrijving is ontvangen.",
868
+ "code" => self::BUCKAROO_SUCCESS,
869
+ "type" => "transfer")),
870
+ 302 => array( '*'=>array( "omschrijving" => "De transactie is geweigerd of afgewezen.",
871
+ "code" => self::BUCKAROO_FAILED,
872
+ "type" => "transfer")),
873
+ 303 => array( '*'=>array( "omschrijving" => "De uiterste betaaldatum voor deze overschrijving is verstreken.",
874
+ "code" => self::BUCKAROO_FAILED,
875
+ "type" => "transfer")),
876
+ 304 => array( '*'=>array( "omschrijving" => "De datum voor ingebrekestelling is verstreken.",
877
+ "code" => self::BUCKAROO_NEUTRAL,
878
+ "type" => "transfer")),
879
+ 305 => array( '*'=>array( "omschrijving" => "Het ontvangen bedrag voor de overschrijving is lager dan het bedrag van de transactie.",
880
+ "code" => 'BUCKAROO_INCORRECT_AMOUNT',
881
+ "type" => "transfer")),
882
+ 306 => array( '*'=>array( "omschrijving" => "Het ontvangen bedrag voor de overschrijving is groter dan het bedrag van de transactie.",
883
+ "code" => 'BUCKAROO_INCORRECT_AMOUNT',
884
+ "type" => "transfer")),
885
+ 309 => array( '*'=>array( "omschrijving" => "De overschrijving is geannuleerd.",
886
+ "code" => self::BUCKAROO_FAILED,
887
+ "type" => "transfer")),
888
+ 345 => array( '*'=>array( "omschrijving" => "Oorspronkelijk transactie-bedrag gedeeld.",
889
+ "code" => self::BUCKAROO_FAILED,
890
+ "type" => "transfer")),
891
+ 371 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is verwerkt.",
892
+ "code" => self::BUCKAROO_NEUTRAL,
893
+ "type" => "creditcard")),
894
+ 372 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is verwerkt.",
895
+ "code" => self::BUCKAROO_NEUTRAL,
896
+ "type" => "transfer")),
897
+ 373 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is verwerkt.",
898
+ "code" => self::BUCKAROO_NEUTRAL,
899
+ "type" => "transfer")),
900
+ 381 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is mislukt.",
901
+ "code" => self::BUCKAROO_NEUTRAL,
902
+ "type" => "transfer")),
903
+ 382 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is mislukt.",
904
+ "code" => self::BUCKAROO_NEUTRAL,
905
+ "type" => "transfer")),
906
+ 383 => array( '*'=>array( "omschrijving" => "De refund voor deze overschrijving is mislukt.",
907
+ "code" => self::BUCKAROO_NEUTRAL,
908
+ "type" => "transfer")),
909
+ 390 => array( '*'=>array( "omschrijving" => "De transactie is buiten Buckaroo om met de klant afgehandeld.",
910
+ "code" => self::BUCKAROO_SUCCESS,
911
+ "type" => "transfer")),
912
+ 392 => array( '*'=>array( "omschrijving" => "Anders betaald.",
913
+ "code" => self::BUCKAROO_SUCCESS,
914
+ "type" => "transfer")),
915
+ 400 => array( '*'=>array( "omschrijving" => "De kadokaart-transactie is nog in behandeling",
916
+ "code" => self::BUCKAROO_NEUTRAL,
917
+ "type" => "giftcard")),
918
+ 401 => array( '*'=>array( "omschrijving" => "De betaling middels kado-kaart is geslaagd.",
919
+ "code" => self::BUCKAROO_SUCCESS,
920
+ "type" => "giftcard")),
921
+ 402 => array( '*'=>array( "omschrijving" => "Betaling middels de kadokaart is afgewezen.",
922
+ "code" => self::BUCKAROO_FAILED,
923
+ "type" => "giftcard")),
924
+ 409 => array( '*'=>array( "omschrijving" => "Betaling middels de kadokaart is geannuleerd.",
925
+ "code" => self::BUCKAROO_FAILED,
926
+ "type" => "giftcard")),
927
+ 403 => array( '*'=>array( "omschrijving" => "Deze Giftcard transactie is niet binnen de maximale, toegestane tijd uitgevoerd.",
928
+ "code" => self::BUCKAROO_FAILED,
929
+ "type" => "giftcard")),
930
+ 404 => array( '*'=>array( "omschrijving" => "Deze Giftcard transactie is om onbekende reden bij de kaartuitgever mislukt.",
931
+ "code" => self::BUCKAROO_FAILED,
932
+ "type" => "giftcard")),
933
+ 409 => array( '*'=>array( "omschrijving" => "Betaling middels de kadokaart is geannuleerd.",
934
+ "code" => self::BUCKAROO_FAILED,
935
+ "type" => "giftcard")),
936
+ 410 => array( '*'=>array( "omschrijving" => "De Merchant Account Code is ongeldig",
937
+ "code" => self::BUCKAROO_FAILED,
938
+ "type" => "giftcard")),
939
+ 411 => array( '*'=>array( "omschrijving" => "De betaling middels kadokaart is voorlopig geaccepteerd.",
940
+ "code" => 'BUCKAROO_PENDINGPAYMENT',
941
+ "type" => "giftcard")),
942
+ 414 => array( '*'=>array( "omschrijving" => "Er is een systeem-fout opgetreden.",
943
+ "code" => self::BUCKAROO_FAILED,
944
+ "type" => "giftcard")),
945
+ 421 => array( '*'=>array( "omschrijving" => "Er is een onbekende Issuer voor de kado-kaart opgegeven.",
946
+ "code" => self::BUCKAROO_FAILED,
947
+ "type" => "giftcard")),
948
+ 422 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden bij de Issuer. De betaling is mislukt. [waarde].",
949
+ "code" => self::BUCKAROO_FAILED,
950
+ "type" => "giftcard")),
951
+ 425 => array( '*'=>array( "omschrijving" => "Niet genoeg saldo om deze transactie uit te voeren.",
952
+ "code" => self::BUCKAROO_FAILED,
953
+ "type" => "giftcard")),
954
+ 461 => array( '*'=>array( "omschrijving" => "Transactie voltooid.",
955
+ "code" => self::BUCKAROO_SUCCESS,
956
+ "type" => "giftcard")),
957
+ 462 => array( '*'=>array( "omschrijving" => "Transactie voltooid.",
958
+ "code" => self::BUCKAROO_SUCCESS,
959
+ "type" => "giftcard")),
960
+ 463 => array( '*'=>array( "omschrijving" => "Transactie voltooid.",
961
+ "code" => self::BUCKAROO_SUCCESS,
962
+ "type" => "giftcard")),
963
+ 464 => array( '*'=>array( "omschrijving" => "Transactie voltooid.",
964
+ "code" => self::BUCKAROO_SUCCESS,
965
+ "type" => "giftcard")),
966
+ 468 => array( '*'=>array( "omschrijving" => "Originele factuur voor deze vordering niet gevonden.",
967
+ "code" => self::BUCKAROO_FAILED,
968
+ "type" => "giftcard")),
969
+ 471 => array( '*'=>array( "omschrijving" => "De refund voor deze giftcardbetaling is verwerkt.",
970
+ "code" => self::BUCKAROO_NEUTRAL,
971
+ "type" => "giftcard")),
972
+ 472 => array( '*'=>array( "omschrijving" => "De refund voor deze giftcardbetaling is mislukt.",
973
+ "code" => self::BUCKAROO_NEUTRAL,
974
+ "type" => "giftcard")),
975
+ 500 => array( '*'=>array( "omschrijving" => "Paypermail: transactie pending",
976
+ "code" => self::BUCKAROO_NEUTRAL,
977
+ "type" => "paypermail")),
978
+ 541 => array( '*'=>array( "omschrijving" => "Transactiekosten zijn verrekend met saldo.",
979
+ "code" => self::BUCKAROO_NEUTRAL,
980
+ "type" => "paypermail")),
981
+ 550 => array( '*'=>array( "omschrijving" => "De uitbetaling is nog niet verwerkt.",
982
+ "code" => self::BUCKAROO_NEUTRAL,
983
+ "type" => "paypermail")),
984
+ 551 => array( '*'=>array( "omschrijving" => "De uitbetaling is succesvol verwerkt.",
985
+ "code" => self::BUCKAROO_SUCCESS,
986
+ "type" => "paypermail")),
987
+ 552 => array( '*'=>array( "omschrijving" => "Transactiekosten zijn verrekend met saldo.",
988
+ "code" => self::BUCKAROO_NEUTRAL,
989
+ "type" => "paypermail")),
990
+ 553 => array( '*'=>array( "omschrijving" => "Transactiekosten zijn verrekend met saldo.",
991
+ "code" => self::BUCKAROO_NEUTRAL,
992
+ "type" => "paypermail")),
993
+ 560 => array( '*'=>array( "omschrijving" => "Correctiebetaling uitgevoerd door Buckaroo.",
994
+ "code" => self::BUCKAROO_NEUTRAL,
995
+ "type" => "paypermail")),
996
+ 581 => array( '*'=>array( "omschrijving" => "Overschrijving van of naar ander Buckaroo-account.",
997
+ "code" => self::BUCKAROO_NEUTRAL,
998
+ "type" => "paypermail")),
999
+ 600 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is nog niet verwerkt.",
1000
+ "code" => self::BUCKAROO_NEUTRAL,
1001
+ "type" => "collect")),
1002
+ 601 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is met succes verwerkt.",
1003
+ "code" => self::BUCKAROO_SUCCESS,
1004
+ "type" => "collect")),
1005
+ 602 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is door de bank afgewezen.",
1006
+ "code" => self::BUCKAROO_FAILED,
1007
+ "type" => "collect")),
1008
+ 605 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is gestorneerd.",
1009
+ "code" => self::BUCKAROO_FAILED,
1010
+ "type" => "collect")),
1011
+ 609 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is geannuleerd voordat incasso plaatsvond.",
1012
+ "code" => self::BUCKAROO_FAILED,
1013
+ "type" => "collect")),
1014
+ 610 => array( '*'=>array( "omschrijving" => "Eenmalige machtiging is door de bank afgewezen. Rekening ongeldig.",
1015
+ "code" => self::BUCKAROO_FAILED,
1016
+ "type" => "collect")),
1017
+ 612 => array( '*'=>array( "omschrijving" => "Terugboeking wegens Melding Onterechte Incasso",
1018
+ "code" => self::BUCKAROO_FAILED,
1019
+ "type" => "collect")),
1020
+ 671 => array( '*'=>array( "omschrijving" => "De refund voor deze machtiging is verwerkt.",
1021
+ "code" => self::BUCKAROO_NEUTRAL,
1022
+ "type" => "collect")),
1023
+ 672 => array( '*'=>array( "omschrijving" => "De refund voor deze machtiging is mislukt.",
1024
+ "code" => self::BUCKAROO_NEUTRAL,
1025
+ "type" => "collect")),
1026
+ 700 => array( '*'=>array( "omschrijving" => "De betaalopdracht is geaccepteerd en wordt in behandeling genomen.",
1027
+ "code" => self::BUCKAROO_NEUTRAL,
1028
+ "type" => "batch")),
1029
+ 701 => array( '*'=>array( "omschrijving" => "De betaalopdracht is verwerkt.",
1030
+ "code" => self::BUCKAROO_SUCCESS,
1031
+ "type" => "batch")),
1032
+ 702 => array( '*'=>array( "omschrijving" => "De betaalopdracht is door de bank teruggestort wegens incorrecte rekeninggegevens.",
1033
+ "code" => self::BUCKAROO_FAILED,
1034
+ "type" => "batch")),
1035
+ 703 => array( '*'=>array( "omschrijving" => "De betaalopdracht is afgewezen door Buckaroo.",
1036
+ "code" => self::BUCKAROO_FAILED,
1037
+ "type" => "batch")),
1038
+ 704 => array( '*'=>array( "omschrijving" => "Betaalopdracht geannuleerd.",
1039
+ "code" => self::BUCKAROO_FAILED,
1040
+ "type" => "batch")),
1041
+ 705 => array( '*'=>array( "omschrijving" => "De batch kon niet worden ingepland. Error: [waarde]",
1042
+ "code" => self::BUCKAROO_FAILED,
1043
+ "type" => "batch")),
1044
+ 710 => array( '*'=>array( "omschrijving" => "Betaalopdracht nog niet geverifieerd.",
1045
+ "code" => self::BUCKAROO_NEUTRAL,
1046
+ "type" => "batch")),
1047
+ 711 => array( '*'=>array( "omschrijving" => "De batch kon niet gevonden worden: [waarde].",
1048
+ "code" => self::BUCKAROO_FAILED,
1049
+ "type" => "batch")),
1050
+ 712 => array( '*'=>array( "omschrijving" => "De batch is reeds verwerkt: [waarde].",
1051
+ "code" => self::BUCKAROO_SUCCESS,
1052
+ "type" => "batch")),
1053
+ 720 => array( '*'=>array( "omschrijving" => "Er is voor deze batch-transactie geen klant-id opgegeven.",
1054
+ "code" => self::BUCKAROO_FAILED,
1055
+ "type" => "batch")),
1056
+ 721 => array( '*'=>array( "omschrijving" => "Het opgegeven klant-id kon niet worden gevonden.",
1057
+ "code" => self::BUCKAROO_FAILED,
1058
+ "type" => "batch")),
1059
+ 800 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is nog niet volledig verwerkt.",
1060
+ "code" => self::BUCKAROO_NEUTRAL,
1061
+ "type" => "ideal")),
1062
+ 801 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is met succes verwerkt.",
1063
+ "code" => self::BUCKAROO_SUCCESS,
1064
+ "type" => "ideal")),
1065
+ 802 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is door de consument geannuleerd. Trx: [waarde]",
1066
+ "code" => self::BUCKAROO_FAILED,
1067
+ "type" => "ideal")),
1068
+ 803 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is niet binnen de maximale toegestane tijd uitgevoerd. Trx: [waarde]",
1069
+ "code" => self::BUCKAROO_FAILED,
1070
+ "type" => "ideal")),
1071
+ 804 => array( '*'=>array( "omschrijving" => "Deze iDeal-transactie is om onbekende reden bij de bank mislukt. Trx: [waarde]",
1072
+ "code" => self::BUCKAROO_FAILED,
1073
+ "type" => "ideal")),
1074
+ 810 => array( '*'=>array( "omschrijving" => "Issuer (bank) is onbekend: [waarde]",
1075
+ "code" => self::BUCKAROO_FAILED,
1076
+ "type" => "ideal")),
1077
+ 811 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij de bank worden achterhaald. De transactie is nog niet afgerond.",
1078
+ "code" => self::BUCKAROO_NEUTRAL,
1079
+ "type" => "ideal")),
1080
+ 812 => array( '*'=>array( "omschrijving" => "De entrance-code [waarde] is ongeldig.",
1081
+ "code" => self::BUCKAROO_FAILED,
1082
+ "type" => "ideal")),
1083
+ 813 => array( '*'=>array( "omschrijving" => "Acquirer-code is onbekend: [waarde].",
1084
+ "code" => self::BUCKAROO_FAILED,
1085
+ "type" => "ideal")),
1086
+ 814 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden. We zullen deze zo snel mogelijk verhelpen. De status zal daarna worden herzien.",
1087
+ "code" => self::BUCKAROO_NEUTRAL,
1088
+ "type" => "ideal")),
1089
+ 815 => array( '*'=>array( "omschrijving" => "Op dit moment is de betaalmethode iDEAL niet beschikbaar wegens een storing bij de bank.",
1090
+ "code" => self::BUCKAROO_FAILED,
1091
+ "type" => "ideal")),
1092
+ 816 => array( '*'=>array( "omschrijving" => "Er kon geen transactie worden gevonden. Criteria: [waarde]",
1093
+ "code" => self::BUCKAROO_FAILED,
1094
+ "type" => "ideal")),
1095
+ 820 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is nog niet volledig verwerkt.",
1096
+ "code" => self::BUCKAROO_NEUTRAL,
1097
+ "type" => "ideal")),
1098
+ 821 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is met succes verwerkt.",
1099
+ "code" => self::BUCKAROO_SUCCESS,
1100
+ "type" => "ideal")),
1101
+ 822 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is door de consument geannuleerd. Trx: [waarde]",
1102
+ "code" => self::BUCKAROO_FAILED,
1103
+ "type" => "ideal")),
1104
+ 823 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is niet binnen de maximale toegestane tijd uitgevoerd. Trx: [waarde]",
1105
+ "code" => self::BUCKAROO_FAILED,
1106
+ "type" => "ideal")),
1107
+ 824 => array( '*'=>array( "omschrijving" => "Deze Giropay-transactie is door de bank afgewezen.",
1108
+ "code" => self::BUCKAROO_FAILED,
1109
+ "type" => "ideal")),
1110
+ 830 => array( '*'=>array( "omschrijving" => "Issuer (bankleitzahl) is onbekend: [waarde]",
1111
+ "code" => self::BUCKAROO_FAILED,
1112
+ "type" => "ideal")),
1113
+ 831 => array( '*'=>array( "omschrijving" => "Om technische reden kon de status van deze transactie nog niet bij de bank worden achterhaald. De transactie is nog niet afgerond.",
1114
+ "code" => self::BUCKAROO_NEUTRAL,
1115
+ "type" => "ideal")),
1116
+ 833 => array( '*'=>array( "omschrijving" => "De entrance-code [waarde] is ongeldig.",
1117
+ "code" => self::BUCKAROO_FAILED,
1118
+ "type" => "ideal")),
1119
+ 834 => array( '*'=>array( "omschrijving" => "Er is een systeemfout opgetreden. We zullen deze zo snel mogelijk verhelpen. De status zal daarna worden herzien.",
1120
+ "code" => self::BUCKAROO_FAILED,
1121
+ "type" => "ideal")),
1122
+ 835 => array( '*'=>array( "omschrijving" => "Het Giropay transactie-id is ongeldig of niet beschikbaar.",
1123
+ "code" => self::BUCKAROO_FAILED,
1124
+ "type" => "ideal")),
1125
+ 836 => array( '*'=>array( "omschrijving" => "Er kon geen transactie worden gevonden. Criteria: [waarde]",
1126
+ "code" => self::BUCKAROO_FAILED,
1127
+ "type" => "ideal")),
1128
+ 871 => array( '*'=>array( "omschrijving" => "De refund voor deze iDeal-cardbetaling is verwerkt.",
1129
+ "code" => self::BUCKAROO_NEUTRAL,
1130
+ "type" => "ideal")),
1131
+ 872 => array( '*'=>array( "omschrijving" => "De refund voor deze iDeal-cardbetaling is mislukt.",
1132
+ "code" => self::BUCKAROO_NEUTRAL,
1133
+ "type" => "ideal")),
1134
+ 873 => array( '*'=>array( "omschrijving" => "De refund voor deze GiroPay-cardbetaling is verwerkt.",
1135
+ "code" => self::BUCKAROO_NEUTRAL,
1136
+ "type" => "ideal")),
1137
+ 874 => array( '*'=>array( "omschrijving" => "De refund voor deze GiroPay-betaling is mislukt.",
1138
+ "code" => self::BUCKAROO_NEUTRAL,
1139
+ "type" => "ideal")),
1140
+ 900 => array( '*'=>array( "omschrijving" => "Geen XML-bericht ontvangen.",
1141
+ "code" => self::BUCKAROO_FAILED,
1142
+ "type" => "xml")),
1143
+ 901 => array( '*'=>array( "omschrijving" => "Ongeldig XML-bericht. [waarde]",
1144
+ "code" => self::BUCKAROO_FAILED,
1145
+ "type" => "xml")),
1146
+ 910 => array( '*'=>array( "omschrijving" => "0 EUR transactie, Customergegevens opgeslagen.",
1147
+ "code" => self::BUCKAROO_FAILED,
1148
+ "type" => "xml")),
1149
+ 931 => array( '*'=>array( "omschrijving" => "[nodetype] [element] ontbreekt.",
1150
+ "code" => self::BUCKAROO_FAILED,
1151
+ "type" => "xml")),
1152
+ 932 => array( '*'=>array( "omschrijving" => "Teveel elementen type [element] (max. 1).",
1153
+ "code" => self::BUCKAROO_FAILED,
1154
+ "type" => "xml")),
1155
+ 933 => array( '*'=>array( "omschrijving" => "Waarde [nodetype] [element] ontbreekt.",
1156
+ "code" => self::BUCKAROO_FAILED,
1157
+ "type" => "xml")),
1158
+ 934 => array( '*'=>array( "omschrijving" => "Waarde [nodetype] [element] (occurance [occurance]) ontbreekt.",
1159
+ "code" => self::BUCKAROO_FAILED,
1160
+ "type" => "xml")),
1161
+ 935 => array( '*'=>array( "omschrijving" => "Waarde attribuut [attribuut] ontbreekt in element [element].",
1162
+ "code" => self::BUCKAROO_FAILED,
1163
+ "type" => "xml")),
1164
+ 940 => array( '*'=>array( "omschrijving" => "Ongeldig request: [waarde].",
1165
+ "code" => self::BUCKAROO_FAILED,
1166
+ "type" => "xml")),
1167
+ 941 => array( '*'=>array( "omschrijving" => "Waarde veld [veld] ongeldig: [waarde].",
1168
+ "code" => self::BUCKAROO_FAILED,
1169
+ "type" => "xml")),
1170
+ 942 => array( '*'=>array( "omschrijving" => "Waarde attribuut [veld] ongeldig: [waarde].",
1171
+ "code" => self::BUCKAROO_FAILED,
1172
+ "type" => "xml")),
1173
+ 943 => array( '*'=>array( "omschrijving" => "Creditcard-type onbekend: [waarde]. (mastercard of visa)",
1174
+ "code" => self::BUCKAROO_FAILED,
1175
+ "type" => "xml")),
1176
+ 944 => array( '*'=>array( "omschrijving" => "Kaartnummer ongeldig (Luhn-check): [waarde].",
1177
+ "code" => self::BUCKAROO_FAILED,
1178
+ "type" => "xml")),
1179
+ 945 => array( '*'=>array( "omschrijving" => "Valuta onbekend ongeldig: [waarde].",
1180
+ "code" => self::BUCKAROO_FAILED,
1181
+ "type" => "xml")),
1182
+ 946 => array( '*'=>array( "omschrijving" => "Bedrag is geen numerieke waarde: [waarde].",
1183
+ "code" => self::BUCKAROO_FAILED,
1184
+ "type" => "xml")),
1185
+ 947 => array( '*'=>array( "omschrijving" => "Bedrag ongeldig: [waarde].",
1186
+ "code" => self::BUCKAROO_FAILED,
1187
+ "type" => "xml")),
1188
+ 948 => array( '*'=>array( "omschrijving" => "CVC-code ongeldig: [waarde].",
1189
+ "code" => self::BUCKAROO_FAILED,
1190
+ "type" => "xml")),
1191
+ 949 => array( '*'=>array( "omschrijving" => "Maand geldigheidsduur creditcard ongeldig: [waarde].",
1192
+ "code" => self::BUCKAROO_FAILED,
1193
+ "type" => "xml")),
1194
+ 950 => array( '*'=>array( "omschrijving" => "Jaar geldigheidsduur creditcard ongeldig: [waarde].",
1195
+ "code" => self::BUCKAROO_FAILED,
1196
+ "type" => "xml")),
1197
+ 951 => array( '*'=>array( "omschrijving" => "Taal onbekend of niet ondersteund: [waarde].",
1198
+ "code" => self::BUCKAROO_FAILED,
1199
+ "type" => "xml")),
1200
+ 952 => array( '*'=>array( "omschrijving" => "Het factuurnummer ontbreekt. Dit veld is verplicht.",
1201
+ "code" => self::BUCKAROO_FAILED,
1202
+ "type" => "xml")),
1203
+ 953 => array( '*'=>array( "omschrijving" => "Geblokkeerd door velocitycheck",
1204
+ "code" => self::BUCKAROO_FAILED,
1205
+ "type" => "xml")),
1206
+ 954 => array( '*'=>array( "omschrijving" => "Het transactie-ID [waarde] is al in gebruik.",
1207
+ "code" => self::BUCKAROO_FAILED,
1208
+ "type" => "xml")),
1209
+ 955 => array( '*'=>array( "omschrijving" => "Authenticatie voor deze creditcard betaling is afgewezen",
1210
+ "code" => self::BUCKAROO_FAILED,
1211
+ "type" => "xml")),
1212
+ 956 => array( '*'=>array( "omschrijving" => "De enrolled status van de creditcard kon niet achterhaald worden.",
1213
+ "code" => self::BUCKAROO_FAILED,
1214
+ "type" => "xml")),
1215
+ 960 => array( '*'=>array( "omschrijving" => "Klantnummer ongeldig: [waarde].",
1216
+ "code" => self::BUCKAROO_FAILED,
1217
+ "type" => "xml")),
1218
+ 961 => array( '*'=>array( "omschrijving" => "Creditcard-type niet geactiveerd: [waarde].",
1219
+ "code" => self::BUCKAROO_FAILED,
1220
+ "type" => "xml")),
1221
+ 962 => array( '*'=>array( "omschrijving" => "Gekozen valuta ongeldig voor Merchant: [waarde].",
1222
+ "code" => self::BUCKAROO_FAILED,
1223
+ "type" => "xml")),
1224
+ 963 => array( '*'=>array( "omschrijving" => "Het transactie-id is ongeldig: [waarde]",
1225
+ "code" => self::BUCKAROO_FAILED,
1226
+ "type" => "xml")),
1227
+ 964 => array( '*'=>array( "omschrijving" => "Er zijn geen betaalmethoden geactiveerd.",
1228
+ "code" => self::BUCKAROO_FAILED,
1229
+ "type" => "xml")),
1230
+ 971 => array( '*'=>array( "omschrijving" => "Er is geen naam opgegeven.",
1231
+ "code" => self::BUCKAROO_FAILED,
1232
+ "type" => "xml")),
1233
+ 972 => array( '*'=>array( "omschrijving" => "Er is geen adres opgegeven.",
1234
+ "code" => self::BUCKAROO_FAILED,
1235
+ "type" => "xml")),
1236
+ 973 => array( '*'=>array( "omschrijving" => "Er is geen postcode ingevuld.",
1237
+ "code" => self::BUCKAROO_FAILED,
1238
+ "type" => "xml")),
1239
+ 974 => array( '*'=>array( "omschrijving" => "Er is geen plaats ingevuld.",
1240
+ "code" => self::BUCKAROO_FAILED,
1241
+ "type" => "xml")),
1242
+ 975 => array( '*'=>array( "omschrijving" => "Er is geen land ingevuld.",
1243
+ "code" => self::BUCKAROO_FAILED,
1244
+ "type" => "xml")),
1245
+ 976 => array( '*'=>array( "omschrijving" => "Er is geen geslacht ingevuld.",
1246
+ "code" => self::BUCKAROO_FAILED,
1247
+ "type" => "xml")),
1248
+ 977 => array( '*'=>array( "omschrijving" => "Mailadres ongeldig.",
1249
+ "code" => self::BUCKAROO_FAILED,
1250
+ "type" => "xml")),
1251
+ 978 => array( '*'=>array( "omschrijving" => "De XML koppeling voor creditcards is nog niet geactiveerd.",
1252
+ "code" => self::BUCKAROO_FAILED,
1253
+ "type" => "xml")),
1254
+ 980 => array( '*'=>array( "omschrijving" => "De betaalmethode [waarde] is niet geactiveerd.",
1255
+ "code" => self::BUCKAROO_FAILED,
1256
+ "type" => "xml")),
1257
+ 981 => array( '*'=>array( "omschrijving" => "De datum van het abonnement is geen geldige datum.",
1258
+ "code" => self::BUCKAROO_FAILED,
1259
+ "type" => "xml")),
1260
+ 982 => array( '*'=>array( "omschrijving" => "Het abonnement is nog niet ingegaan.",
1261
+ "code" => self::BUCKAROO_FAILED,
1262
+ "type" => "xml")),
1263
+ 983 => array( '*'=>array( "omschrijving" => "Het abonnement is verlopen.",
1264
+ "code" => self::BUCKAROO_FAILED,
1265
+ "type" => "xml")),
1266
+ 990 => array( '*'=>array( "omschrijving" => "De digitale handtekening is incorrect: [waarde].",
1267
+ "code" => self::BUCKAROO_FAILED,
1268
+ "type" => "xml")),
1269
+ 991 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden bij het verwerken van de transactie. De Merchant Account Code kon niet worden gelocaliseerd.",
1270
+ "code" => self::BUCKAROO_FAILED,
1271
+ "type" => "xml")),
1272
+ 992 => array( '*'=>array( "omschrijving" => "Er is fout opgetreden bij het verwerken van de response. We zullen de storing zo snel mogelijk verhelpen.",
1273
+ "code" => self::BUCKAROO_FAILED,
1274
+ "type" => "xml")),
1275
+ 993 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden bij het verwerken van de transactie. We zullen de storing zo snel mogelijk verhelpen.",
1276
+ "code" => self::BUCKAROO_FAILED,
1277
+ "type" => "xml")),
1278
+ 999 => array( '*'=>array( "omschrijving" => "Er is een fout opgetreden waarvan de oorzaak vooralsnog onbekend is. We zullen de storing zo snel mogelijk verhelpen.",
1279
+ "code" => self::BUCKAROO_FAILED))
1280
+ );
1281
  }
app/code/community/TIG/Buckaroo3Extended/Model/Adminhtml/System/Config/Backend/Buckaroo/Fee.php CHANGED
@@ -1,35 +1,35 @@
1
- <?php
2
 
3
  class TIG_Buckaroo3Extended_Model_Adminhtml_System_Config_Backend_Buckaroo_Fee extends Mage_Core_Model_Config_Data
4
  {
5
  public function _beforeSave()
6
  {
7
- $groups = $this->getGroups();
8
- foreach($groups as &$group) {
9
- $fields = $group['fields'];
10
- if (array_key_exists('payment_fee', $fields)) {
11
- $fee = $group['fields']['payment_fee']['value'];
12
  if ($fee) {
13
  $group['fields']['payment_fee']['value'] = $this->_validateFee($fee);
14
  }
15
- }
16
- }
17
-
18
- $this->setGroups($groups);
19
-
20
- return parent::_beforeSave();
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  }
22
-
23
- protected function _validateFee($fee)
24
- {
25
- $fee = str_replace(',', '.', $fee);
26
- preg_match("#^0*(100(\.00?)?|[0-9]?[0-9](\.[0-9][0-9]?)?)%?$#", $fee, $matches);
27
-
28
- if (empty($matches)) {
29
- Mage::throwException(
30
- Mage::helper('buckaroo3extended')->__('Fee value is improperly formatted. Fee must be a positive number or a percentage with a single decimal seperator.')
31
- );
32
- }
33
- return $matches[0];
34
- }
35
  }
1
+ <?php
2
 
3
  class TIG_Buckaroo3Extended_Model_Adminhtml_System_Config_Backend_Buckaroo_Fee extends Mage_Core_Model_Config_Data
4
  {
5
  public function _beforeSave()
6
  {
7
+ $groups = $this->getGroups();
8
+ foreach($groups as &$group) {
9
+ $fields = $group['fields'];
10
+ if (array_key_exists('payment_fee', $fields)) {
11
+ $fee = $group['fields']['payment_fee']['value'];
12
  if ($fee) {
13
  $group['fields']['payment_fee']['value'] = $this->_validateFee($fee);
14
  }
15
+ }
16
+ }
17
+
18
+ $this->setGroups($groups);
19
+
20
+ return parent::_beforeSave();
21
+ }
22
+
23
+ protected function _validateFee($fee)
24
+ {
25
+ $fee = str_replace(',', '.', $fee);
26
+ preg_match("#^0*(100(\.00?)?|[0-9]?[0-9](\.[0-9][0-9]?)?)%?$#", $fee, $matches);
27
+
28
+ if (empty($matches)) {
29
+ Mage::throwException(
30
+ Mage::helper('buckaroo3extended')->__('Fee value is improperly formatted. Fee must be a positive number or a percentage with a single decimal seperator.')
31
+ );
32
+ }
33
+ return $matches[0];
34
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
app/code/community/TIG/Buckaroo3Extended/Model/Certificate/Certificate.php CHANGED
@@ -4,55 +4,55 @@ class TIG_Buckaroo3Extended_Model_Certificate_Certificate extends Mage_Core_Mode
4
  {
5
  /**
6
  * Uploads the certificate file.
7
- *
8
  * @param Varien_Object $object
9
  */
10
  public function uploadAndImport(Varien_Object $object)
11
- {
12
- if (
13
  isset($_FILES['groups']['name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value'])
14
  && !empty($_FILES['groups']['name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value'])
15
- && file_exists($_FILES['groups']['tmp_name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value'])
16
  ) {
17
  try {
18
- //check if a certificate name is defined
19
- if (!isset($_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value'])
20
- || empty($_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value'])
21
- ) {
22
- Mage::throwException('please enter a name for this certificate');
23
- }
24
-
25
  if (strpos($_FILES['groups']['name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value'], '.pem') === false) {
26
  Mage::throwException('invalid certificate file uploaded');
27
  }
28
-
29
- $model = Mage::getModel('buckaroo3extended/certificate');
30
- $collection = $model->getCollection()->load();
31
- $names = $collection->getColumnValues('certificate_name');
32
-
33
- //check if chosen certificate name is already in use
34
- if (in_array($_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value'], $names)) {
35
- Mage::throwException(
36
- 'The certificate name \''
37
- . $_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value']
38
- . '\' is already in use.'
39
- );
40
- }
41
-
42
- $data = array(
43
- 'certificate' => file_get_contents($_FILES['groups']['tmp_name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value']),
44
- 'certificate_name' => $_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value'],
45
- 'upload_date' => date('Y:m:d H:i:s'),
46
- );
47
- $model->setData($data);
48
- $model->save();
49
  } catch (Exception $e) {
50
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
51
 
52
  return $object;
53
  }
54
- }
55
-
56
  return $object;
57
  }
58
  }
4
  {
5
  /**
6
  * Uploads the certificate file.
7
+ *
8
  * @param Varien_Object $object
9
  */
10
  public function uploadAndImport(Varien_Object $object)
11
+ {
12
+ if (
13
  isset($_FILES['groups']['name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value'])
14
  && !empty($_FILES['groups']['name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value'])
15
+ && file_exists($_FILES['groups']['tmp_name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value'])
16
  ) {
17
  try {
18
+ //check if a certificate name is defined
19
+ if (!isset($_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value'])
20
+ || empty($_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value'])
21
+ ) {
22
+ Mage::throwException('please enter a name for this certificate');
23
+ }
24
+
25
  if (strpos($_FILES['groups']['name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value'], '.pem') === false) {
26
  Mage::throwException('invalid certificate file uploaded');
27
  }
28
+
29
+ $model = Mage::getModel('buckaroo3extended/certificate');
30
+ $collection = $model->getCollection()->load();
31
+ $names = $collection->getColumnValues('certificate_name');
32
+
33
+ //check if chosen certificate name is already in use
34
+ if (in_array($_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value'], $names)) {
35
+ Mage::throwException(
36
+ 'The certificate name \''
37
+ . $_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value']
38
+ . '\' is already in use.'
39
+ );
40
+ }
41
+
42
+ $data = array(
43
+ 'certificate' => file_get_contents($_FILES['groups']['tmp_name']['buckaroo3extended_certificate']['fields']['certificate_upload']['value']),
44
+ 'certificate_name' => $_POST['groups']['buckaroo3extended_certificate']['fields']['certificate_name']['value'],
45
+ 'upload_date' => date('Y:m:d H:i:s'),
46
+ );
47
+ $model->setData($data);
48
+ $model->save();
49
  } catch (Exception $e) {
50
  Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
51
 
52
  return $object;
53
  }
54
+ }
55
+
56
  return $object;
57
  }
58
  }
app/code/community/TIG/Buckaroo3Extended/Model/Observer.php CHANGED
@@ -20,8 +20,8 @@
20
  * @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
21
  */
22
 
23
- class TIG_Buckaroo3Extended_Model_Observer extends Mage_Core_Model_Abstract
24
- {
25
 
26
  /**
27
  * When config settings are saved in the backend, retrieve the title of all buckaroo payment methods that have been activated.
@@ -33,39 +33,39 @@ class TIG_Buckaroo3Extended_Model_Observer extends Mage_Core_Model_Abstract
33
  * @param Varien_Event_Observer $observer
34
  * @return bool
35
  */
36
- public function controller_action_postdispatch_adminhtml_system_config_save(Varien_Event_Observer $observer)
37
  {
38
- //check if the section being saved is 'buckaroo'
39
- $buckarooRequest = strpos(Mage::getSingleton('core/app')->getRequest()->getRequestUri(), 'section/buckaroo/');
40
- if ($buckarooRequest === false) {
41
- return false;
42
- }
43
-
44
- //get all activated payment methods
45
- $payments = Mage::getSingleton('payment/config')->getActiveMethods();
46
  foreach ($payments as $payment) {
47
-
48
- //get the code and check if its a buckaroo2012 payment method
49
- $code = $payment->getCode();
50
- $isBuckaroo = strpos($code, 'buckaroo3extended');
51
- if ($isBuckaroo !== false) {
52
- foreach(Mage::app()->getStores() as $eachStore => $storeVal)
53
- {
54
- //retrieve the title as set in the backend
55
- $title = Mage::getStoreConfig('buckaroo/' . $code . '/title', Mage::app()->getStore($eachStore)->getId());
56
- $sort_order = Mage::getStoreConfig('buckaroo/' . $code . '/sort_order', Mage::app()->getStore($eachStore)->getId());
57
-
58
- if (!is_null($title) && $title !== '') {
59
- //set the title as the new path
60
- Mage::getModel('core/config')->saveConfig('payment/' . $code . '/title', $title, 'stores', Mage::app()->getStore($eachStore)->getId());
61
- }
62
- if (!is_null($sort_order) && $title !== '') {
63
- //set the sort_order as the new path
64
- Mage::getModel('core/config')->saveConfig('payment/' . $code . '/sort_order', $sort_order, 'stores', Mage::app()->getStore($eachStore)->getId());
65
- }
66
- }
67
-
68
- }
69
- }
70
  }
71
  }
20
  * @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
21
  */
22
 
23
+ class TIG_Buckaroo3Extended_Model_Observer extends Mage_Core_Model_Abstract
24
+ {
25
 
26
  /**
27
  * When config settings are saved in the backend, retrieve the title of all buckaroo payment methods that have been activated.
33
  * @param Varien_Event_Observer $observer
34
  * @return bool
35
  */
36
+ public function controller_action_postdispatch_adminhtml_system_config_save(Varien_Event_Observer $observer)
37
  {
38
+ //check if the section being saved is 'buckaroo'
39
+ $buckarooRequest = strpos(Mage::getSingleton('core/app')->getRequest()->getRequestUri(), 'section/buckaroo/');
40
+ if ($buckarooRequest === false) {
41
+ return false;
42
+ }
43
+
44
+ //get all activated payment methods
45
+ $payments = Mage::getSingleton('payment/config')->getActiveMethods();
46
  foreach ($payments as $payment) {
47
+
48
+ //get the code and check if its a buckaroo2012 payment method
49
+ $code = $payment->getCode();
50
+ $isBuckaroo = strpos($code, 'buckaroo3extended');
51
+ if ($isBuckaroo !== false) {
52
+ foreach(Mage::app()->getStores() as $eachStore => $storeVal)
53
+ {
54
+ //retrieve the title as set in the backend
55
+ $title = Mage::getStoreConfig('buckaroo/' . $code . '/title', Mage::app()->getStore($eachStore)->getId());
56
+ $sort_order = Mage::getStoreConfig('buckaroo/' . $code . '/sort_order', Mage::app()->getStore($eachStore)->getId());
57
+
58
+ if (!is_null($title) && $title !== '') {
59
+ //set the title as the new path
60
+ Mage::getModel('core/config')->saveConfig('payment/' . $code . '/title', $title, 'stores', Mage::app()->getStore($eachStore)->getId());
61
+ }
62
+ if (!is_null($sort_order) && $title !== '') {
63
+ //set the sort_order as the new path
64
+ Mage::getModel('core/config')->saveConfig('payment/' . $code . '/sort_order', $sort_order, 'stores', Mage::app()->getStore($eachStore)->getId());
65
+ }
66
+ }
67
+
68
+ }
69
+ }
70
  }
71
  }
app/code/community/TIG/Buckaroo3Extended/Model/Observer/Abstract.php CHANGED
@@ -67,16 +67,16 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
67
  $dueDate = date('Y-m-d', mktime(0, 0, 0, date("m") , (date("d") + $dueDaysInvoice + $dueDays), date("Y")));
68
 
69
  if (array_key_exists('customVars', $vars) && array_key_exists($serviceName, $vars['customVars']) && is_array($vars['customVars'][$serviceName])) {
70
- $vars['customVars'][$serviceName] = array_merge($vars['customVars'][$serviceName], array(
71
- 'DateDue' => $dueDate,
72
- 'InvoiceDate' => $invoiceDate,
73
  ));
74
- } else {
75
- $vars['customVars'][$serviceName] = array(
76
- 'DateDue' => $dueDate,
77
- 'InvoiceDate' => $invoiceDate,
78
- );
79
- }
80
 
81
  return $vars;
82
  }
@@ -88,29 +88,29 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
88
  */
89
  protected function _addAdditionalCreditManagementVariables(&$vars)
90
  {
91
- $VAT = 0;
92
- foreach($this->_order->getFullTaxInfo() as $taxRecord)
93
- {
94
- $VAT += $taxRecord['amount'];
95
- }
96
-
97
- $reminderLevel = Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/reminder_level', $this->getStoreId());
98
-
99
- $creditmanagementArray = array(
100
- 'AmountVat' => $VAT,
101
- 'CustomerType' => 1,
102
- 'MaxReminderLevel' => $reminderLevel,
103
- );
104
-
105
- if (array_key_exists('customVars', $vars) && is_array($vars['customVars']['creditmanagement'])) {
106
- $vars['customVars']['creditmanagement'] = array_merge($vars['customVars']['creditmanagement'], $creditmanagementArray);
107
- } else {
108
- $vars['customVars']['creditmanagement'] = $creditmanagementArray;
109
- }
110
-
111
- if (empty($vars['customVars']['creditmanagement']['PhoneNumber']) && !empty($vars['customVars']['creditmanagement']['MobilePhoneNumber'])) {
112
- $vars['customVars']['creditmanagement']['PhoneNumber'] = $vars['customVars']['creditmanagement']['MobilePhoneNumber'];
113
- }
114
  }
115
 
116
  /**
@@ -129,15 +129,15 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
129
  }
130
 
131
  if (isset($additionalFields['BPE_Customergender'])) {
132
- $gender = $additionalFields['BPE_Customergender'];
133
  } else {
134
- $gender = 0;
135
  }
136
 
137
  if (isset($additionalFields['BPE_customerbirthdate'])) {
138
- $dob = $additionalFields['BPE_customerbirthdate'];
139
  } else {
140
- $dob = '';
141
  }
142
 
143
  if (isset($additionalFields['BPE_Customermail'])) {
@@ -147,81 +147,81 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
147
  }
148
 
149
  $customerId = $this->_order->getCustomerId()
150
- ? $this->_order->getCustomerId()
151
- : $this->_order->getIncrementId();
152
 
153
  $firstName = $this->_billingInfo['firstname'];
154
- $lastName = $this->_billingInfo['lastname'];
155
- $address = $this->_processAddressCM();
156
- $houseNumber = $address['house_number'];
157
- $houseNumberSuffix = $address['number_addition'];
158
- $street = $address['street'];
159
- $zipcode = $this->_billingInfo['zip'];
160
- $city = $this->_billingInfo['city'];
161
- $state = $this->_billingInfo['state'];
162
- $fax = $this->_billingInfo['fax'];
163
- $country = $this->_billingInfo['countryCode'];
164
- $processedPhoneNumber = $this->_processPhoneNumberCM();
165
- $customerLastNamePrefix = $this->_getCustomerLastNamePrefix();
166
- $customerInitials = $this->_getInitialsCM();
167
-
168
- $array = array(
169
- 'CustomerCode' => $customerId,
170
- 'CustomerFirstName' => $firstName,
171
- 'CustomerLastName' => $lastName,
172
- 'FaxNumber' => $fax,
173
- 'CustomerInitials' => $customerInitials,
174
- 'CustomerLastNamePrefix' => $customerLastNamePrefix,
175
- 'CustomerBirthDate' => $dob,
176
- 'Customergender' => $gender,
177
- 'Customeremail' => $mail,
178
- 'ZipCode' => array(
179
  'value' => $zipcode,
180
  'group' => 'address'
181
  ),
182
- 'City' => array(
183
  'value' => $city,
184
  'group' => 'address'
185
  ),
186
- 'State' => array(
187
  'value' => $state,
188
  'group' => 'address'
189
  ),
190
- 'Street' => array(
191
  'value' => $street,
192
  'group' => 'address'
193
  ),
194
- 'HouseNumber' => array(
195
  'value' => $houseNumber,
196
  'group' => 'address'
197
  ),
198
- 'HouseNumberSuffix' => array(
199
  'value' => $houseNumberSuffix,
200
  'group' => 'address'
201
  ),
202
- 'Country' => array(
203
  'value' => $country,
204
  'group' => 'address'
205
  )
206
  );
207
 
208
- if (array_key_exists('customVars', $vars) && array_key_exists($serviceName, $vars['customVars']) && is_array($vars['customVars'][$serviceName])) {
209
- $vars['customVars'][$serviceName] = array_merge($vars['customVars'][$serviceName], $array);
210
- } else {
211
- $vars['customVars'][$serviceName] = $array;
212
- }
213
-
214
- if ($processedPhoneNumber['mobile']) {
215
- $vars['customVars'][$serviceName] = array_merge($vars['customVars'][$serviceName], array(
216
- 'MobilePhoneNumber' => $processedPhoneNumber['clean'],
217
- ));
218
- } else {
219
- $vars['customVars'][$serviceName] = array_merge($vars['customVars'][$serviceName], array(
220
- 'PhoneNumber' => $processedPhoneNumber['clean'],
221
- ));
222
- }
223
-
224
- return $vars;
225
  }
226
 
227
  /**
@@ -231,18 +231,18 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
231
  * @return string
232
  */
233
  protected function _getInitialsCM()
234
- {
235
- $firstname = $this->_billingInfo['firstname'];
236
 
237
- $initials = '';
238
- $firstnameParts = explode(' ', $firstname);
239
 
240
- foreach ($firstnameParts as $namePart) {
241
- $initials .= strtoupper($namePart[0]) . '.';
242
- }
243
 
244
- return $initials;
245
- }
246
 
247
  /**
248
  *
@@ -251,31 +251,31 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
251
  * @return array
252
  */
253
  protected function _processAddressCM()
254
- {
255
- //get address from billingInfo
256
- $address = $this->_billingInfo['address'];
257
-
258
- $ret = array();
259
- $ret['house_number'] = '';
260
- $ret['number_addition'] = '';
261
- if (preg_match('#^(.*?)([0-9]+)(.*)#s', $address, $matches)) {
262
- if ('' == $matches[1]) {
263
- // Number at beginning
264
- $ret['house_number'] = trim($matches[2]);
265
- $ret['street'] = trim($matches[3]);
266
- } else {
267
- // Number at end
268
- $ret['street'] = trim($matches[1]);
269
- $ret['house_number'] = trim($matches[2]);
270
- $ret['number_addition'] = trim($matches[3]);
271
- }
272
- } else {
273
- // No number
274
- $ret['street'] = $address;
275
- }
276
-
277
- return $ret;
278
- }
279
 
280
  /**
281
  * processes the customer's phone number so as to fit the betaalgarant SOAP request
@@ -283,16 +283,16 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
283
  * @return array
284
  */
285
  protected function _processPhoneNumberCM()
286
- {
287
- $additionalFields = Mage::getSingleton('checkout/session')->getData('additionalFields');
288
- if (isset($additionalFields['BPE_PhoneNumber'])) {
289
- $number = $additionalFields['BPE_PhoneNumber'];
290
- } else {
291
  $number = ($this->_billingInfo['telephone'])?:'1234567890';
292
- }
293
 
294
 
295
- //the final output must like this: 0031123456789 for mobile: 0031612345678
296
  //so 13 characters max else number is not valid
297
  //but for some error correction we try to find if there is some faulty notation
298
 
@@ -341,7 +341,7 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
341
  }
342
 
343
  return $return;
344
- }
345
 
346
  /**
347
  * validate the phonenumber
@@ -370,14 +370,14 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
370
  return $number;
371
  }
372
 
373
- /**
374
- * Checks if the number is a mobile number or not.
375
- *
376
- * @param string $number
377
- *
378
- * @return boolean
379
- */
380
- protected function _isMobileNumber($number) {
381
  //this function only checks if it is a mobile number, not checking valid notation
382
  $checkMobileArray = array("3106","316","06","00316","003106");
383
  foreach($checkMobileArray as $key => $value) {
@@ -394,21 +394,21 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
394
  * @return string
395
  */
396
  protected function _getCustomerLastNamePrefix()
397
- {
398
- $lastName = $this->_billingInfo['lastname'];
399
 
400
- $lastNameBits = explode(' ', $lastName);
401
 
402
- if (count($lastNameBits === 1)) {
403
- return '';
404
- }
405
 
406
- $lastNameEnd = end($lastNameBits);
407
- unset($lastNameEnd);
408
 
409
- $prefix = implode(' ', $lastNameBits);
410
- return $prefix;
411
- }
412
 
413
  /**
414
  * Certain payment methods require a list of other payment methods that will be used to finalize the payment.
@@ -485,13 +485,13 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
485
  * @param $order Mage_Sales_Model_Order
486
  */
487
  protected function _updateSecureStatus($enrolled, $authenticated, $order)
488
- {
489
  $shouldHold = Mage::getStoreConfig('buckaroo/' . $this->_code . '/unsecure_hold', $order->getStoreId());
490
 
491
  if (
492
- (!$enrolled || !$authenticated)
493
- && $shouldHold
494
- && $order->canHold())
495
  {
496
  $order->hold()->save();
497
  }
@@ -514,7 +514,7 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
514
  }
515
 
516
  $order->save();
517
- }
518
 
519
  /**
520
  * @return int|mixed
67
  $dueDate = date('Y-m-d', mktime(0, 0, 0, date("m") , (date("d") + $dueDaysInvoice + $dueDays), date("Y")));
68
 
69
  if (array_key_exists('customVars', $vars) && array_key_exists($serviceName, $vars['customVars']) && is_array($vars['customVars'][$serviceName])) {
70
+ $vars['customVars'][$serviceName] = array_merge($vars['customVars'][$serviceName], array(
71
+ 'DateDue' => $dueDate,
72
+ 'InvoiceDate' => $invoiceDate,
73
  ));
74
+ } else {
75
+ $vars['customVars'][$serviceName] = array(
76
+ 'DateDue' => $dueDate,
77
+ 'InvoiceDate' => $invoiceDate,
78
+ );
79
+ }
80
 
81
  return $vars;
82
  }
88
  */
89
  protected function _addAdditionalCreditManagementVariables(&$vars)
90
  {
91
+ $VAT = 0;
92
+ foreach($this->_order->getFullTaxInfo() as $taxRecord)
93
+ {
94
+ $VAT += $taxRecord['amount'];
95
+ }
96
+
97
+ $reminderLevel = Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/reminder_level', $this->getStoreId());
98
+
99
+ $creditmanagementArray = array(
100
+ 'AmountVat' => $VAT,
101
+ 'CustomerType' => 1,
102
+ 'MaxReminderLevel' => $reminderLevel,
103
+ );
104
+
105
+ if (array_key_exists('customVars', $vars) && is_array($vars['customVars']['creditmanagement'])) {
106
+ $vars['customVars']['creditmanagement'] = array_merge($vars['customVars']['creditmanagement'], $creditmanagementArray);
107
+ } else {
108
+ $vars['customVars']['creditmanagement'] = $creditmanagementArray;
109
+ }
110
+
111
+ if (empty($vars['customVars']['creditmanagement']['PhoneNumber']) && !empty($vars['customVars']['creditmanagement']['MobilePhoneNumber'])) {
112
+ $vars['customVars']['creditmanagement']['PhoneNumber'] = $vars['customVars']['creditmanagement']['MobilePhoneNumber'];
113
+ }
114
  }
115
 
116
  /**
129
  }
130
 
131
  if (isset($additionalFields['BPE_Customergender'])) {
132
+ $gender = $additionalFields['BPE_Customergender'];
133
  } else {
134
+ $gender = 0;
135
  }
136
 
137
  if (isset($additionalFields['BPE_customerbirthdate'])) {
138
+ $dob = $additionalFields['BPE_customerbirthdate'];
139
  } else {
140
+ $dob = '';
141
  }
142
 
143
  if (isset($additionalFields['BPE_Customermail'])) {
147
  }
148
 
149
  $customerId = $this->_order->getCustomerId()
150
+ ? $this->_order->getCustomerId()
151
+ : $this->_order->getIncrementId();
152
 
153
  $firstName = $this->_billingInfo['firstname'];
154
+ $lastName = $this->_billingInfo['lastname'];
155
+ $address = $this->_processAddressCM();
156
+ $houseNumber = $address['house_number'];
157
+ $houseNumberSuffix = $address['number_addition'];
158
+ $street = $address['street'];
159
+ $zipcode = $this->_billingInfo['zip'];
160
+ $city = $this->_billingInfo['city'];
161
+ $state = $this->_billingInfo['state'];
162
+ $fax = $this->_billingInfo['fax'];
163
+ $country = $this->_billingInfo['countryCode'];
164
+ $processedPhoneNumber = $this->_processPhoneNumberCM();
165
+ $customerLastNamePrefix = $this->_getCustomerLastNamePrefix();
166
+ $customerInitials = $this->_getInitialsCM();
167
+
168
+ $array = array(
169
+ 'CustomerCode' => $customerId,
170
+ 'CustomerFirstName' => $firstName,
171
+ 'CustomerLastName' => $lastName,
172
+ 'FaxNumber' => $fax,
173
+ 'CustomerInitials' => $customerInitials,
174
+ 'CustomerLastNamePrefix' => $customerLastNamePrefix,
175
+ 'CustomerBirthDate' => $dob,
176
+ 'Customergender' => $gender,
177
+ 'Customeremail' => $mail,
178
+ 'ZipCode' => array(
179
  'value' => $zipcode,
180
  'group' => 'address'
181
  ),
182
+ 'City' => array(
183
  'value' => $city,
184
  'group' => 'address'
185
  ),
186
+ 'State' => array(
187
  'value' => $state,
188
  'group' => 'address'
189
  ),
190
+ 'Street' => array(
191
  'value' => $street,
192
  'group' => 'address'
193
  ),
194
+ 'HouseNumber' => array(
195
  'value' => $houseNumber,
196
  'group' => 'address'
197
  ),
198
+ 'HouseNumberSuffix' => array(
199
  'value' => $houseNumberSuffix,
200
  'group' => 'address'
201
  ),
202
+ 'Country' => array(
203
  'value' => $country,
204
  'group' => 'address'
205
  )
206
  );
207
 
208
+ if (array_key_exists('customVars', $vars) && array_key_exists($serviceName, $vars['customVars']) && is_array($vars['customVars'][$serviceName])) {
209
+ $vars['customVars'][$serviceName] = array_merge($vars['customVars'][$serviceName], $array);
210
+ } else {
211
+ $vars['customVars'][$serviceName] = $array;
212
+ }
213
+
214
+ if ($processedPhoneNumber['mobile']) {
215
+ $vars['customVars'][$serviceName] = array_merge($vars['customVars'][$serviceName], array(
216
+ 'MobilePhoneNumber' => $processedPhoneNumber['clean'],
217
+ ));
218
+ } else {
219
+ $vars['customVars'][$serviceName] = array_merge($vars['customVars'][$serviceName], array(
220
+ 'PhoneNumber' => $processedPhoneNumber['clean'],
221
+ ));
222
+ }
223
+
224
+ return $vars;
225
  }
226
 
227
  /**
231
  * @return string
232
  */
233
  protected function _getInitialsCM()
234
+ {
235
+ $firstname = $this->_billingInfo['firstname'];
236
 
237
+ $initials = '';
238
+ $firstnameParts = explode(' ', $firstname);
239
 
240
+ foreach ($firstnameParts as $namePart) {
241
+ $initials .= strtoupper($namePart[0]) . '.';
242
+ }
243
 
244
+ return $initials;
245
+ }
246
 
247
  /**
248
  *
251
  * @return array
252
  */
253
  protected function _processAddressCM()
254
+ {
255
+ //get address from billingInfo
256
+ $address = $this->_billingInfo['address'];
257
+
258
+ $ret = array();
259
+ $ret['house_number'] = '';
260
+ $ret['number_addition'] = '';
261
+ if (preg_match('#^(.*?)([0-9]+)(.*)#s', $address, $matches)) {
262
+ if ('' == $matches[1]) {
263
+ // Number at beginning
264
+ $ret['house_number'] = trim($matches[2]);
265
+ $ret['street'] = trim($matches[3]);
266
+ } else {
267
+ // Number at end
268
+ $ret['street'] = trim($matches[1]);
269
+ $ret['house_number'] = trim($matches[2]);
270
+ $ret['number_addition'] = trim($matches[3]);
271
+ }
272
+ } else {
273
+ // No number
274
+ $ret['street'] = $address;
275
+ }
276
+
277
+ return $ret;
278
+ }
279
 
280
  /**
281
  * processes the customer's phone number so as to fit the betaalgarant SOAP request
283
  * @return array
284
  */
285
  protected function _processPhoneNumberCM()
286
+ {
287
+ $additionalFields = Mage::getSingleton('checkout/session')->getData('additionalFields');
288
+ if (isset($additionalFields['BPE_PhoneNumber'])) {
289
+ $number = $additionalFields['BPE_PhoneNumber'];
290
+ } else {
291
  $number = ($this->_billingInfo['telephone'])?:'1234567890';
292
+ }
293
 
294
 
295
+ //the final output must like this: 0031123456789 for mobile: 0031612345678
296
  //so 13 characters max else number is not valid
297
  //but for some error correction we try to find if there is some faulty notation
298
 
341
  }
342
 
343
  return $return;
344
+ }
345
 
346
  /**
347
  * validate the phonenumber
370
  return $number;
371
  }
372
 
373
+ /**
374
+ * Checks if the number is a mobile number or not.
375
+ *
376
+ * @param string $number
377
+ *
378
+ * @return boolean
379
+ */
380
+ protected function _isMobileNumber($number) {
381
  //this function only checks if it is a mobile number, not checking valid notation
382
  $checkMobileArray = array("3106","316","06","00316","003106");
383
  foreach($checkMobileArray as $key => $value) {
394
  * @return string
395
  */
396
  protected function _getCustomerLastNamePrefix()
397
+ {
398
+ $lastName = $this->_billingInfo['lastname'];
399
 
400
+ $lastNameBits = explode(' ', $lastName);
401
 
402
+ if (count($lastNameBits === 1)) {
403
+ return '';
404
+ }
405
 
406
+ $lastNameEnd = end($lastNameBits);
407
+ unset($lastNameEnd);
408
 
409
+ $prefix = implode(' ', $lastNameBits);
410
+ return $prefix;
411
+ }
412
 
413
  /**
414
  * Certain payment methods require a list of other payment methods that will be used to finalize the payment.
485
  * @param $order Mage_Sales_Model_Order
486
  */
487
  protected function _updateSecureStatus($enrolled, $authenticated, $order)
488
+ {
489
  $shouldHold = Mage::getStoreConfig('buckaroo/' . $this->_code . '/unsecure_hold', $order->getStoreId());
490
 
491
  if (
492
+ (!$enrolled || !$authenticated)
493
+ && $shouldHold
494
+ && $order->canHold())
495
  {
496
  $order->hold()->save();
497
  }
514
  }
515
 
516
  $order->save();
517
+ }
518
 
519
  /**
520
  * @return int|mixed
app/code/community/TIG/Buckaroo3Extended/Model/Observer/BackendOrder.php CHANGED
@@ -1,25 +1,32 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Model_Observer_BackendOrder extends Mage_Core_Model_Abstract
3
  {
4
- public function checkout_submit_all_after(Varien_Event_Observer $observer)
5
  {
6
  $order = $observer->getOrder();
7
  $method = $order->getPayment()->getMethod();
8
-
9
  if (strpos($method, 'buckaroo3extended') === false) {
10
  return $this;
11
  }
12
-
13
  try {
14
  $request = Mage::getModel('buckaroo3extended/request_abstract');
15
  $request->setOrder($order)
16
  ->setOrderBillingInfo();
17
-
18
  $request->sendRequest();
19
- } catch (Exception $e) {
20
  Mage::throwException($e->getMessage());
21
- }
22
-
 
 
 
 
 
 
 
23
  return $this;
24
  }
25
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Model_Observer_BackendOrder extends Mage_Core_Model_Abstract
3
  {
4
+ public function checkout_submit_all_after(Varien_Event_Observer $observer)
5
  {
6
  $order = $observer->getOrder();
7
  $method = $order->getPayment()->getMethod();
8
+
9
  if (strpos($method, 'buckaroo3extended') === false) {
10
  return $this;
11
  }
12
+
13
  try {
14
  $request = Mage::getModel('buckaroo3extended/request_abstract');
15
  $request->setOrder($order)
16
  ->setOrderBillingInfo();
17
+
18
  $request->sendRequest();
19
+ } catch (Exception $e) {
20
  Mage::throwException($e->getMessage());
21
+ }
22
+
23
+ // Now set our custom pending status
24
+ $newStates = Mage::helper('buckaroo3extended')->getNewStates('BUCKAROO_PENDING_PAYMENT', $order, $method);
25
+ if ($newStates[1] !== null) {
26
+ $order->setStatus($newStates[1]);
27
+ $order->save();
28
+ }
29
+
30
  return $this;
31
  }
32
  }
app/code/community/TIG/Buckaroo3Extended/Model/OldPaymentMethods/OldPaymentMethod.php CHANGED
@@ -2,7 +2,7 @@
2
  class TIG_Buckaroo3Extended_Model_OldPaymentMethods_OldPaymentMethod extends Mage_Payment_Model_Method_Abstract
3
  {
4
  protected $_code = 'oldBuckaroo';
5
-
6
  protected $_isGateway = false;
7
  protected $_canAuthorize = false;
8
  protected $_canCapture = false;
@@ -13,14 +13,14 @@ class TIG_Buckaroo3Extended_Model_OldPaymentMethods_OldPaymentMethod extends Mag
13
  protected $_canUseCheckout = false;
14
  protected $_canUseForMultishipping = false;
15
  protected $_canSaveCc = false;
16
-
17
  public function getOrderPlaceRedirectUrl()
18
  {
19
-
20
  }
21
-
22
- public function isAvailable($quote = null)
23
  {
24
- return false;
25
  }
26
  }
2
  class TIG_Buckaroo3Extended_Model_OldPaymentMethods_OldPaymentMethod extends Mage_Payment_Model_Method_Abstract
3
  {
4
  protected $_code = 'oldBuckaroo';
5
+
6
  protected $_isGateway = false;
7
  protected $_canAuthorize = false;
8
  protected $_canCapture = false;
13
  protected $_canUseCheckout = false;
14
  protected $_canUseForMultishipping = false;
15
  protected $_canSaveCc = false;
16
+
17
  public function getOrderPlaceRedirectUrl()
18
  {
19
+
20
  }
21
+
22
+ public function isAvailable($quote = null)
23
  {
24
+ return false;
25
  }
26
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Afterpay/Observer.php CHANGED
@@ -377,10 +377,10 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
377
  if ('' == $matches[1]) {
378
  // Number at beginning
379
  $ret['house_number'] = trim($matches[2]);
380
- $ret['street'] = trim($matches[3]);
381
  } else {
382
  // Number at end
383
- $ret['street'] = trim($matches[1]);
384
  $ret['house_number'] = trim($matches[2]);
385
  $ret['number_addition'] = trim($matches[3]);
386
  }
377
  if ('' == $matches[1]) {
378
  // Number at beginning
379
  $ret['house_number'] = trim($matches[2]);
380
+ $ret['street'] = trim($matches[3]);
381
  } else {
382
  // Number at end
383
+ $ret['street'] = trim($matches[1]);
384
  $ret['house_number'] = trim($matches[2]);
385
  $ret['number_addition'] = trim($matches[3]);
386
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Afterpay/PaymentMethod.php CHANGED
@@ -95,98 +95,105 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_PaymentMethod extends
95
  */
96
  public function isAvailable($quote = null)
97
  {
 
98
 
99
- if(is_null($quote) && Mage::helper('buckaroo3extended')->isAdmin()){
100
- // Uncomment this code to get all active Buckaroo payment methods in the backend. (3th party extensions)
101
- /*if(Mage::getStoreConfigFlag('buckaroo/' . $this->_code . '/active', Mage::app()->getStore()->getId())){
102
- return true;
103
- }*/
104
 
105
- return false;
 
 
106
  }
107
 
108
- $quoteItems = $quote->getAllVisibleItems();
109
- if(count($quoteItems) > 99){
110
  return false;
111
  }
112
 
 
 
 
 
 
 
 
113
  $session = Mage::getSingleton('checkout/session');
114
- if($session->getData('buckarooAfterpayRejected') == true){
115
  return false;
116
  }
117
 
118
-
119
- //check if the country specified in the billing address is allowed to use this payment method
120
- if (Mage::getStoreConfig('buckaroo/' . $this->_code . '/allowspecific', $quote->getStoreId()) == 1
 
121
  && $quote->getBillingAddress()->getCountry())
122
  {
123
- $allowedCountries = explode(',',Mage::getStoreConfig('buckaroo/' . $this->_code . '/specificcountry', $quote->getStoreId()));
124
  $country = $quote->getBillingAddress()->getCountry();
125
 
126
- if (!in_array($country,$allowedCountries)) {
127
  return false;
128
  }
129
  }
130
 
131
  $areaAllowed = null;
132
  if ($this->canUseInternal()) {
133
- $areaAllowed = Mage::getStoreConfig('buckaroo/' . $this->_code . '/area', $quote->getStoreId());
134
  }
135
 
136
- //check if the paymentmethod is available in the current shop area (frontend or backend)
137
- if ($areaAllowed == 'backend'
 
138
  && !Mage::helper('buckaroo3extended')->isAdmin()
139
  ) {
140
  return false;
141
- } elseif ($areaAllowed == 'frontend'
 
142
  && Mage::helper('buckaroo3extended')->isAdmin()
143
  ) {
144
  return false;
145
  }
146
 
147
- // check if max amount for the issued PaymentMethod is set and if the quote basegrandtotal exceeds that
148
- $maxAmount = Mage::getStoreConfig('buckaroo/' . $this->_code . '/max_amount', $quote->getStoreId());
149
- if (!empty($maxAmount)
150
- && !empty($quote)
151
- && $quote->getBaseGrandTotal() > $maxAmount)
152
- {
 
153
  return false;
154
  }
155
 
156
  // check if min amount for the issued PaymentMethod is set and if the quote basegrandtotal is less than that
157
- $minAmount = Mage::getStoreConfig('buckaroo/' . $this->_code . '/min_amount', $quote->getStoreId());
158
- if (!empty($minAmount)
159
- && !empty($quote)
160
- && $quote->getBaseGrandTotal() < $minAmount)
161
- {
162
- return false;
163
- }
164
-
165
- //check if the module is set to enabled
166
- if (!Mage::getStoreConfig('buckaroo/' . $this->_code . '/active', $quote->getStoreId())) {
167
  return false;
168
  }
169
 
170
- //limit by ip
171
- if (mage::getStoreConfig('dev/restrict/allow_ips') && Mage::getStoreConfig('buckaroo/' . $this->_code . '/limit_by_ip'))
172
- {
173
  $allowedIp = explode(',', mage::getStoreConfig('dev/restrict/allow_ips'));
174
- if (!in_array(Mage::helper('core/http')->getRemoteAddr(), $allowedIp))
175
- {
176
  return false;
177
  }
178
  }
179
 
180
- // get current currency code
181
  $currency = Mage::app()->getStore()->getBaseCurrencyCode();
182
 
183
-
184
- // currency is not available for this module
185
- if (!in_array($currency, $this->allowedCurrencies))
186
- {
187
  return false;
188
  }
189
 
190
- return TIG_Buckaroo3Extended_Model_Request_Availability::canUseBuckaroo($quote);
 
 
191
  }
192
  }
95
  */
96
  public function isAvailable($quote = null)
97
  {
98
+ $storeId = Mage::app()->getStore()->getId();
99
 
100
+ // Check if quote is null, and try to look it up based on adminhtml session
101
+ if (!$quote && Mage::helper('buckaroo3extended')->isAdmin()) {
102
+ $quote = Mage::getSingleton('adminhtml/session_quote');
103
+ }
 
104
 
105
+ // If quote is not null, set storeId to quote storeId
106
+ if ($quote) {
107
+ $storeId = $quote->getStoreId();
108
  }
109
 
110
+ //check if the module is set to enabled
111
+ if (!Mage::getStoreConfig('buckaroo/' . $this->_code . '/active', $storeId)) {
112
  return false;
113
  }
114
 
115
+ if ($quote) {
116
+ $quoteItems = $quote->getAllVisibleItems();
117
+ if (count($quoteItems) > 99) {
118
+ return false;
119
+ }
120
+ }
121
+
122
  $session = Mage::getSingleton('checkout/session');
123
+ if ($session->getData('buckarooAfterpayRejected') == true) {
124
  return false;
125
  }
126
 
127
+ // Check if the country specified in the billing address is allowed to use this payment method
128
+ if (
129
+ $quote
130
+ && Mage::getStoreConfig('buckaroo/' . $this->_code . '/allowspecific', $storeId) == 1
131
  && $quote->getBillingAddress()->getCountry())
132
  {
133
+ $allowedCountries = explode(',',Mage::getStoreConfig('buckaroo/' . $this->_code . '/specificcountry', $storeId));
134
  $country = $quote->getBillingAddress()->getCountry();
135
 
136
+ if (!in_array($country, $allowedCountries)) {
137
  return false;
138
  }
139
  }
140
 
141
  $areaAllowed = null;
142
  if ($this->canUseInternal()) {
143
+ $areaAllowed = Mage::getStoreConfig('buckaroo/' . $this->_code . '/area', $storeId);
144
  }
145
 
146
+ // Check if the paymentmethod is available in the current shop area (frontend or backend)
147
+ if (
148
+ $areaAllowed == 'backend'
149
  && !Mage::helper('buckaroo3extended')->isAdmin()
150
  ) {
151
  return false;
152
+ } elseif (
153
+ $areaAllowed == 'frontend'
154
  && Mage::helper('buckaroo3extended')->isAdmin()
155
  ) {
156
  return false;
157
  }
158
 
159
+ // Check if max amount for the issued PaymentMethod is set and if the quote basegrandtotal exceeds that
160
+ $maxAmount = Mage::getStoreConfig('buckaroo/' . $this->_code . '/max_amount', $storeId);
161
+ if (
162
+ $quote
163
+ && !empty($maxAmount)
164
+ && $quote->getBaseGrandTotal() > $maxAmount
165
+ ) {
166
  return false;
167
  }
168
 
169
  // check if min amount for the issued PaymentMethod is set and if the quote basegrandtotal is less than that
170
+ $minAmount = Mage::getStoreConfig('buckaroo/' . $this->_code . '/min_amount', $storeId);
171
+ if (
172
+ $quote
173
+ && !empty($minAmount)
174
+ && $quote->getBaseGrandTotal() < $minAmount
175
+ ) {
 
 
 
 
176
  return false;
177
  }
178
 
179
+ // Check limit by ip
180
+ if (mage::getStoreConfig('dev/restrict/allow_ips') && Mage::getStoreConfig('buckaroo/' . $this->_code . '/limit_by_ip')) {
 
181
  $allowedIp = explode(',', mage::getStoreConfig('dev/restrict/allow_ips'));
182
+ if (!in_array(Mage::helper('core/http')->getRemoteAddr(), $allowedIp)) {
 
183
  return false;
184
  }
185
  }
186
 
187
+ // Get current currency code
188
  $currency = Mage::app()->getStore()->getBaseCurrencyCode();
189
 
190
+ // Currency is not available for this module
191
+ if (!in_array($currency, $this->allowedCurrencies)) {
 
 
192
  return false;
193
  }
194
 
195
+ $canUseBuckaroo = TIG_Buckaroo3Extended_Model_Request_Availability::canUseBuckaroo($quote);
196
+
197
+ return $canUseBuckaroo;
198
  }
199
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Amex/Observer.php CHANGED
@@ -1,44 +1,44 @@
1
  <?php
2
- class TIG_Buckaroo3Extended_Model_PaymentMethods_Amex_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
- {
4
  protected $_code = 'buckaroo3extended_amex';
5
  protected $_method = 'amex';
6
-
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
-
13
  $request = $observer->getRequest();
14
-
15
  $vars = $request->getVars();
16
-
17
  $array = array(
18
  $this->_method => array(
19
  'action' => 'Pay',
20
  'version' => 1,
21
  ),
22
  );
23
-
24
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
25
  $array['creditmanagement'] = array(
26
  'action' => 'Invoice',
27
  'version' => 1,
28
  );
29
  }
30
-
31
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
32
  $vars['services'] = array_merge($vars['services'], $array);
33
  } else {
34
  $vars['services'] = $array;
35
  }
36
-
37
  $request->setVars($vars);
38
-
39
  return $this;
40
  }
41
-
42
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
43
  {
44
  if($this->_isChosenMethod($observer) === false) {
@@ -61,27 +61,27 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Amex_Observer extends TIG_Bucka
61
  {
62
  $this->_addAavCredentials($vars);
63
  }
64
-
65
  $request->setVars($vars);
66
-
67
  return $this;
68
  }
69
-
70
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
71
  {
72
  if($this->_isChosenMethod($observer) === false) {
73
  return $this;
74
  }
75
-
76
  $request = $observer->getRequest();
77
-
78
  $codeBits = explode('_', $this->_code);
79
  $code = end($codeBits);
80
  $request->setMethod($code);
81
-
82
  return $this;
83
  }
84
-
85
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
86
  {
87
  if($this->_isChosenMethod($observer) === false) {
@@ -96,7 +96,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Amex_Observer extends TIG_Bucka
96
 
97
  return $this;
98
  }
99
-
100
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
101
  {
102
  if($this->_isChosenMethod($observer) === false) {
@@ -104,14 +104,14 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Amex_Observer extends TIG_Bucka
104
  }
105
 
106
  $refundRequest = $observer->getRequest();
107
-
108
  $vars = $refundRequest->getVars();
109
 
110
  $array = array(
111
  'action' => 'Refund',
112
  'version' => 1,
113
  );
114
-
115
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
116
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
117
  } else {
@@ -122,7 +122,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Amex_Observer extends TIG_Bucka
122
 
123
  return $this;
124
  }
125
-
126
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
127
  {
128
  if($this->_isChosenMethod($observer) === false) {
@@ -155,17 +155,17 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Amex_Observer extends TIG_Bucka
155
  $billingPhonenumber = $this->_processPhoneNumber($billingAddress['telephone']);
156
 
157
 
158
- $shippingFirstname = $shippingAddress->getFirstname();
159
- $shippingLastname = $shippingAddress->getLastname();
160
  $shippingStreetFull = $this->_processAddress($shippingAddress->getStreetFull());
161
  $shippingHouseumber = $shippingStreetFull['house_number'];
162
  $shippingHousenumberSuffix = $shippingStreetFull['number_addition'];
163
  $shippingStreet = $shippingStreetFull['street'];
164
  $shippingZipcode = $shippingAddress->getPostcode();
165
  $shippingPhonenumber = $this->_processPhoneNumber($shippingAddress->getTelephone());
166
- $shippingCountryCode = $shippingAddress->getCountry();
167
 
168
- $customerEmail = $this->_order->getCustomerEmail();
169
 
170
 
171
  $array = array(
@@ -214,10 +214,10 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Amex_Observer extends TIG_Bucka
214
  if ('' == $matches[1]) {
215
  // Number at beginning
216
  $ret['house_number'] = trim($matches[2]);
217
- $ret['street'] = trim($matches[3]);
218
  } else {
219
  // Number at end
220
- $ret['street'] = trim($matches[1]);
221
  $ret['house_number'] = trim($matches[2]);
222
  $ret['number_addition'] = trim($matches[3]);
223
  }
1
  <?php
2
+ class TIG_Buckaroo3Extended_Model_PaymentMethods_Amex_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
+ {
4
  protected $_code = 'buckaroo3extended_amex';
5
  protected $_method = 'amex';
6
+
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
+
13
  $request = $observer->getRequest();
14
+
15
  $vars = $request->getVars();
16
+
17
  $array = array(
18
  $this->_method => array(
19
  'action' => 'Pay',
20
  'version' => 1,
21
  ),
22
  );
23
+
24
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
25
  $array['creditmanagement'] = array(
26
  'action' => 'Invoice',
27
  'version' => 1,
28
  );
29
  }
30
+
31
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
32
  $vars['services'] = array_merge($vars['services'], $array);
33
  } else {
34
  $vars['services'] = $array;
35
  }
36
+
37
  $request->setVars($vars);
38
+
39
  return $this;
40
  }
41
+
42
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
43
  {
44
  if($this->_isChosenMethod($observer) === false) {
61
  {
62
  $this->_addAavCredentials($vars);
63
  }
64
+
65
  $request->setVars($vars);
66
+
67
  return $this;
68
  }
69
+
70
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
71
  {
72
  if($this->_isChosenMethod($observer) === false) {
73
  return $this;
74
  }
75
+
76
  $request = $observer->getRequest();
77
+
78
  $codeBits = explode('_', $this->_code);
79
  $code = end($codeBits);
80
  $request->setMethod($code);
81
+
82
  return $this;
83
  }
84
+
85
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
86
  {
87
  if($this->_isChosenMethod($observer) === false) {
96
 
97
  return $this;
98
  }
99
+
100
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
101
  {
102
  if($this->_isChosenMethod($observer) === false) {
104
  }
105
 
106
  $refundRequest = $observer->getRequest();
107
+
108
  $vars = $refundRequest->getVars();
109
 
110
  $array = array(
111
  'action' => 'Refund',
112
  'version' => 1,
113
  );
114
+
115
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
116
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
117
  } else {
122
 
123
  return $this;
124
  }
125
+
126
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
127
  {
128
  if($this->_isChosenMethod($observer) === false) {
155
  $billingPhonenumber = $this->_processPhoneNumber($billingAddress['telephone']);
156
 
157
 
158
+ $shippingFirstname = $shippingAddress->getFirstname();
159
+ $shippingLastname = $shippingAddress->getLastname();
160
  $shippingStreetFull = $this->_processAddress($shippingAddress->getStreetFull());
161
  $shippingHouseumber = $shippingStreetFull['house_number'];
162
  $shippingHousenumberSuffix = $shippingStreetFull['number_addition'];
163
  $shippingStreet = $shippingStreetFull['street'];
164
  $shippingZipcode = $shippingAddress->getPostcode();
165
  $shippingPhonenumber = $this->_processPhoneNumber($shippingAddress->getTelephone());
166
+ $shippingCountryCode = $shippingAddress->getCountry();
167
 
168
+ $customerEmail = $this->_order->getCustomerEmail();
169
 
170
 
171
  $array = array(
214
  if ('' == $matches[1]) {
215
  // Number at beginning
216
  $ret['house_number'] = trim($matches[2]);
217
+ $ret['street'] = trim($matches[3]);
218
  } else {
219
  // Number at end
220
+ $ret['street'] = trim($matches[1]);
221
  $ret['house_number'] = trim($matches[2]);
222
  $ret['number_addition'] = trim($matches[3]);
223
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Bancontactmrcash/Observer.php CHANGED
@@ -17,16 +17,16 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Bancontactmrcash_Observer
17
 
18
  $array = array(
19
  $this->_method => array(
20
- 'action' => 'Pay',
21
  'version' => 1,
22
  ),
23
  );
24
 
25
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
26
- $array['creditmanagement'] = array(
27
- 'action' => 'Invoice',
28
- 'version' => 1,
29
- );
30
  }
31
 
32
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
@@ -53,9 +53,9 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Bancontactmrcash_Observer
53
  $vars = $request->getVars();
54
 
55
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
56
- $this->_addCustomerVariables($vars);
57
- $this->_addCreditManagement($vars);
58
- $this->_addAdditionalCreditManagementVariables($vars);
59
  }
60
 
61
  $array = array(
@@ -125,7 +125,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Bancontactmrcash_Observer
125
  $vars = $refundRequest->getVars();
126
 
127
  $array = array(
128
- 'action' => 'Refund',
129
  'version' => 1,
130
  );
131
 
17
 
18
  $array = array(
19
  $this->_method => array(
20
+ 'action' => 'Pay',
21
  'version' => 1,
22
  ),
23
  );
24
 
25
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
26
+ $array['creditmanagement'] = array(
27
+ 'action' => 'Invoice',
28
+ 'version' => 1,
29
+ );
30
  }
31
 
32
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
53
  $vars = $request->getVars();
54
 
55
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
56
+ $this->_addCustomerVariables($vars);
57
+ $this->_addCreditManagement($vars);
58
+ $this->_addAdditionalCreditManagementVariables($vars);
59
  }
60
 
61
  $array = array(
125
  $vars = $refundRequest->getVars();
126
 
127
  $array = array(
128
+ 'action' => 'Refund',
129
  'version' => 1,
130
  );
131
 
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Bancontactmrcash/PaymentMethod.php CHANGED
@@ -10,5 +10,5 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Bancontactmrcash_PaymentMethod
10
 
11
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_bancontactmrcash_checkout_form';
12
 
13
- protected $_canRefundInvoicePartial = false;
14
  }
10
 
11
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_bancontactmrcash_checkout_form';
12
 
13
+ protected $_canRefundInvoicePartial = true;
14
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Cartebancaire/Observer.php CHANGED
@@ -150,9 +150,9 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Cartebancaire_Observer extends
150
  ->setBuckarooSecureAuthenticated($authenticated)
151
  ->save();
152
 
153
- if ($order->getTransactionKey()) {
154
- $this->_updateSecureStatus($enrolled, $authenticated, $order);
155
- }
156
 
157
  return $this;
158
  }
@@ -167,12 +167,12 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Cartebancaire_Observer extends
167
  $enrolled = $order->getBuckarooSecureEnrolled();
168
  $authenticated = $order->getBuckarooSecureAuthenticated();
169
 
170
- if (is_null($enrolled) || is_null($authenticated)) {
171
- return $this;
172
- }
173
 
174
- $this->_updateSecureStatus($enrolled, $authenticated, $order);
175
 
176
- return $this;
177
  }
178
  }
150
  ->setBuckarooSecureAuthenticated($authenticated)
151
  ->save();
152
 
153
+ if ($order->getTransactionKey()) {
154
+ $this->_updateSecureStatus($enrolled, $authenticated, $order);
155
+ }
156
 
157
  return $this;
158
  }
167
  $enrolled = $order->getBuckarooSecureEnrolled();
168
  $authenticated = $order->getBuckarooSecureAuthenticated();
169
 
170
+ if (is_null($enrolled) || is_null($authenticated)) {
171
+ return $this;
172
+ }
173
 
174
+ $this->_updateSecureStatus($enrolled, $authenticated, $order);
175
 
176
+ return $this;
177
  }
178
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Cartebleue/Observer.php CHANGED
@@ -1,44 +1,44 @@
1
  <?php
2
  class TIG_Buckaroo3Extended_Model_PaymentMethods_Cartebleue_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
- {
4
  protected $_code = 'buckaroo3extended_cartebleue';
5
  protected $_method = 'cartebleuevisa';
6
-
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
-
13
  $request = $observer->getRequest();
14
-
15
  $vars = $request->getVars();
16
-
17
  $array = array(
18
  $this->_method => array(
19
  'action' => 'Pay',
20
  'version' => 1,
21
  ),
22
  );
23
-
24
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
25
  $array['creditmanagement'] = array(
26
  'action' => 'Invoice',
27
  'version' => 1,
28
  );
29
  }
30
-
31
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
32
  $vars['services'] = array_merge($vars['services'], $array);
33
  } else {
34
  $vars['services'] = $array;
35
  }
36
-
37
  $request->setVars($vars);
38
-
39
  return $this;
40
  }
41
-
42
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
43
  {
44
  if($this->_isChosenMethod($observer) === false) {
@@ -56,27 +56,27 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Cartebleue_Observer extends TIG
56
  $this->_addCreditManagement($vars);
57
  $this->_addAdditionalCreditManagementVariables($vars);
58
  }
59
-
60
  $request->setVars($vars);
61
 
62
  return $this;
63
  }
64
-
65
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
66
  {
67
  if($this->_isChosenMethod($observer) === false) {
68
  return $this;
69
  }
70
-
71
  $request = $observer->getRequest();
72
-
73
  $codeBits = explode('_', $this->_code);
74
  $code = end($codeBits);
75
  $request->setMethod($code);
76
-
77
  return $this;
78
  }
79
-
80
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
81
  {
82
  if($this->_isChosenMethod($observer) === false) {
@@ -91,7 +91,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Cartebleue_Observer extends TIG
91
 
92
  return $this;
93
  }
94
-
95
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
96
  {
97
  if($this->_isChosenMethod($observer) === false) {
@@ -99,14 +99,14 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Cartebleue_Observer extends TIG
99
  }
100
 
101
  $refundRequest = $observer->getRequest();
102
-
103
  $vars = $refundRequest->getVars();
104
 
105
  $array = array(
106
  'action' => 'Refund',
107
  'version' => 1,
108
  );
109
-
110
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
111
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
112
  } else {
@@ -117,7 +117,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Cartebleue_Observer extends TIG
117
 
118
  return $this;
119
  }
120
-
121
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
122
  {
123
  if($this->_isChosenMethod($observer) === false) {
@@ -126,53 +126,53 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Cartebleue_Observer extends TIG
126
 
127
  return $this;
128
  }
129
-
130
  public function buckaroo3extended_return_custom_processing(Varien_Event_Observer $observer)
131
  {
132
  if($this->_isChosenMethod($observer) === false) {
133
  return $this;
134
  }
135
-
136
  $response = $observer->getPostArray();
137
  $order = $observer->getOrder();
138
-
139
  $enrolled = false;
140
  $authenticated = false;
141
  if (isset($response['brq_SERVICE_mastercard_Enrolled']) && isset($response['brq_SERVICE_mastercard_Authentication'])) {
142
  $enrolled = $response['brq_SERVICE_mastercard_Enrolled'];
143
  $enrolled = ($enrolled == 'Y') ? true : false;
144
-
145
  $authenticated = $response['brq_SERVICE_mastercard_Authentication'];
146
  $authenticated = ($authenticated == 'Y') ? true : false;
147
  }
148
-
149
  $order->setBuckarooSecureEnrolled($enrolled)
150
  ->setBuckarooSecureAuthenticated($authenticated)
151
  ->save();
152
-
153
- if ($order->getTransactionKey()) {
154
- $this->_updateSecureStatus($enrolled, $authenticated, $order);
155
- }
156
-
157
  return $this;
158
  }
159
-
160
  public function buckaroo3extended_push_custom_processing_after(Varien_Event_Observer $observer)
161
  {
162
  if($this->_isChosenMethod($observer) === false) {
163
  return $this;
164
  }
165
-
166
  $order = $observer->getOrder();
167
  $enrolled = $order->getBuckarooSecureEnrolled();
168
  $authenticated = $order->getBuckarooSecureAuthenticated();
169
-
170
- if (is_null($enrolled) || is_null($authenticated)) {
171
- return $this;
172
- }
173
-
174
- $this->_updateSecureStatus($enrolled, $authenticated, $order);
175
-
176
- return $this;
177
  }
178
  }
1
  <?php
2
  class TIG_Buckaroo3Extended_Model_PaymentMethods_Cartebleue_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
+ {
4
  protected $_code = 'buckaroo3extended_cartebleue';
5
  protected $_method = 'cartebleuevisa';
6
+
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
+
13
  $request = $observer->getRequest();
14
+
15
  $vars = $request->getVars();
16
+
17
  $array = array(
18
  $this->_method => array(
19
  'action' => 'Pay',
20
  'version' => 1,
21
  ),
22
  );
23
+
24
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
25
  $array['creditmanagement'] = array(
26
  'action' => 'Invoice',
27
  'version' => 1,
28
  );
29
  }
30
+
31
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
32
  $vars['services'] = array_merge($vars['services'], $array);
33
  } else {
34
  $vars['services'] = $array;
35
  }
36
+
37
  $request->setVars($vars);
38
+
39
  return $this;
40
  }
41
+
42
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
43
  {
44
  if($this->_isChosenMethod($observer) === false) {
56
  $this->_addCreditManagement($vars);
57
  $this->_addAdditionalCreditManagementVariables($vars);
58
  }
59
+
60
  $request->setVars($vars);
61
 
62
  return $this;
63
  }
64
+
65
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
66
  {
67
  if($this->_isChosenMethod($observer) === false) {
68
  return $this;
69
  }
70
+
71
  $request = $observer->getRequest();
72
+
73
  $codeBits = explode('_', $this->_code);
74
  $code = end($codeBits);
75
  $request->setMethod($code);
76
+
77
  return $this;
78
  }
79
+
80
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
81
  {
82
  if($this->_isChosenMethod($observer) === false) {
91
 
92
  return $this;
93
  }
94
+
95
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
96
  {
97
  if($this->_isChosenMethod($observer) === false) {
99
  }
100
 
101
  $refundRequest = $observer->getRequest();
102
+
103
  $vars = $refundRequest->getVars();
104
 
105
  $array = array(
106
  'action' => 'Refund',
107
  'version' => 1,
108
  );
109
+
110
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
111
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
112
  } else {
117
 
118
  return $this;
119
  }
120
+
121
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
122
  {
123
  if($this->_isChosenMethod($observer) === false) {
126
 
127
  return $this;
128
  }
129
+
130
  public function buckaroo3extended_return_custom_processing(Varien_Event_Observer $observer)
131
  {
132
  if($this->_isChosenMethod($observer) === false) {
133
  return $this;
134
  }
135
+
136
  $response = $observer->getPostArray();
137
  $order = $observer->getOrder();
138
+
139
  $enrolled = false;
140
  $authenticated = false;
141
  if (isset($response['brq_SERVICE_mastercard_Enrolled']) && isset($response['brq_SERVICE_mastercard_Authentication'])) {
142
  $enrolled = $response['brq_SERVICE_mastercard_Enrolled'];
143
  $enrolled = ($enrolled == 'Y') ? true : false;
144
+
145
  $authenticated = $response['brq_SERVICE_mastercard_Authentication'];
146
  $authenticated = ($authenticated == 'Y') ? true : false;
147
  }
148
+
149
  $order->setBuckarooSecureEnrolled($enrolled)
150
  ->setBuckarooSecureAuthenticated($authenticated)
151
  ->save();
152
+
153
+ if ($order->getTransactionKey()) {
154
+ $this->_updateSecureStatus($enrolled, $authenticated, $order);
155
+ }
156
+
157
  return $this;
158
  }
159
+
160
  public function buckaroo3extended_push_custom_processing_after(Varien_Event_Observer $observer)
161
  {
162
  if($this->_isChosenMethod($observer) === false) {
163
  return $this;
164
  }
165
+
166
  $order = $observer->getOrder();
167
  $enrolled = $order->getBuckarooSecureEnrolled();
168
  $authenticated = $order->getBuckarooSecureAuthenticated();
169
+
170
+ if (is_null($enrolled) || is_null($authenticated)) {
171
+ return $this;
172
+ }
173
+
174
+ $this->_updateSecureStatus($enrolled, $authenticated, $order);
175
+
176
+ return $this;
177
  }
178
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Giftcards/Observer.php CHANGED
@@ -1,19 +1,19 @@
1
  <?php
2
- class TIG_Buckaroo3Extended_Model_PaymentMethods_Giftcards_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
- {
4
  protected $_code = 'buckaroo3extended_giftcards';
5
  protected $_method = 'giftcards';
6
-
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
-
13
  $request = $observer->getRequest();
14
-
15
  $vars = $request->getVars();
16
-
17
  $array = array();
18
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
19
  $array['creditmanagement'] = array(
@@ -21,7 +21,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Giftcards_Observer extends TIG_
21
  'version' => 1,
22
  );
23
  }
24
-
25
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
26
  $vars['services'] = array_merge($vars['services'], $array);
27
  } else {
@@ -29,10 +29,10 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Giftcards_Observer extends TIG_
29
  }
30
 
31
  $request->setVars($vars);
32
-
33
  return $this;
34
  }
35
-
36
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
37
  {
38
  if($this->_isChosenMethod($observer) === false) {
@@ -47,87 +47,87 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Giftcards_Observer extends TIG_
47
  $this->_addCreditManagement($vars);
48
  $this->_addAdditionalCreditManagementVariables($vars);
49
  }
50
-
51
  $availableCards = Mage::getStoreConfig('buckaroo/buckaroo3extended_giftcards/cards_allowed', Mage::app()->getStore()->getId());
52
  if (empty($availableCards)) {
53
  Mage::throwException('no giftcards available');
54
  }
55
  $availableCards .= ',ideal';
56
-
57
  $array = array(
58
- 'servicesSelectableByClient' => $availableCards,
59
- 'continueOnImcomplete' => 'RedirectToHTML',
60
  );
61
-
62
  if (array_key_exists('customVars', $vars)) {
63
  $vars['customVars'] = array_merge($vars['customVars'], $array);
64
  } else {
65
  $vars['customVars'] = $array;
66
  }
67
-
68
  $request->setVars($vars);
69
-
70
  return $this;
71
  }
72
-
73
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
74
  {
75
  if($this->_isChosenMethod($observer) === false) {
76
  return $this;
77
  }
78
-
79
  $request = $observer->getRequest();
80
-
81
  $codeBits = explode('_', $this->_code);
82
  $code = end($codeBits);
83
  $request->setMethod($code);
84
-
85
  return $this;
86
  }
87
-
88
  protected function _isChosenMethod($observer)
89
  {
90
  $ret = false;
91
-
92
  $chosenMethod = $observer->getOrder()->getPayment()->getMethod();
93
-
94
  if ($chosenMethod === $this->_code) {
95
  $ret = true;
96
  }
97
  return $ret;
98
  }
99
-
100
  public function buckaroo3extended_push_custom_processing($observer)
101
  {
102
  if($this->_isChosenMethod($observer) === false) {
103
  return $this;
104
  }
105
-
106
  $push = $observer->getPush();
107
  $postData = $push->getPostArray();
108
  if (!empty($postData['brq_relatedtransaction_partialpayment'])) {
109
  $order = $observer->getOrder();
110
  if ($postData['brq_amount'] < $order->getGrandTotal()) {
111
  $order->setTransactionKey($postData['brq_relatedtransaction_partialpayment']);
112
-
113
- $processingPaymentStatus = Mage::getStoreConfig('buckaroo/buckaroo3extended_giftcards/order_status_giftcard', Mage::app()->getStore()->getStoreId());
114
  if (!empty($processingPaymentStatus)) {
115
  $order->setStatus($processingPaymentStatus);
116
  }
117
-
118
  $order->save();
119
  $push->setCustomResponseProcessing(true);
120
  }
121
  }
122
  }
123
-
124
-
125
  public function buckaroo3extended_return_custom_processing($observer)
126
  {
127
  if($this->_isChosenMethod($observer) === false) {
128
  return $this;
129
  }
130
-
131
  $return = $observer->getReturn();
132
  $postData = $return->getPostArray();
133
  $order = $observer->getOrder();
@@ -136,12 +136,12 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Giftcards_Observer extends TIG_
136
  $return->setCustomResponseProcessing(true);
137
  $return->customSuccess();
138
  }
139
-
140
  if ($code == 'buckaroo3extended_giftcards' && $postData['brq_statuscode'] == 890 && $postData['brq_amount'] < $order->getGrandTotal()) {
141
  $return->setCustomResponseProcessing(true);
142
  $return->customFailed();
143
  }
144
  }
145
-
146
-
147
  }
1
  <?php
2
+ class TIG_Buckaroo3Extended_Model_PaymentMethods_Giftcards_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
+ {
4
  protected $_code = 'buckaroo3extended_giftcards';
5
  protected $_method = 'giftcards';
6
+
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
+
13
  $request = $observer->getRequest();
14
+
15
  $vars = $request->getVars();
16
+
17
  $array = array();
18
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
19
  $array['creditmanagement'] = array(
21
  'version' => 1,
22
  );
23
  }
24
+
25
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
26
  $vars['services'] = array_merge($vars['services'], $array);
27
  } else {
29
  }
30
 
31
  $request->setVars($vars);
32
+
33
  return $this;
34
  }
35
+
36
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
37
  {
38
  if($this->_isChosenMethod($observer) === false) {
47
  $this->_addCreditManagement($vars);
48
  $this->_addAdditionalCreditManagementVariables($vars);
49
  }
50
+
51
  $availableCards = Mage::getStoreConfig('buckaroo/buckaroo3extended_giftcards/cards_allowed', Mage::app()->getStore()->getId());
52
  if (empty($availableCards)) {
53
  Mage::throwException('no giftcards available');
54
  }
55
  $availableCards .= ',ideal';
56
+
57
  $array = array(
58
+ 'servicesSelectableByClient' => $availableCards,
59
+ 'continueOnImcomplete' => 'RedirectToHTML',
60
  );
61
+
62
  if (array_key_exists('customVars', $vars)) {
63
  $vars['customVars'] = array_merge($vars['customVars'], $array);
64
  } else {
65
  $vars['customVars'] = $array;
66
  }
67
+
68
  $request->setVars($vars);
69
+
70
  return $this;
71
  }
72
+
73
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
74
  {
75
  if($this->_isChosenMethod($observer) === false) {
76
  return $this;
77
  }
78
+
79
  $request = $observer->getRequest();
80
+
81
  $codeBits = explode('_', $this->_code);
82
  $code = end($codeBits);
83
  $request->setMethod($code);
84
+
85
  return $this;
86
  }
87
+
88
  protected function _isChosenMethod($observer)
89
  {
90
  $ret = false;
91
+
92
  $chosenMethod = $observer->getOrder()->getPayment()->getMethod();
93
+
94
  if ($chosenMethod === $this->_code) {
95
  $ret = true;
96
  }
97
  return $ret;
98
  }
99
+
100
  public function buckaroo3extended_push_custom_processing($observer)
101
  {
102
  if($this->_isChosenMethod($observer) === false) {
103
  return $this;
104
  }
105
+
106
  $push = $observer->getPush();
107
  $postData = $push->getPostArray();
108
  if (!empty($postData['brq_relatedtransaction_partialpayment'])) {
109
  $order = $observer->getOrder();
110
  if ($postData['brq_amount'] < $order->getGrandTotal()) {
111
  $order->setTransactionKey($postData['brq_relatedtransaction_partialpayment']);
112
+
113
+ $processingPaymentStatus = Mage::getStoreConfig('buckaroo/buckaroo3extended_giftcards/order_status_giftcard', $order->getStoreId());
114
  if (!empty($processingPaymentStatus)) {
115
  $order->setStatus($processingPaymentStatus);
116
  }
117
+
118
  $order->save();
119
  $push->setCustomResponseProcessing(true);
120
  }
121
  }
122
  }
123
+
124
+
125
  public function buckaroo3extended_return_custom_processing($observer)
126
  {
127
  if($this->_isChosenMethod($observer) === false) {
128
  return $this;
129
  }
130
+
131
  $return = $observer->getReturn();
132
  $postData = $return->getPostArray();
133
  $order = $observer->getOrder();
136
  $return->setCustomResponseProcessing(true);
137
  $return->customSuccess();
138
  }
139
+
140
  if ($code == 'buckaroo3extended_giftcards' && $postData['brq_statuscode'] == 890 && $postData['brq_amount'] < $order->getGrandTotal()) {
141
  $return->setCustomResponseProcessing(true);
142
  $return->customFailed();
143
  }
144
  }
145
+
146
+
147
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Ideal/Observer.php CHANGED
@@ -3,7 +3,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Ideal_Observer extends TIG_Buck
3
  {
4
  protected $_code = 'buckaroo3extended_ideal';
5
  protected $_method = 'ideal';
6
-
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
@@ -14,25 +14,25 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Ideal_Observer extends TIG_Buck
14
 
15
  $vars = $request->getVars();
16
  $serviceVersion = $this->_getServiceVersion();
17
-
18
  $array = array(
19
  $this->_method => array(
20
- 'action' => 'Pay',
21
  'version' => $serviceVersion,
22
  ),
23
  );
24
-
25
  $order = $request->getOrder();
26
  $order->setBuckarooServiceVersionUsed($serviceVersion)
27
  ->save();
28
-
29
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
30
- $array['creditmanagement'] = array(
31
- 'action' => 'Invoice',
32
- 'version' => 1,
33
- );
34
  }
35
-
36
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
37
  $vars['services'] = array_merge($vars['services'], $array);
38
  } else {
@@ -57,11 +57,11 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Ideal_Observer extends TIG_Buck
57
  $vars = $request->getVars();
58
 
59
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
60
- $this->_addCustomerVariables($vars);
61
- $this->_addCreditManagement($vars);
62
- $this->_addAdditionalCreditManagementVariables($vars);
63
  }
64
-
65
  $issuer = $this->_getIssuer();
66
  $array = array(
67
  'issuer' => $issuer,
@@ -71,7 +71,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Ideal_Observer extends TIG_Buck
71
  } else {
72
  $vars['customVars'][$this->_method] = $array;
73
  }
74
-
75
  $request->setVars($vars);
76
 
77
  return $this;
@@ -111,7 +111,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Ideal_Observer extends TIG_Buck
111
 
112
  return $issuer;
113
  }
114
-
115
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
116
  {
117
  if($this->_isChosenMethod($observer) === false) {
@@ -126,7 +126,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Ideal_Observer extends TIG_Buck
126
 
127
  return $this;
128
  }
129
-
130
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
131
  {
132
  if($this->_isChosenMethod($observer) === false) {
@@ -134,15 +134,15 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Ideal_Observer extends TIG_Buck
134
  }
135
 
136
  $refundRequest = $observer->getRequest();
137
-
138
  $vars = $refundRequest->getVars();
139
  $serviceVersion = $this->_getRefundServiceVersion($refundRequest->getOrder());
140
-
141
  $array = array(
142
- 'action' => 'Refund',
143
  'version' => $serviceVersion,
144
  );
145
-
146
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
147
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
148
  } else {
@@ -153,7 +153,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Ideal_Observer extends TIG_Buck
153
 
154
  return $this;
155
  }
156
-
157
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
158
  {
159
  if($this->_isChosenMethod($observer) === false) {
3
  {
4
  protected $_code = 'buckaroo3extended_ideal';
5
  protected $_method = 'ideal';
6
+
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
14
 
15
  $vars = $request->getVars();
16
  $serviceVersion = $this->_getServiceVersion();
17
+
18
  $array = array(
19
  $this->_method => array(
20
+ 'action' => 'Pay',
21
  'version' => $serviceVersion,
22
  ),
23
  );
24
+
25
  $order = $request->getOrder();
26
  $order->setBuckarooServiceVersionUsed($serviceVersion)
27
  ->save();
28
+
29
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
30
+ $array['creditmanagement'] = array(
31
+ 'action' => 'Invoice',
32
+ 'version' => 1,
33
+ );
34
  }
35
+
36
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
37
  $vars['services'] = array_merge($vars['services'], $array);
38
  } else {
57
  $vars = $request->getVars();
58
 
59
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
60
+ $this->_addCustomerVariables($vars);
61
+ $this->_addCreditManagement($vars);
62
+ $this->_addAdditionalCreditManagementVariables($vars);
63
  }
64
+
65
  $issuer = $this->_getIssuer();
66
  $array = array(
67
  'issuer' => $issuer,
71
  } else {
72
  $vars['customVars'][$this->_method] = $array;
73
  }
74
+
75
  $request->setVars($vars);
76
 
77
  return $this;
111
 
112
  return $issuer;
113
  }
114
+
115
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
116
  {
117
  if($this->_isChosenMethod($observer) === false) {
126
 
127
  return $this;
128
  }
129
+
130
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
131
  {
132
  if($this->_isChosenMethod($observer) === false) {
134
  }
135
 
136
  $refundRequest = $observer->getRequest();
137
+
138
  $vars = $refundRequest->getVars();
139
  $serviceVersion = $this->_getRefundServiceVersion($refundRequest->getOrder());
140
+
141
  $array = array(
142
+ 'action' => 'Refund',
143
  'version' => $serviceVersion,
144
  );
145
+
146
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
147
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
148
  } else {
153
 
154
  return $this;
155
  }
156
+
157
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
158
  {
159
  if($this->_isChosenMethod($observer) === false) {
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Mastercard/Observer.php CHANGED
@@ -1,44 +1,44 @@
1
  <?php
2
- class TIG_Buckaroo3Extended_Model_PaymentMethods_Mastercard_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
- {
4
  protected $_code = 'buckaroo3extended_mastercard';
5
  protected $_method = 'mastercard';
6
-
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
-
13
  $request = $observer->getRequest();
14
-
15
  $vars = $request->getVars();
16
-
17
  $array = array(
18
  $this->_method => array(
19
  'action' => 'Pay',
20
  'version' => 1,
21
  ),
22
  );
23
-
24
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
25
  $array['creditmanagement'] = array(
26
  'action' => 'Invoice',
27
  'version' => 1,
28
  );
29
  }
30
-
31
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
32
  $vars['services'] = array_merge($vars['services'], $array);
33
  } else {
34
  $vars['services'] = $array;
35
  }
36
-
37
  $request->setVars($vars);
38
-
39
  return $this;
40
  }
41
-
42
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
43
  {
44
  if($this->_isChosenMethod($observer) === false) {
@@ -56,27 +56,27 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Mastercard_Observer extends TIG
56
  $this->_addCreditManagement($vars);
57
  $this->_addAdditionalCreditManagementVariables($vars);
58
  }
59
-
60
  $request->setVars($vars);
61
 
62
  return $this;
63
  }
64
-
65
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
66
  {
67
  if($this->_isChosenMethod($observer) === false) {
68
  return $this;
69
  }
70
-
71
  $request = $observer->getRequest();
72
-
73
  $codeBits = explode('_', $this->_code);
74
  $code = end($codeBits);
75
  $request->setMethod($code);
76
-
77
  return $this;
78
  }
79
-
80
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
81
  {
82
  if($this->_isChosenMethod($observer) === false) {
@@ -91,7 +91,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Mastercard_Observer extends TIG
91
 
92
  return $this;
93
  }
94
-
95
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
96
  {
97
  if($this->_isChosenMethod($observer) === false) {
@@ -99,14 +99,14 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Mastercard_Observer extends TIG
99
  }
100
 
101
  $refundRequest = $observer->getRequest();
102
-
103
  $vars = $refundRequest->getVars();
104
 
105
  $array = array(
106
  'action' => 'Refund',
107
  'version' => 1,
108
  );
109
-
110
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
111
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
112
  } else {
@@ -117,7 +117,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Mastercard_Observer extends TIG
117
 
118
  return $this;
119
  }
120
-
121
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
122
  {
123
  if($this->_isChosenMethod($observer) === false) {
@@ -126,53 +126,53 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Mastercard_Observer extends TIG
126
 
127
  return $this;
128
  }
129
-
130
  public function buckaroo3extended_return_custom_processing(Varien_Event_Observer $observer)
131
  {
132
  if($this->_isChosenMethod($observer) === false) {
133
  return $this;
134
  }
135
-
136
  $response = $observer->getPostArray();
137
  $order = $observer->getOrder();
138
-
139
  $enrolled = false;
140
  $authenticated = false;
141
  if (isset($response['brq_SERVICE_mastercard_Enrolled']) && isset($response['brq_SERVICE_mastercard_Authentication'])) {
142
  $enrolled = $response['brq_SERVICE_mastercard_Enrolled'];
143
  $enrolled = ($enrolled == 'Y') ? true : false;
144
-
145
  $authenticated = $response['brq_SERVICE_mastercard_Authentication'];
146
  $authenticated = ($authenticated == 'Y') ? true : false;
147
  }
148
-
149
  $order->setBuckarooSecureEnrolled($enrolled)
150
  ->setBuckarooSecureAuthenticated($authenticated)
151
  ->save();
152
-
153
- if ($order->getTransactionKey()) {
154
- $this->_updateSecureStatus($enrolled, $authenticated, $order);
155
- }
156
-
157
  return $this;
158
  }
159
-
160
  public function buckaroo3extended_push_custom_processing_after(Varien_Event_Observer $observer)
161
  {
162
  if($this->_isChosenMethod($observer) === false) {
163
  return $this;
164
  }
165
-
166
  $order = $observer->getOrder();
167
  $enrolled = $order->getBuckarooSecureEnrolled();
168
  $authenticated = $order->getBuckarooSecureAuthenticated();
169
-
170
- if (is_null($enrolled) || is_null($authenticated)) {
171
- return $this;
172
- }
173
-
174
- $this->_updateSecureStatus($enrolled, $authenticated, $order);
175
-
176
- return $this;
177
  }
178
  }
1
  <?php
2
+ class TIG_Buckaroo3Extended_Model_PaymentMethods_Mastercard_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
+ {
4
  protected $_code = 'buckaroo3extended_mastercard';
5
  protected $_method = 'mastercard';
6
+
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
+
13
  $request = $observer->getRequest();
14
+
15
  $vars = $request->getVars();
16
+
17
  $array = array(
18
  $this->_method => array(
19
  'action' => 'Pay',
20
  'version' => 1,
21
  ),
22
  );
23
+
24
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
25
  $array['creditmanagement'] = array(
26
  'action' => 'Invoice',
27
  'version' => 1,
28
  );
29
  }
30
+
31
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
32
  $vars['services'] = array_merge($vars['services'], $array);
33
  } else {
34
  $vars['services'] = $array;
35
  }
36
+
37
  $request->setVars($vars);
38
+
39
  return $this;
40
  }
41
+
42
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
43
  {
44
  if($this->_isChosenMethod($observer) === false) {
56
  $this->_addCreditManagement($vars);
57
  $this->_addAdditionalCreditManagementVariables($vars);
58
  }
59
+
60
  $request->setVars($vars);
61
 
62
  return $this;
63
  }
64
+
65
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
66
  {
67
  if($this->_isChosenMethod($observer) === false) {
68
  return $this;
69
  }
70
+
71
  $request = $observer->getRequest();
72
+
73
  $codeBits = explode('_', $this->_code);
74
  $code = end($codeBits);
75
  $request->setMethod($code);
76
+
77
  return $this;
78
  }
79
+
80
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
81
  {
82
  if($this->_isChosenMethod($observer) === false) {
91
 
92
  return $this;
93
  }
94
+
95
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
96
  {
97
  if($this->_isChosenMethod($observer) === false) {
99
  }
100
 
101
  $refundRequest = $observer->getRequest();
102
+
103
  $vars = $refundRequest->getVars();
104
 
105
  $array = array(
106
  'action' => 'Refund',
107
  'version' => 1,
108
  );
109
+
110
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
111
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
112
  } else {
117
 
118
  return $this;
119
  }
120
+
121
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
122
  {
123
  if($this->_isChosenMethod($observer) === false) {
126
 
127
  return $this;
128
  }
129
+
130
  public function buckaroo3extended_return_custom_processing(Varien_Event_Observer $observer)
131
  {
132
  if($this->_isChosenMethod($observer) === false) {
133
  return $this;
134
  }
135
+
136
  $response = $observer->getPostArray();
137
  $order = $observer->getOrder();
138
+
139
  $enrolled = false;
140
  $authenticated = false;
141
  if (isset($response['brq_SERVICE_mastercard_Enrolled']) && isset($response['brq_SERVICE_mastercard_Authentication'])) {
142
  $enrolled = $response['brq_SERVICE_mastercard_Enrolled'];
143
  $enrolled = ($enrolled == 'Y') ? true : false;
144
+
145
  $authenticated = $response['brq_SERVICE_mastercard_Authentication'];
146
  $authenticated = ($authenticated == 'Y') ? true : false;
147
  }
148
+
149
  $order->setBuckarooSecureEnrolled($enrolled)
150
  ->setBuckarooSecureAuthenticated($authenticated)
151
  ->save();
152
+
153
+ if ($order->getTransactionKey()) {
154
+ $this->_updateSecureStatus($enrolled, $authenticated, $order);
155
+ }
156
+
157
  return $this;
158
  }
159
+
160
  public function buckaroo3extended_push_custom_processing_after(Varien_Event_Observer $observer)
161
  {
162
  if($this->_isChosenMethod($observer) === false) {
163
  return $this;
164
  }
165
+
166
  $order = $observer->getOrder();
167
  $enrolled = $order->getBuckarooSecureEnrolled();
168
  $authenticated = $order->getBuckarooSecureAuthenticated();
169
+
170
+ if (is_null($enrolled) || is_null($authenticated)) {
171
+ return $this;
172
+ }
173
+
174
+ $this->_updateSecureStatus($enrolled, $authenticated, $order);
175
+
176
+ return $this;
177
  }
178
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Masterpass/Observer.php CHANGED
@@ -68,7 +68,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Masterpass_Observer
68
 
69
  $array = array(
70
  $this->_method => array(
71
- 'action' => 'PaymentInvitation',
72
  'version' => $serviceVersion,
73
  ),
74
  );
@@ -82,7 +82,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Masterpass_Observer
82
 
83
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
84
  $array['creditmanagement'] = array(
85
- 'action' => 'Invoice',
86
  'version' => 1,
87
  );
88
  }
68
 
69
  $array = array(
70
  $this->_method => array(
71
+ 'action' => 'PaymentInvitation',
72
  'version' => $serviceVersion,
73
  ),
74
  );
82
 
83
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
84
  $array['creditmanagement'] = array(
85
+ 'action' => 'Invoice',
86
  'version' => 1,
87
  );
88
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/PaymentMethod.php CHANGED
@@ -131,77 +131,84 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_PaymentMethod extends Mage_Paym
131
  throw new Exception('Buckaroo refunding is currently disabled in the configuration menu.');
132
  return false;
133
  }
134
-
135
  return true;
136
  }
137
 
138
  public function isAvailable($quote = null)
139
  {
140
- if(is_null($quote) || Mage::helper('buckaroo3extended')->isAdmin()){
141
- // Uncomment this code to get all active Buckaroo payment methods in the backend. (3th party extensions)
142
- if(Mage::getStoreConfigFlag('buckaroo/' . $this->_code . '/active', Mage::app()->getStore()->getId())){
143
- return true;
144
- }
 
 
 
 
 
 
 
 
 
145
  return false;
146
  }
147
 
148
- //check if the country specified in the billing address is allowed to use this payment method
149
- if (Mage::getStoreConfig('buckaroo/' . $this->_code . '/allowspecific', $quote->getStoreId()) == 1
150
- && $quote->getBillingAddress()->getCountry())
151
- {
152
- $allowedCountries = explode(',',Mage::getStoreConfig('buckaroo/' . $this->_code . '/specificcountry', $quote->getStoreId()));
 
 
153
  $country = $quote->getBillingAddress()->getCountry();
154
 
155
- if (!in_array($country,$allowedCountries)) {
156
  return false;
157
  }
158
  }
159
 
160
  $areaAllowed = null;
161
  if ($this->canUseInternal()) {
162
- $areaAllowed = Mage::getStoreConfig('buckaroo/' . $this->_code . '/area', $quote->getStoreId());
163
  }
164
 
165
- //check if the paymentmethod is available in the current shop area (frontend or backend)
166
- if ($areaAllowed == 'backend'
 
167
  && !Mage::helper('buckaroo3extended')->isAdmin()
168
  ) {
169
  return false;
170
- } elseif ($areaAllowed == 'frontend'
 
171
  && Mage::helper('buckaroo3extended')->isAdmin()
172
  ) {
173
  return false;
174
  }
175
 
176
- // check if max amount for the issued PaymentMethod is set and if the quote basegrandtotal exceeds that
177
- $maxAmount = Mage::getStoreConfig('buckaroo/' . $this->_code . '/max_amount', $quote->getStoreId());
178
- if (!empty($maxAmount)
179
- && !empty($quote)
180
- && $quote->getBaseGrandTotal() > $maxAmount)
181
- {
 
182
  return false;
183
  }
184
 
185
  // check if min amount for the issued PaymentMethod is set and if the quote basegrandtotal is less than that
186
- $minAmount = Mage::getStoreConfig('buckaroo/' . $this->_code . '/min_amount', $quote->getStoreId());
187
- if (!empty($minAmount)
188
- && !empty($quote)
189
- && $quote->getBaseGrandTotal() < $minAmount)
190
- {
191
- return false;
192
- }
193
-
194
- //check if the module is set to enabled
195
- if (!Mage::getStoreConfig('buckaroo/' . $this->_code . '/active', $quote->getStoreId())) {
196
  return false;
197
  }
198
 
199
- //limit by ip
200
- if (mage::getStoreConfig('dev/restrict/allow_ips') && Mage::getStoreConfig('buckaroo/' . $this->_code . '/limit_by_ip'))
201
- {
202
  $allowedIp = explode(',', mage::getStoreConfig('dev/restrict/allow_ips'));
203
- if (!in_array(Mage::helper('core/http')->getRemoteAddr(), $allowedIp))
204
- {
205
  return false;
206
  }
207
  }
@@ -209,10 +216,8 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_PaymentMethod extends Mage_Paym
209
  // get current currency code
210
  $currency = Mage::app()->getStore()->getBaseCurrencyCode();
211
 
212
-
213
  // currency is not available for this module
214
- if (!in_array($currency, $this->allowedCurrencies))
215
- {
216
  return false;
217
  }
218
 
131
  throw new Exception('Buckaroo refunding is currently disabled in the configuration menu.');
132
  return false;
133
  }
 
134
  return true;
135
  }
136
 
137
  public function isAvailable($quote = null)
138
  {
139
+ $storeId = Mage::app()->getStore()->getId();
140
+
141
+ // Check if quote is null, and try to look it up based on adminhtml session
142
+ if (!$quote && Mage::helper('buckaroo3extended')->isAdmin()) {
143
+ $quote = Mage::getSingleton('adminhtml/session_quote');
144
+ }
145
+
146
+ // If quote is not null, set storeId to quote storeId
147
+ if ($quote) {
148
+ $storeId = $quote->getStoreId();
149
+ }
150
+
151
+ // Check if the module is set to enabled
152
+ if (!Mage::getStoreConfig('buckaroo/' . $this->_code . '/active', $storeId)) {
153
  return false;
154
  }
155
 
156
+ // Check if the country specified in the billing address is allowed to use this payment method
157
+ if (
158
+ $quote
159
+ && Mage::getStoreConfigFlag('buckaroo/' . $this->_code . '/allowspecific', $storeId)
160
+ && $quote->getBillingAddress()->getCountry()
161
+ ) {
162
+ $allowedCountries = explode(',',Mage::getStoreConfig('buckaroo/' . $this->_code . '/specificcountry', $storeId));
163
  $country = $quote->getBillingAddress()->getCountry();
164
 
165
+ if (!in_array($country, $allowedCountries)) {
166
  return false;
167
  }
168
  }
169
 
170
  $areaAllowed = null;
171
  if ($this->canUseInternal()) {
172
+ $areaAllowed = Mage::getStoreConfig('buckaroo/' . $this->_code . '/area', $storeId);
173
  }
174
 
175
+ // Check if the paymentmethod is available in the current shop area (frontend or backend)
176
+ if (
177
+ $areaAllowed == 'backend'
178
  && !Mage::helper('buckaroo3extended')->isAdmin()
179
  ) {
180
  return false;
181
+ } elseif (
182
+ $areaAllowed == 'frontend'
183
  && Mage::helper('buckaroo3extended')->isAdmin()
184
  ) {
185
  return false;
186
  }
187
 
188
+ // Check if max amount for the issued PaymentMethod is set and if the quote basegrandtotal exceeds that
189
+ $maxAmount = Mage::getStoreConfig('buckaroo/' . $this->_code . '/max_amount', $storeId);
190
+ if (
191
+ $quote
192
+ && !empty($maxAmount)
193
+ && $quote->getBaseGrandTotal() > $maxAmount
194
+ ) {
195
  return false;
196
  }
197
 
198
  // check if min amount for the issued PaymentMethod is set and if the quote basegrandtotal is less than that
199
+ $minAmount = Mage::getStoreConfig('buckaroo/' . $this->_code . '/min_amount', $storeId);
200
+ if (
201
+ $quote
202
+ && !empty($minAmount)
203
+ && $quote->getBaseGrandTotal() < $minAmount
204
+ ) {
 
 
 
 
205
  return false;
206
  }
207
 
208
+ // Check limit by ip
209
+ if (mage::getStoreConfig('dev/restrict/allow_ips') && Mage::getStoreConfig('buckaroo/' . $this->_code . '/limit_by_ip')) {
 
210
  $allowedIp = explode(',', mage::getStoreConfig('dev/restrict/allow_ips'));
211
+ if (!in_array(Mage::helper('core/http')->getRemoteAddr(), $allowedIp)) {
 
212
  return false;
213
  }
214
  }
216
  // get current currency code
217
  $currency = Mage::app()->getStore()->getBaseCurrencyCode();
218
 
 
219
  // currency is not available for this module
220
+ if (!in_array($currency, $this->allowedCurrencies)) {
 
221
  return false;
222
  }
223
 
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Paymentguarantee/Observer.php CHANGED
@@ -189,9 +189,9 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Paymentguarantee_Observer exten
189
  switch ($response['status'])
190
  {
191
  case self::BUCKAROO_ERROR:
192
- case self::BUCKAROO_FAILED: $updatedFailed = $pushModel->processFailed($newStates, $response['message']);
193
  break;
194
- case self::BUCKAROO_SUCCESS: $updatedSuccess = $pushModel->processSuccess($newStates, $response['message']);
195
  break;
196
  case self::BUCKAROO_NEUTRAL: $responseModel->_addNote($response['message']);
197
  break;
189
  switch ($response['status'])
190
  {
191
  case self::BUCKAROO_ERROR:
192
+ case self::BUCKAROO_FAILED: $updatedFailed = $pushModel->processFailed($newStates, $response['message']);
193
  break;
194
+ case self::BUCKAROO_SUCCESS: $updatedSuccess = $pushModel->processSuccess($newStates, $response['message']);
195
  break;
196
  case self::BUCKAROO_NEUTRAL: $responseModel->_addNote($response['message']);
197
  break;
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Payperemail/Observer.php CHANGED
@@ -66,9 +66,9 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Payperemail_Observer extends TI
66
  }
67
 
68
  if (!Mage::helper('buckaroo3extended')->isAdmin()) {
69
- $additionalFields = Mage::getSingleton('checkout/session')->getData('additionalFields');
70
  } else {
71
- $additionalFields = Mage::getSingleton('core/session')->getData('additionalFields');
72
  }
73
 
74
  if (is_array($additionalFields)
@@ -87,7 +87,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Payperemail_Observer extends TI
87
  $array = array();
88
  }
89
  $array['MerchantSendsEmail'] = Mage::getStoreConfig('buckaroo/buckaroo3extended_payperemail/send_mail'
90
- , Mage::app()->getStore()->getStoreId()) ? 'false' : 'true';
91
  $array['PaymentMethodsAllowed'] = $this->_getPaymentMethodsAllowed();
92
 
93
  if (array_key_exists('customVars', $vars) && array_key_exists($this->_method, $vars['customVars']) && is_array($vars['customVars'][$this->_method])) {
66
  }
67
 
68
  if (!Mage::helper('buckaroo3extended')->isAdmin()) {
69
+ $additionalFields = Mage::getSingleton('checkout/session')->getData('additionalFields');
70
  } else {
71
+ $additionalFields = Mage::getSingleton('core/session')->getData('additionalFields');
72
  }
73
 
74
  if (is_array($additionalFields)
87
  $array = array();
88
  }
89
  $array['MerchantSendsEmail'] = Mage::getStoreConfig('buckaroo/buckaroo3extended_payperemail/send_mail'
90
+ , $this->_order->getStoreId()) ? 'false' : 'true';
91
  $array['PaymentMethodsAllowed'] = $this->_getPaymentMethodsAllowed();
92
 
93
  if (array_key_exists('customVars', $vars) && array_key_exists($this->_method, $vars['customVars']) && is_array($vars['customVars'][$this->_method])) {
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Payperemail/PaymentMethod.php CHANGED
@@ -42,6 +42,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Payperemail_PaymentMethod exten
42
  'lastname' => $_POST['buckaroo3extended_payperemail_BPE_Customerlastname'],
43
  'mail' => $_POST['buckaroo3extended_payperemail_BPE_Customermail'],
44
  ));
 
45
  return parent::assignData($data);
46
  }
47
  }
42
  'lastname' => $_POST['buckaroo3extended_payperemail_BPE_Customerlastname'],
43
  'mail' => $_POST['buckaroo3extended_payperemail_BPE_Customermail'],
44
  ));
45
+
46
  return parent::assignData($data);
47
  }
48
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Visa/Observer.php CHANGED
@@ -1,54 +1,54 @@
1
  <?php
2
- class TIG_Buckaroo3Extended_Model_PaymentMethods_Visa_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
- {
4
  protected $_code = 'buckaroo3extended_visa';
5
  protected $_method = 'visa';
6
-
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
-
13
  $request = $observer->getRequest();
14
-
15
  $vars = $request->getVars();
16
-
17
  $array = array(
18
  $this->_method => array(
19
  'action' => 'Pay',
20
  'version' => 1,
21
  ),
22
  );
23
-
24
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
25
  $array['creditmanagement'] = array(
26
  'action' => 'Invoice',
27
  'version' => 1,
28
  );
29
  }
30
-
31
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
32
  $vars['services'] = array_merge($vars['services'], $array);
33
  } else {
34
  $vars['services'] = $array;
35
  }
36
-
37
  $request->setVars($vars);
38
-
39
  return $this;
40
  }
41
-
42
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
43
  {
44
  if($this->_isChosenMethod($observer) === false) {
45
  return $this;
46
  }
47
-
48
  $request = $observer->getRequest();
49
  $this->_billingInfo = $request->getBillingInfo();
50
  $this->_order = $request->getOrder();
51
-
52
  $vars = $request->getVars();
53
 
54
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
@@ -57,25 +57,25 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Visa_Observer extends TIG_Bucka
57
  $this->_addAdditionalCreditManagementVariables($vars);
58
  }
59
  $request->setVars($vars);
60
-
61
  return $this;
62
  }
63
-
64
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
65
  {
66
  if($this->_isChosenMethod($observer) === false) {
67
  return $this;
68
  }
69
-
70
  $request = $observer->getRequest();
71
-
72
  $codeBits = explode('_', $this->_code);
73
  $code = end($codeBits);
74
  $request->setMethod($code);
75
-
76
  return $this;
77
  }
78
-
79
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
80
  {
81
  if($this->_isChosenMethod($observer) === false) {
@@ -90,7 +90,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Visa_Observer extends TIG_Bucka
90
 
91
  return $this;
92
  }
93
-
94
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
95
  {
96
  if($this->_isChosenMethod($observer) === false) {
@@ -98,14 +98,14 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Visa_Observer extends TIG_Bucka
98
  }
99
 
100
  $refundRequest = $observer->getRequest();
101
-
102
  $vars = $refundRequest->getVars();
103
 
104
  $array = array(
105
  'action' => 'Refund',
106
  'version' => 1,
107
  );
108
-
109
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
110
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
111
  } else {
@@ -116,7 +116,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Visa_Observer extends TIG_Bucka
116
 
117
  return $this;
118
  }
119
-
120
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
121
  {
122
  if($this->_isChosenMethod($observer) === false) {
@@ -125,53 +125,53 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Visa_Observer extends TIG_Bucka
125
 
126
  return $this;
127
  }
128
-
129
  public function buckaroo3extended_return_custom_processing(Varien_Event_Observer $observer)
130
  {
131
  if($this->_isChosenMethod($observer) === false) {
132
  return $this;
133
  }
134
-
135
  $response = $observer->getPostArray();
136
  $order = $observer->getOrder();
137
-
138
  $enrolled = false;
139
  $authenticated = false;
140
  if (isset($response['brq_SERVICE_visa_Enrolled']) && isset($response['brq_SERVICE_visa_Authentication'])) {
141
  $enrolled = $response['brq_SERVICE_visa_Enrolled'];
142
  $enrolled = ($enrolled == 'Y') ? true : false;
143
-
144
  $authenticated = $response['brq_SERVICE_visa_Authentication'];
145
  $authenticated = ($authenticated == 'Y') ? true : false;
146
  }
147
-
148
  $order->setBuckarooSecureEnrolled($enrolled)
149
  ->setBuckarooSecureAuthenticated($authenticated)
150
  ->save();
151
-
152
- if ($order->getTransactionKey()) {
153
- $this->_updateSecureStatus($enrolled, $authenticated, $order);
154
- }
155
-
156
  return $this;
157
  }
158
-
159
  public function buckaroo3extended_push_custom_processing_after(Varien_Event_Observer $observer)
160
  {
161
  if($this->_isChosenMethod($observer) === false) {
162
  return $this;
163
  }
164
-
165
  $order = $observer->getOrder();
166
  $enrolled = $order->getBuckarooSecureEnrolled();
167
  $authenticated = $order->getBuckarooSecureAuthenticated();
168
-
169
- if (is_null($enrolled) || is_null($authenticated)) {
170
- return $this;
171
- }
172
-
173
- $this->_updateSecureStatus($enrolled, $authenticated, $order);
174
-
175
- return $this;
176
  }
177
  }
1
  <?php
2
+ class TIG_Buckaroo3Extended_Model_PaymentMethods_Visa_Observer extends TIG_Buckaroo3Extended_Model_Observer_Abstract
3
+ {
4
  protected $_code = 'buckaroo3extended_visa';
5
  protected $_method = 'visa';
6
+
7
  public function buckaroo3extended_request_addservices(Varien_Event_Observer $observer)
8
  {
9
  if($this->_isChosenMethod($observer) === false) {
10
  return $this;
11
  }
12
+
13
  $request = $observer->getRequest();
14
+
15
  $vars = $request->getVars();
16
+
17
  $array = array(
18
  $this->_method => array(
19
  'action' => 'Pay',
20
  'version' => 1,
21
  ),
22
  );
23
+
24
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
25
  $array['creditmanagement'] = array(
26
  'action' => 'Invoice',
27
  'version' => 1,
28
  );
29
  }
30
+
31
  if (array_key_exists('services', $vars) && is_array($vars['services'])) {
32
  $vars['services'] = array_merge($vars['services'], $array);
33
  } else {
34
  $vars['services'] = $array;
35
  }
36
+
37
  $request->setVars($vars);
38
+
39
  return $this;
40
  }
41
+
42
  public function buckaroo3extended_request_addcustomvars(Varien_Event_Observer $observer)
43
  {
44
  if($this->_isChosenMethod($observer) === false) {
45
  return $this;
46
  }
47
+
48
  $request = $observer->getRequest();
49
  $this->_billingInfo = $request->getBillingInfo();
50
  $this->_order = $request->getOrder();
51
+
52
  $vars = $request->getVars();
53
 
54
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
57
  $this->_addAdditionalCreditManagementVariables($vars);
58
  }
59
  $request->setVars($vars);
60
+
61
  return $this;
62
  }
63
+
64
  public function buckaroo3extended_request_setmethod(Varien_Event_Observer $observer)
65
  {
66
  if($this->_isChosenMethod($observer) === false) {
67
  return $this;
68
  }
69
+
70
  $request = $observer->getRequest();
71
+
72
  $codeBits = explode('_', $this->_code);
73
  $code = end($codeBits);
74
  $request->setMethod($code);
75
+
76
  return $this;
77
  }
78
+
79
  public function buckaroo3extended_refund_request_setmethod(Varien_Event_Observer $observer)
80
  {
81
  if($this->_isChosenMethod($observer) === false) {
90
 
91
  return $this;
92
  }
93
+
94
  public function buckaroo3extended_refund_request_addservices(Varien_Event_Observer $observer)
95
  {
96
  if($this->_isChosenMethod($observer) === false) {
98
  }
99
 
100
  $refundRequest = $observer->getRequest();
101
+
102
  $vars = $refundRequest->getVars();
103
 
104
  $array = array(
105
  'action' => 'Refund',
106
  'version' => 1,
107
  );
108
+
109
  if (array_key_exists('services', $vars) && is_array($vars['services'][$this->_method])) {
110
  $vars['services'][$this->_method] = array_merge($vars['services'][$this->_method], $array);
111
  } else {
116
 
117
  return $this;
118
  }
119
+
120
  public function buckaroo3extended_refund_request_addcustomvars(Varien_Event_Observer $observer)
121
  {
122
  if($this->_isChosenMethod($observer) === false) {
125
 
126
  return $this;
127
  }
128
+
129
  public function buckaroo3extended_return_custom_processing(Varien_Event_Observer $observer)
130
  {
131
  if($this->_isChosenMethod($observer) === false) {
132
  return $this;
133
  }
134
+
135
  $response = $observer->getPostArray();
136
  $order = $observer->getOrder();
137
+
138
  $enrolled = false;
139
  $authenticated = false;
140
  if (isset($response['brq_SERVICE_visa_Enrolled']) && isset($response['brq_SERVICE_visa_Authentication'])) {
141
  $enrolled = $response['brq_SERVICE_visa_Enrolled'];
142
  $enrolled = ($enrolled == 'Y') ? true : false;
143
+
144
  $authenticated = $response['brq_SERVICE_visa_Authentication'];
145
  $authenticated = ($authenticated == 'Y') ? true : false;
146
  }
147
+
148
  $order->setBuckarooSecureEnrolled($enrolled)
149
  ->setBuckarooSecureAuthenticated($authenticated)
150
  ->save();
151
+
152
+ if ($order->getTransactionKey()) {
153
+ $this->_updateSecureStatus($enrolled, $authenticated, $order);
154
+ }
155
+
156
  return $this;
157
  }
158
+
159
  public function buckaroo3extended_push_custom_processing_after(Varien_Event_Observer $observer)
160
  {
161
  if($this->_isChosenMethod($observer) === false) {
162
  return $this;
163
  }
164
+
165
  $order = $observer->getOrder();
166
  $enrolled = $order->getBuckarooSecureEnrolled();
167
  $authenticated = $order->getBuckarooSecureAuthenticated();
168
+
169
+ if (is_null($enrolled) || is_null($authenticated)) {
170
+ return $this;
171
+ }
172
+
173
+ $this->_updateSecureStatus($enrolled, $authenticated, $order);
174
+
175
+ return $this;
176
  }
177
  }
app/code/community/TIG/Buckaroo3Extended/Model/Process.php CHANGED
@@ -22,9 +22,9 @@
22
 
23
  class TIG_Buckaroo3Extended_Model_Process extends Mage_Index_Model_Process
24
  {
25
- protected $_isLocked = null;
26
-
27
- /**
28
  * Get lock file resource
29
  *
30
  * @return resource | TIG_Buckaroo3Extended_Model_Process
@@ -32,29 +32,29 @@ class TIG_Buckaroo3Extended_Model_Process extends Mage_Index_Model_Process
32
  protected function _getLockFile()
33
  {
34
  if ($this->_lockFile !== null) {
35
- return $this->_lockFile;
36
  }
37
-
38
  $varDir = Mage::getConfig()->getVarDir('locks');
39
  $file = $varDir . DS . 'buckaroo_process_' . $this->getId() . '.lock';
40
-
41
  if (is_file($file)) {
42
- if($this->_lockIsExpired()){
43
- unlink($file);//remove file
44
- $this->_lockFile = fopen($file, 'x');//create new lock file
45
- }else{
46
- $this->_lockFile = fopen($file, 'w');
47
- }
48
  } else {
49
  $this->_lockFile = fopen($file, 'x');
50
  }
51
-
52
  fwrite($this->_lockFile, date('r'));
53
-
54
- return $this->_lockFile;
55
  }
56
-
57
- /**
58
  * Lock process without blocking.
59
  * This method allow protect multiple process running and fast lock validation.
60
  *
@@ -63,28 +63,28 @@ class TIG_Buckaroo3Extended_Model_Process extends Mage_Index_Model_Process
63
  public function lock()
64
  {
65
  $this->_isLocked = true;
66
-
67
  flock($this->_getLockFile(), LOCK_EX | LOCK_NB);
68
 
69
  return $this;
70
  }
71
-
72
- /**
73
- * Lock and block process
74
- *
75
- * @return TIG_Buckaroo3Extended_Model_Process
76
- */
77
- public function lockAndBlock()
78
  {
79
  $this->_isLocked = true;
80
- $file = $this->_getLockFile();
81
-
82
  flock($this->_getLockFile(), LOCK_EX);
83
-
84
  return $this;
85
  }
86
-
87
- /**
88
  * Unlock process
89
  *
90
  * @return TIG_Buckaroo3Extended_Model_Process
@@ -92,15 +92,15 @@ class TIG_Buckaroo3Extended_Model_Process extends Mage_Index_Model_Process
92
  public function unlock()
93
  {
94
  $this->_isLocked = false;
95
- $file = $this->_getLockFile();
96
-
97
- flock($file, LOCK_UN);
98
-
99
  //remove lockfile
100
  $varDir = Mage::getConfig()->getVarDir('locks');
101
  $lockFile = $varDir . DS . 'buckaroo_process_' . $this->getId() . '.lock';
102
  unlink($lockFile);
103
-
104
  return $this;
105
  }
106
 
@@ -114,55 +114,55 @@ class TIG_Buckaroo3Extended_Model_Process extends Mage_Index_Model_Process
114
  if ($this->_isLocked !== null) {
115
  return $this->_isLocked;
116
  }
117
-
118
  $fp = $this->_getLockFile();
119
  if (flock($fp, LOCK_EX | LOCK_NB)) {
120
  flock($fp, LOCK_UN);
121
  return false;
122
  }
123
-
124
- //if the lock exists and exists for longer then 5minutes then remove lock & return false
125
- if($this->_lockIsExpired()){
126
- $varDir = Mage::getConfig()->getVarDir('locks');
127
  $lockFile = $varDir . DS . 'buckaroo_process_' . $this->getId() . '.lock';
128
  unlink($lockFile);
129
-
130
  $this->_getLockFile();//create new lock file
131
- return false;
132
  }
133
-
134
  return true;
135
  }
136
-
137
- /**
138
- * Checks if the lock has expired
139
- *
140
- * @return bool
141
- */
142
- protected function _lockIsExpired(){
143
- $varDir = Mage::getConfig()->getVarDir('locks');
144
- $file = $varDir . DS . 'buckaroo_process_'.$this->getId().'.lock';
145
-
146
- if(!is_file($file)){
147
- $fp = fopen($file, 'x');
148
  fwrite($fp, date('r'));
149
  fclose($fp);
150
  return false;
151
- }
152
-
153
-
154
  $fiveMinAgo = time() - 300;//300
155
- $contents = file_get_contents($file);
156
- $time = strtotime($contents);
157
- $debug = 'current contents: '.$contents . "\n"
158
- . 'contents in timestamp: '.$time . "\n"
159
- . '5 minutes ago in timestamp: '.$fiveMinAgo;
160
-
161
- if($time <= $fiveMinAgo){
162
- $fp = fopen($file,'w');
163
- flock($fp, LOCK_UN);
164
- return true;
165
- }
166
- return false;
167
- }
168
  }
22
 
23
  class TIG_Buckaroo3Extended_Model_Process extends Mage_Index_Model_Process
24
  {
25
+ protected $_isLocked = null;
26
+
27
+ /**
28
  * Get lock file resource
29
  *
30
  * @return resource | TIG_Buckaroo3Extended_Model_Process
32
  protected function _getLockFile()
33
  {
34
  if ($this->_lockFile !== null) {
35
+ return $this->_lockFile;
36
  }
37
+
38
  $varDir = Mage::getConfig()->getVarDir('locks');
39
  $file = $varDir . DS . 'buckaroo_process_' . $this->getId() . '.lock';
40
+
41
  if (is_file($file)) {
42
+ if($this->_lockIsExpired()){
43
+ unlink($file);//remove file
44
+ $this->_lockFile = fopen($file, 'x');//create new lock file
45
+ }else{
46
+ $this->_lockFile = fopen($file, 'w');
47
+ }
48
  } else {
49
  $this->_lockFile = fopen($file, 'x');
50
  }
51
+
52
  fwrite($this->_lockFile, date('r'));
53
+
54
+ return $this->_lockFile;
55
  }
56
+
57
+ /**
58
  * Lock process without blocking.
59
  * This method allow protect multiple process running and fast lock validation.
60
  *
63
  public function lock()
64
  {
65
  $this->_isLocked = true;
66
+
67
  flock($this->_getLockFile(), LOCK_EX | LOCK_NB);
68
 
69
  return $this;
70
  }
71
+
72
+ /**
73
+ * Lock and block process
74
+ *
75
+ * @return TIG_Buckaroo3Extended_Model_Process
76
+ */
77
+ public function lockAndBlock()
78
  {
79
  $this->_isLocked = true;
80
+ $file = $this->_getLockFile();
81
+
82
  flock($this->_getLockFile(), LOCK_EX);
83
+
84
  return $this;
85
  }
86
+
87
+ /**
88
  * Unlock process
89
  *
90
  * @return TIG_Buckaroo3Extended_Model_Process
92
  public function unlock()
93
  {
94
  $this->_isLocked = false;
95
+ $file = $this->_getLockFile();
96
+
97
+ flock($file, LOCK_UN);
98
+
99
  //remove lockfile
100
  $varDir = Mage::getConfig()->getVarDir('locks');
101
  $lockFile = $varDir . DS . 'buckaroo_process_' . $this->getId() . '.lock';
102
  unlink($lockFile);
103
+
104
  return $this;
105
  }
106
 
114
  if ($this->_isLocked !== null) {
115
  return $this->_isLocked;
116
  }
117
+
118
  $fp = $this->_getLockFile();
119
  if (flock($fp, LOCK_EX | LOCK_NB)) {
120
  flock($fp, LOCK_UN);
121
  return false;
122
  }
123
+
124
+ //if the lock exists and exists for longer then 5minutes then remove lock & return false
125
+ if($this->_lockIsExpired()){
126
+ $varDir = Mage::getConfig()->getVarDir('locks');
127
  $lockFile = $varDir . DS . 'buckaroo_process_' . $this->getId() . '.lock';
128
  unlink($lockFile);
129
+
130
  $this->_getLockFile();//create new lock file
131
+ return false;
132
  }
133
+
134
  return true;
135
  }
136
+
137
+ /**
138
+ * Checks if the lock has expired
139
+ *
140
+ * @return bool
141
+ */
142
+ protected function _lockIsExpired(){
143
+ $varDir = Mage::getConfig()->getVarDir('locks');
144
+ $file = $varDir . DS . 'buckaroo_process_'.$this->getId().'.lock';
145
+
146
+ if(!is_file($file)){
147
+ $fp = fopen($file, 'x');
148
  fwrite($fp, date('r'));
149
  fclose($fp);
150
  return false;
151
+ }
152
+
153
+
154
  $fiveMinAgo = time() - 300;//300
155
+ $contents = file_get_contents($file);
156
+ $time = strtotime($contents);
157
+ $debug = 'current contents: '.$contents . "\n"
158
+ . 'contents in timestamp: '.$time . "\n"
159
+ . '5 minutes ago in timestamp: '.$fiveMinAgo;
160
+
161
+ if($time <= $fiveMinAgo){
162
+ $fp = fopen($file,'w');
163
+ flock($fp, LOCK_UN);
164
+ return true;
165
+ }
166
+ return false;
167
+ }
168
  }
app/code/community/TIG/Buckaroo3Extended/Model/Refund/Creditmemo.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extended_Model_Refund_Response_Push
3
  {
4
  protected $_request;
5
-
6
  /**
7
  * This is called when a refund is made in Buckaroo Payment Plaza.
8
  * This Function will result in a creditmemo being created for the order in question.
@@ -11,26 +11,26 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
11
  {
12
  //check if the push is valid and if the order can be updated
13
  list($valid, $canProcess) = $this->_canProcessRefundPush();
14
-
15
  $this->_debugEmail .= "Is the PUSH valid? " . $valid . "\nCan the creditmemo be created? " . $canProcess . "\n";
16
-
17
  if (!$valid || !$canProcess) {
18
  return false;
19
  }
20
-
21
  $success = $this->_createCreditmemo();
22
-
23
  if ($success === false) { //if $success === true, the observer will update the status instead
24
  $this->_updateRefundedOrderStatus($success);
25
  }
26
-
27
  return true;
28
  }
29
-
30
  protected function _createCreditmemo()
31
  {
32
  $data = $this->_getCreditmemoData();
33
-
34
  try {
35
  $creditmemo = $this->_initCreditmemo($data);
36
  if ($creditmemo) {
@@ -60,7 +60,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
60
  }
61
 
62
  $creditmemo->setTransactionKey($this->_postArray['brq_transactions']);
63
-
64
  $creditmemo->register();
65
  if (!empty($data['send_email'])) {
66
  $creditmemo->setEmailSent(true);
@@ -69,9 +69,9 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
69
  $creditmemo->getOrder()->setCustomerNoteNotify(!empty($data['send_email']));
70
  $this->_saveCreditmemo($creditmemo);
71
  $creditmemo->sendEmail(!empty($data['send_email']), $comment);
72
-
73
  Mage::getSingleton('adminhtml/session')->getCommentText(true);
74
-
75
  return true;
76
  } else {
77
  return false;
@@ -85,21 +85,21 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
85
  }
86
  return true;
87
  }
88
-
89
  protected function _initCreditmemo($data, $update = false)
90
  {
91
  $request = $this->getRequest();
92
  $request->setParam('creditmemo', $data);
93
-
94
-
95
  $creditmemo = false;
96
-
97
  $order = $this->_order;
98
-
99
  $service = Mage::getModel('sales/service_order', $order);
100
-
101
  $savedData = $this->_getItemData($data);
102
-
103
  $qtys = array();
104
  foreach ($savedData as $orderItemId =>$itemData) {
105
  if (isset($itemData['qty'])) {
@@ -108,14 +108,14 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
108
  }
109
  $data['qtys'] = $qtys;
110
  $creditmemo = $service->prepareCreditmemo($data);
111
-
112
  /**
113
  * Process back to stock flags
114
  */
115
  foreach ($creditmemo->getAllItems() as $creditmemoItem) {
116
  $creditmemoItem->setBackToStock(false);
117
  }
118
-
119
  $args = array('creditmemo' => $creditmemo, 'request' => $request);
120
  Mage::dispatchEvent('adminhtml_sales_order_creditmemo_register_before', $args);
121
 
@@ -139,7 +139,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
139
 
140
  return $this;
141
  }
142
-
143
  /**
144
  * Get requested items qtys and return to stock flags
145
  */
@@ -152,26 +152,26 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
152
  }
153
  return $qtys;
154
  }
155
-
156
  /**
157
  * Most of the code used to create a creditmemo is copied and modified from the default magento code.
158
  * However, that code expects an array with values. This method creates that array.
159
- *
160
  * @return array $data
161
  */
162
  protected function _getCreditmemoData()
163
  {
164
  $totalAmount = $this->_calculateTotalAmount();
165
-
166
  $data = array(
167
  'do_offline' => '0',
168
  'do_refund' => '0',
169
  'comment_text' => '',
170
  );
171
-
172
  $totalToRefund = $totalAmount + $this->_order->getBaseTotalRefunded();
173
  if ($totalToRefund == $this->_order->getBaseGrandTotal()) {
174
-
175
  //calculates the total adjustments made by previous creditmemos
176
  $creditmemos = $this->_order->getCreditmemosCollection();
177
  $totalAdjustment = 0;
@@ -179,37 +179,53 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
179
  $adjustment = $creditmemo->getBaseAdjustmentPositive() - $creditmemo->getBaseAdjustmentNegative();
180
  $totalAdjustment += $adjustment;
181
  }
182
-
183
  //if the amount to be refunded + the amount that has already been refunded equals the order's base grandtotal
184
  //all products from that order will be refunded as well
185
  $data['shipping_amount'] = $this->_order->getBaseShippingAmount() - $this->_order->getBaseShippingRefunded();
186
  $data['adjustment_negative'] = $totalAdjustment;
187
-
188
  $remainder = $this->_calculateRemainder();
189
-
 
 
 
 
190
  $data['adjustment_positive'] = $remainder;
191
  } else {
 
 
192
  //if the above is not the case; no products will be refunded and this refund will be considered an
193
  //adjustment refund
194
  $data['shipping_amount'] = '0';
195
  $data['adjustment_negative'] = '0';
196
- $data['adjustment_positive'] = $totalAmount;
197
  }
198
-
199
  $items = $this->_getCreditmemoDataItems();
200
-
201
  $data['items'] = $items;
202
-
203
  return $data;
204
  }
205
-
 
 
 
 
 
 
 
 
 
 
206
  protected function _calculateTotalAmount()
207
  {
208
  $amountPushed = $this->_postArray['brq_amount_credit'];
209
-
210
  $baseCurrency = $this->_order->getBaseCurrency()->getCode();
211
  $currency = $this->_postArray['brq_currency'];
212
-
213
  if ($baseCurrency == $currency) {
214
  return $amountPushed;
215
  } else {
@@ -217,17 +233,17 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
217
  return $amount;
218
  }
219
  }
220
-
221
  /**
222
  * Calculates the amount left over after discounts, shipping, taxes, adjustments and the subtotal have been
223
- * taken into account. This remainder is probably caused by some module such as a paymentfee.
224
- *
225
  * This method will return 0 in most cases.
226
  */
227
  protected function _calculateRemainder()
228
  {
229
  $baseTotalToBeRefunded = (
230
- $this->_order->getBaseShippingAmount()
231
  - $this->_order->getBaseShippingRefunded()
232
  ) + (
233
  $this->_order->getBaseSubtotal()
@@ -242,14 +258,14 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
242
  $this->_order->getBaseDiscountAmount()
243
  - $this->_order->getBaseDiscountRefunded()
244
  );
245
-
246
- $remainderToBeRefunded = $this->_order->getBaseGrandTotal()
247
  - $baseTotalToBeRefunded
248
  - $this->_order->getBaseTotalRefunded();
249
-
 
250
  return $remainderToBeRefunded;
251
  }
252
-
253
  /**
254
  * Determines which items need to be refunded. If the amount to be refunded equals the order base grandtotal
255
  * then all items are refunded, otherwise none are
@@ -270,15 +286,15 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
270
  );
271
  }
272
  }
273
-
274
  return $items;
275
  }
276
-
277
  /**
278
  * Checks if the post recieved is valid by checking its signature field.
279
  * This field is unique for every payment and every store.
280
  * Also calls a method that checks if the order is able to have a creditmemo
281
- *
282
  * @return array $return
283
  */
284
  protected function _canProcessRefundPush()
@@ -289,29 +305,29 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
289
  if ($signature === $this->_postArray['brq_signature']) {
290
  $correctSignature = true;
291
  }
292
-
293
  //check if the order can recieve a new creditmemo
294
  if ($correctSignature === true) {
295
  $canProcess = $this->_canProcessCreditmemo();
296
  }
297
-
298
  $return = array(
299
  (bool) $correctSignature,
300
  (bool) $canProcess,
301
  );
302
  return $return;
303
  }
304
-
305
  protected function _canProcessCreditmemo()
306
  {
307
  if (!$this->_order->canCreditmemo()) {
308
  return false;
309
  }
310
-
311
  if (!Mage::getStoreConfig('buckaroo/buckaroo3extended_refund/allow_push')) {
312
  return false;
313
  }
314
-
315
  return true;
316
  }
317
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extended_Model_Refund_Response_Push
3
  {
4
  protected $_request;
5
+
6
  /**
7
  * This is called when a refund is made in Buckaroo Payment Plaza.
8
  * This Function will result in a creditmemo being created for the order in question.
11
  {
12
  //check if the push is valid and if the order can be updated
13
  list($valid, $canProcess) = $this->_canProcessRefundPush();
14
+
15
  $this->_debugEmail .= "Is the PUSH valid? " . $valid . "\nCan the creditmemo be created? " . $canProcess . "\n";
16
+
17
  if (!$valid || !$canProcess) {
18
  return false;
19
  }
20
+
21
  $success = $this->_createCreditmemo();
22
+
23
  if ($success === false) { //if $success === true, the observer will update the status instead
24
  $this->_updateRefundedOrderStatus($success);
25
  }
26
+
27
  return true;
28
  }
29
+
30
  protected function _createCreditmemo()
31
  {
32
  $data = $this->_getCreditmemoData();
33
+
34
  try {
35
  $creditmemo = $this->_initCreditmemo($data);
36
  if ($creditmemo) {
60
  }
61
 
62
  $creditmemo->setTransactionKey($this->_postArray['brq_transactions']);
63
+
64
  $creditmemo->register();
65
  if (!empty($data['send_email'])) {
66
  $creditmemo->setEmailSent(true);
69
  $creditmemo->getOrder()->setCustomerNoteNotify(!empty($data['send_email']));
70
  $this->_saveCreditmemo($creditmemo);
71
  $creditmemo->sendEmail(!empty($data['send_email']), $comment);
72
+
73
  Mage::getSingleton('adminhtml/session')->getCommentText(true);
74
+
75
  return true;
76
  } else {
77
  return false;
85
  }
86
  return true;
87
  }
88
+
89
  protected function _initCreditmemo($data, $update = false)
90
  {
91
  $request = $this->getRequest();
92
  $request->setParam('creditmemo', $data);
93
+
94
+
95
  $creditmemo = false;
96
+
97
  $order = $this->_order;
98
+
99
  $service = Mage::getModel('sales/service_order', $order);
100
+
101
  $savedData = $this->_getItemData($data);
102
+
103
  $qtys = array();
104
  foreach ($savedData as $orderItemId =>$itemData) {
105
  if (isset($itemData['qty'])) {
108
  }
109
  $data['qtys'] = $qtys;
110
  $creditmemo = $service->prepareCreditmemo($data);
111
+
112
  /**
113
  * Process back to stock flags
114
  */
115
  foreach ($creditmemo->getAllItems() as $creditmemoItem) {
116
  $creditmemoItem->setBackToStock(false);
117
  }
118
+
119
  $args = array('creditmemo' => $creditmemo, 'request' => $request);
120
  Mage::dispatchEvent('adminhtml_sales_order_creditmemo_register_before', $args);
121
 
139
 
140
  return $this;
141
  }
142
+
143
  /**
144
  * Get requested items qtys and return to stock flags
145
  */
152
  }
153
  return $qtys;
154
  }
155
+
156
  /**
157
  * Most of the code used to create a creditmemo is copied and modified from the default magento code.
158
  * However, that code expects an array with values. This method creates that array.
159
+ *
160
  * @return array $data
161
  */
162
  protected function _getCreditmemoData()
163
  {
164
  $totalAmount = $this->_calculateTotalAmount();
165
+
166
  $data = array(
167
  'do_offline' => '0',
168
  'do_refund' => '0',
169
  'comment_text' => '',
170
  );
171
+
172
  $totalToRefund = $totalAmount + $this->_order->getBaseTotalRefunded();
173
  if ($totalToRefund == $this->_order->getBaseGrandTotal()) {
174
+
175
  //calculates the total adjustments made by previous creditmemos
176
  $creditmemos = $this->_order->getCreditmemosCollection();
177
  $totalAdjustment = 0;
179
  $adjustment = $creditmemo->getBaseAdjustmentPositive() - $creditmemo->getBaseAdjustmentNegative();
180
  $totalAdjustment += $adjustment;
181
  }
182
+
183
  //if the amount to be refunded + the amount that has already been refunded equals the order's base grandtotal
184
  //all products from that order will be refunded as well
185
  $data['shipping_amount'] = $this->_order->getBaseShippingAmount() - $this->_order->getBaseShippingRefunded();
186
  $data['adjustment_negative'] = $totalAdjustment;
187
+
188
  $remainder = $this->_calculateRemainder();
189
+ //if the totalAmount equals te grandTotal the paymentFee is inside the credit Amount and should not be
190
+ //an positive adjustment.
191
+ if($totalAmount == $this->_order->getBaseGrandTotal()){
192
+ $remainder = 0;
193
+ }
194
  $data['adjustment_positive'] = $remainder;
195
  } else {
196
+ //If this is the first adjustment refund on the order, than the fee must be count off.
197
+ $creditAmount = $this->_setPaymentfeeRefund();
198
  //if the above is not the case; no products will be refunded and this refund will be considered an
199
  //adjustment refund
200
  $data['shipping_amount'] = '0';
201
  $data['adjustment_negative'] = '0';
202
+ $data['adjustment_positive'] = $creditAmount;
203
  }
204
+
205
  $items = $this->_getCreditmemoDataItems();
206
+
207
  $data['items'] = $items;
208
+
209
  return $data;
210
  }
211
+
212
+ protected function _setPaymentfeeRefund()
213
+ {
214
+ $totalAmount = $this->_calculateTotalAmount();
215
+ if(0 == $this->_order->getBaseTotalRefunded()){
216
+ $totalAmount = $totalAmount - ($this->_order->getBaseBuckarooFee() + $this->_order->getBaseBuckarooFeeTaxInvoiced());
217
+ }
218
+
219
+ return $totalAmount;
220
+ }
221
+
222
  protected function _calculateTotalAmount()
223
  {
224
  $amountPushed = $this->_postArray['brq_amount_credit'];
225
+
226
  $baseCurrency = $this->_order->getBaseCurrency()->getCode();
227
  $currency = $this->_postArray['brq_currency'];
228
+
229
  if ($baseCurrency == $currency) {
230
  return $amountPushed;
231
  } else {
233
  return $amount;
234
  }
235
  }
236
+
237
  /**
238
  * Calculates the amount left over after discounts, shipping, taxes, adjustments and the subtotal have been
239
+ * taken into account. This remainder is probably caused by some module such as a paymentfee.
240
+ *
241
  * This method will return 0 in most cases.
242
  */
243
  protected function _calculateRemainder()
244
  {
245
  $baseTotalToBeRefunded = (
246
+ $this->_order->getBaseShippingAmount()
247
  - $this->_order->getBaseShippingRefunded()
248
  ) + (
249
  $this->_order->getBaseSubtotal()
258
  $this->_order->getBaseDiscountAmount()
259
  - $this->_order->getBaseDiscountRefunded()
260
  );
261
+
262
+ $remainderToBeRefunded = $this->_order->getBaseGrandTotal()
263
  - $baseTotalToBeRefunded
264
  - $this->_order->getBaseTotalRefunded();
265
+
266
+
267
  return $remainderToBeRefunded;
268
  }
 
269
  /**
270
  * Determines which items need to be refunded. If the amount to be refunded equals the order base grandtotal
271
  * then all items are refunded, otherwise none are
286
  );
287
  }
288
  }
289
+
290
  return $items;
291
  }
292
+
293
  /**
294
  * Checks if the post recieved is valid by checking its signature field.
295
  * This field is unique for every payment and every store.
296
  * Also calls a method that checks if the order is able to have a creditmemo
297
+ *
298
  * @return array $return
299
  */
300
  protected function _canProcessRefundPush()
305
  if ($signature === $this->_postArray['brq_signature']) {
306
  $correctSignature = true;
307
  }
308
+
309
  //check if the order can recieve a new creditmemo
310
  if ($correctSignature === true) {
311
  $canProcess = $this->_canProcessCreditmemo();
312
  }
313
+
314
  $return = array(
315
  (bool) $correctSignature,
316
  (bool) $canProcess,
317
  );
318
  return $return;
319
  }
320
+
321
  protected function _canProcessCreditmemo()
322
  {
323
  if (!$this->_order->canCreditmemo()) {
324
  return false;
325
  }
326
+
327
  if (!Mage::getStoreConfig('buckaroo/buckaroo3extended_refund/allow_push')) {
328
  return false;
329
  }
330
+
331
  return true;
332
  }
333
  }
app/code/community/TIG/Buckaroo3Extended/Model/Refund/Observer.php CHANGED
@@ -1,51 +1,51 @@
1
  <?php
2
- class TIG_Buckaroo3Extended_Model_Refund_Observer extends Mage_Core_Model_Abstract
3
- {
4
  public function sales_order_payment_refund(Varien_Event_Observer $observer)
5
  {
6
  $payment = $observer->getPayment();
7
  $creditmemo = $observer->getCreditmemo();
8
-
9
  if (!$creditmemo->getTransactionKey()) {
10
  $creditmemo->setTransactionKey($payment->getTransactionKey())->save();
11
  $payment->setTransactionKey(null)->save(); //the transaction key needs to be reset after every refund
12
  }
13
-
14
  $order = $creditmemo->getOrder();
15
  $this->_updateRefundedOrderStatus($creditmemo, $order, true);
16
-
17
  return $this;
18
  }
19
-
20
- protected function _updateRefundedOrderStatus($creditmemo, $order, $success)
21
- {
22
- if (!$creditmemo->getTransactionKey()) {
23
- return false;
24
- }
25
-
26
- $successString = $success ? 'success' : 'failed';
27
- $state = $order->getState();
28
-
29
- if ($success) {
30
- $comment = 'Buckaroo refund request was successfully processed.';
31
- } else {
32
- $comment = 'Unfortunately the Buckaroo refund request could not be processed succesfully.';
33
- }
34
-
35
- if ($order->getBaseGrandTotal() != $order->getBaseTotalRefunded()) {
36
- $configField = "buckaroo/buckaroo3extended_refund/order_status_partial_{$state}_{$successString}";
37
- $status = Mage::getStoreConfig($configField);
38
- } else {
39
- $status = null;
40
- }
41
-
42
- if (!empty($status) && $order->getStatus() != $status) {
43
- $order->setStatus($status)->save();
44
- $order->addStatusHistoryComment($comment, $status)
45
- ->save();
46
- } else {
47
- $order->addStatusHistoryComment($comment)
48
- ->save();
49
- }
50
- }
51
  }
1
  <?php
2
+ class TIG_Buckaroo3Extended_Model_Refund_Observer extends Mage_Core_Model_Abstract
3
+ {
4
  public function sales_order_payment_refund(Varien_Event_Observer $observer)
5
  {
6
  $payment = $observer->getPayment();
7
  $creditmemo = $observer->getCreditmemo();
8
+
9
  if (!$creditmemo->getTransactionKey()) {
10
  $creditmemo->setTransactionKey($payment->getTransactionKey())->save();
11
  $payment->setTransactionKey(null)->save(); //the transaction key needs to be reset after every refund
12
  }
13
+
14
  $order = $creditmemo->getOrder();
15
  $this->_updateRefundedOrderStatus($creditmemo, $order, true);
16
+
17
  return $this;
18
  }
19
+
20
+ protected function _updateRefundedOrderStatus($creditmemo, $order, $success)
21
+ {
22
+ if (!$creditmemo->getTransactionKey()) {
23
+ return false;
24
+ }
25
+
26
+ $successString = $success ? 'success' : 'failed';
27
+ $state = $order->getState();
28
+
29
+ if ($success) {
30
+ $comment = 'Buckaroo refund request was successfully processed.';
31
+ } else {
32
+ $comment = 'Unfortunately the Buckaroo refund request could not be processed succesfully.';
33
+ }
34
+
35
+ if ($order->getBaseGrandTotal() != $order->getBaseTotalRefunded()) {
36
+ $configField = "buckaroo/buckaroo3extended_refund/order_status_partial_{$state}_{$successString}";
37
+ $status = Mage::getStoreConfig($configField, $order->getStoreId());
38
+ } else {
39
+ $status = null;
40
+ }
41
+
42
+ if (!empty($status) && $order->getStatus() != $status) {
43
+ $order->setStatus($status)->save();
44
+ $order->addStatusHistoryComment($comment, $status)
45
+ ->save();
46
+ } else {
47
+ $order->addStatusHistoryComment($comment)
48
+ ->save();
49
+ }
50
+ }
51
  }
app/code/community/TIG/Buckaroo3Extended/Model/Refund/Response/Abstract.php CHANGED
@@ -2,24 +2,24 @@
2
  class TIG_Buckaroo3Extended_Model_Refund_Response_Abstract extends TIG_Buckaroo3Extended_Model_Response_Abstract
3
  {
4
  protected $_payment;
5
-
6
  public function setPayment($payment)
7
  {
8
  $this->_payment = $payment;
9
  }
10
-
11
  public function getPayment()
12
  {
13
  return $this->_payment;
14
  }
15
-
16
  public function __construct($data)
17
  {
18
  $this->setOrder($data['order']);
19
  $this->setPayment($data['payment']);
20
  parent::__construct($data);
21
  }
22
-
23
  public function processResponse()
24
  {
25
  if ($this->_response === false) {
@@ -37,16 +37,16 @@ class TIG_Buckaroo3Extended_Model_Refund_Response_Abstract extends TIG_Buckaroo3
37
  $this->_debugEmail .= "Verified as authentic! \n\n";
38
 
39
  $this->_payment->setTransactionKey($this->_response->Key)->save();
40
-
41
  $parsedResponse = $this->_parseResponse();
42
  $this->_debugEmail .= "Parsed response: " . var_export($parsedResponse, true) . "\n";
43
 
44
  $this->_debugEmail .= "Dispatching custom order processing event... \n";
45
-
46
  Mage::dispatchEvent(
47
- 'buckaroo3extended_refund_response_custom_processing',
48
  array(
49
- 'model' => $this,
50
  'order' => $this->getOrder(),
51
  'response' => $parsedResponse,
52
  )
@@ -55,51 +55,51 @@ class TIG_Buckaroo3Extended_Model_Refund_Response_Abstract extends TIG_Buckaroo3
55
  $this->_requiredAction($parsedResponse);
56
  return $this;
57
  }
58
-
59
-
60
  protected function _success()
61
  {
62
  $this->_debugEmail .= 'The refund request has been accepted \n';
63
-
64
  $this->sendDebugEmail();
65
-
66
  return $this;
67
  }
68
 
69
  protected function _failed()
70
  {
71
  $this->_debugEmail .= 'The transaction request has failed. \n';
72
-
73
  $this->_updateRefundedOrderStatus(false);
74
-
75
  $this->sendDebugEmail();
76
-
77
  Mage::throwException(Mage::helper('buckaroo3extended')->__($this->_response->Status->Code->_));
78
  }
79
 
80
  protected function _error()
81
  {
82
  $this->_debugEmail .= 'The transaction request produced an error. \n';
83
-
84
  if ($this->getOrder()) {
85
  $this->_updateRefundedOrderStatus(false);
86
  }
87
-
88
  $this->sendDebugEmail();
89
-
90
  if (isset($this->_response) && isset($this->_response->Status->Code->_)) {
91
- Mage::throwException(Mage::helper('buckaroo3extended')->__('Buckaroo returned the following error: %s', $this->_response->Status->Code->_));
92
  } else {
93
- Mage::throwException('An unknown error occurred.');
94
  }
95
-
96
  }
97
 
98
  protected function _neutral()
99
  {
100
  $this->_failed();
101
  }
102
-
103
  protected function _verifyError()
104
  {
105
  $this->_failed();
@@ -108,11 +108,11 @@ class TIG_Buckaroo3Extended_Model_Refund_Response_Abstract extends TIG_Buckaroo3
108
  protected function _pendingPayment()
109
  {
110
  $this->_debugEmail .= 'This refund request has been put on hold. \n';
111
-
112
  $this->_updateRefundedOrderStatus(false);
113
-
114
  $this->sendDebugEmail();
115
-
116
  Mage::throwException(Mage::helper('buckaroo3extended')->__("This refund request has been put on hold by Buckaroo. You can find out details regarding the action and complete the refund in Buckaroo Payment Plaza."));
117
  }
118
  }
2
  class TIG_Buckaroo3Extended_Model_Refund_Response_Abstract extends TIG_Buckaroo3Extended_Model_Response_Abstract
3
  {
4
  protected $_payment;
5
+
6
  public function setPayment($payment)
7
  {
8
  $this->_payment = $payment;
9
  }
10
+
11
  public function getPayment()
12
  {
13
  return $this->_payment;
14
  }
15
+
16
  public function __construct($data)
17
  {
18
  $this->setOrder($data['order']);
19
  $this->setPayment($data['payment']);
20
  parent::__construct($data);
21
  }
22
+
23
  public function processResponse()
24
  {
25
  if ($this->_response === false) {
37
  $this->_debugEmail .= "Verified as authentic! \n\n";
38
 
39
  $this->_payment->setTransactionKey($this->_response->Key)->save();
40
+
41
  $parsedResponse = $this->_parseResponse();
42
  $this->_debugEmail .= "Parsed response: " . var_export($parsedResponse, true) . "\n";
43
 
44
  $this->_debugEmail .= "Dispatching custom order processing event... \n";
45
+
46
  Mage::dispatchEvent(
47
+ 'buckaroo3extended_refund_response_custom_processing',
48
  array(
49
+ 'model' => $this,
50
  'order' => $this->getOrder(),
51
  'response' => $parsedResponse,
52
  )
55
  $this->_requiredAction($parsedResponse);
56
  return $this;
57
  }
58
+
59
+
60
  protected function _success()
61
  {
62
  $this->_debugEmail .= 'The refund request has been accepted \n';
63
+
64
  $this->sendDebugEmail();
65
+
66
  return $this;
67
  }
68
 
69
  protected function _failed()
70
  {
71
  $this->_debugEmail .= 'The transaction request has failed. \n';
72
+
73
  $this->_updateRefundedOrderStatus(false);
74
+
75
  $this->sendDebugEmail();
76
+
77
  Mage::throwException(Mage::helper('buckaroo3extended')->__($this->_response->Status->Code->_));
78
  }
79
 
80
  protected function _error()
81
  {
82
  $this->_debugEmail .= 'The transaction request produced an error. \n';
83
+
84
  if ($this->getOrder()) {
85
  $this->_updateRefundedOrderStatus(false);
86
  }
87
+
88
  $this->sendDebugEmail();
89
+
90
  if (isset($this->_response) && isset($this->_response->Status->Code->_)) {
91
+ Mage::throwException(Mage::helper('buckaroo3extended')->__('Buckaroo returned the following error: %s', $this->_response->Status->Code->_));
92
  } else {
93
+ Mage::throwException('An unknown error occurred.');
94
  }
95
+
96
  }
97
 
98
  protected function _neutral()
99
  {
100
  $this->_failed();
101
  }
102
+
103
  protected function _verifyError()
104
  {
105
  $this->_failed();
108
  protected function _pendingPayment()
109
  {
110
  $this->_debugEmail .= 'This refund request has been put on hold. \n';
111
+
112
  $this->_updateRefundedOrderStatus(false);
113
+
114
  $this->sendDebugEmail();
115
+
116
  Mage::throwException(Mage::helper('buckaroo3extended')->__("This refund request has been put on hold by Buckaroo. You can find out details regarding the action and complete the refund in Buckaroo Payment Plaza."));
117
  }
118
  }
app/code/community/TIG/Buckaroo3Extended/Model/Refund/Response/Push.php CHANGED
@@ -1,366 +1,366 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Model_Refund_Response_Push extends TIG_Buckaroo3Extended_Model_Refund_Response_Abstract
3
  {
4
  const PAYMENTCODE = 'buckaroo3extended';
5
-
6
  protected $_order = '';
7
  protected $_creditmemo = '';
8
  protected $_postArray = '';
9
  protected $_debugEmail = '';
10
  protected $_method = '';
11
  protected $_storeId = '';
12
-
13
- public function setCurrentOrder($order)
14
  {
15
- $this->_order = $order;
16
  }
17
-
18
  public function getCurrentOrder()
19
  {
20
- return $this->_order;
21
  }
22
-
23
- public function setCreditmemo($creditmemo)
24
  {
25
- $this->_creditmemo = $creditmemo;
26
  }
27
-
28
  public function getCreditmemo()
29
  {
30
- return $this->_creditmemo;
31
  }
32
-
33
  public function setPostArray($array)
34
  {
35
- $this->_postArray = $array;
36
  }
37
-
38
  public function getPostArray()
39
  {
40
- return $this->_postArray;
41
  }
42
-
43
  public function setDebugEmail($debugEmail)
44
  {
45
- $this->_debugEmail = $debugEmail;
46
  }
47
-
48
  public function getDebugEmail()
49
  {
50
- return $this->_debugEmail;
51
  }
52
-
53
  public function setStoreId($storeId)
54
  {
55
  $this->_storeId = $storeId;
56
  }
57
-
58
  public function getStoreId()
59
  {
60
  return $this->_storeId;
61
  }
62
-
63
  public function __construct($data = array())
64
  {
65
- $this->setCurrentOrder($data['order']);
66
- $this->setPostArray($data['postArray']);
67
- $this->setDebugEmail($data['debugEmail']);
68
  $this->setStoreId($this->getOrder()->getStoreId());
69
-
70
- foreach ($data['order']->getCreditmemosCollection() as $creditmemo)
71
- {
72
- if ($creditmemo->getTransactionKey() == $data['postArray']['brq_transactions']) {
73
- $this->setCreditmemo($creditmemo);
74
- break;
75
- }
76
- }
77
-
78
- if (empty($creditmemo)) {
79
- $this->_debugEmail .= "Could not locate a creditmemo with the supplied transaction key. \n";
80
- }
81
  }
82
- /**
83
- * Processes 'pushes' recieves from Buckaroo with the purpose of updating an existing creditmemo or create a new one.
84
- *
85
- * @return boolean
86
- */
87
- public function processPush()
88
- {
89
- //check if the push is valid and if the order can be updated
90
- $canProcessPush = $this->_canProcessRefundPush();
91
- list($canProcess, $canUpdate) = $canProcessPush;
92
-
93
- $this->_debugEmail .= "can the creditmemo be processed? " . $canProcess . "\ncan the creditmemo be updated? " . $canUpdate . "\n";
94
-
95
- if (!$canProcess || !$canUpdate) {
96
- return false;
97
- }
98
-
99
- $response = $this->_parseRefundPostResponse($this->_postArray['brq_statuscode']);
100
-
101
- $this->_debugEmail .= "Response recieved: " . var_export($response, true) . "\n\n";
102
-
103
- Mage::dispatchEvent('buckaroo3extended_refund_push_custom_processing', array('push' => $this, 'order' => $this->getCurrentOrder(), 'response' => $response));
104
-
105
  if ($this->getCustomResponseProcessing()) {
106
  return true;
107
  }
108
-
109
- return true;
110
- }
111
-
112
- /**
113
  * Checks if the post recieved is valid by checking its signature field.
114
  * This field is unique for every payment and every store.
115
  * Also calls method that checks if an order is able to be updated further.
116
  * Canceled, completed, holded etc. orders are not able to be updated
117
- *
118
  * @return array $return
119
  */
120
- protected function _canProcessRefundPush()
121
- {
122
- $correctSignature = false;
123
- $canUpdate = false;
124
- $signature = $this->_calculateSignature();
125
- if ($signature === $this->_postArray['brq_signature']) {
126
- $correctSignature = true;
127
- }
128
-
129
- //check if the order can recieve further status updates
130
- if ($correctSignature === true) {
131
- if ($this->_order->canRefund() && $this->_postArray['brq_statuscode'] == '190') {
132
- $canUpdate = true;
133
- }
134
- }
135
-
136
- $return = array(
137
- (bool) $correctSignature,
138
- (bool) $canUpdate,
139
- );
140
- return $return;
141
- }
142
-
143
- /**
144
- * Process a succesful order. Sets its new state and status, sends an order confirmation email
145
- * and creates an invoice if set in config.
146
- *
147
- * @TODO $trx will be used for Buckaroo2012Refund, to be added in 3.0.0
148
- *
149
- * @param array $response | int $response
150
- * @param string $description
151
- *
152
- * @return boolean
153
- */
154
- protected function _processSuccess($newStates, $description = false)
155
- {
156
  $this->_autoInvoice();
157
-
158
- $description = Mage::helper('buckaroo3extended')->__($description);
159
-
160
- $description .= " (#{$this->_postArray['brq_statuscode']})";
161
-
162
- //sets the transaction key if its defined ($trx)
163
- //will retrieve it from the response array, if response actually is an array
164
- if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
165
- $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
166
- $this->_order->save();
167
- }
168
-
169
- $this->_order->setState($newStates[0], $newStates[1], $description)
170
- ->save();
171
-
172
- //send new order email if it hasnt already been sent
173
- if(!$this->_order->getEmailSent())
174
  {
175
- $this->_order->sendNewOrderEmail();
176
  }
177
-
178
- return true;
179
- }
180
-
181
- /**
182
- * Process a failed order. Sets its new state and status and cencels the order
183
- * if set in config.
184
- *
185
- * @param array $newStates
186
- * @param string $description
187
- *
188
- * @return boolean
189
- */
190
- protected function _processFailed($newStates, $description = false)
191
- {
192
- $description .= " (#{$this->_postArray['brq_statuscode']})";
193
-
194
- //sets the transaction key if its defined ($trx)
195
- //will retrieve it from the response array, if response actually is an array
196
- if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
197
- $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
198
- }
199
-
200
- if (Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/cancel_on_failed', $this->getStoreId())) {
201
- $this->_order->cancel()
202
- ->save();
203
- if ($description) {
204
- $this->_order->addStatusHistoryComment(Mage::helper('buckaroo3extended')->__($description))
205
- ->save();
206
- }
207
- } else {
208
- $this->_order->setState($newStates[0], $newStates[1], Mage::helper('buckaroo3extended')->__($description))
209
- ->save();
210
- }
211
- return true;
212
- }
213
-
214
- /**
215
- * Processes an order for which an incorrect amount has been paid (can only happen with Overschrijving)
216
- *
217
- * @return boolean
218
- */
219
- protected function _processIncorrectPayment($newStates)
220
- {
221
- //determine whether too much or not enough has been paid and determine the status history copmment accordingly
222
- $amount = round($this->_order->getBaseGrandTotal()*100, 0);
223
- $currency = $this->_order->getBaseCurrencyCode();
224
-
225
- if ($amount > $this->_postArray['brq_amount']) {
226
- $setState = $newStates[0];
227
  $setStatus = $newStates[1];
228
- $description = Mage::helper('buckaroo3extended')->__('te weinig betaald: ')
229
- . round(($this->_postArray['brq_amount'] / 100), 2)
230
- . ' '
231
- . $currency
232
- . Mage::helper('buckaroo3extended')->__(' is overgemaakt. Order bedrag was: ')
233
- . round($this->_order->getGrandTotal(), 2)
234
- . ' '
235
- . $currency;
236
- } elseif ($amount < $this->_postArray['bpe_amount']) {
237
- $setState = $newStates[0];
238
  $setStatus = $newStates[1];
239
- $description = Mage::helper('buckaroo3extended')->__('te veel betaald: ')
240
- . round(($this->_postArray['brq_amount'] / 100), 2)
241
- . ' '
242
- . $currency
243
- . Mage::helper('buckaroo3extended')->__(' is overgemaakt. Order bedrag was: ')
244
- . round($this->_order->getGrandTotal(), 2)
245
- . ' '
246
- . $currency;
247
- } else {
248
- //the correct amount was actually paid, so return false
249
- return false;
250
- }
251
-
252
- if (Mage::getStoreConfig('buckaroo/buckaroo3extended_transfer/on_hold_email')) {
253
- $this->_sendOverschrijvingOnHoldEmail();
254
- }
255
-
256
- //hold the order
257
- $this->_order->hold()
258
- ->save();
259
- $this->_order->setState($setState, $setStatus, Mage::helper('buckaroo3extended')->__($description))
260
- ->save();
261
-
262
- return true;
263
- }
264
-
265
- /**
266
- * processes an order awaiting payment. Sets its new state and status.
267
- *
268
- * @param array $newStates
269
- * @param string $description
270
- *
271
- * @return boolean
272
- */
273
  protected function _processPendingPayment($newStates, $description = false)
274
- {
275
- $description = Mage::helper('buckaroo3extended')->__($description);
276
- $description .= " (#{$this->_postArray['brq_statuscode']})";
277
-
278
- //sets the transaction key if its defined ($trx)
279
- //will retrieve it from the response array, if response actually is an array
280
- if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
281
- $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
282
- }
283
-
284
- $this->_order->setState($newStates[0], $newStates[1], $description)
285
- ->save();
286
-
287
- return true;
288
- }
289
-
290
- public function getNewStates($code)
291
- {
292
- return $this->_getNewStates($code);
293
- }
294
-
295
- public function processPendingPayment($newStates, $description = false) {
296
- return $this->_processPendingPayment($newStates, $description);
297
- }
298
-
299
  public function processSuccess($newStates, $description = false) {
300
- return $this->_processPendingPayment($newStates, $description);
301
- }
302
-
303
  public function processFailed($newStates, $description = false) {
304
- return $this->_processPendingPayment($newStates, $description);
305
- }
306
-
307
  public function processIncorrectPayment($newStates) {
308
- return $this->_processPendingPayment($newStates);
309
- }
310
-
311
- /**
312
- * Determines the signature using array sorting and the SHA1 hash algorithm
313
- *
314
- * @param array $origArray
315
- *
316
- * @return string $signature
317
- */
318
- protected function _calculateSignature()
319
- {
320
- if (isset($this->_postArray['isOldPost']) && $this->_postArray['isOldPost'])
321
- {
322
- return $this->_calculateOldSignature();
323
- }
324
-
325
- $origArray = $this->_postArray;
326
- unset($origArray['brq_signature']);
327
-
328
- //sort the array
329
- $sortableArray = $this->buckarooSort($origArray);
330
-
331
- //turn into string and add the secret key to the end
332
- $signatureString = '';
333
- foreach($sortableArray as $key => $value) {
334
  $value = urldecode($value);
335
- $signatureString .= $key . '=' . $value;
336
- }
337
- $signatureString .= Mage::getStoreConfig('buckaroo/buckaroo3extended/digital_signature', $this->getStoreId());
338
-
339
- $this->_debugEmail .= "\nSignaturestring: {$signatureString}\n";
340
-
341
- //return the SHA1 encoded string for comparison
342
- $signature = SHA1($signatureString);
343
-
344
- $this->_debugEmail .= "\nSignature: {$signature}\n";
345
-
346
- return $signature;
347
- }
348
-
349
- protected function _calculateOldSignature()
350
- {
351
  $signature2 = md5(
352
- $this->_postArray['oldPost']["bpe_trx"]
353
- . $this->_postArray['oldPost']["bpe_timestamp"]
354
- . Mage::getStoreConfig('buckaroo/buckaroo3extended/key', $this->getStoreId())
355
- . $this->_postArray['oldPost']["bpe_invoice"]
356
- . $this->_postArray['oldPost']["bpe_reference"]
357
- . $this->_postArray['oldPost']["bpe_currency"]
358
- . $this->_postArray['oldPost']["bpe_amount"]
359
- . $this->_postArray['oldPost']["bpe_result"]
360
- . $this->_postArray['oldPost']["bpe_mode"]
361
- . Mage::getStoreConfig('buckaroo/buckaroo3extended/digital_signature', $this->getStoreId())
362
- );
363
-
364
- return $signature2;
365
- }
366
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Model_Refund_Response_Push extends TIG_Buckaroo3Extended_Model_Refund_Response_Abstract
3
  {
4
  const PAYMENTCODE = 'buckaroo3extended';
5
+
6
  protected $_order = '';
7
  protected $_creditmemo = '';
8
  protected $_postArray = '';
9
  protected $_debugEmail = '';
10
  protected $_method = '';
11
  protected $_storeId = '';
12
+
13
+ public function setCurrentOrder($order)
14
  {
15
+ $this->_order = $order;
16
  }
17
+
18
  public function getCurrentOrder()
19
  {
20
+ return $this->_order;
21
  }
22
+
23
+ public function setCreditmemo($creditmemo)
24
  {
25
+ $this->_creditmemo = $creditmemo;
26
  }
27
+
28
  public function getCreditmemo()
29
  {
30
+ return $this->_creditmemo;
31
  }
32
+
33
  public function setPostArray($array)
34
  {
35
+ $this->_postArray = $array;
36
  }
37
+
38
  public function getPostArray()
39
  {
40
+ return $this->_postArray;
41
  }
42
+
43
  public function setDebugEmail($debugEmail)
44
  {
45
+ $this->_debugEmail = $debugEmail;
46
  }
47
+
48
  public function getDebugEmail()
49
  {
50
+ return $this->_debugEmail;
51
  }
52
+
53
  public function setStoreId($storeId)
54
  {
55
  $this->_storeId = $storeId;
56
  }
57
+
58
  public function getStoreId()
59
  {
60
  return $this->_storeId;
61
  }
62
+
63
  public function __construct($data = array())
64
  {
65
+ $this->setCurrentOrder($data['order']);
66
+ $this->setPostArray($data['postArray']);
67
+ $this->setDebugEmail($data['debugEmail']);
68
  $this->setStoreId($this->getOrder()->getStoreId());
69
+
70
+ foreach ($data['order']->getCreditmemosCollection() as $creditmemo)
71
+ {
72
+ if ($creditmemo->getTransactionKey() == $data['postArray']['brq_transactions']) {
73
+ $this->setCreditmemo($creditmemo);
74
+ break;
75
+ }
76
+ }
77
+
78
+ if (empty($creditmemo)) {
79
+ $this->_debugEmail .= "Could not locate a creditmemo with the supplied transaction key. \n";
80
+ }
81
  }
82
+ /**
83
+ * Processes 'pushes' recieves from Buckaroo with the purpose of updating an existing creditmemo or create a new one.
84
+ *
85
+ * @return boolean
86
+ */
87
+ public function processPush()
88
+ {
89
+ //check if the push is valid and if the order can be updated
90
+ $canProcessPush = $this->_canProcessRefundPush();
91
+ list($canProcess, $canUpdate) = $canProcessPush;
92
+
93
+ $this->_debugEmail .= "can the creditmemo be processed? " . $canProcess . "\ncan the creditmemo be updated? " . $canUpdate . "\n";
94
+
95
+ if (!$canProcess || !$canUpdate) {
96
+ return false;
97
+ }
98
+
99
+ $response = $this->_parseRefundPostResponse($this->_postArray['brq_statuscode']);
100
+
101
+ $this->_debugEmail .= "Response recieved: " . var_export($response, true) . "\n\n";
102
+
103
+ Mage::dispatchEvent('buckaroo3extended_refund_push_custom_processing', array('push' => $this, 'order' => $this->getCurrentOrder(), 'response' => $response));
104
+
105
  if ($this->getCustomResponseProcessing()) {
106
  return true;
107
  }
108
+
109
+ return true;
110
+ }
111
+
112
+ /**
113
  * Checks if the post recieved is valid by checking its signature field.
114
  * This field is unique for every payment and every store.
115
  * Also calls method that checks if an order is able to be updated further.
116
  * Canceled, completed, holded etc. orders are not able to be updated
117
+ *
118
  * @return array $return
119
  */
120
+ protected function _canProcessRefundPush()
121
+ {
122
+ $correctSignature = false;
123
+ $canUpdate = false;
124
+ $signature = $this->_calculateSignature();
125
+ if ($signature === $this->_postArray['brq_signature']) {
126
+ $correctSignature = true;
127
+ }
128
+
129
+ //check if the order can recieve further status updates
130
+ if ($correctSignature === true) {
131
+ if ($this->_order->canRefund() && $this->_postArray['brq_statuscode'] == '190') {
132
+ $canUpdate = true;
133
+ }
134
+ }
135
+
136
+ $return = array(
137
+ (bool) $correctSignature,
138
+ (bool) $canUpdate,
139
+ );
140
+ return $return;
141
+ }
142
+
143
+ /**
144
+ * Process a succesful order. Sets its new state and status, sends an order confirmation email
145
+ * and creates an invoice if set in config.
146
+ *
147
+ * @TODO $trx will be used for Buckaroo2012Refund, to be added in 3.0.0
148
+ *
149
+ * @param array $response | int $response
150
+ * @param string $description
151
+ *
152
+ * @return boolean
153
+ */
154
+ protected function _processSuccess($newStates, $description = false)
155
+ {
156
  $this->_autoInvoice();
157
+
158
+ $description = Mage::helper('buckaroo3extended')->__($description);
159
+
160
+ $description .= " (#{$this->_postArray['brq_statuscode']})";
161
+
162
+ //sets the transaction key if its defined ($trx)
163
+ //will retrieve it from the response array, if response actually is an array
164
+ if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
165
+ $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
166
+ $this->_order->save();
167
+ }
168
+
169
+ $this->_order->setState($newStates[0], $newStates[1], $description)
170
+ ->save();
171
+
172
+ //send new order email if it hasnt already been sent
173
+ if(!$this->_order->getEmailSent())
174
  {
175
+ $this->_order->sendNewOrderEmail();
176
  }
177
+
178
+ return true;
179
+ }
180
+
181
+ /**
182
+ * Process a failed order. Sets its new state and status and cencels the order
183
+ * if set in config.
184
+ *
185
+ * @param array $newStates
186
+ * @param string $description
187
+ *
188
+ * @return boolean
189
+ */
190
+ protected function _processFailed($newStates, $description = false)
191
+ {
192
+ $description .= " (#{$this->_postArray['brq_statuscode']})";
193
+
194
+ //sets the transaction key if its defined ($trx)
195
+ //will retrieve it from the response array, if response actually is an array
196
+ if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
197
+ $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
198
+ }
199
+
200
+ if (Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/cancel_on_failed', $this->getStoreId())) {
201
+ $this->_order->cancel()
202
+ ->save();
203
+ if ($description) {
204
+ $this->_order->addStatusHistoryComment(Mage::helper('buckaroo3extended')->__($description))
205
+ ->save();
206
+ }
207
+ } else {
208
+ $this->_order->setState($newStates[0], $newStates[1], Mage::helper('buckaroo3extended')->__($description))
209
+ ->save();
210
+ }
211
+ return true;
212
+ }
213
+
214
+ /**
215
+ * Processes an order for which an incorrect amount has been paid (can only happen with Overschrijving)
216
+ *
217
+ * @return boolean
218
+ */
219
+ protected function _processIncorrectPayment($newStates)
220
+ {
221
+ //determine whether too much or not enough has been paid and determine the status history copmment accordingly
222
+ $amount = round($this->_order->getBaseGrandTotal()*100, 0);
223
+ $currency = $this->_order->getBaseCurrencyCode();
224
+
225
+ if ($amount > $this->_postArray['brq_amount']) {
226
+ $setState = $newStates[0];
227
  $setStatus = $newStates[1];
228
+ $description = Mage::helper('buckaroo3extended')->__('te weinig betaald: ')
229
+ . round(($this->_postArray['brq_amount'] / 100), 2)
230
+ . ' '
231
+ . $currency
232
+ . Mage::helper('buckaroo3extended')->__(' is overgemaakt. Order bedrag was: ')
233
+ . round($this->_order->getGrandTotal(), 2)
234
+ . ' '
235
+ . $currency;
236
+ } elseif ($amount < $this->_postArray['bpe_amount']) {
237
+ $setState = $newStates[0];
238
  $setStatus = $newStates[1];
239
+ $description = Mage::helper('buckaroo3extended')->__('te veel betaald: ')
240
+ . round(($this->_postArray['brq_amount'] / 100), 2)
241
+ . ' '
242
+ . $currency
243
+ . Mage::helper('buckaroo3extended')->__(' is overgemaakt. Order bedrag was: ')
244
+ . round($this->_order->getGrandTotal(), 2)
245
+ . ' '
246
+ . $currency;
247
+ } else {
248
+ //the correct amount was actually paid, so return false
249
+ return false;
250
+ }
251
+
252
+ if (Mage::getStoreConfig('buckaroo/buckaroo3extended_transfer/on_hold_email')) {
253
+ $this->_sendOverschrijvingOnHoldEmail();
254
+ }
255
+
256
+ //hold the order
257
+ $this->_order->hold()
258
+ ->save();
259
+ $this->_order->setState($setState, $setStatus, Mage::helper('buckaroo3extended')->__($description))
260
+ ->save();
261
+
262
+ return true;
263
+ }
264
+
265
+ /**
266
+ * processes an order awaiting payment. Sets its new state and status.
267
+ *
268
+ * @param array $newStates
269
+ * @param string $description
270
+ *
271
+ * @return boolean
272
+ */
273
  protected function _processPendingPayment($newStates, $description = false)
274
+ {
275
+ $description = Mage::helper('buckaroo3extended')->__($description);
276
+ $description .= " (#{$this->_postArray['brq_statuscode']})";
277
+
278
+ //sets the transaction key if its defined ($trx)
279
+ //will retrieve it from the response array, if response actually is an array
280
+ if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
281
+ $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
282
+ }
283
+
284
+ $this->_order->setState($newStates[0], $newStates[1], $description)
285
+ ->save();
286
+
287
+ return true;
288
+ }
289
+
290
+ public function getNewStates($code)
291
+ {
292
+ return $this->_getNewStates($code);
293
+ }
294
+
295
+ public function processPendingPayment($newStates, $description = false) {
296
+ return $this->_processPendingPayment($newStates, $description);
297
+ }
298
+
299
  public function processSuccess($newStates, $description = false) {
300
+ return $this->_processPendingPayment($newStates, $description);
301
+ }
302
+
303
  public function processFailed($newStates, $description = false) {
304
+ return $this->_processPendingPayment($newStates, $description);
305
+ }
306
+
307
  public function processIncorrectPayment($newStates) {
308
+ return $this->_processPendingPayment($newStates);
309
+ }
310
+
311
+ /**
312
+ * Determines the signature using array sorting and the SHA1 hash algorithm
313
+ *
314
+ * @param array $origArray
315
+ *
316
+ * @return string $signature
317
+ */
318
+ protected function _calculateSignature()
319
+ {
320
+ if (isset($this->_postArray['isOldPost']) && $this->_postArray['isOldPost'])
321
+ {
322
+ return $this->_calculateOldSignature();
323
+ }
324
+
325
+ $origArray = $this->_postArray;
326
+ unset($origArray['brq_signature']);
327
+
328
+ //sort the array
329
+ $sortableArray = $this->buckarooSort($origArray);
330
+
331
+ //turn into string and add the secret key to the end
332
+ $signatureString = '';
333
+ foreach($sortableArray as $key => $value) {
334
  $value = urldecode($value);
335
+ $signatureString .= $key . '=' . $value;
336
+ }
337
+ $signatureString .= Mage::getStoreConfig('buckaroo/buckaroo3extended/digital_signature', $this->getStoreId());
338
+
339
+ $this->_debugEmail .= "\nSignaturestring: {$signatureString}\n";
340
+
341
+ //return the SHA1 encoded string for comparison
342
+ $signature = SHA1($signatureString);
343
+
344
+ $this->_debugEmail .= "\nSignature: {$signature}\n";
345
+
346
+ return $signature;
347
+ }
348
+
349
+ protected function _calculateOldSignature()
350
+ {
351
  $signature2 = md5(
352
+ $this->_postArray['oldPost']["bpe_trx"]
353
+ . $this->_postArray['oldPost']["bpe_timestamp"]
354
+ . Mage::getStoreConfig('buckaroo/buckaroo3extended/key', $this->getStoreId())
355
+ . $this->_postArray['oldPost']["bpe_invoice"]
356
+ . $this->_postArray['oldPost']["bpe_reference"]
357
+ . $this->_postArray['oldPost']["bpe_currency"]
358
+ . $this->_postArray['oldPost']["bpe_amount"]
359
+ . $this->_postArray['oldPost']["bpe_result"]
360
+ . $this->_postArray['oldPost']["bpe_mode"]
361
+ . Mage::getStoreConfig('buckaroo/buckaroo3extended/digital_signature', $this->getStoreId())
362
+ );
363
+
364
+ return $signature2;
365
+ }
366
  }
app/code/community/TIG/Buckaroo3Extended/Model/Request/Abstract.php CHANGED
@@ -103,9 +103,9 @@ class TIG_Buckaroo3Extended_Model_Request_Abstract extends TIG_Buckaroo3Extended
103
 
104
  //hack to prevent SQL errors when using onestepcheckout
105
  if(!Mage::helper('buckaroo3extended')->isAdmin()) {
106
- Mage::getSingleton('checkout/session')->getQuote()->setReservedOrderId(null)->save();
107
  }else {
108
- Mage::getSingleton('adminhtml/session_quote')->getQuote()->setReservedOrderId(null)->save();
109
  }
110
 
111
 
@@ -166,7 +166,7 @@ class TIG_Buckaroo3Extended_Model_Request_Abstract extends TIG_Buckaroo3Extended
166
  protected function _addServices()
167
  {
168
  $this->_vars['services'][$this->_method] = array(
169
- 'action' => 'Pay',
170
  'version' => 1,
171
  );
172
  }
103
 
104
  //hack to prevent SQL errors when using onestepcheckout
105
  if(!Mage::helper('buckaroo3extended')->isAdmin()) {
106
+ Mage::getSingleton('checkout/session')->getQuote()->setReservedOrderId(null)->save();
107
  }else {
108
+ Mage::getSingleton('adminhtml/session_quote')->getQuote()->setReservedOrderId(null)->save();
109
  }
110
 
111
 
166
  protected function _addServices()
167
  {
168
  $this->_vars['services'][$this->_method] = array(
169
+ 'action' => 'Pay',
170
  'version' => 1,
171
  );
172
  }
app/code/community/TIG/Buckaroo3Extended/Model/Request/Availability.php CHANGED
@@ -2,14 +2,14 @@
2
  class TIG_Buckaroo3Extended_Model_Request_Availability extends TIG_Buckaroo3Extended_Model_Abstract
3
  {
4
  public static $allowedCurrencies = array(
5
- 'EUR',
6
- 'GBP',
7
- 'USD',
8
- 'CAD',
9
- 'SHR',
10
- 'NOK',
11
- 'SEK',
12
- 'DKK',
13
  'ARS',
14
  'BRL',
15
  'HRK',
@@ -24,7 +24,7 @@ class TIG_Buckaroo3Extended_Model_Request_Availability extends TIG_Buckaroo3Exte
24
  'PLN',
25
  'CHF',
26
  'CZK',
27
- );
28
 
29
  /**
30
  * Various checks to determine if Buckaroo payment options should be available to customers
@@ -34,30 +34,30 @@ class TIG_Buckaroo3Extended_Model_Request_Availability extends TIG_Buckaroo3Exte
34
  */
35
  public static function canUseBuckaroo($quote = null)
36
  {
37
- $return = false;
38
 
39
- $configValues = self::_checkConfigValues();
40
 
41
- $currencyAllowed = self::_checkCurrencyAllowed();
42
 
43
- $ipAllowed = self::_checkIpAllowed();
44
 
45
- $isZeroPayment = self::_checkGrandTotalNotZero($quote);
46
 
47
- $isEnterprise = @mage::getModel('Enterprise_Reward_Model_Reward');
48
 
49
- if (
50
- $configValues === true
51
- && $currencyAllowed === true
52
- && $ipAllowed === true
53
- && (
54
- $isZeroPayment === false || $isEnterprise
55
- )
56
- )
57
- {
58
- $return = true;
59
- }
60
- return $return;
61
  }
62
 
63
  /**
@@ -71,30 +71,30 @@ class TIG_Buckaroo3Extended_Model_Request_Availability extends TIG_Buckaroo3Exte
71
  $configValues = false;
72
 
73
  //config values that need to be entered
74
- $configEnabled = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended/active', Mage::app()->getStore()->getStoreId());
75
- $merchantKeyEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended/key', Mage::app()->getStore()->getStoreId());
76
- $thumbprintEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended/thumbprint', Mage::app()->getStore()->getStoreId());
77
- $orderStatusSuccessEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_success', Mage::app()->getStore()->getStoreId());
78
- $orderStatusFailedEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_failed', Mage::app()->getStore()->getStoreId());
79
-
80
- //advanced config values that need to be entered
81
- $newOrderStatusEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status', Mage::app()->getStore()->getStoreId());
82
- $orderStateSuccessEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_success', Mage::app()->getStore()->getStoreId());
83
- $orderStateFailedEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_failed', Mage::app()->getStore()->getStoreId());
84
-
85
- if ($configEnabled
86
- && $merchantKeyEntered
87
- && $thumbprintEntered
88
- && $orderStatusSuccessEntered
89
- && $orderStatusFailedEntered
90
- && $newOrderStatusEntered
91
- && $orderStateSuccessEntered
92
- && $orderStateFailedEntered
93
- )
94
- {
95
- $configValues = true;
96
- }
97
- return $configValues;
98
  }
99
 
100
  /**
@@ -106,13 +106,13 @@ class TIG_Buckaroo3Extended_Model_Request_Availability extends TIG_Buckaroo3Exte
106
  {
107
  $allowed = false;
108
 
109
- $baseCurrency = Mage::app()->getStore()->getBaseCurrency()->getCode();
110
 
111
- if (in_array($baseCurrency, self::$allowedCurrencies)) {
112
- $allowed = true;
113
- }
114
 
115
- return $allowed;
116
  }
117
 
118
  /**
@@ -126,17 +126,17 @@ class TIG_Buckaroo3Extended_Model_Request_Availability extends TIG_Buckaroo3Exte
126
  $ipAllowed = false;
127
 
128
  if (Mage::getStoreConfig('dev/restrict/allow_ips') && Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/limit_by_ip'))
129
- {
130
- $allowedIp = explode(',', mage::getStoreConfig('dev/restrict/allow_ips'));
131
- if (in_array(Mage::helper('core/http')->getRemoteAddr(), $allowedIp))
132
- {
133
- $ipAllowed = true;
134
- }
135
- } else {
136
- $ipAllowed = true;
137
- }
138
-
139
- return $ipAllowed;
140
  }
141
 
142
  /**
@@ -149,9 +149,9 @@ class TIG_Buckaroo3Extended_Model_Request_Availability extends TIG_Buckaroo3Exte
149
  */
150
  private static function _checkGrandTotalNotZero($quote)
151
  {
152
- if (empty($quote)) {
153
- return true;
154
- }
155
  $isZero = false;
156
 
157
  if ($quote->getBaseGrandTotal() < 0.01) {
2
  class TIG_Buckaroo3Extended_Model_Request_Availability extends TIG_Buckaroo3Extended_Model_Abstract
3
  {
4
  public static $allowedCurrencies = array(
5
+ 'EUR',
6
+ 'GBP',
7
+ 'USD',
8
+ 'CAD',
9
+ 'SHR',
10
+ 'NOK',
11
+ 'SEK',
12
+ 'DKK',
13
  'ARS',
14
  'BRL',
15
  'HRK',
24
  'PLN',
25
  'CHF',
26
  'CZK',
27
+ );
28
 
29
  /**
30
  * Various checks to determine if Buckaroo payment options should be available to customers
34
  */
35
  public static function canUseBuckaroo($quote = null)
36
  {
37
+ $return = false;
38
 
39
+ $configValues = self::_checkConfigValues();
40
 
41
+ $currencyAllowed = self::_checkCurrencyAllowed();
42
 
43
+ $ipAllowed = self::_checkIpAllowed();
44
 
45
+ $isZeroPayment = self::_checkGrandTotalNotZero($quote);
46
 
47
+ $isEnterprise = @mage::getModel('Enterprise_Reward_Model_Reward');
48
 
49
+ if (
50
+ $configValues === true
51
+ && $currencyAllowed === true
52
+ && $ipAllowed === true
53
+ && (
54
+ $isZeroPayment === false || $isEnterprise
55
+ )
56
+ )
57
+ {
58
+ $return = true;
59
+ }
60
+ return $return;
61
  }
62
 
63
  /**
71
  $configValues = false;
72
 
73
  //config values that need to be entered
74
+ $configEnabled = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended/active', Mage::app()->getStore()->getStoreId());
75
+ $merchantKeyEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended/key', Mage::app()->getStore()->getStoreId());
76
+ $thumbprintEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended/thumbprint', Mage::app()->getStore()->getStoreId());
77
+ $orderStatusSuccessEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_success', Mage::app()->getStore()->getStoreId());
78
+ $orderStatusFailedEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_failed', Mage::app()->getStore()->getStoreId());
79
+
80
+ //advanced config values that need to be entered
81
+ $newOrderStatusEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status', Mage::app()->getStore()->getStoreId());
82
+ $orderStateSuccessEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_success', Mage::app()->getStore()->getStoreId());
83
+ $orderStateFailedEntered = (bool) Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_failed', Mage::app()->getStore()->getStoreId());
84
+
85
+ if ($configEnabled
86
+ && $merchantKeyEntered
87
+ && $thumbprintEntered
88
+ && $orderStatusSuccessEntered
89
+ && $orderStatusFailedEntered
90
+ && $newOrderStatusEntered
91
+ && $orderStateSuccessEntered
92
+ && $orderStateFailedEntered
93
+ )
94
+ {
95
+ $configValues = true;
96
+ }
97
+ return $configValues;
98
  }
99
 
100
  /**
106
  {
107
  $allowed = false;
108
 
109
+ $baseCurrency = Mage::app()->getStore()->getBaseCurrency()->getCode();
110
 
111
+ if (in_array($baseCurrency, self::$allowedCurrencies)) {
112
+ $allowed = true;
113
+ }
114
 
115
+ return $allowed;
116
  }
117
 
118
  /**
126
  $ipAllowed = false;
127
 
128
  if (Mage::getStoreConfig('dev/restrict/allow_ips') && Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/limit_by_ip'))
129
+ {
130
+ $allowedIp = explode(',', mage::getStoreConfig('dev/restrict/allow_ips'));
131
+ if (in_array(Mage::helper('core/http')->getRemoteAddr(), $allowedIp))
132
+ {
133
+ $ipAllowed = true;
134
+ }
135
+ } else {
136
+ $ipAllowed = true;
137
+ }
138
+
139
+ return $ipAllowed;
140
  }
141
 
142
  /**
149
  */
150
  private static function _checkGrandTotalNotZero($quote)
151
  {
152
+ if (empty($quote)) {
153
+ return true;
154
+ }
155
  $isZero = false;
156
 
157
  if ($quote->getBaseGrandTotal() < 0.01) {
app/code/community/TIG/Buckaroo3Extended/Model/Response/Abstract.php CHANGED
@@ -7,24 +7,24 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
7
 
8
  protected $_customResponseProcessing = false;
9
 
10
- public function setCurrentOrder($order)
11
  {
12
- $this->_order = $order;
13
  }
14
 
15
  public function getCurrentOrder()
16
  {
17
- return $this->_order;
18
  }
19
 
20
  public function setDebugEmail($debugEmail)
21
  {
22
- $this->_debugEmail = $debugEmail;
23
  }
24
 
25
  public function getDebugEmail()
26
  {
27
- return $this->_debugEmail;
28
  }
29
 
30
  public function setResponseXML($xml)
@@ -81,28 +81,28 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
81
  $this->_debugEmail .= "Verified as authentic! \n\n";
82
 
83
  if (!$this->_order->getTransactionKey()
84
- && is_object($this->_response)
85
- && isset($this->_response->Key))
86
- {
87
- $this->_order->setTransactionKey($this->_response->Key);
88
- $this->_order->save();
89
  $this->_debugEmail .= 'Transaction key saved: ' . $this->_response->Key . "\n";
90
- }
91
-
92
- //sets the currency used by Buckaroo
93
- if (!$this->_order->getCurrencyCodeUsedForTransaction()
94
- && is_object($this->_response)
95
- && isset($this->_response->Currency))
96
- {
97
- $this->_order->setCurrencyCodeUsedForTransaction($this->_response->Currency);
98
- $this->_order->save();
99
- }
100
-
101
- if (is_object($this->_response) && isset($this->_response->RequiredAction)) {
102
- $requiredAction = $this->_response->RequiredAction->Type;
103
- } else {
104
- $requiredAction = false;
105
- }
106
 
107
  $parsedResponse = $this->_parseResponse();
108
  $this->_addSubCodeComment($parsedResponse);
@@ -119,9 +119,9 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
119
 
120
  $this->_debugEmail .= "Dispatching custom order processing event... \n";
121
  Mage::dispatchEvent(
122
- 'buckaroo3extended_response_custom_processing',
123
  array(
124
- 'model' => $this,
125
  'order' => $this->getOrder(),
126
  'response' => $parsedResponse,
127
  'responseobject' => $this->_response,
@@ -212,24 +212,24 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
212
  $shouldSend = Mage::getStoreConfig('buckaroo/' . $payment->getMethod() . '/order_email', $this->_order->getStoreId());
213
  if(!$this->_order->getEmailSent() && $shouldSend)
214
  {
215
- $this->sendNewOrderEmail();
216
  }
217
 
218
  $this->emptyCart();
219
 
220
- Mage::getSingleton('core/session')->addSuccess(
221
- Mage::helper('buckaroo3extended')->__('Your order has been placed succesfully.')
222
- );
223
 
224
- $returnLocation = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/success_redirect', $this->_order->getStoreId());
225
  $returnUrl = Mage::getUrl($returnLocation, array('_secure' => true));
226
 
227
  $this->_debugEmail .= 'Redirecting user to...' . $returnUrl . "\n";
228
 
229
  $this->sendDebugEmail();
230
 
231
- header('Location:' . $returnUrl);
232
- exit;
233
  }
234
 
235
  protected function _failed()
@@ -269,7 +269,7 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
269
  $this->_debugEmail .= "The transaction generated an error. \n";
270
 
271
  Mage::getSingleton('core/session')->addError(
272
- Mage::helper('buckaroo3extended')->__('A technical error has occurred. Please try again. If this problem persists, please contact the shop owner.')
273
  );
274
 
275
  $this->_order->addStatusHistoryComment(
@@ -307,13 +307,12 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
307
  case 'buckaroo3extended_afterpay2':
308
  Mage::getSingleton('checkout/session')->setData('buckarooAfterpayRejected',true);
309
  $message = Mage::helper('buckaroo3extended')->__(
310
- 'We are sorry to inform you that the request to pay afterwards with AfterPay is not possible at' .
311
- ' this time. This can be due to various (temporary) reasons.<br/><br/> For questions about your' .
312
- ' rejection you can contact the customer service of AfterPay. Or you can visit the website of' .
313
- ' AfterPay and click ""Frequently asked questions"" through this link <a' .
314
- ' href=""http://www.afterpay.nl/page/consument-faq"">http://www.afterpay.nl/page/consument-faq<' .
315
- '/a> in the section ""Datacontrol"".<br/><br/> We advice you to choose a different payment method' .
316
- ' to complete your order.'
317
  );
318
  break;
319
  default:
@@ -350,11 +349,11 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
350
  );
351
  $this->_order->save();
352
 
353
- Mage::getSingleton('core/session')->addSuccess(
354
- Mage::helper('buckaroo3extended')->__(
355
- 'Your order has been placed succesfully. You will recieve an e-mail containing further payment instructions shortly.'
356
- )
357
- );
358
 
359
  $returnLocation = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/success_redirect', $this->_order->getStoreId());
360
  $returnUrl = Mage::getUrl($returnLocation, array('_secure' => true));
@@ -362,8 +361,8 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
362
  $this->_debugEmail .= 'Redirecting user to...' . $returnUrl . '\n';
363
 
364
  $this->sendDebugEmail();
365
- header('Location:' . $returnUrl);
366
- exit;
367
  }
368
 
369
  /**
@@ -477,30 +476,30 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
477
 
478
  $xPath = new DOMXPath($responseDomDoc);
479
 
480
- //register namespaces to use in xpath query's
481
- $xPath->registerNamespace('wsse','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd');
482
- $xPath->registerNamespace('sig','http://www.w3.org/2000/09/xmldsig#');
483
- $xPath->registerNamespace('soap','http://schemas.xmlsoap.org/soap/envelope/');
484
 
485
  //Get the SignedInfo nodeset
486
- $SignedInfoQuery = '//wsse:Security/sig:Signature/sig:SignedInfo';
487
- $SignedInfoQueryNodeSet = $xPath->query($SignedInfoQuery);
488
- $SignedInfoNodeSet = $SignedInfoQueryNodeSet->item(0);
489
 
490
- //Canonicalize nodeset
491
- $signedInfo = $SignedInfoNodeSet->C14N(true, false);
492
 
493
- //get the public key
494
- $pubKey = openssl_get_publickey(openssl_x509_read(file_get_contents(CERTIFICATE_DIR . DS .'Checkout.pem')));
495
 
496
- //verify the signature
497
- $sigVerify = openssl_verify($signedInfo, $sigDecoded, $pubKey);
498
 
499
- if ($sigVerify === 1) {
500
- $verified = true;
501
- }
502
 
503
- return $verified;
504
  }
505
 
506
  protected function _verifyDigest()
@@ -523,24 +522,24 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
523
 
524
  $xPath = new DOMXPath($responseDomDoc);
525
 
526
- //register namespaces to use in xpath query's
527
- $xPath->registerNamespace('wsse','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd');
528
- $xPath->registerNamespace('sig','http://www.w3.org/2000/09/xmldsig#');
529
- $xPath->registerNamespace('soap','http://schemas.xmlsoap.org/soap/envelope/');
530
 
531
- $controlHashReference = $xPath->query('//*[@Id="_control"]')->item(0);
532
- $controlHashCanonical = $controlHashReference->C14N(true, false);
533
- $controlHash = base64_encode(pack('H*',sha1($controlHashCanonical)));
534
 
535
- $bodyHashReference = $xPath->query('//*[@Id="_body"]')->item(0);
536
- $bodyHashCanonical = $bodyHashReference->C14N(true, false);
537
- $bodyHash = base64_encode(pack('H*',sha1($bodyHashCanonical)));
538
 
539
- if (in_array($controlHash, $digestValues) === true && in_array($bodyHash, $digestValues) === true) {
540
- $verified = true;
541
- }
542
 
543
- return $verified;
544
  }
545
 
546
  public function sendNewOrderEmail()
7
 
8
  protected $_customResponseProcessing = false;
9
 
10
+ public function setCurrentOrder($order)
11
  {
12
+ $this->_order = $order;
13
  }
14
 
15
  public function getCurrentOrder()
16
  {
17
+ return $this->_order;
18
  }
19
 
20
  public function setDebugEmail($debugEmail)
21
  {
22
+ $this->_debugEmail = $debugEmail;
23
  }
24
 
25
  public function getDebugEmail()
26
  {
27
+ return $this->_debugEmail;
28
  }
29
 
30
  public function setResponseXML($xml)
81
  $this->_debugEmail .= "Verified as authentic! \n\n";
82
 
83
  if (!$this->_order->getTransactionKey()
84
+ && is_object($this->_response)
85
+ && isset($this->_response->Key))
86
+ {
87
+ $this->_order->setTransactionKey($this->_response->Key);
88
+ $this->_order->save();
89
  $this->_debugEmail .= 'Transaction key saved: ' . $this->_response->Key . "\n";
90
+ }
91
+
92
+ //sets the currency used by Buckaroo
93
+ if (!$this->_order->getCurrencyCodeUsedForTransaction()
94
+ && is_object($this->_response)
95
+ && isset($this->_response->Currency))
96
+ {
97
+ $this->_order->setCurrencyCodeUsedForTransaction($this->_response->Currency);
98
+ $this->_order->save();
99
+ }
100
+
101
+ if (is_object($this->_response) && isset($this->_response->RequiredAction)) {
102
+ $requiredAction = $this->_response->RequiredAction->Type;
103
+ } else {
104
+ $requiredAction = false;
105
+ }
106
 
107
  $parsedResponse = $this->_parseResponse();
108
  $this->_addSubCodeComment($parsedResponse);
119
 
120
  $this->_debugEmail .= "Dispatching custom order processing event... \n";
121
  Mage::dispatchEvent(
122
+ 'buckaroo3extended_response_custom_processing',
123
  array(
124
+ 'model' => $this,
125
  'order' => $this->getOrder(),
126
  'response' => $parsedResponse,
127
  'responseobject' => $this->_response,
212
  $shouldSend = Mage::getStoreConfig('buckaroo/' . $payment->getMethod() . '/order_email', $this->_order->getStoreId());
213
  if(!$this->_order->getEmailSent() && $shouldSend)
214
  {
215
+ $this->sendNewOrderEmail();
216
  }
217
 
218
  $this->emptyCart();
219
 
220
+ Mage::getSingleton('core/session')->addSuccess(
221
+ Mage::helper('buckaroo3extended')->__('Your order has been placed succesfully.')
222
+ );
223
 
224
+ $returnLocation = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/success_redirect', $this->_order->getStoreId());
225
  $returnUrl = Mage::getUrl($returnLocation, array('_secure' => true));
226
 
227
  $this->_debugEmail .= 'Redirecting user to...' . $returnUrl . "\n";
228
 
229
  $this->sendDebugEmail();
230
 
231
+ header('Location:' . $returnUrl);
232
+ exit;
233
  }
234
 
235
  protected function _failed()
269
  $this->_debugEmail .= "The transaction generated an error. \n";
270
 
271
  Mage::getSingleton('core/session')->addError(
272
+ Mage::helper('buckaroo3extended')->__('A technical error has occurred. Please try again. If this problem persists, please contact the shop owner.')
273
  );
274
 
275
  $this->_order->addStatusHistoryComment(
307
  case 'buckaroo3extended_afterpay2':
308
  Mage::getSingleton('checkout/session')->setData('buckarooAfterpayRejected',true);
309
  $message = Mage::helper('buckaroo3extended')->__(
310
+ "We are sorry to inform you that the request to pay afterwards with AfterPay is not possible at " .
311
+ "this time. This can be due to various (temporary) reasons.<br/><br/> For questions about your " .
312
+ "rejection you can contact the customer service of AfterPay. Or you can visit the website of " .
313
+ "AfterPay and click 'Frequently asked questions' through this link " .
314
+ "<a href='http://www.afterpay.nl/page/consument-faq'>http://www.afterpay.nl/page/consument-faq</a> " .
315
+ "in the section 'Datacontrol'.<br/><br/> We advice you to choose a different payment method to complete your order."
 
316
  );
317
  break;
318
  default:
349
  );
350
  $this->_order->save();
351
 
352
+ Mage::getSingleton('core/session')->addSuccess(
353
+ Mage::helper('buckaroo3extended')->__(
354
+ 'Your order has been placed succesfully. You will recieve an e-mail containing further payment instructions shortly.'
355
+ )
356
+ );
357
 
358
  $returnLocation = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/success_redirect', $this->_order->getStoreId());
359
  $returnUrl = Mage::getUrl($returnLocation, array('_secure' => true));
361
  $this->_debugEmail .= 'Redirecting user to...' . $returnUrl . '\n';
362
 
363
  $this->sendDebugEmail();
364
+ header('Location:' . $returnUrl);
365
+ exit;
366
  }
367
 
368
  /**
476
 
477
  $xPath = new DOMXPath($responseDomDoc);
478
 
479
+ //register namespaces to use in xpath query's
480
+ $xPath->registerNamespace('wsse','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd');
481
+ $xPath->registerNamespace('sig','http://www.w3.org/2000/09/xmldsig#');
482
+ $xPath->registerNamespace('soap','http://schemas.xmlsoap.org/soap/envelope/');
483
 
484
  //Get the SignedInfo nodeset
485
+ $SignedInfoQuery = '//wsse:Security/sig:Signature/sig:SignedInfo';
486
+ $SignedInfoQueryNodeSet = $xPath->query($SignedInfoQuery);
487
+ $SignedInfoNodeSet = $SignedInfoQueryNodeSet->item(0);
488
 
489
+ //Canonicalize nodeset
490
+ $signedInfo = $SignedInfoNodeSet->C14N(true, false);
491
 
492
+ //get the public key
493
+ $pubKey = openssl_get_publickey(openssl_x509_read(file_get_contents(CERTIFICATE_DIR . DS .'Checkout.pem')));
494
 
495
+ //verify the signature
496
+ $sigVerify = openssl_verify($signedInfo, $sigDecoded, $pubKey);
497
 
498
+ if ($sigVerify === 1) {
499
+ $verified = true;
500
+ }
501
 
502
+ return $verified;
503
  }
504
 
505
  protected function _verifyDigest()
522
 
523
  $xPath = new DOMXPath($responseDomDoc);
524
 
525
+ //register namespaces to use in xpath query's
526
+ $xPath->registerNamespace('wsse','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd');
527
+ $xPath->registerNamespace('sig','http://www.w3.org/2000/09/xmldsig#');
528
+ $xPath->registerNamespace('soap','http://schemas.xmlsoap.org/soap/envelope/');
529
 
530
+ $controlHashReference = $xPath->query('//*[@Id="_control"]')->item(0);
531
+ $controlHashCanonical = $controlHashReference->C14N(true, false);
532
+ $controlHash = base64_encode(pack('H*',sha1($controlHashCanonical)));
533
 
534
+ $bodyHashReference = $xPath->query('//*[@Id="_body"]')->item(0);
535
+ $bodyHashCanonical = $bodyHashReference->C14N(true, false);
536
+ $bodyHash = base64_encode(pack('H*',sha1($bodyHashCanonical)));
537
 
538
+ if (in_array($controlHash, $digestValues) === true && in_array($bodyHash, $digestValues) === true) {
539
+ $verified = true;
540
+ }
541
 
542
+ return $verified;
543
  }
544
 
545
  public function sendNewOrderEmail()
app/code/community/TIG/Buckaroo3Extended/Model/Response/BackendOrder.php CHANGED
@@ -4,14 +4,14 @@ class TIG_Buckaroo3Extended_Model_Response_BackendOrder extends TIG_Buckaroo3Ext
4
  protected function _success()
5
  {
6
  $this->_debugEmail .= "The request was successful \n";
7
- if(!$this->_order->getEmailSent())
8
  {
9
- $this->_order->sendNewOrderEmail();
10
  }
11
-
12
- Mage::getSingleton('core/session')->addSuccess(
13
- Mage::helper('buckaroo3extended')->__('Your order has been placed succesfully.')
14
- );
15
  $this->sendDebugEmail();
16
  }
17
 
@@ -31,9 +31,9 @@ class TIG_Buckaroo3Extended_Model_Response_BackendOrder extends TIG_Buckaroo3Ext
31
  protected function _error()
32
  {
33
  $this->_debugEmail .= "The request generated an error \n";
34
-
35
  $this->_order->cancel()->save();
36
-
37
  $this->_debugEmail .= "I have cancelled the order! \n";
38
 
39
  $this->sendDebugEmail();
@@ -44,11 +44,11 @@ class TIG_Buckaroo3Extended_Model_Response_BackendOrder extends TIG_Buckaroo3Ext
44
  {
45
  $this->_debugEmail .= "The request was neutral \n";
46
 
47
- Mage::getSingleton('core/session')->addSuccess(
48
- Mage::helper('buckaroo3extended')->__(
49
- 'Your order has been placed succesfully. You will recieve an e-mail containing further payment instructions shortly.'
50
- )
51
- );
52
 
53
  $this->sendDebugEmail();
54
  }
4
  protected function _success()
5
  {
6
  $this->_debugEmail .= "The request was successful \n";
7
+ if(!$this->_order->getEmailSent())
8
  {
9
+ $this->_order->sendNewOrderEmail();
10
  }
11
+
12
+ Mage::getSingleton('core/session')->addSuccess(
13
+ Mage::helper('buckaroo3extended')->__('Your order has been placed succesfully.')
14
+ );
15
  $this->sendDebugEmail();
16
  }
17
 
31
  protected function _error()
32
  {
33
  $this->_debugEmail .= "The request generated an error \n";
34
+
35
  $this->_order->cancel()->save();
36
+
37
  $this->_debugEmail .= "I have cancelled the order! \n";
38
 
39
  $this->sendDebugEmail();
44
  {
45
  $this->_debugEmail .= "The request was neutral \n";
46
 
47
+ Mage::getSingleton('core/session')->addSuccess(
48
+ Mage::helper('buckaroo3extended')->__(
49
+ 'Your order has been placed succesfully. You will recieve an e-mail containing further payment instructions shortly.'
50
+ )
51
+ );
52
 
53
  $this->sendDebugEmail();
54
  }
app/code/community/TIG/Buckaroo3Extended/Model/Response/Push.php CHANGED
@@ -12,52 +12,52 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
12
  protected $_debugEmail = '';
13
  protected $_method = '';
14
 
15
- public function setCurrentOrder($order)
16
  {
17
- $this->_order = $order;
18
  }
19
 
20
  public function getCurrentOrder()
21
  {
22
- return $this->_order;
23
  }
24
 
25
  public function setPostArray($array)
26
  {
27
- $this->_postArray = $array;
28
  }
29
 
30
  public function getPostArray()
31
  {
32
- return $this->_postArray;
33
  }
34
 
35
  public function setMethod($method)
36
  {
37
- $this->_method = $method;
38
  }
39
 
40
  public function getMethod()
41
  {
42
- return $this->_method;
43
  }
44
 
45
  public function setDebugEmail($debugEmail)
46
  {
47
- $this->_debugEmail = $debugEmail;
48
  }
49
 
50
  public function getDebugEmail()
51
  {
52
- return $this->_debugEmail;
53
  }
54
 
55
  public function __construct($data = array())
56
  {
57
- $this->setCurrentOrder($data['order']);
58
- $this->setPostArray($data['postArray']);
59
- $this->setDebugEmail($data['debugEmail']);
60
- $this->setMethod($data['method']);
61
  }
62
 
63
  /**
@@ -66,26 +66,26 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
66
  * @return bool
67
  */
68
  public function processPush()
69
- {
70
- $response = $this->_parsePostResponse($this->_postArray['brq_statuscode']);
71
 
72
- //check if the push is valid and if the order can be updated
73
  list($canProcess, $canUpdate) = $this->_canProcessPush(false,$response);
74
 
75
- $this->_debugEmail .= "Can the order be processed? " . $canProcess . "\n"."Can the order be updated? " . $canUpdate . "\n";
76
 
77
- if (!$canProcess) {
78
- return false;
79
- } elseif ($canProcess && !$canUpdate) {
80
- //if the order cant be updated, try to add a notification to the status history instead
81
- $response = $this->_parsePostResponse($this->_postArray['brq_statuscode']);
82
- $this->_addNote($response['message'], $this->_method);
83
- return false;
84
- }
85
 
86
  $paymentMethod = $this->_order->getPayment()->getMethod();
87
 
88
- if ($paymentMethod == 'buckaroo3extended_giftcards') {
89
  Mage::dispatchEvent('buckaroo3extended_push_custom_processing', array('push' => $this, 'order' => $this->getCurrentOrder()));
90
 
91
  if ($this->getCustomResponseProcessing()) {
@@ -93,11 +93,11 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
93
  }
94
  }
95
 
96
- $newStates = $this->_getNewStates($response['status']);
97
 
98
- $this->_debugEmail .= "Response recieved: " . var_export($response, true) . "\n\n";
99
- $this->_debugEmail .= "Current state: " . $this->_order->getState() . "\nCurrent status: " . $this->_order->getStatus() . "\n";
100
- $this->_debugEmail .= "New state: " . $newStates[0] . "\nNew status: " . $newStates[1] . "\n\n";
101
 
102
  Mage::dispatchEvent('buckaroo3extended_push_custom_processing', array('push' => $this, 'order' => $this->getCurrentOrder(), 'response' => $response));
103
 
@@ -105,20 +105,20 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
105
  return true;
106
  }
107
 
108
- switch ($response['status'])
109
- {
110
- case self::BUCKAROO_ERROR:
111
- case self::BUCKAROO_FAILED: $updatedFailed = $this->_processFailed($newStates, $response['message']);
112
- break;
113
- case self::BUCKAROO_SUCCESS: $updatedSuccess = $this->_processSuccess($newStates, $response['message']);
114
- break;
115
- case self::BUCKAROO_NEUTRAL: $this->_addNote($response['message']);
116
- break;
117
- case self::BUCKAROO_PENDING_PAYMENT: $updatedPendingPayment = $this->_processPendingPayment($newStates, $response['message']);
118
- break;
119
- case self::BUCKAROO_INCORRECT_PAYMENT: $updatedIncorrectPayment = $this->_processIncorrectPayment($newStates);
120
- break;
121
- }
122
 
123
  //revert the original status in order complete the whole process like it should.
124
  if (isset($originalResponseStatus)) {
@@ -136,20 +136,20 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
136
  )
137
  );
138
 
139
- if (isset($updatedFailed) && $updatedFailed) {
140
- $this->_debugEmail .= "Succesfully updated 'failed' state and status \n";
141
- } elseif (isset($updatedSuccess) && $updatedSuccess) {
142
- $this->_debugEmail .= "Succesfully updated 'success' state and status \n";
143
- } elseif (isset($updatedPendingPayment) && $updatedPendingPayment) {
144
- $this->_debugEmail .= "Succesfully updated pending payment \n";
145
- } elseif (isset($updatedIncorrectPayment) && $updatedIncorrectPayment) {
146
- $this->_debugEmail .= "Succesfully updated incorrect payment \n";
147
- } else {
148
- $this->_debugEmail .= "Order was not updated \n";
149
- }
150
 
151
- return true;
152
- }
153
 
154
 
155
  /**
@@ -163,53 +163,53 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
163
  * @return array
164
  */
165
  protected function _canProcessPush($isReturn = false, $response = array())
166
- {
167
- $correctSignature = false;
168
- $canUpdate = false;
169
- $signature = $this->_calculateSignature();
170
- if ($signature === $this->_postArray['brq_signature']) {
171
- $correctSignature = true;
172
- }
173
-
174
- //check if the order can recieve further status updates
175
- if ($correctSignature === true) {
176
- $canUpdate = $this->_canUpdate($response);
177
- }
178
-
179
- $return = array(
180
- (bool) $correctSignature,
181
- (bool) $canUpdate,
182
- );
183
- return $return;
184
- }
185
-
186
- /**
187
- * Checks if the order can be updated by checking if its state and status is not
188
- * complete, closed, cancelled or holded and the order can be invoiced
189
- *
190
  * @param array $response
191
  *
192
- * @return boolean
193
- */
194
- protected function _canUpdate($response = array())
195
- {
196
 
197
- // Get successful state and status
198
  $completedStateAndStatus = array('complete', 'complete');
199
  $cancelledStateAndStatus = array('canceled', 'canceled');
200
  $holdedStateAndStatus = array('holded', 'holded');
201
  $closedStateAndStatus = array ('closed','closed');
202
 
203
- $currentStateAndStatus = array($this->_order->getState(), $this->_order->getStatus());
204
 
205
- //prevent completed orders from recieving further updates
206
  if( $completedStateAndStatus != $currentStateAndStatus
207
- && $cancelledStateAndStatus != $currentStateAndStatus
208
- && $holdedStateAndStatus != $currentStateAndStatus
209
- && $closedStateAndStatus != $currentStateAndStatus
210
- && $this->_order->canInvoice()
211
  ){
212
- return true;
213
  }
214
 
215
  //when payperemail is used and the order has the status other then success, and current pushed status is success; send email to shopowner
@@ -226,11 +226,11 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
226
  $this->_sendDoubleTransactionEmail();
227
  }
228
 
229
- $this->_debugEmail .= "order already has succes, complete, closed, or holded state or can't be invoiced \n\n";
230
 
231
 
232
  return false;
233
- }
234
 
235
  /**
236
  * Send the shop owner and subscribers to the debug-email an email with the message that there is a double transaction
@@ -255,125 +255,38 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
255
  }
256
  }
257
 
258
- /**
259
- * Uses setState to add a comment to the order status history without changing the state nor status. Purpose of the comment
260
- * is to inform the user of an attempted status upsate after the order has already recieved complete, canceled, closed or holded states
261
- * or the order can't be invoiced. Returns false if the config has disabled this feature.
262
- *
263
- * @param string $description
264
- */
265
- protected function _addNote($description)
266
- {
267
- $helper = Mage::helper('buckaroo3extended');
268
-
269
- $note = $helper->__('Buckaroo attempted to update this order after it already had ')
270
- . '<b>'
271
- . strtoupper($this->_order->getState())
272
- . '</b>'
273
- . $helper->__(' state, by sending the following: ')
274
- . '<br/>--------------------------------------------------------------------------------------------------------------------------------<br/>'
275
- . $description
276
- . ' ('
277
- . $this->_postArray['brq_statuscode']
278
- . ')';
279
- $this->_order->addStatusHistoryComment($note)
280
- ->save();
281
- }
282
 
283
  /**
284
  * @param $description
285
  */
286
  public function addNote($description)
287
- {
288
- $this->_addNote($description);
289
- }
290
-
291
- /**
292
- * Determines which state and status an order will recieve based on its response code
293
- * and the configuration. Will use configuration for the payment method used or, if
294
- * that's not set, use the default
295
- *
296
- * @param string $code
297
- *
298
- * @return array $newStates
299
- *
300
- * @note currently the states are only used by _processpendingPayment(). May be removed completely in the future
301
- */
302
- protected function _getNewStates($code)
303
- {
304
- $order = $this->getorder();
305
- $storeId = $order->getStoreId();
306
-
307
- $useStatus = Mage::getStoreConfig('buckaroo/' . $this->_method . '/active_status', $storeId);
308
-
309
- //get the possible new states for the order
310
- $stateSuccess = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_success', $storeId);
311
- $stateFailure = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_failed', $storeId);
312
- $statePendingpayment = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_state_pendingpayment', $storeId);
313
-
314
- //get the possible new status for the order based on the payment method's individual config options
315
- //these are optional
316
- $customSuccessStatus = Mage::getStoreConfig('buckaroo/' . $this->_method . '/order_status_success', $storeId);
317
- $customFailureStatus = Mage::getStoreConfig('buckaroo/' . $this->_method . '/order_status_failed', $storeId);
318
- $customPendingPaymentStatus = Mage::getStoreConfig('buckaroo/' . $this->_method . '/order_status_pendingpayment', $storeId);
319
-
320
- //get the possible default new status for the order based on the general config options
321
- //these should always be set
322
- $defaultSuccessStatus = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_success', $storeId);
323
- $defaultFailureStatus = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_failed', $storeId);
324
- $defaultPendingPaymentStatus = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/order_status_pendingpayment', $storeId);
325
-
326
- //determine whether to use the default or custom status
327
- if ($useStatus && $customSuccessStatus && !empty($customSuccessStatus)) {
328
- $statusSuccess = $customSuccessStatus;
329
- } else {
330
- $statusSuccess = $defaultSuccessStatus;
331
- }
332
-
333
- if ($useStatus && $customFailureStatus && !empty($customFailureStatus)) {
334
- $statusFailure = $customFailureStatus;
335
- } else {
336
- $statusFailure = $defaultFailureStatus;
337
- }
338
-
339
- if ($useStatus && $customPendingPaymentStatus && !empty($customPendingPaymentStatus)) {
340
- $statusPendingpayment = $customPendingPaymentStatus;
341
- } else {
342
- $statusPendingpayment = $defaultPendingPaymentStatus;
343
- }
344
-
345
- $stateIncorrectPayment = 'holded';
346
- $statusIncorrectPayment = 'buckaroo_incorrect_payment';
347
-
348
- //magento 1.4 compatibility
349
- $version15 = '1.5.0.0';
350
- $version14 = '1.4.0.0';
351
- if (version_compare(Mage::getVersion(), $version15, '<')
352
- && version_compare(Mage::getVersion(), $version14, '>')
353
- && $statusIncorrectPayment == 'buckaroo_incorrect_payment'
354
- )
355
- {
356
- $statusIncorrectPayment = 'payment_review';
357
- }
358
-
359
- switch($code)
360
- {
361
- case self::BUCKAROO_SUCCESS: $newStates = array($stateSuccess, $statusSuccess);
362
- break;
363
- case self::BUCKAROO_ERROR:
364
- case self::BUCKAROO_FAILED: $newStates = array($stateFailure, $statusFailure);
365
- break;
366
- case self::BUCKAROO_NEUTRAL: $newStates = array(null, null);
367
- break;
368
- case self::BUCKAROO_PENDING_PAYMENT: $newStates = array($statePendingpayment, $statusPendingpayment);
369
- break;
370
- case self::BUCKAROO_INCORRECT_PAYMENT: $newStates = array($stateIncorrectPayment, $statusIncorrectPayment);
371
- break;
372
- default: $newStates = array(null, null);
373
- }
374
-
375
- return $newStates;
376
- }
377
 
378
  /**
379
  * Process a succesful order. Sets its new state and status, sends an order confirmation email
@@ -384,25 +297,25 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
384
  * @return bool
385
  */
386
  protected function _processSuccess($newStates, $description = false)
387
- {
388
- //send new order email if it hasnt already been sent
389
- if(!$this->_order->getEmailSent())
390
  {
391
- $this->sendNewOrderEmail();
392
  }
393
 
394
  $this->_autoInvoice();
395
 
396
- $description = Mage::helper('buckaroo3extended')->__($description);
397
 
398
- $description .= " (#{$this->_postArray['brq_statuscode']})";
399
 
400
- //sets the transaction key if its defined ($trx)
401
- //will retrieve it from the response array, if response actually is an array
402
- if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
403
- $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
404
- $this->_order->save();
405
- }
406
 
407
  if ($this->_order->getState() == Mage_Sales_Model_Order::STATE_PROCESSING) {
408
  $this->_order->addStatusHistoryComment($description, $newStates[1])
@@ -415,8 +328,8 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
415
  }
416
 
417
 
418
- return true;
419
- }
420
 
421
  /**
422
  * Process a failed order. Sets its new state and status and cancels the order
@@ -465,9 +378,9 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
465
  * @return bool
466
  */
467
  protected function _processIncorrectPayment($newStates)
468
- {
469
- //determine whether too much or not enough has been paid and determine the status history copmment accordingly
470
- $amount = round($this->_order->getBaseGrandTotal()*100, 0);
471
 
472
  $setStatus = $newStates[1];
473
 
@@ -479,33 +392,33 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
479
  $orderAmount = $this->_order->getGrandTotal();
480
  }
481
 
482
- if ($amount > $this->_postArray['brq_amount']) {
483
  $description = Mage::helper('buckaroo3extended')->__(
484
  'Not enough paid: %s has been transfered. Order grand total was: %s.',
485
  Mage::app()->getLocale()->currency($currencyCode)->toCurrency($this->_postArray['brq_amount']),
486
  Mage::app()->getLocale()->currency($currencyCode)->toCurrency($orderAmount)
487
  );
488
- } elseif ($amount < $this->_postArray['brq_amount']) {
489
  $description = Mage::helper('buckaroo3extended')->__(
490
  'Too much paid: %s has been transfered. Order grand total was: %s.',
491
  Mage::app()->getLocale()->currency($currencyCode)->toCurrency($this->_postArray['brq_amount']),
492
  Mage::app()->getLocale()->currency($currencyCode)->toCurrency($orderAmount)
493
  );
494
- } else {
495
- //the correct amount was actually paid, so return false
496
- return false;
497
- }
498
 
499
- //hold the order
500
- $this->_order->hold()
501
  ->save()
502
  ->setStatus($setStatus)
503
  ->save()
504
- ->addStatusHistoryComment(Mage::helper('buckaroo3extended')->__($description), $setStatus)
505
  ->save();
506
 
507
- return true;
508
- }
509
 
510
  /**
511
  * processes an order awaiting payment. Sets its new state and status.
@@ -515,15 +428,15 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
515
  * @return bool
516
  */
517
  protected function _processPendingPayment($newStates, $description = false)
518
- {
519
- $description = Mage::helper('buckaroo3extended')->__($description);
520
- $description .= " (#{$this->_postArray['brq_statuscode']})";
521
 
522
- //sets the transaction key if its defined ($trx)
523
- //will retrieve it from the response array, if response actually is an array
524
- if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
525
- $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
526
- }
527
 
528
 
529
  if ($this->_order->getState() == Mage_Sales_Model_Order::STATE_NEW) {
@@ -536,17 +449,17 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
536
  ->save();
537
  }
538
 
539
- return true;
540
- }
541
 
542
  /**
543
  * @param $code
544
  * @return array
545
  */
546
  public function getNewStates($code)
547
- {
548
- return $this->_getNewStates($code);
549
- }
550
 
551
  /**
552
  * @param $newStates
@@ -554,8 +467,8 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
554
  * @return bool
555
  */
556
  public function processPendingPayment($newStates, $description = false) {
557
- return $this->_processPendingPayment($newStates, $description);
558
- }
559
 
560
  /**
561
  * @param $newStates
@@ -563,8 +476,8 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
563
  * @return bool
564
  */
565
  public function processSuccess($newStates, $description = false) {
566
- return $this->_processSuccess($newStates, $description);
567
- }
568
 
569
  /**
570
  * @param $newStates
@@ -572,16 +485,16 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
572
  * @return bool
573
  */
574
  public function processFailed($newStates, $description = false) {
575
- return $this->_processFailed($newStates, $description);
576
- }
577
 
578
  /**
579
  * @param $newStates
580
  * @return bool
581
  */
582
  public function processIncorrectPayment($newStates) {
583
- return $this->_processIncorrectPayment($newStates);
584
- }
585
 
586
  /**
587
  * Creates an invoice for the order if the module is configured to do so.
@@ -589,31 +502,31 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
589
  * @return bool
590
  */
591
  protected function _autoInvoice()
592
- {
593
- //check if the module is configured to create invoice on success
594
- if (!Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/auto_invoice', $this->_order->getStoreId()))
595
- {
596
- return false;
597
- }
598
 
599
  //returns true if invoice has been made, else false
600
- $invoiceSaved = $this->_saveInvoice();
601
-
602
- if($invoiceSaved && Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/invoice_mail', $this->_order->getStoreId()))
603
- {
604
- //loop through every invoice
605
- foreach($this->_order->getInvoiceCollection() as $invoice)
606
- {
607
- //when there is no invoice send to the customer, send it!
608
- if(!$invoice->getEmailSent())
609
- {
610
- $invoice->sendEmail()
611
- ->setEmailSent(true)
612
- ->save();
613
- }
614
- }
615
- }
616
- }
617
 
618
  /**
619
  * Saves an invoice and sets total-paid for the order
@@ -622,67 +535,67 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
622
  */
623
  protected function _saveInvoice()
624
  {
625
- if ($this->_order->canInvoice() && !$this->_order->hasInvoices()) {
626
- $payment = $this->_order->getPayment();
627
- $payment->registerCaptureNotification($this->_order->getBaseGrandTotal());
628
 
629
- $this->_order->save();
630
- $this->_debugEmail .= 'Invoice created and saved. \n';
631
 
632
- //sets the invoice's transaction ID as the Buckaroo TRX. This is to allow the order to be refunded using Buckaroo later on.
633
  foreach($this->_order->getInvoiceCollection() as $invoice)
634
- {
635
- if (!isset($this->_postArray['brq_transactions'])) {
636
- continue;
637
  }
638
- $invoice->setTransactionId($this->_postArray['brq_transactions'])
639
- ->save();
640
- }
641
- return true;
642
- }
643
 
644
  return false;
645
  }
646
 
647
- /**
648
- * Determines the signature using array sorting and the SHA1 hash algorithm
649
- *
650
- * @return string $signature
651
- */
652
- protected function _calculateSignature()
653
- {
654
- if (isset($this->_postArray['isOldPost']) && $this->_postArray['isOldPost'])
655
- {
656
- return $this->_calculateOldSignature();
657
- }
658
-
659
- $origArray = $this->_postArray;
660
- unset($origArray['brq_signature']);
661
-
662
- //sort the array
663
- $sortableArray = $this->buckarooSort($origArray);
664
-
665
- //turn into string and add the secret key to the end
666
- $signatureString = '';
667
- foreach($sortableArray as $key => $value) {
668
  if ('brq_SERVICE_masterpass_CustomerPhoneNumber' !== $key
669
  && 'brq_SERVICE_masterpass_ShippingRecipientPhoneNumber' !== $key
670
  ) {
671
  $value = urldecode($value);
672
  }
673
- $signatureString .= $key . '=' . $value;
674
- }
675
- $signatureString .= Mage::getStoreConfig('buckaroo/buckaroo3extended/digital_signature', $this->_order->getStoreId());
676
 
677
- $this->_debugEmail .= "\nSignaturestring: {$signatureString}\n";
678
 
679
- //return the SHA1 encoded string for comparison
680
- $signature = SHA1($signatureString);
681
 
682
- $this->_debugEmail .= "\nSignature: {$signature}\n";
683
 
684
- return $signature;
685
- }
686
 
687
  /**
688
  * Compatibility for BPE 2.0 pushes
@@ -690,20 +603,20 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
690
  * @return string
691
  */
692
  protected function _calculateOldSignature()
693
- {
694
  $signature2 = md5(
695
- $this->_postArray['oldPost']["bpe_trx"]
696
- . $this->_postArray['oldPost']["bpe_timestamp"]
697
- . Mage::getStoreConfig('buckaroo/buckaroo3extended/key', $this->_order->getStoreId())
698
- . $this->_postArray['oldPost']["bpe_invoice"]
699
- . $this->_postArray['oldPost']["bpe_reference"]
700
- . $this->_postArray['oldPost']["bpe_currency"]
701
- . $this->_postArray['oldPost']["bpe_amount"]
702
- . $this->_postArray['oldPost']["bpe_result"]
703
- . $this->_postArray['oldPost']["bpe_mode"]
704
- . Mage::getStoreConfig('buckaroo/buckaroo3extended/digital_signature', $this->_order->getStoreId())
705
- );
706
-
707
- return $signature2;
708
- }
709
  }
12
  protected $_debugEmail = '';
13
  protected $_method = '';
14
 
15
+ public function setCurrentOrder($order)
16
  {
17
+ $this->_order = $order;
18
  }
19
 
20
  public function getCurrentOrder()
21
  {
22
+ return $this->_order;
23
  }
24
 
25
  public function setPostArray($array)
26
  {
27
+ $this->_postArray = $array;
28
  }
29
 
30
  public function getPostArray()
31
  {
32
+ return $this->_postArray;
33
  }
34
 
35
  public function setMethod($method)
36
  {
37
+ $this->_method = $method;
38
  }
39
 
40
  public function getMethod()
41
  {
42
+ return $this->_method;
43
  }
44
 
45
  public function setDebugEmail($debugEmail)
46
  {
47
+ $this->_debugEmail = $debugEmail;
48
  }
49
 
50
  public function getDebugEmail()
51
  {
52
+ return $this->_debugEmail;
53
  }
54
 
55
  public function __construct($data = array())
56
  {
57
+ $this->setCurrentOrder($data['order']);
58
+ $this->setPostArray($data['postArray']);
59
+ $this->setDebugEmail($data['debugEmail']);
60
+ $this->setMethod($data['method']);
61
  }
62
 
63
  /**
66
  * @return bool
67
  */
68
  public function processPush()
69
+ {
70
+ $response = $this->_parsePostResponse($this->_postArray['brq_statuscode']);
71
 
72
+ //check if the push is valid and if the order can be updated
73
  list($canProcess, $canUpdate) = $this->_canProcessPush(false,$response);
74
 
75
+ $this->_debugEmail .= "Can the order be processed? " . $canProcess . "\n"."Can the order be updated? " . $canUpdate . "\n";
76
 
77
+ if (!$canProcess) {
78
+ return false;
79
+ } elseif ($canProcess && !$canUpdate) {
80
+ //if the order cant be updated, try to add a notification to the status history instead
81
+ $response = $this->_parsePostResponse($this->_postArray['brq_statuscode']);
82
+ $this->_addNote($response['message'], $this->_method);
83
+ return false;
84
+ }
85
 
86
  $paymentMethod = $this->_order->getPayment()->getMethod();
87
 
88
+ if ($paymentMethod == 'buckaroo3extended_giftcards') {
89
  Mage::dispatchEvent('buckaroo3extended_push_custom_processing', array('push' => $this, 'order' => $this->getCurrentOrder()));
90
 
91
  if ($this->getCustomResponseProcessing()) {
93
  }
94
  }
95
 
96
+ $newStates = $this->getNewStates($response['status']);
97
 
98
+ $this->_debugEmail .= "Response recieved: " . var_export($response, true) . "\n\n";
99
+ $this->_debugEmail .= "Current state: " . $this->_order->getState() . "\nCurrent status: " . $this->_order->getStatus() . "\n";
100
+ $this->_debugEmail .= "New state: " . $newStates[0] . "\nNew status: " . $newStates[1] . "\n\n";
101
 
102
  Mage::dispatchEvent('buckaroo3extended_push_custom_processing', array('push' => $this, 'order' => $this->getCurrentOrder(), 'response' => $response));
103
 
105
  return true;
106
  }
107
 
108
+ switch ($response['status'])
109
+ {
110
+ case self::BUCKAROO_ERROR:
111
+ case self::BUCKAROO_FAILED: $updatedFailed = $this->_processFailed($newStates, $response['message']);
112
+ break;
113
+ case self::BUCKAROO_SUCCESS: $updatedSuccess = $this->_processSuccess($newStates, $response['message']);
114
+ break;
115
+ case self::BUCKAROO_NEUTRAL: $this->_addNote($response['message']);
116
+ break;
117
+ case self::BUCKAROO_PENDING_PAYMENT: $updatedPendingPayment = $this->_processPendingPayment($newStates, $response['message']);
118
+ break;
119
+ case self::BUCKAROO_INCORRECT_PAYMENT: $updatedIncorrectPayment = $this->_processIncorrectPayment($newStates);
120
+ break;
121
+ }
122
 
123
  //revert the original status in order complete the whole process like it should.
124
  if (isset($originalResponseStatus)) {
136
  )
137
  );
138
 
139
+ if (isset($updatedFailed) && $updatedFailed) {
140
+ $this->_debugEmail .= "Succesfully updated 'failed' state and status \n";
141
+ } elseif (isset($updatedSuccess) && $updatedSuccess) {
142
+ $this->_debugEmail .= "Succesfully updated 'success' state and status \n";
143
+ } elseif (isset($updatedPendingPayment) && $updatedPendingPayment) {
144
+ $this->_debugEmail .= "Succesfully updated pending payment \n";
145
+ } elseif (isset($updatedIncorrectPayment) && $updatedIncorrectPayment) {
146
+ $this->_debugEmail .= "Succesfully updated incorrect payment \n";
147
+ } else {
148
+ $this->_debugEmail .= "Order was not updated \n";
149
+ }
150
 
151
+ return true;
152
+ }
153
 
154
 
155
  /**
163
  * @return array
164
  */
165
  protected function _canProcessPush($isReturn = false, $response = array())
166
+ {
167
+ $correctSignature = false;
168
+ $canUpdate = false;
169
+ $signature = $this->_calculateSignature();
170
+ if ($signature === $this->_postArray['brq_signature']) {
171
+ $correctSignature = true;
172
+ }
173
+
174
+ //check if the order can recieve further status updates
175
+ if ($correctSignature === true) {
176
+ $canUpdate = $this->_canUpdate($response);
177
+ }
178
+
179
+ $return = array(
180
+ (bool) $correctSignature,
181
+ (bool) $canUpdate,
182
+ );
183
+ return $return;
184
+ }
185
+
186
+ /**
187
+ * Checks if the order can be updated by checking if its state and status is not
188
+ * complete, closed, cancelled or holded and the order can be invoiced
189
+ *
190
  * @param array $response
191
  *
192
+ * @return boolean
193
+ */
194
+ protected function _canUpdate($response = array())
195
+ {
196
 
197
+ // Get successful state and status
198
  $completedStateAndStatus = array('complete', 'complete');
199
  $cancelledStateAndStatus = array('canceled', 'canceled');
200
  $holdedStateAndStatus = array('holded', 'holded');
201
  $closedStateAndStatus = array ('closed','closed');
202
 
203
+ $currentStateAndStatus = array($this->_order->getState(), $this->_order->getStatus());
204
 
205
+ //prevent completed orders from recieving further updates
206
  if( $completedStateAndStatus != $currentStateAndStatus
207
+ && $cancelledStateAndStatus != $currentStateAndStatus
208
+ && $holdedStateAndStatus != $currentStateAndStatus
209
+ && $closedStateAndStatus != $currentStateAndStatus
210
+ && $this->_order->canInvoice()
211
  ){
212
+ return true;
213
  }
214
 
215
  //when payperemail is used and the order has the status other then success, and current pushed status is success; send email to shopowner
226
  $this->_sendDoubleTransactionEmail();
227
  }
228
 
229
+ $this->_debugEmail .= "order already has succes, complete, closed, or holded state or can't be invoiced \n\n";
230
 
231
 
232
  return false;
233
+ }
234
 
235
  /**
236
  * Send the shop owner and subscribers to the debug-email an email with the message that there is a double transaction
255
  }
256
  }
257
 
258
+ /**
259
+ * Uses setState to add a comment to the order status history without changing the state nor status. Purpose of the comment
260
+ * is to inform the user of an attempted status upsate after the order has already recieved complete, canceled, closed or holded states
261
+ * or the order can't be invoiced. Returns false if the config has disabled this feature.
262
+ *
263
+ * @param string $description
264
+ */
265
+ protected function _addNote($description)
266
+ {
267
+ $helper = Mage::helper('buckaroo3extended');
268
+
269
+ $note = $helper->__('Buckaroo attempted to update this order after it already had ')
270
+ . '<b>'
271
+ . strtoupper($this->_order->getState())
272
+ . '</b>'
273
+ . $helper->__(' state, by sending the following: ')
274
+ . '<br/>--------------------------------------------------------------------------------------------------------------------------------<br/>'
275
+ . $description
276
+ . ' ('
277
+ . $this->_postArray['brq_statuscode']
278
+ . ')';
279
+ $this->_order->addStatusHistoryComment($note)
280
+ ->save();
281
+ }
282
 
283
  /**
284
  * @param $description
285
  */
286
  public function addNote($description)
287
+ {
288
+ $this->_addNote($description);
289
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
 
291
  /**
292
  * Process a succesful order. Sets its new state and status, sends an order confirmation email
297
  * @return bool
298
  */
299
  protected function _processSuccess($newStates, $description = false)
300
+ {
301
+ //send new order email if it hasnt already been sent
302
+ if(!$this->_order->getEmailSent())
303
  {
304
+ $this->sendNewOrderEmail();
305
  }
306
 
307
  $this->_autoInvoice();
308
 
309
+ $description = Mage::helper('buckaroo3extended')->__($description);
310
 
311
+ $description .= " (#{$this->_postArray['brq_statuscode']})";
312
 
313
+ //sets the transaction key if its defined ($trx)
314
+ //will retrieve it from the response array, if response actually is an array
315
+ if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
316
+ $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
317
+ $this->_order->save();
318
+ }
319
 
320
  if ($this->_order->getState() == Mage_Sales_Model_Order::STATE_PROCESSING) {
321
  $this->_order->addStatusHistoryComment($description, $newStates[1])
328
  }
329
 
330
 
331
+ return true;
332
+ }
333
 
334
  /**
335
  * Process a failed order. Sets its new state and status and cancels the order
378
  * @return bool
379
  */
380
  protected function _processIncorrectPayment($newStates)
381
+ {
382
+ //determine whether too much or not enough has been paid and determine the status history copmment accordingly
383
+ $amount = round($this->_order->getBaseGrandTotal()*100, 0);
384
 
385
  $setStatus = $newStates[1];
386
 
392
  $orderAmount = $this->_order->getGrandTotal();
393
  }
394
 
395
+ if ($amount > $this->_postArray['brq_amount']) {
396
  $description = Mage::helper('buckaroo3extended')->__(
397
  'Not enough paid: %s has been transfered. Order grand total was: %s.',
398
  Mage::app()->getLocale()->currency($currencyCode)->toCurrency($this->_postArray['brq_amount']),
399
  Mage::app()->getLocale()->currency($currencyCode)->toCurrency($orderAmount)
400
  );
401
+ } elseif ($amount < $this->_postArray['brq_amount']) {
402
  $description = Mage::helper('buckaroo3extended')->__(
403
  'Too much paid: %s has been transfered. Order grand total was: %s.',
404
  Mage::app()->getLocale()->currency($currencyCode)->toCurrency($this->_postArray['brq_amount']),
405
  Mage::app()->getLocale()->currency($currencyCode)->toCurrency($orderAmount)
406
  );
407
+ } else {
408
+ //the correct amount was actually paid, so return false
409
+ return false;
410
+ }
411
 
412
+ //hold the order
413
+ $this->_order->hold()
414
  ->save()
415
  ->setStatus($setStatus)
416
  ->save()
417
+ ->addStatusHistoryComment(Mage::helper('buckaroo3extended')->__($description), $setStatus)
418
  ->save();
419
 
420
+ return true;
421
+ }
422
 
423
  /**
424
  * processes an order awaiting payment. Sets its new state and status.
428
  * @return bool
429
  */
430
  protected function _processPendingPayment($newStates, $description = false)
431
+ {
432
+ $description = Mage::helper('buckaroo3extended')->__($description);
433
+ $description .= " (#{$this->_postArray['brq_statuscode']})";
434
 
435
+ //sets the transaction key if its defined ($trx)
436
+ //will retrieve it from the response array, if response actually is an array
437
+ if (!$this->_order->getTransactionKey() && array_key_exists('brq_transactions', $this->_postArray)) {
438
+ $this->_order->setTransactionKey($this->_postArray['brq_transactions']);
439
+ }
440
 
441
 
442
  if ($this->_order->getState() == Mage_Sales_Model_Order::STATE_NEW) {
449
  ->save();
450
  }
451
 
452
+ return true;
453
+ }
454
 
455
  /**
456
  * @param $code
457
  * @return array
458
  */
459
  public function getNewStates($code)
460
+ {
461
+ return Mage::helper('buckaroo3extended')->getNewStates($code, $this->getOrder(), $this->_method);
462
+ }
463
 
464
  /**
465
  * @param $newStates
467
  * @return bool
468
  */
469
  public function processPendingPayment($newStates, $description = false) {
470
+ return $this->_processPendingPayment($newStates, $description);
471
+ }
472
 
473
  /**
474
  * @param $newStates
476
  * @return bool
477
  */
478
  public function processSuccess($newStates, $description = false) {
479
+ return $this->_processSuccess($newStates, $description);
480
+ }
481
 
482
  /**
483
  * @param $newStates
485
  * @return bool
486
  */
487
  public function processFailed($newStates, $description = false) {
488
+ return $this->_processFailed($newStates, $description);
489
+ }
490
 
491
  /**
492
  * @param $newStates
493
  * @return bool
494
  */
495
  public function processIncorrectPayment($newStates) {
496
+ return $this->_processIncorrectPayment($newStates);
497
+ }
498
 
499
  /**
500
  * Creates an invoice for the order if the module is configured to do so.
502
  * @return bool
503
  */
504
  protected function _autoInvoice()
505
+ {
506
+ //check if the module is configured to create invoice on success
507
+ if (!Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/auto_invoice', $this->_order->getStoreId()))
508
+ {
509
+ return false;
510
+ }
511
 
512
  //returns true if invoice has been made, else false
513
+ $invoiceSaved = $this->_saveInvoice();
514
+
515
+ if($invoiceSaved && Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/invoice_mail', $this->_order->getStoreId()))
516
+ {
517
+ //loop through every invoice
518
+ foreach($this->_order->getInvoiceCollection() as $invoice)
519
+ {
520
+ //when there is no invoice send to the customer, send it!
521
+ if(!$invoice->getEmailSent())
522
+ {
523
+ $invoice->sendEmail()
524
+ ->setEmailSent(true)
525
+ ->save();
526
+ }
527
+ }
528
+ }
529
+ }
530
 
531
  /**
532
  * Saves an invoice and sets total-paid for the order
535
  */
536
  protected function _saveInvoice()
537
  {
538
+ if ($this->_order->canInvoice() && !$this->_order->hasInvoices()) {
539
+ $payment = $this->_order->getPayment();
540
+ $payment->registerCaptureNotification($this->_order->getBaseGrandTotal());
541
 
542
+ $this->_order->save();
543
+ $this->_debugEmail .= 'Invoice created and saved. \n';
544
 
545
+ //sets the invoice's transaction ID as the Buckaroo TRX. This is to allow the order to be refunded using Buckaroo later on.
546
  foreach($this->_order->getInvoiceCollection() as $invoice)
547
+ {
548
+ if (!isset($this->_postArray['brq_transactions'])) {
549
+ continue;
550
  }
551
+ $invoice->setTransactionId($this->_postArray['brq_transactions'])
552
+ ->save();
553
+ }
554
+ return true;
555
+ }
556
 
557
  return false;
558
  }
559
 
560
+ /**
561
+ * Determines the signature using array sorting and the SHA1 hash algorithm
562
+ *
563
+ * @return string $signature
564
+ */
565
+ protected function _calculateSignature()
566
+ {
567
+ if (isset($this->_postArray['isOldPost']) && $this->_postArray['isOldPost'])
568
+ {
569
+ return $this->_calculateOldSignature();
570
+ }
571
+
572
+ $origArray = $this->_postArray;
573
+ unset($origArray['brq_signature']);
574
+
575
+ //sort the array
576
+ $sortableArray = $this->buckarooSort($origArray);
577
+
578
+ //turn into string and add the secret key to the end
579
+ $signatureString = '';
580
+ foreach($sortableArray as $key => $value) {
581
  if ('brq_SERVICE_masterpass_CustomerPhoneNumber' !== $key
582
  && 'brq_SERVICE_masterpass_ShippingRecipientPhoneNumber' !== $key
583
  ) {
584
  $value = urldecode($value);
585
  }
586
+ $signatureString .= $key . '=' . $value;
587
+ }
588
+ $signatureString .= Mage::getStoreConfig('buckaroo/buckaroo3extended/digital_signature', $this->_order->getStoreId());
589
 
590
+ $this->_debugEmail .= "\nSignaturestring: {$signatureString}\n";
591
 
592
+ //return the SHA1 encoded string for comparison
593
+ $signature = SHA1($signatureString);
594
 
595
+ $this->_debugEmail .= "\nSignature: {$signature}\n";
596
 
597
+ return $signature;
598
+ }
599
 
600
  /**
601
  * Compatibility for BPE 2.0 pushes
603
  * @return string
604
  */
605
  protected function _calculateOldSignature()
606
+ {
607
  $signature2 = md5(
608
+ $this->_postArray['oldPost']["bpe_trx"]
609
+ . $this->_postArray['oldPost']["bpe_timestamp"]
610
+ . Mage::getStoreConfig('buckaroo/buckaroo3extended/key', $this->_order->getStoreId())
611
+ . $this->_postArray['oldPost']["bpe_invoice"]
612
+ . $this->_postArray['oldPost']["bpe_reference"]
613
+ . $this->_postArray['oldPost']["bpe_currency"]
614
+ . $this->_postArray['oldPost']["bpe_amount"]
615
+ . $this->_postArray['oldPost']["bpe_result"]
616
+ . $this->_postArray['oldPost']["bpe_mode"]
617
+ . Mage::getStoreConfig('buckaroo/buckaroo3extended/digital_signature', $this->_order->getStoreId())
618
+ );
619
+
620
+ return $signature2;
621
+ }
622
  }
app/code/community/TIG/Buckaroo3Extended/Model/Response/Return.php CHANGED
@@ -1,35 +1,35 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Model_Response_Return extends TIG_Buckaroo3Extended_Model_Response_Push
3
  {
4
  public function processReturn()
5
  {
6
  //check if the push is valid and if the order can be updated
7
- list($canProcess, $canUpdate) = $this->_canProcessPush(true);
8
-
9
- $this->_debugEmail .= "can the order be processed? " . $canProcess . "\ncan the order be updated? " . $canUpdate . "\n";
10
-
11
- if (!$canProcess) {
12
- $this->_verifyError();
13
- }
14
-
15
- Mage::dispatchEvent('buckaroo3extended_return_custom_processing', array('return' => $this, 'order' => $this->getCurrentOrder(), 'post_array' => $this->_postArray));
16
-
17
  if ($this->getCustomResponseProcessing()) {
18
  return true;
19
  }
20
-
21
- $parsedResponse = $this->_parsePostResponse($this->_postArray['brq_statuscode']);
22
-
23
- $this->_requiredAction($parsedResponse);
24
  }
25
-
26
  public function customSuccess()
27
  {
28
  if ($this->getCustomResponseProcessing()) {
29
  $this->_success();
30
  }
31
  }
32
-
33
  public function customFailed()
34
  {
35
  if ($this->getCustomResponseProcessing()) {
1
+ <?php
2
  class TIG_Buckaroo3Extended_Model_Response_Return extends TIG_Buckaroo3Extended_Model_Response_Push
3
  {
4
  public function processReturn()
5
  {
6
  //check if the push is valid and if the order can be updated
7
+ list($canProcess, $canUpdate) = $this->_canProcessPush(true);
8
+
9
+ $this->_debugEmail .= "can the order be processed? " . $canProcess . "\ncan the order be updated? " . $canUpdate . "\n";
10
+
11
+ if (!$canProcess) {
12
+ $this->_verifyError();
13
+ }
14
+
15
+ Mage::dispatchEvent('buckaroo3extended_return_custom_processing', array('return' => $this, 'order' => $this->getCurrentOrder(), 'post_array' => $this->_postArray));
16
+
17
  if ($this->getCustomResponseProcessing()) {
18
  return true;
19
  }
20
+
21
+ $parsedResponse = $this->_parsePostResponse($this->_postArray['brq_statuscode']);
22
+
23
+ $this->_requiredAction($parsedResponse);
24
  }
25
+
26
  public function customSuccess()
27
  {
28
  if ($this->getCustomResponseProcessing()) {
29
  $this->_success();
30
  }
31
  }
32
+
33
  public function customFailed()
34
  {
35
  if ($this->getCustomResponseProcessing()) {
app/code/community/TIG/Buckaroo3Extended/Model/Sources/AcceptgiroDirectdebit.php CHANGED
@@ -3,10 +3,10 @@ class TIG_Buckaroo3Extended_Model_Sources_AcceptgiroDirectdebit
3
  {
4
  public function toOptionArray()
5
  {
6
- $array = array(
7
- array('value' => 'afterpayacceptgiro', 'label' => Mage::helper('buckaroo3extended')->__('Acceptgiro')),
8
- array('value' => 'afterpaydigiaccept', 'label' => Mage::helper('buckaroo3extended')->__('Digiaccept')),
9
- );
10
- return $array;
11
  }
12
  }
3
  {
4
  public function toOptionArray()
5
  {
6
+ $array = array(
7
+ array('value' => 'afterpayacceptgiro', 'label' => Mage::helper('buckaroo3extended')->__('Acceptgiro')),
8
+ array('value' => 'afterpaydigiaccept', 'label' => Mage::helper('buckaroo3extended')->__('Digiaccept')),
9
+ );
10
+ return $array;
11
  }
12
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Afterpay/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Afterpay_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_afterpay_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_afterpay_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Afterpay2/AvailableCurrencies.php CHANGED
@@ -11,6 +11,6 @@ class TIG_Buckaroo3Extended_Model_Sources_Afterpay2_AvailableCurrencies
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
 
14
- return $array;
15
  }
16
  }
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
 
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Amex/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Amex_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_amex_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_amex_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Bancontactmrcash/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Bancontactmrcash_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_bancontactmrcash_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_bancontactmrcash_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Cartebancaire/AvailableCurrencies.php CHANGED
@@ -11,6 +11,6 @@ class TIG_Buckaroo3Extended_Model_Sources_Cartebancaire_AvailableCurrencies
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
 
14
- return $array;
15
  }
16
  }
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
 
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Cartebleue/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Cartebleue_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_cartebleue_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_cartebleue_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Certificates.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_Certificates
3
  {
4
  public function toOptionArray()
5
  {
6
- $collection = Mage::getResourceModel('buckaroo3extended/certificate_collection');
7
-
8
  if ($collection->count() < 1) {
9
  $array = array(
10
  array(
@@ -12,24 +12,24 @@ class TIG_Buckaroo3Extended_Model_Sources_Certificates
12
  'value' => '',
13
  ),
14
  );
15
-
16
  return $array;
17
  }
18
-
19
- $array = array(
20
  array(
21
  'label' => Mage::helper('buckaroo3extended')->__('No certificate selected.'),
22
  'value' => '',
23
  ),
24
  );
25
-
26
- foreach($collection->getItems() as $certificate) {
27
- $array[] = array(
28
- 'value' => $certificate->getCertificateId(),
29
- 'label' => $certificate->getCertificateName() . ' (' . $certificate->getUploadDate() . ')',
30
- );
31
- }
32
-
33
- return $array;
34
  }
35
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_Certificates
3
  {
4
  public function toOptionArray()
5
  {
6
+ $collection = Mage::getResourceModel('buckaroo3extended/certificate_collection');
7
+
8
  if ($collection->count() < 1) {
9
  $array = array(
10
  array(
12
  'value' => '',
13
  ),
14
  );
15
+
16
  return $array;
17
  }
18
+
19
+ $array = array(
20
  array(
21
  'label' => Mage::helper('buckaroo3extended')->__('No certificate selected.'),
22
  'value' => '',
23
  ),
24
  );
25
+
26
+ foreach($collection->getItems() as $certificate) {
27
+ $array[] = array(
28
+ 'value' => $certificate->getCertificateId(),
29
+ 'label' => $certificate->getCertificateName() . ' (' . $certificate->getUploadDate() . ')',
30
+ );
31
+ }
32
+
33
+ return $array;
34
  }
35
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/CultureType.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_CultureType
3
  {
4
  public function toOptionArray()
5
  {
6
- $array = array(
7
- array('value' => 'billing', 'label' => Mage::helper('buckaroo3extended')->__('Billing Address')),
8
- array('value' => 'store', 'label' => Mage::helper('buckaroo3extended')->__('Store Settings')),
9
- );
10
- return $array;
11
  }
12
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_CultureType
3
  {
4
  public function toOptionArray()
5
  {
6
+ $array = array(
7
+ array('value' => 'billing', 'label' => Mage::helper('buckaroo3extended')->__('Billing Address')),
8
+ array('value' => 'store', 'label' => Mage::helper('buckaroo3extended')->__('Store Settings')),
9
+ );
10
+ return $array;
11
  }
12
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Directdebit/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Directdebit_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_directdebit_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_directdebit_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Empayment/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Empayment_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_empayment_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_empayment_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Eps/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Eps_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_eps_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_eps_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/FeePercentageMode.php CHANGED
@@ -44,8 +44,8 @@ class TIG_Buckaroo3Extended_Model_Sources_FeePercentageMode
44
  public function toOptionArray()
45
  {
46
  $helper = Mage::helper('buckaroo3extended');
47
- $array = array(
48
- array(
49
  'value' => 'subtotal',
50
  'label' => $helper->__('Subtotal')
51
  ),
@@ -53,11 +53,11 @@ class TIG_Buckaroo3Extended_Model_Sources_FeePercentageMode
53
  'value' => 'subtotal_incl_tax',
54
  'label' => $helper->__('Subtotal incl. tax')
55
  ),
56
- array(
57
  'value' => 'grandtotal',
58
  'label' => $helper->__('Grand total')
59
  ),
60
- );
61
- return $array;
62
  }
63
  }
44
  public function toOptionArray()
45
  {
46
  $helper = Mage::helper('buckaroo3extended');
47
+ $array = array(
48
+ array(
49
  'value' => 'subtotal',
50
  'label' => $helper->__('Subtotal')
51
  ),
53
  'value' => 'subtotal_incl_tax',
54
  'label' => $helper->__('Subtotal incl. tax')
55
  ),
56
+ array(
57
  'value' => 'grandtotal',
58
  'label' => $helper->__('Grand total')
59
  ),
60
+ );
61
+ return $array;
62
  }
63
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Giftcards/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Giftcards_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_giftcards_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_giftcards_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Giropay/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Giropay_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_giropay_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_giropay_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Ideal/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Ideal_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_ideal_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_ideal_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Ideal/ServiceVersion.php CHANGED
@@ -4,7 +4,7 @@ class TIG_Buckaroo3Extended_Model_Sources_Ideal_ServiceVersion
4
  public function toOptionArray()
5
  {
6
  $helper = Mage::helper('buckaroo3extended');
7
-
8
  $array = array(
9
  array(
10
  'label' => $helper->__('1'),
@@ -15,7 +15,7 @@ class TIG_Buckaroo3Extended_Model_Sources_Ideal_ServiceVersion
15
  'value' => 2,
16
  ),
17
  );
18
-
19
- return $array;
20
  }
21
  }
4
  public function toOptionArray()
5
  {
6
  $helper = Mage::helper('buckaroo3extended');
7
+
8
  $array = array(
9
  array(
10
  'label' => $helper->__('1'),
15
  'value' => 2,
16
  ),
17
  );
18
+
19
+ return $array;
20
  }
21
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Maestro/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Maestro_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_maestro_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_maestro_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Mastercard/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Mastercard_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_mastercard_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_mastercard_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Masterpass/AvailableCurrencies.php CHANGED
@@ -11,6 +11,6 @@ class TIG_Buckaroo3Extended_Model_Sources_Masterpass_AvailableCurrencies
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
 
14
- return $array;
15
  }
16
  }
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
 
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Onlinegiro/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Onlinegiro_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_onlinegiro_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_onlinegiro_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/PaymentMethodArea.php CHANGED
@@ -1,13 +1,13 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_PaymentMethodArea
3
  {
4
  public function toOptionArray()
5
  {
6
- $array = array(
7
- array('value' => 'frontend', 'label' => Mage::helper('buckaroo3extended')->__('Frontend')),
8
- array('value' => 'backend', 'label' => Mage::helper('buckaroo3extended')->__('Backend')),
9
- array('value' => 'both', 'label' => Mage::helper('buckaroo3extended')->__('Frontend and Backend')),
10
- );
11
- return $array;
12
  }
13
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_PaymentMethodArea
3
  {
4
  public function toOptionArray()
5
  {
6
+ $array = array(
7
+ array('value' => 'frontend', 'label' => Mage::helper('buckaroo3extended')->__('Frontend')),
8
+ array('value' => 'backend', 'label' => Mage::helper('buckaroo3extended')->__('Backend')),
9
+ array('value' => 'both', 'label' => Mage::helper('buckaroo3extended')->__('Frontend and Backend')),
10
+ );
11
+ return $array;
12
  }
13
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Paymentguarantee/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Paymentguarantee_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_paymentguarantee_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_paymentguarantee_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Paypal/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Paypal_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_paypal_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_paypal_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Payperemail/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Payperemail_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_payperemail_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_payperemail_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Paysafecard/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Paysafecard_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_paysafecard_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_paysafecard_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/ReminderLevel.php CHANGED
@@ -1,14 +1,14 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_ReminderLevel
3
  {
4
  public function toOptionArray()
5
  {
6
- $array = array(
7
- array('value' => '4', 'label' => Mage::helper('buckaroo3extended')->__('4')),
8
- array('value' => '3', 'label' => Mage::helper('buckaroo3extended')->__('3')),
9
- array('value' => '2', 'label' => Mage::helper('buckaroo3extended')->__('2')),
10
- array('value' => '1', 'label' => Mage::helper('buckaroo3extended')->__('1')),
11
- );
12
- return $array;
13
  }
14
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_ReminderLevel
3
  {
4
  public function toOptionArray()
5
  {
6
+ $array = array(
7
+ array('value' => '4', 'label' => Mage::helper('buckaroo3extended')->__('4')),
8
+ array('value' => '3', 'label' => Mage::helper('buckaroo3extended')->__('3')),
9
+ array('value' => '2', 'label' => Mage::helper('buckaroo3extended')->__('2')),
10
+ array('value' => '1', 'label' => Mage::helper('buckaroo3extended')->__('1')),
11
+ );
12
+ return $array;
13
  }
14
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Sofortueberweisung/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Sofortueberweisung_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_sofortueberweisung_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_sofortueberweisung_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/TestLive.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_TestLive
3
  {
4
  public function toOptionArray()
5
  {
6
- $array = array(
7
- array('value' => '1', 'label' => Mage::helper('buckaroo3extended')->__('Test')),
8
- array('value' => '0', 'label' => Mage::helper('buckaroo3extended')->__('Live')),
9
- );
10
- return $array;
11
  }
12
  }
1
+ <?php
2
  class TIG_Buckaroo3Extended_Model_Sources_TestLive
3
  {
4
  public function toOptionArray()
5
  {
6
+ $array = array(
7
+ array('value' => '1', 'label' => Mage::helper('buckaroo3extended')->__('Test')),
8
+ array('value' => '0', 'label' => Mage::helper('buckaroo3extended')->__('Live')),
9
+ );
10
+ return $array;
11
  }
12
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Transfer/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Transfer_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_transfer_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_transfer_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Visa/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Visa_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_visa_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_visa_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Visaelectron/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Visaelectron_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_visaelectron_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_visaelectron_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/Model/Sources/Vpay/AvailableCurrencies.php CHANGED
@@ -5,12 +5,12 @@ class TIG_Buckaroo3Extended_Model_Sources_Vpay_AvailableCurrencies
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_vpay_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
-
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
-
14
- return $array;
15
  }
16
  }
5
  {
6
  $paymentModel = Mage::getModel('buckaroo3extended/paymentMethods_vpay_paymentMethod');
7
  $allowedCurrencies = $paymentModel->getAllowedCurrencies();
8
+
9
  $array = array();
10
  foreach ($allowedCurrencies as $allowedCurrency) {
11
  $array[] = array('value' => $allowedCurrency, 'label' => $allowedCurrency);
12
  }
13
+
14
+ return $array;
15
  }
16
  }
app/code/community/TIG/Buckaroo3Extended/controllers/CheckoutController.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  class TIG_Buckaroo3Extended_CheckoutController extends Mage_Core_Controller_Front_Action
3
  {
4
- public function checkoutAction()
5
- {
6
  /**
7
  * @var TIG_Buckaroo3Extended_Model_Request_Abstract $request
8
  */
9
  $request = Mage::getModel('buckaroo3extended/request_abstract');
10
  $request->sendRequest();
11
- }
12
 
13
  public function saveDataAction()
14
  {
1
  <?php
2
  class TIG_Buckaroo3Extended_CheckoutController extends Mage_Core_Controller_Front_Action
3
  {
4
+ public function checkoutAction()
5
+ {
6
  /**
7
  * @var TIG_Buckaroo3Extended_Model_Request_Abstract $request
8
  */
9
  $request = Mage::getModel('buckaroo3extended/request_abstract');
10
  $request->sendRequest();
11
+ }
12
 
13
  public function saveDataAction()
14
  {
app/code/community/TIG/Buckaroo3Extended/controllers/NotifyController.php CHANGED
@@ -50,15 +50,15 @@ class TIG_Buckaroo3Extended_NotifyController extends Mage_Core_Controller_Front_
50
  return $this->_debugEmail;
51
  }
52
 
53
- public function setPushLock($orderId)
54
- {
55
- $this->_processPush = Mage::getModel('buckaroo3extended/process')->setId('push_' . $orderId);
56
- }
57
 
58
- public function getPushLock()
59
- {
60
- return $this->_processPush;
61
- }
62
 
63
  /**
64
  *
@@ -107,20 +107,20 @@ class TIG_Buckaroo3Extended_NotifyController extends Mage_Core_Controller_Front_
107
  }
108
 
109
 
110
- //order exists, instantiate the lock-object for the push
111
- $this->setPushLock($this->_order->getId());
112
 
113
- if ($this->_processPush->isLocked())
114
- {
115
- $this->_debugEmail .= "\n".'Currently another push is being processed, the current push will not be processed.'."\n";
116
  $this->_debugEmail .= "\n".'sent from: ' . __FILE__ . '@' . __LINE__."\n";
117
  $module = Mage::getModel('buckaroo3extended/abstract', $this->_debugEmail);
118
  $module->setDebugEmail($this->_debugEmail);
119
  $module->sendDebugEmail();
120
  return false;
121
- }
122
 
123
- $this->_processPush->lockAndBlock();
124
  $this->_debugEmail .= "\n".'Push is gelocked, hij kan nu verwerkt worden.'."\n";
125
 
126
  $this->_paymentCode = $this->_order->getPayment()->getMethod();
@@ -148,8 +148,8 @@ class TIG_Buckaroo3Extended_NotifyController extends Mage_Core_Controller_Front_
148
 
149
  $this->_debugEmail .= "\n".' sent from: ' . __FILE__ . '@' . __LINE__;
150
 
151
- // Remove the lock.
152
- $this->_processPush->unlock();
153
  $this->_debugEmail .= "\n".'Push is afgerond, lock is vrij gegeven'."\n";
154
  //send debug email
155
  $module->setDebugEmail($this->_debugEmail);
@@ -188,9 +188,6 @@ class TIG_Buckaroo3Extended_NotifyController extends Mage_Core_Controller_Front_
188
 
189
  $module->processReturn();
190
 
191
-
192
-
193
-
194
  $this->_redirect('');
195
  }
196
 
50
  return $this->_debugEmail;
51
  }
52
 
53
+ public function setPushLock($orderId)
54
+ {
55
+ $this->_processPush = Mage::getModel('buckaroo3extended/process')->setId('push_' . $orderId);
56
+ }
57
 
58
+ public function getPushLock()
59
+ {
60
+ return $this->_processPush;
61
+ }
62
 
63
  /**
64
  *
107
  }
108
 
109
 
110
+ //order exists, instantiate the lock-object for the push
111
+ $this->setPushLock($this->_order->getId());
112
 
113
+ if ($this->_processPush->isLocked())
114
+ {
115
+ $this->_debugEmail .= "\n".'Currently another push is being processed, the current push will not be processed.'."\n";
116
  $this->_debugEmail .= "\n".'sent from: ' . __FILE__ . '@' . __LINE__."\n";
117
  $module = Mage::getModel('buckaroo3extended/abstract', $this->_debugEmail);
118
  $module->setDebugEmail($this->_debugEmail);
119
  $module->sendDebugEmail();
120
  return false;
121
+ }
122
 
123
+ $this->_processPush->lockAndBlock();
124
  $this->_debugEmail .= "\n".'Push is gelocked, hij kan nu verwerkt worden.'."\n";
125
 
126
  $this->_paymentCode = $this->_order->getPayment()->getMethod();
148
 
149
  $this->_debugEmail .= "\n".' sent from: ' . __FILE__ . '@' . __LINE__;
150
 
151
+ // Remove the lock.
152
+ $this->_processPush->unlock();
153
  $this->_debugEmail .= "\n".'Push is afgerond, lock is vrij gegeven'."\n";
154
  //send debug email
155
  $module->setDebugEmail($this->_debugEmail);
188
 
189
  $module->processReturn();
190
 
 
 
 
191
  $this->_redirect('');
192
  }
193
 
app/code/community/TIG/Buckaroo3Extended/etc/adminhtml.xml CHANGED
@@ -11,31 +11,31 @@
11
  </children>
12
  </system>
13
  </menu>
14
- <acl>
15
- <resources>
16
- <all>
17
- <title>Allow Everything</title>
18
- </all>
19
- <admin>
20
- <children>
21
- <system>
22
- <children>
23
- <config>
24
- <children>
25
- <buckaroo translate="title">
26
- <title>Buckaroo</title>
27
- <sort_order>0</sort_order>
28
- </buckaroo>
29
- </children>
30
- </config>
31
- <buckaroo_giftcard translate="title">
32
- <title>Buckaroo Giftcards</title>
33
- <sort_order>55</sort_order>
34
- </buckaroo_giftcard>
35
- </children>
36
- </system>
37
- </children>
38
- </admin>
39
- </resources>
40
- </acl>
41
  </config>
11
  </children>
12
  </system>
13
  </menu>
14
+ <acl>
15
+ <resources>
16
+ <all>
17
+ <title>Allow Everything</title>
18
+ </all>
19
+ <admin>
20
+ <children>
21
+ <system>
22
+ <children>
23
+ <config>
24
+ <children>
25
+ <buckaroo translate="title">
26
+ <title>Buckaroo</title>
27
+ <sort_order>0</sort_order>
28
+ </buckaroo>
29
+ </children>
30
+ </config>
31
+ <buckaroo_giftcard translate="title">
32
+ <title>Buckaroo Giftcards</title>
33
+ <sort_order>55</sort_order>
34
+ </buckaroo_giftcard>
35
+ </children>
36
+ </system>
37
+ </children>
38
+ </admin>
39
+ </resources>
40
+ </acl>
41
  </config>
app/code/community/TIG/Buckaroo3Extended/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <TIG_Buckaroo3Extended>
5
- <version>4.12.0</version>
6
  </TIG_Buckaroo3Extended>
7
  </modules>
8
  <frontend>
@@ -1830,6 +1830,16 @@
1830
  <order_email>1</order_email>
1831
  </buckaroo3extended_masterpass>
1832
  </buckaroo>
1833
-
 
 
 
 
 
 
 
 
 
 
1834
  </default>
1835
- </config>
2
  <config>
3
  <modules>
4
  <TIG_Buckaroo3Extended>
5
+ <version>4.13.0</version>
6
  </TIG_Buckaroo3Extended>
7
  </modules>
8
  <frontend>
1830
  <order_email>1</order_email>
1831
  </buckaroo3extended_masterpass>
1832
  </buckaroo>
1833
+ <tax>
1834
+ <calculation>
1835
+ <buckaroo_fee_including_tax>1</buckaroo_fee_including_tax>
1836
+ </calculation>
1837
+ <sales_display>
1838
+ <buckaroo_fee>3</buckaroo_fee>
1839
+ </sales_display>
1840
+ <cart_display>
1841
+ <buckaroo_fee>2</buckaroo_fee>
1842
+ </cart_display>
1843
+ </tax>
1844
  </default>
1845
+ </config>
app/code/community/TIG/Buckaroo3Extended/etc/system.xml CHANGED
@@ -5208,11 +5208,11 @@
5208
  <show_in_store>1</show_in_store>
5209
  </sort_order>
5210
  <cards_allowed translate="label comment tooltip">
5211
- <label>Allowed giftcards</label>
5212
- <comment>Select which giftcards are available to the customer. You can add new cards in System > Buckaroo giftcards</comment>
5213
- <tooltip>These options will be presented to the customer after Buckaroo has received the order. If left blank, the available options will be based on which Buckaroo payment options you have enabled.</tooltip>
5214
- <frontend_type>multiselect</frontend_type>
5215
- <source_model>buckaroo3extended/sources_giftcards_availableCards</source_model>
5216
  <sort_order>50</sort_order>
5217
  <show_in_default>1</show_in_default>
5218
  <show_in_website>1</show_in_website>
5208
  <show_in_store>1</show_in_store>
5209
  </sort_order>
5210
  <cards_allowed translate="label comment tooltip">
5211
+ <label>Allowed giftcards</label>
5212
+ <comment>Select which giftcards are available to the customer. You can add new cards in System > Buckaroo giftcards</comment>
5213
+ <tooltip>These options will be presented to the customer after Buckaroo has received the order. If left blank, the available options will be based on which Buckaroo payment options you have enabled.</tooltip>
5214
+ <frontend_type>multiselect</frontend_type>
5215
+ <source_model>buckaroo3extended/sources_giftcards_availableCards</source_model>
5216
  <sort_order>50</sort_order>
5217
  <show_in_default>1</show_in_default>
5218
  <show_in_website>1</show_in_website>
app/code/community/TIG/Buckaroo3Extended/sql/buckaroo3extended_setup/mysql4-data-upgrade-4.12.0-4.13.0.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * ___________ __ __
4
+ * \__ ___/____ _/ |_ _____ | |
5
+ * | | / _ \\ __\\__ \ | |
6
+ * | | | |_| || | / __ \_| |__
7
+ * |____| \____/ |__| (____ /|____/
8
+ * \/
9
+ * ___ __ __
10
+ * | | ____ _/ |_ ____ _______ ____ ____ _/ |_
11
+ * | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
12
+ * | || | \| | \ ___/ | | \/| | \\ ___/ | |
13
+ * |___||___| /|__| \_____>|__| |___| / \_____>|__|
14
+ * \/ \/
15
+ * ________
16
+ * / _____/_______ ____ __ __ ______
17
+ * / \ ___\_ __ \ / _ \ | | \\____ \
18
+ * \ \_\ \| | \/| |_| || | /| |_| |
19
+ * \______ /|__| \____/ |____/ | __/
20
+ * \/ |__|
21
+ *
22
+ * NOTICE OF LICENSE
23
+ *
24
+ * This source file is subject to the Creative Commons License.
25
+ * It is available through the world-wide-web at this URL:
26
+ * http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
27
+ * If you are unable to obtain it through the world-wide-web, please send an email
28
+ * to servicedesk@totalinternetgroup.nl so we can send you a copy immediately.
29
+ *
30
+ * DISCLAIMER
31
+ *
32
+ * Do not edit or add to this file if you wish to upgrade this module to newer
33
+ * versions in the future. If you wish to customize this module for your
34
+ * needs please contact servicedesk@totalinternetgroup.nl for more information.
35
+ *
36
+ * @copyright Copyright (c) 2013 Total Internet Group B.V. (http://www.totalinternetgroup.nl)
37
+ * @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
38
+ */
39
+ $installer = $this;
40
+
41
+ $installer->startSetup();
42
+
43
+ $statusArray = array(
44
+ array(
45
+ 'status' => 'buckaroo_pending_payment',
46
+ 'label' => 'Buckaroo (waiting for payment)',
47
+ 'is_new' => 1,
48
+ 'form_key' => '',
49
+ 'store_labels' => array(),
50
+ 'state' => 'new'
51
+ ),
52
+ array(
53
+ 'status' => 'buckaroo_incorrect_payment',
54
+ 'label' => 'Buckaroo On Hold (incorrect amount transfered)',
55
+ 'is_new' => 1,
56
+ 'form_key' => '',
57
+ 'store_labels' => array(),
58
+ 'state' => 'holded'
59
+ )
60
+ );
61
+
62
+ foreach ($statusArray as $data) {
63
+ // Get the entity from the database
64
+ $statusDb = Mage::getModel('sales/order_status')->load($data['status']);
65
+
66
+ // Check if it already has a status - if it doesn't, we're going to add it
67
+ if (!$statusDb->getStatus()) {
68
+ $statusDb->setData($data);
69
+ $statusDb->save();
70
+ }
71
+ }
72
+
73
+ $installer->endSetup();
app/code/community/TIG/Buckaroo3Extended/sql/buckaroo3extended_setup/mysql4-install-0.1.0.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
  $installer = $this;
3
 
4
  $installer->startSetup();
@@ -11,50 +11,50 @@ $isVersion19 = version_compare(Mage::getVersion(), $version19, '<') ? false : tr
11
  $isVersion110 = version_compare(Mage::getVersion(), $version110, '<') ? false : true;
12
 
13
  if (!$isVersion15 || ($isVersion19 && !$isVersion110)) {
14
- return;
15
  }
16
 
17
  //define statusses to be added
18
  $statusArray = array(
19
- 'buckaroo_pending_payment' => array(
20
- 'status' => 'buckaroo_pending_payment',
21
- 'label' => 'Buckaroo (waiting for payment)',
22
- 'is_new' => 1,
23
- 'form_key' => '',
24
- 'store_labels' => array(),
25
- 'state' => 'new'
26
- ),
27
- 'buckaroo_incorrect_amount' => array(
28
- 'status' => 'buckaroo_incorrect_payment',
29
- 'label' => 'Buckaroo On Hold (incorrect amount transfered)',
30
- 'is_new' => 1,
31
- 'form_key' => '',
32
- 'store_labels' => array(),
33
- 'state' => 'holded'
34
- )
35
  );
36
 
37
  //add the statusses and link them to their defined states
38
  foreach ($statusArray as $status) {
39
- $_stat = Mage::getModel('sales/order_status')->load($status['status']);
40
-
41
- /* Add Status */
42
- if ($status['is_new'] && $_stat->getStatus()) {
43
- return;
44
- }
45
-
46
- $_stat->setData($status)->setStatus($status['status']);
47
-
48
- try {
49
- $_stat->save();
50
- } catch (Mage_Core_Exception $e) { }
51
-
52
- /* Assign Status to State */
53
- if ($_stat && $_stat->getStatus()) {
54
- try {
55
- $_stat->assignState($status['state'], false);
56
- } catch (Mage_Core_Exception $e) { }
57
- catch (Exception $e) { }
58
- }
59
  }
60
  $installer->endSetup();
1
+ <?php
2
  $installer = $this;
3
 
4
  $installer->startSetup();
11
  $isVersion110 = version_compare(Mage::getVersion(), $version110, '<') ? false : true;
12
 
13
  if (!$isVersion15 || ($isVersion19 && !$isVersion110)) {
14
+ return;
15
  }
16
 
17
  //define statusses to be added
18
  $statusArray = array(
19
+ 'buckaroo_pending_payment' => array(
20
+ 'status' => 'buckaroo_pending_payment',
21
+ 'label' => 'Buckaroo (waiting for payment)',
22
+ 'is_new' => 1,
23
+ 'form_key' => '',
24
+ 'store_labels' => array(),
25
+ 'state' => 'new'
26
+ ),
27
+ 'buckaroo_incorrect_amount' => array(
28
+ 'status' => 'buckaroo_incorrect_payment',
29
+ 'label' => 'Buckaroo On Hold (incorrect amount transfered)',
30
+ 'is_new' => 1,
31
+ 'form_key' => '',
32
+ 'store_labels' => array(),
33
+ 'state' => 'holded'
34
+ )
35
  );
36
 
37
  //add the statusses and link them to their defined states
38
  foreach ($statusArray as $status) {
39
+ $_stat = Mage::getModel('sales/order_status')->load($status['status']);
40
+
41
+ /* Add Status */
42
+ if ($status['is_new'] && $_stat->getStatus()) {
43
+ return;
44
+ }
45
+
46
+ $_stat->setData($status)->setStatus($status['status']);
47
+
48
+ try {
49
+ $_stat->save();
50
+ } catch (Mage_Core_Exception $e) { }
51
+
52
+ /* Assign Status to State */
53
+ if ($_stat && $_stat->getStatus()) {
54
+ try {
55
+ $_stat->assignState($status['state'], false);
56
+ } catch (Mage_Core_Exception $e) { }
57
+ catch (Exception $e) { }
58
+ }
59
  }
60
  $installer->endSetup();
app/code/community/TIG/Buckaroo3Extended/sql/buckaroo3extended_setup/mysql4-upgrade-4.0.3-4.1.0.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
  $installer = $this;
3
 
4
  $installer->startSetup();
@@ -25,12 +25,12 @@ SQL3;
25
  $sql4 = <<<SQL4
26
  CREATE TABLE `{$certificatesTable}`
27
  (
28
- `certificate_id` INT(7) NOT NULL auto_increment,
29
- `certificate` TEXT NOT NULL,
30
- `certificate_name` VARCHAR(15) NOT NULL,
31
- `upload_date` DATETIME NOT NULL,
32
- PRIMARY KEY (`certificate_id`),
33
- UNIQUE (`certificate_name`)
34
  )
35
 
36
  SQL4;
@@ -41,7 +41,7 @@ try {
41
  $installer->run($sql3);
42
  $installer->run($sql4);
43
  } catch (Exception $e) {
44
-
45
  }
46
 
47
  $installer->endSetup();
1
+ <?php
2
  $installer = $this;
3
 
4
  $installer->startSetup();
25
  $sql4 = <<<SQL4
26
  CREATE TABLE `{$certificatesTable}`
27
  (
28
+ `certificate_id` INT(7) NOT NULL auto_increment,
29
+ `certificate` TEXT NOT NULL,
30
+ `certificate_name` VARCHAR(15) NOT NULL,
31
+ `upload_date` DATETIME NOT NULL,
32
+ PRIMARY KEY (`certificate_id`),
33
+ UNIQUE (`certificate_name`)
34
  )
35
 
36
  SQL4;
41
  $installer->run($sql3);
42
  $installer->run($sql4);
43
  } catch (Exception $e) {
44
+
45
  }
46
 
47
  $installer->endSetup();
app/code/community/TIG/Buckaroo3Extended/sql/buckaroo3extended_setup/mysql4-upgrade-4.3.1-4.3.2.php CHANGED
@@ -3,16 +3,16 @@ $installer = $this;
3
 
4
  $installer->startSetup();
5
  $status = array(
6
- 'status' => 'buckaroo_giftcard',
7
- 'label' => 'Buckaroo (giftcard)',
8
- 'is_new' => 1,
9
- 'form_key' => '',
10
- 'store_labels' => array(),
11
- 'state' => 'new'
12
  );
13
 
14
  $_stat = Mage::getModel('sales/order_status')->load('buckaroo_giftcard');
15
-
16
  /* Add Status */
17
  if ($_stat->getStatus()) {
18
  return;
@@ -22,13 +22,13 @@ $_stat->setData($status)->setStatus('buckaroo_giftcard');
22
 
23
  try {
24
  $_stat->save();
25
- } catch (Mage_Core_Exception $e) { }
26
 
27
  /* Assign Status to State */
28
  if ($_stat && $_stat->getStatus()) {
29
  try {
30
  $_stat->assignState($status['state'], false);
31
- } catch (Mage_Core_Exception $e) { }
32
  catch (Exception $e) { }
33
  }
34
 
3
 
4
  $installer->startSetup();
5
  $status = array(
6
+ 'status' => 'buckaroo_giftcard',
7
+ 'label' => 'Buckaroo (giftcard)',
8
+ 'is_new' => 1,
9
+ 'form_key' => '',
10
+ 'store_labels' => array(),
11
+ 'state' => 'new'
12
  );
13
 
14
  $_stat = Mage::getModel('sales/order_status')->load('buckaroo_giftcard');
15
+
16
  /* Add Status */
17
  if ($_stat->getStatus()) {
18
  return;
22
 
23
  try {
24
  $_stat->save();
25
+ } catch (Mage_Core_Exception $e) { }
26
 
27
  /* Assign Status to State */
28
  if ($_stat && $_stat->getStatus()) {
29
  try {
30
  $_stat->assignState($status['state'], false);
31
+ } catch (Mage_Core_Exception $e) { }
32
  catch (Exception $e) { }
33
  }
34
 
app/design/adminhtml/default/default/template/buckaroo3extended/sales/order/creditmemo/create/refund_fields.phtml CHANGED
@@ -39,15 +39,16 @@
39
  * @var TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Creditmemo_Create_RefundFields $this
40
  */
41
  ?>
 
42
  <?php $_paymentMethod = $this->getPaymentMethod(); ?>
43
- <?php if ($_paymentMethod == 'buckaroo3extended_bancontactmrcash'): ?>
44
  <table id="buckaroo3extended_refund_fields_container">
45
  <tr>
46
  <td class="label">
47
  <label for="buckaroo3extended_refund_iban"><?php echo $this->__('Customer IBAN') ?></label>
48
  </td>
49
  <td>
50
- <input type="text" name="creditmemo[buckaroo3extended_refund_fields][customer_iban]" value="" class="required-entry input-text" style="width:120px;text-align:right" id="buckaroo3extended_refund_iban"/>
51
  </td>
52
  </tr>
53
  <tr>
@@ -55,7 +56,7 @@
55
  <label for="buckaroo3extended_refund_account_name"><?php echo $this->__('Customer Account Name') ?></label>
56
  </td>
57
  <td>
58
- <input type="text" name="creditmemo[buckaroo3extended_refund_fields][customer_account_name]" value="" class="required-entry input-text" style="width:120px;text-align:right" id="buckaroo3extended_refund_account_name"/>
59
  </td>
60
  </tr>
61
  <tr>
@@ -63,7 +64,7 @@
63
  <label for="buckaroo3extended_refund_bic"><?php echo $this->__('Customer BIC') ?></label>
64
  </td>
65
  <td>
66
- <input type="text" name="creditmemo[buckaroo3extended_refund_fields][customer_bic]" value="" class="required-entry input-text" style="width:120px;text-align:right" id="buckaroo3extended_refund_bic"/>
67
  </td>
68
  </tr>
69
  <tr>
@@ -72,32 +73,37 @@
72
  </td>
73
  </tr>
74
  </table>
75
- <?php endif; ?>
76
- <script type="text/javascript">
77
- //<![CDATA[
78
- var moveRefundFields = function() {
79
- var refundFieldsContainer = $('buckaroo3extended_refund_fields_container');
80
- if (!refundFieldsContainer) {
81
- return;
82
- }
 
 
 
 
83
 
84
- var refundFields = refundFieldsContainer.select('tr');
85
- var refundFieldsDestination = $$('.order-totals tbody')[0];
86
- if (refundFields.length < 1 || !refundFieldsDestination) {
87
  refundFieldsContainer.remove();
 
88
 
89
- return;
90
- }
91
 
92
- refundFields.reverse().each(function(refundField) {
93
- refundFieldsDestination.insert({
94
- top : refundField
95
- });
 
 
 
 
 
 
 
 
96
  });
97
-
98
- refundFieldsContainer.remove();
99
- };
100
-
101
- moveRefundFields();
102
- //]]>
103
- </script>
39
  * @var TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Creditmemo_Create_RefundFields $this
40
  */
41
  ?>
42
+ <?php $_buckarooInvoiced = $this->isBuckarooInvoiced(); ?>
43
  <?php $_paymentMethod = $this->getPaymentMethod(); ?>
44
+ <?php if ($_buckarooInvoiced && $_paymentMethod == 'buckaroo3extended_bancontactmrcash'): ?>
45
  <table id="buckaroo3extended_refund_fields_container">
46
  <tr>
47
  <td class="label">
48
  <label for="buckaroo3extended_refund_iban"><?php echo $this->__('Customer IBAN') ?></label>
49
  </td>
50
  <td>
51
+ <input type="text" name="creditmemo[buckaroo3extended_refund_fields][customer_iban]" value="" class="required-conditional field-refund input-text" style="width:120px;text-align:right" id="buckaroo3extended_refund_iban"/>
52
  </td>
53
  </tr>
54
  <tr>
56
  <label for="buckaroo3extended_refund_account_name"><?php echo $this->__('Customer Account Name') ?></label>
57
  </td>
58
  <td>
59
+ <input type="text" name="creditmemo[buckaroo3extended_refund_fields][customer_account_name]" value="" class="required-conditional field-refund input-text" style="width:120px;text-align:right" id="buckaroo3extended_refund_account_name"/>
60
  </td>
61
  </tr>
62
  <tr>
64
  <label for="buckaroo3extended_refund_bic"><?php echo $this->__('Customer BIC') ?></label>
65
  </td>
66
  <td>
67
+ <input type="text" name="creditmemo[buckaroo3extended_refund_fields][customer_bic]" value="" class="required-conditional field-refund input-text" style="width:120px;text-align:right" id="buckaroo3extended_refund_bic"/>
68
  </td>
69
  </tr>
70
  <tr>
73
  </td>
74
  </tr>
75
  </table>
76
+ <script type="text/javascript">
77
+ //<![CDATA[
78
+ var moveRefundFields = function() {
79
+ var refundFieldsContainer = $('buckaroo3extended_refund_fields_container');
80
+ var refundFields = refundFieldsContainer.select('tr');
81
+ var refundFieldsDestination = $$('.order-totals tbody')[0];
82
+
83
+ refundFields.reverse().each(function(refundField) {
84
+ refundFieldsDestination.insert({
85
+ top : refundField
86
+ });
87
+ });
88
 
 
 
 
89
  refundFieldsContainer.remove();
90
+ };
91
 
92
+ moveRefundFields();
 
93
 
94
+ // Custom validator on .required-conditional fields, which is dynamic based on #creditmemo_do_offline
95
+ Validation.add('required-conditional', 'This is a required field.', function(field_value) {
96
+ // If not offline refund it's an online refund so we need to validate
97
+ if ($('creditmemo_do_offline').value == 0) {
98
+ if (field_value.length == 0) {
99
+ // Field is empty so return false & allow the user to retry
100
+ enableElements('submit-button');
101
+ return false;
102
+ }
103
+ }
104
+ // All good, return true
105
+ return true;
106
  });
107
+ //]]>
108
+ </script>
109
+ <?php endif; ?>
 
 
 
 
app/design/frontend/base/default/template/buckaroo3extended/ideal/checkout/form.phtml CHANGED
@@ -6,23 +6,23 @@
6
  <div id="payment-errors" class="validation-advice" style="display:none;"></div>
7
 
8
  <fieldset class="form-list buckaroo-method">
9
- <ul id="payment_form_<?php echo $_code ?>" style="display:none" class="buckaroo3extended_input">
10
  <li><label class="required"><?php echo $this->__('Please, choose your bank'); ?>: <em>*</em></label></li>
11
- <li>
12
- <div id="radiogroup-container">
13
- <?php $i = 0; ?>
14
- <?php foreach($_issuerList as $issuer => $issuerDetails): ?>
15
- <?php $i++; ?>
16
- <?php if ($i == count($_issuerList)): ?>
17
- <?php $validation = "class='validate-one-required-by-name'"; ?>
18
- <?php endif; ?>
19
- <label>
20
- <input type="radio" name="<?php echo $_code;?>_BPE_Issuer" value="<?php echo $issuer; ?>" <?php echo $validation; ?> <?php echo $issuer == $_value ? "checked" : ''; ?>/>
21
- <img src="<?php echo $this->getSkinUrl("images/tig_buckaroo3extended/" . $issuerDetails['logo']);?>"/>
22
- <?php echo $this->__($issuerDetails['name']);?>
23
- </label>
24
- <?php endforeach; ?>
25
- </div>
26
- </li>
27
  </ul>
28
  </fieldset>
6
  <div id="payment-errors" class="validation-advice" style="display:none;"></div>
7
 
8
  <fieldset class="form-list buckaroo-method">
9
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none" class="buckaroo3extended_input form-list buckaroo-method">
10
  <li><label class="required"><?php echo $this->__('Please, choose your bank'); ?>: <em>*</em></label></li>
11
+ <?php $i = 0; ?>
12
+ <?php foreach($_issuerList as $issuer => $issuerDetails): ?>
13
+ <li>
14
+ <?php $i++; ?>
15
+ <?php if ($i == count($_issuerList)): ?>
16
+ <?php $validation = "class='validate-one-required-by-name'"; ?>
17
+ <?php endif; ?>
18
+ <label>
19
+ <span class="bank_logo">
20
+ <img src="<?php echo $this->getSkinUrl("images/tig_buckaroo3extended/" . $issuerDetails['logo']);?>"/>
21
+ </span>
22
+ <input type="radio" name="<?php echo $_code;?>_BPE_Issuer" value="<?php echo $issuer; ?>" <?php echo $validation; ?> <?php echo $issuer == $_value ? "checked" : ''; ?>/>
23
+ <span class="bank_name"> <?php echo $this->__($issuerDetails['name']);?></span>
24
+ </label>
25
+ </li>
26
+ <?php endforeach; ?>
27
  </ul>
28
  </fieldset>
app/locale/nl_NL/TIG_Buckaroo3Extended.csv CHANGED
@@ -273,7 +273,7 @@
273
  "Seller protection enabled","Maak gebruik van verkopersbescherming"
274
  "Seller protection for unauthorized payment and item not received","Verkopersbescherming wordt toegekend voor ongeauthorizeerde betaling en niet ontvangen goederen"
275
  "Seller protection item not received","Verkopersbescherming niet ontvangen goederen"
276
- "Seller protection for item not received",""Verkopersbescherming wordt toegekend voor niet ontvangen goederen"
277
  "Seller protection unauthorized payment","Verkopersbescherming ongeauthoriseerde betaling"
278
  "Seller protection for unauthorized payment","Verkopersbescherming wordt toegekend voor ongeauthoriseerde betaling"
279
  "Seller protection ineligible","Geen verkopersbescherming"
@@ -331,8 +331,8 @@ TIG_Buckaroo3Extended::Subtotal,Subtotaal
331
  TIG_Buckaroo3Extended::Subtotal incl. tax,Subtotaal incl. BTW
332
  TIG_Buckaroo3Extended::Grand total,Groot totaal
333
  TIG_Buckaroo3Extended::Fee percentage mode,Toeslag percentage modus
334
- "TIG_Buckaroo3Extended::This setting only applies to percentage-based Buckaroo fee's.<br />Please choose over which amount the fee percentage is calculated.",Deze instelling is enkel van toepassing op percentage-gebaseerde toeslagen.<br />Kies s.v.p. over welk bedrag het toeslag percentage wordt berekend.
335
- "We are sorry to inform you that the request to pay afterwards with AfterPay is not possible at this time. This can be due to various (temporary) reasons.<br/><br/> For questions about your rejection you can contact the customer service of AfterPay. Or you can visit the website of AfterPay and click ""Frequently asked questions"" through this link <a href=""http://www.afterpay.nl/page/consument-faq"">http://www.afterpay.nl/page/consument-faq</a> in the section ""Datacontrol"".<br/><br/> We advice you to choose a different payment method to complete your order.","Het spijt ons u te moeten mededelen dat uw aanvraag om uw bestelling achteraf te betalen op dit moment niet door AfterPay wordt geaccepteerd. Dit kan om diverse (tijdelijke) redenen zijn.<br/><br/>Voor vragen over uw afwijzing kunt u contact opnemen met de Klantenservice van AfterPay. Of kijk op de website van AfterPay bij ""Veelgestelde vragen"" via de link <a href=""http://www.afterpay.nl/page/consument-faq"">http://www.afterpay.nl/page/consument-faq</a> onder het kopje ""Gegevenscontrole"".<br/><br/>Wij adviseren u voor een andere betaalmethode te kiezen om alsnog de betaling van uw bestelling af te ronden."
336
  TIG_Buckaroo3Extended::Fee,Betaaltoeslag
337
  TIG_Buckaroo3Extended::Fee label, Betaaltoeslag label
338
  "Tax class for Buckaroo Payment fee", "Belasting tarief voor de Buckaroo betaaltoeslag"
273
  "Seller protection enabled","Maak gebruik van verkopersbescherming"
274
  "Seller protection for unauthorized payment and item not received","Verkopersbescherming wordt toegekend voor ongeauthorizeerde betaling en niet ontvangen goederen"
275
  "Seller protection item not received","Verkopersbescherming niet ontvangen goederen"
276
+ "Seller protection for item not received","Verkopersbescherming wordt toegekend voor niet ontvangen goederen"
277
  "Seller protection unauthorized payment","Verkopersbescherming ongeauthoriseerde betaling"
278
  "Seller protection for unauthorized payment","Verkopersbescherming wordt toegekend voor ongeauthoriseerde betaling"
279
  "Seller protection ineligible","Geen verkopersbescherming"
331
  TIG_Buckaroo3Extended::Subtotal incl. tax,Subtotaal incl. BTW
332
  TIG_Buckaroo3Extended::Grand total,Groot totaal
333
  TIG_Buckaroo3Extended::Fee percentage mode,Toeslag percentage modus
334
+ "TIG_Buckaroo3Extended::This setting only applies to percentage-based Buckaroo fee's.<br />Please choose over which amount the fee percentage is calculated.","Deze instelling is enkel van toepassing op percentage-gebaseerde toeslagen.<br />Kies s.v.p. over welk bedrag het toeslag percentage wordt berekend."
335
+ "We are sorry to inform you that the request to pay afterwards with AfterPay is not possible at this time. This can be due to various (temporary) reasons.<br/><br/> For questions about your rejection you can contact the customer service of AfterPay. Or you can visit the website of AfterPay and click 'Frequently asked questions' through this link <a href='http://www.afterpay.nl/page/consument-faq'>http://www.afterpay.nl/page/consument-faq</a> in the section 'Datacontrol'.<br/><br/> We advice you to choose a different payment method to complete your order.","Het spijt ons u te moeten mededelen dat uw aanvraag om uw bestelling achteraf te betalen op dit moment niet door AfterPay wordt geaccepteerd. Dit kan om diverse (tijdelijke) redenen zijn.<br/><br/>Voor vragen over uw afwijzing kunt u contact opnemen met de Klantenservice van AfterPay. Of kijk op de website van AfterPay bij 'Veelgestelde vragen' via de link <a href='http://www.afterpay.nl/page/consument-faq'>http://www.afterpay.nl/page/consument-faq</a> onder het kopje 'Gegevenscontrole'.<br/><br/>Wij adviseren u voor een andere betaalmethode te kiezen om alsnog de betaling van uw bestelling af te ronden."
336
  TIG_Buckaroo3Extended::Fee,Betaaltoeslag
337
  TIG_Buckaroo3Extended::Fee label, Betaaltoeslag label
338
  "Tax class for Buckaroo Payment fee", "Belasting tarief voor de Buckaroo betaaltoeslag"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>tig_buckaroo3extended</name>
4
- <version>4.12.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US">Creative Commons License</license>
7
  <channel>community</channel>
@@ -34,18 +34,36 @@ Payment methods available include:&#xD;
34
  - Vpay&#xD;
35
  &#xD;
36
  Other services offered by this extension include refunds and paymentfee.</description>
37
- <notes>===== 4.12.0 =====&#xD;
38
- - Tweede betaalmethode Afterpay toegevoegd.&#xD;
 
 
 
 
 
39
  &#xD;
40
- Bugfixes:&#xD;
41
- - Paymentfee label in order bevestiging wordt nu altijd goed overgenomen.&#xD;
42
- &#xD;
43
- ===== 4.11.0 =====&#xD;
44
- - MasterPass betaalmethode toegevoegd&#xD;
45
- - IBAN veld bij de AfterPay DigiAccept betaalmethode verwijderd&#xD;
 
 
 
 
 
 
 
 
 
 
46
  &#xD;
47
- Bugfixes:&#xD;
48
- - Paymentfee label in transactionele e-mails tonen&#xD;
 
 
 
49
  &#xD;
50
  ==== 4.10.1 ====&#xD;
51
  ==== Improvements ====&#xD;
@@ -71,9 +89,9 @@ Bugfixes:&#xD;
71
  ==== Bug fixes ====&#xD;
72
  - Fixed a problem where the order ID would stay reserved after a payment had failed, causing errors.</notes>
73
  <authors><author><name>TIG</name><user>supporttotal</user><email>servicedesk@totalinternetgroup.nl</email></author></authors>
74
- <date>2015-06-25</date>
75
- <time>11:30:42</time>
76
- <contents><target name="magecommunity"><dir name="TIG"><dir name="Buckaroo3Extended"><dir name="Block"><dir name="Adminhtml"><dir name="Giftcard"><dir name="Edit"><file name="Form.php" hash="cec5b5d92f5f710693e4cb8495cfb6a8"/></dir><file name="Edit.php" hash="28d90558574b93a6cb360b7270991016"/><file name="Grid.php" hash="a3d1b809a0a5c88fb3ff9b74d6b3dd5c"/></dir><file name="Giftcard.php" hash="a3937f82be98c507a28b6fcad86313ee"/><dir name="Sales"><dir name="Order"><dir name="Create"><dir name="Totals"><file name="Fee.php" hash="84d71b5c883b67baa84c2df0bcd8142b"/></dir></dir><dir name="Creditmemo"><dir name="Create"><file name="Fee.php" hash="c294febe98243a2c1f0f74417e07d094"/><file name="RefundFields.php" hash="ba689788cd45cdde188a63607d1c35f2"/></dir><dir name="Totals"><file name="Fee.php" hash="9e7ce33537256a4ee24928932a6de670"/></dir></dir><dir name="Invoice"><dir name="Totals"><file name="Fee.php" hash="f96253212645e3873369e69698f2d9d9"/></dir></dir><dir name="Totals"><file name="Fee.php" hash="6864e33af4fa09ef3bdeb35686701623"/></dir></dir></dir><dir name="System"><dir name="Config"><file name="Hint.php" hash="6a9485f367f03b8475a9db75a0dadb6b"/><file name="KlarnaCheck.php" hash="4af2d295960ab6b130d5a00679743973"/><file name="Paymentmethodbanner.php" hash="517693650534e8069de9839c0f5f90f4"/><file name="SellersProtectionCheck.php" hash="fc531673aa166098a19b5c8919c1b992"/><file name="Singlehint.php" hash="78f13dec86b716a2fb6e136c4efbd34f"/><file name="SupportTab.php" hash="0bd8666b7428669839b96a05c794f192"/></dir></dir></dir><dir name="Customer"><dir name="Widget"><file name="Dob.php" hash="c0b2de80572d3acf4228c6e04d5a8a50"/></dir></dir><dir name="PaymentFee"><dir name="Checkout"><dir name="Total"><file name="Fee.php" hash="859c52bdb843bd2a5dca69c1a96b9d85"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><dir name="Totals"><file name="Fee.php" hash="40556128c469edfc7514e8eb46668360"/></dir></dir><dir name="Invoice"><dir name="Totals"><file name="Fee.php" hash="99993c8778754a2aa551a0f263745225"/></dir></dir><dir name="Totals"><file name="Fee.php" hash="f731faca357e5eab220df5c7b0df6d3d"/></dir></dir></dir></dir><dir name="PaymentMethods"><dir name="Afterpay"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="ba11f813f22d58843815e9fc1c26fc5e"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="a179f66c4080cf66a8eee986ee7e8e49"/></dir></dir><dir name="Afterpay2"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="89317daa2c708f7a29c515be5381ab80"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="1ae3de4c8e3c9d86a0da556181a1ca20"/></dir></dir><dir name="Amex"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="ec67efef6005d63a6f7ef84a805ed084"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="ef4f931b4c5c26a63b263e914b516014"/></dir></dir><dir name="Bancontactmrcash"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="b5a0025b216c2b63d8c83e7fe4eb2ddf"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="2e2712dbaf27527c0656b364bf125dc9"/></dir></dir><dir name="Cartebancaire"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="31ed65e056140a830602b96968669415"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="dc97283a9fefd72b17dec36a5d59d120"/></dir></dir><dir name="Cartebleue"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="e51cfc32b2bd41e6bfb84e685bd48f49"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="1881a3b27b52a2c6f0d9c2af537d2eda"/></dir></dir><dir name="Checkout"><dir name="Form"><file name="Abstract.php" hash="140cf74d591a29d9dc1743dbb896181b"/></dir></dir><dir name="Directdebit"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="858cc238e314497c6e02b86ce8854792"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="6cd6ce1d3e716a945a1be7e85a840172"/></dir><file name="Info.php" hash="dcf3f19dcd8fdcf6db3113439ccfd5b6"/></dir><dir name="Empayment"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="3e28f395bb35d8560d89917b9f0c226f"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="ecb1f211db9d40dda96aae89e8b32a23"/></dir></dir><dir name="Eps"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="eeb6508ef91f6cd68e1eeca65da606a1"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="a5135b3bdae5d5f92d0de10f6048fd25"/></dir></dir><dir name="Giftcards"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="ec67efef6005d63a6f7ef84a805ed084"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="33af8a819f0c98e375da3f1a6bd4fd90"/></dir></dir><dir name="Giropay"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="71ae33b626babf928bef6d9a0b473fbf"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="9579b1fc7b39c7e0311112eed0e2e424"/></dir></dir><dir name="Ideal"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="7e2f27cb6d88508141bf9ca81a62e788"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="93535ef15ddf0e01877d5238a592c90c"/></dir></dir><dir name="Maestro"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="36b949922a808b6762d55585053e4c15"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="3436feaae3971f17a27a98b6a5d245ea"/></dir></dir><dir name="Mastercard"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="ec6b987d24c741645ec37bd892ac8bca"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="ffb982e49d399822c419925383c3d4c8"/></dir></dir><dir name="Masterpass"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="e4744b76ca546ce6475d6098e63a0de4"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="be79c5f18e56a1881106d25f45b63d9c"/></dir></dir><dir name="Onlinegiro"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="358a5df80243f9cfc77c224087822ff9"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="5a0313aa9253d9e321da67cf2d202181"/></dir></dir><dir name="Paymentguarantee"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="c8d536fb37e9810650c3952934e75057"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="38f8edba57df3f3769a0eb9353f7400c"/></dir></dir><dir name="Paypal"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="ccf71be678656e036d1567717020817f"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="edd039e7dba53c0d8c270545509d38b5"/></dir></dir><dir name="Payperemail"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="bf4783b0df67b3df19c720364e568d2e"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="e7b3e1b8b5cdcc7445d8e7209bf22f9c"/></dir></dir><dir name="Paysafecard"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="882c8e4aadf56b177ba5b5623370d92a"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="ed9c62c607b4d663ad06be904cbaa46a"/></dir></dir><dir name="Sofortueberweisung"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="f17155682aea4ab281eb898f6de4df3a"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="0971634416e29fc9a56a34dbf3cdedbf"/></dir></dir><dir name="Transfer"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="0c478e0a56af5c39c5c6477300591a75"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="300913974c2851e88c95a9a59fada8dd"/></dir></dir><dir name="Visa"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="541ddbdcd3ad5651287d4109a6ad7233"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="b12ed9f43d71192ad44bbfc946d79581"/></dir></dir><dir name="Visaelectron"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="2c3b332aefde3fb985caa37ce5605c04"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="cc6c89b829c9fefdca74ba8d8173889b"/></dir></dir><dir name="Vpay"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="15544e4ab1e765f7e284b4ad9c554c92"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="8795e0134da1d2cece56c7d228a20fc1"/></dir></dir></dir><dir name="Refund"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="NoOptionsAvailable.php" hash="f40e0935fc520a46d16c6d2d93c65a02"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="fc8a5eec4f83f8f18ffc467604846726"/></dir><dir name="Model"><file name="Abstract.php" hash="8bf1ac37eba295a59d50f0d9b648ed77"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Buckaroo"><file name="Certificate.php" hash="81662b088ecdd765c6d3219fae334af1"/><file name="Fee.php" hash="13780025d18a138e0fa3c09048bf2e19"/></dir></dir></dir></dir></dir><dir name="Certificate"><file name="Certificate.php" hash="53f288cf29724c0df201a2d368222d7e"/></dir><file name="Certificate.php" hash="4f0c237526e019a188b0abd58820ab2a"/><file name="Giftcard.php" hash="8c3125cece761673aef50307e4f6b398"/><dir name="Mysql4"><file name="Setup.php" hash="fede9dbd2f1b214a12aa98bd895018b9"/></dir><dir name="Observer"><file name="Abstract.php" hash="ea1a041de14fc04132545f540afaeda1"/><file name="BackendOrder.php" hash="c3c6a924cea97e4e3a28adbda83ffe78"/></dir><file name="Observer.php" hash="cb2af674850a678fae0b91ef45f621a1"/><dir name="OldPaymentMethods"><file name="OldPaymentMethod.php" hash="7a27b031e5e0192a1486da3b30fa77be"/></dir><dir name="PaymentFee"><dir name="Order"><dir name="Creditmemo"><dir name="Total"><dir name="Fee"><file name="Abstract.php" hash="7a735d2cdd496f1ab39b5e7fa39385eb"/></dir><file name="Fee.php" hash="932fd6e5229ea0e03bfc8c4a3cdb08b6"/><file name="FeeTax.php" hash="de53ceeec529fe83d61a440397e5ae8f"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Fee.php" hash="c3c18aedec2ec4f8626643db53c7ac67"/><file name="FeeTax.php" hash="55260378223e3bb0e6daace9388e2e03"/><file name="Subtotal.php" hash="2e44bed3b438dc0a44a4fc5c9bb8b426"/></dir></dir><dir name="Pdf"><dir name="Total"><file name="Fee.php" hash="2f837fd9e9c55a921fd505e0b6b34d1d"/><file name="Grandtotal.php" hash="f31d624fffaa5b35c81ced7a251c5c97"/><file name="Tax.php" hash="f0d2374a156c19a88b37f9d76ad56c55"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><dir name="Fee"><file name="Abstract.php" hash="4d4a5e078ed2fb568ac28ce736321d59"/></dir><file name="Fee.php" hash="0a7ec955f8bfe4b42c3482b53dfaa98c"/><file name="FeeTax.php" hash="970b285c1df9ad676b426946b3b21603"/></dir></dir></dir><file name="Service.php" hash="38d9ea54efba391312d6f3b28686d9e7"/><dir name="System"><dir name="Config"><dir name="Source"><file name="FeeTaxClass.php" hash="13fd7cb66310ce16d3f073ff39d108de"/></dir></dir></dir></dir><dir name="PaymentMethods"><dir name="Afterpay"><file name="Observer.php" hash="c335ee5ce8b9685125af4b328ed3a352"/><file name="PaymentMethod.php" hash="aff2923d8120048174a160e239ecedb2"/></dir><dir name="Afterpay2"><file name="Observer.php" hash="fc491fd84036c1b971e8b45b64a8703c"/><file name="PaymentMethod.php" hash="5b2dede30a1f0e5030f6d6d3a8a738f0"/></dir><dir name="Amex"><file name="Observer.php" hash="c747d9147e1731a384960385ba9cc400"/><file name="PaymentMethod.php" hash="76aad7b5b1b5eec3565596a46b0bad92"/></dir><dir name="Bancontactmrcash"><file name="Observer.php" hash="a180693e927d0fee20202127c911155e"/><file name="PaymentMethod.php" hash="89556900b8112c809db248c24be23409"/></dir><dir name="Cartebancaire"><file name="Observer.php" hash="7acd1977f6a5485061676b5e5828da69"/><file name="PaymentMethod.php" hash="8133e6b1b3f68e879200e233fbd88b68"/></dir><dir name="Cartebleue"><file name="Observer.php" hash="3c749240c61fced32af6f7ac64f09422"/><file name="PaymentMethod.php" hash="f6174e8aaa6b9425ef56096fe31a2279"/></dir><dir name="Directdebit"><file name="Observer.php" hash="d69fea8936a47b872022f8d983e9be4a"/><file name="PaymentMethod.php" hash="49cd22ff14b88cc95b394288c673e5b9"/></dir><dir name="Empayment"><file name="Observer.php" hash="b50935e06c48f1288250df3a89c1937a"/><file name="PaymentMethod.php" hash="d870c837eff76d921251c1ae77f7da91"/></dir><dir name="Eps"><file name="Observer.php" hash="beab5315b271c662b88de70f4c37e437"/><file name="PaymentMethod.php" hash="9fdaac7fe5d631e7433d96e44b0a352c"/></dir><dir name="Giftcards"><file name="Observer.php" hash="b9a51455a64ddeba6cdc8a1f98baf8e9"/><file name="PaymentMethod.php" hash="c13e50817ea4b175459aa00ef55ceb99"/></dir><dir name="Giropay"><file name="Observer.php" hash="150c3f7e14fa48582e79c4de971d77fc"/><file name="PaymentMethod.php" hash="597f7589be437f9cc5543a492c944fb1"/></dir><dir name="Ideal"><file name="Observer.php" hash="4e8918aa271eafdbd47c587a9b21af8c"/><file name="PaymentMethod.php" hash="887eb231ed601e191a8d96c8e1c6f1ea"/></dir><dir name="Maestro"><file name="Observer.php" hash="b5679881bfd06e5c98e6acac05343382"/><file name="PaymentMethod.php" hash="726ab3653211cde3a67d8814ad7fceb2"/></dir><dir name="Mastercard"><file name="Observer.php" hash="839c559ea4473ecabcf2aba35de909a9"/><file name="PaymentMethod.php" hash="3d84627f57dbe5492e85caf35e4d9834"/></dir><dir name="Masterpass"><file name="Observer.php" hash="52cd83acb0e30ca39d1edb03800da026"/><file name="PaymentMethod.php" hash="352549517053d396ef2e13743970932c"/></dir><dir name="Onlinegiro"><file name="Observer.php" hash="d8a90c5c36a45dc5845f3f38d86015e7"/><file name="PaymentMethod.php" hash="8e90b5a32e15865f89219c6304ac7eda"/></dir><file name="PaymentMethod.php" hash="26999eb53caa477ded3f73a19230e09d"/><dir name="Paymentguarantee"><file name="Observer.php" hash="eff1c02b192d7c1e69cdf819946ec194"/><file name="PaymentMethod.php" hash="c37dceb8dbf9c1a7d83bc1cd6431f1a0"/></dir><dir name="Paypal"><file name="Observer.php" hash="42a860b3cd28d3dae91bf0cdcf6cbf29"/><file name="PaymentMethod.php" hash="4304dd8b85e113512c5c21a5b302ce3e"/></dir><dir name="Payperemail"><file name="Observer.php" hash="d3f2d288610593c5a0a9398e4e96d068"/><file name="PaymentMethod.php" hash="d7bd90a320f0390e20165581c3d9ddfe"/></dir><dir name="Paysafecard"><file name="Observer.php" hash="5954a4b4bf9dd4febd8d84988e7282b9"/><file name="PaymentMethod.php" hash="771fe27ce89c1451bb03d1fb2b3c569e"/></dir><dir name="Sofortueberweisung"><file name="Observer.php" hash="96a4db03f99ed03bfc91ab3b315cc1da"/><file name="PaymentMethod.php" hash="3ce7b2d7c1ea195122174f6b66de7ac8"/></dir><dir name="Transfer"><file name="Observer.php" hash="eea70837020fcc703d2eb383f7926765"/><file name="PaymentMethod.php" hash="34878422839008d966bb7a86dc67477f"/></dir><dir name="Visa"><file name="Observer.php" hash="95e72d2f4950d1a213c56b318c199be6"/><file name="PaymentMethod.php" hash="cc082b4d6adfc96bf9a3c8b10500aea0"/></dir><dir name="Visaelectron"><file name="Observer.php" hash="ca9f4a9b94b2c3bd00733df160c4493e"/><file name="PaymentMethod.php" hash="1c6c4206cd80c4fcd0c02fd510d322f4"/></dir><dir name="Vpay"><file name="Observer.php" hash="61d59a900b732bb15f82dacb9a59407f"/><file name="PaymentMethod.php" hash="318085aa11380ca26d8486d3e40ab49c"/></dir></dir><file name="Process.php" hash="e22b62762fb2cc40e103bbd3e5ccf707"/><dir name="Refund"><file name="Creditmemo.php" hash="169384b6e3569c1291b0a17f141089d6"/><file name="Observer.php" hash="b86430165d17526ac58b2a5a5ff93a7e"/><dir name="Request"><file name="Abstract.php" hash="f61f0ffc429b2f67713525d35b69e3ce"/></dir><dir name="Response"><file name="Abstract.php" hash="50b9c66ec4694d143ae2c9d08fa9e308"/><file name="Push.php" hash="917395f2960a36ce44700a5025e3e1d3"/></dir><dir name="Sources"><file name="StatusesClosedFailed.php" hash="4972f40ca79890943b064dde78ce4dcd"/><file name="StatusesClosedSuccess.php" hash="ee554ae7199ce719ff3752821a3bdd08"/><file name="StatusesCompleteFailed.php" hash="2cdf858b2802f4c7219d47b3ad74f723"/><file name="StatusesCompleteSuccess.php" hash="82e0c3cc3e5464d52382f5d0c283b3fe"/><file name="StatusesProcessingFailed.php" hash="1e312bcc824623a3346bed6f64f1e170"/><file name="StatusesProcessingSuccess.php" hash="4f5fe2bbb1423bf24b595bb76d489cec"/></dir></dir><dir name="Request"><file name="Abstract.php" hash="d83abd0ea0649ca14f2326c4ef75fce7"/><file name="Availability.php" hash="8dd023844d5c27c198a937e5d2e4c6b3"/></dir><dir name="Resource"><dir name="Certificate"><file name="Collection.php" hash="793d24a8b45acfd95a86cb56f10c4af9"/></dir><file name="Certificate.php" hash="2944bbd321d00f4530a2ae9f420db461"/><dir name="Giftcard"><file name="Collection.php" hash="3f001857a1b75f42bcbb9af0e9ba8bae"/></dir><file name="Giftcard.php" hash="ce7fe75cca48d71fa78441fb42eb17ff"/><file name="Setup.php" hash="0a1ef7d53f0a597cddbe1ea136cb1b80"/></dir><dir name="Response"><file name="Abstract.php" hash="6b4be1f32770bdb06a384f916ac27c1a"/><file name="BackendOrder.php" hash="0bb1d6c88aa4a61f682c88f5b05dcd71"/><file name="Push.php" hash="debe799a1f29cc1c149de96171edca7f"/><file name="Return.php" hash="014b7366883c97db925723725ae0e481"/></dir><file name="Soap.php" hash="9a56d584132c26b5b4b1bb950ed52009"/><dir name="Sources"><file name="AcceptgiroDirectdebit.php" hash="a6bb969a2072a3616b3ac1487581702f"/><dir name="Afterpay"><file name="AvailableCurrencies.php" hash="e1a5f71e4c2285e790d0edc88ed729b6"/></dir><dir name="Afterpay2"><file name="AvailableCurrencies.php" hash="e2787840d8ba378df8eba9062c579e4c"/></dir><file name="Allspecificcountries.php" hash="718960abf74dead25882b4c9aed6748b"/><dir name="Amex"><file name="AvailableCurrencies.php" hash="a4ab70448075087d0d09573b76627b8f"/></dir><file name="Availablemethods.php" hash="3990954382e47269fc22fcc2ba9d1db5"/><dir name="Bancontactmrcash"><file name="AvailableCurrencies.php" hash="13182b85cc71aece799bdd83d24f09ac"/></dir><file name="BusinessToBusiness.php" hash="7433dd041e659bef9d589500a21edc7e"/><dir name="Cartebancaire"><file name="AvailableCurrencies.php" hash="1b43becf181eb8be91b97c0b1eedbbee"/></dir><dir name="Cartebleue"><file name="AvailableCurrencies.php" hash="ec38baf0d46f9d2cb33a4aaf282a78d2"/></dir><file name="Certificates.php" hash="4a5ba3edbf7f78e48a02f06dbe646d90"/><file name="CultureType.php" hash="d16db29cf420fa3fd950b9b0e6f589a6"/><dir name="Directdebit"><file name="AvailableCurrencies.php" hash="445f7129e59841c1980a020d3c226677"/></dir><dir name="Empayment"><file name="AvailableCurrencies.php" hash="a311f94ec63c66b6271e474d17b75a1c"/></dir><dir name="Eps"><file name="AvailableCurrencies.php" hash="35a46a119f24f488ee39072de89a5490"/></dir><file name="FeePercentageMode.php" hash="061762cdb412508fb151ca39cbbae5d5"/><dir name="Giftcards"><file name="AvailableCards.php" hash="e7ff41b43fd9735391172a6761ce5beb"/><file name="AvailableCurrencies.php" hash="715babae709c477b511b8d42f2ba7c73"/></dir><dir name="Giropay"><file name="AvailableCurrencies.php" hash="bf9331a3f657c8cd088adc8dbff80dc2"/></dir><dir name="Ideal"><file name="AvailableCurrencies.php" hash="9c69554dda3472f3bdda6d2d56af7736"/><file name="ServiceVersion.php" hash="181e0bc6f5e6e37c4b18cd66e01d9779"/></dir><dir name="Maestro"><file name="AvailableCurrencies.php" hash="df04706dcf5fd123a62a76a0fad52869"/></dir><dir name="Mastercard"><file name="AvailableCurrencies.php" hash="be324daba3c3cacefa355a8b129b5648"/></dir><dir name="Masterpass"><file name="AvailableCurrencies.php" hash="301c10a4586aa1df8bba41b2d1633355"/></dir><dir name="Onlinegiro"><file name="AvailableCurrencies.php" hash="64771602c17f8bb9b68dffcdfe61e95b"/></dir><file name="PaymentMethodArea.php" hash="00b4294cdc79583a718521f14903e5ba"/><dir name="Paymentguarantee"><file name="AvailableCurrencies.php" hash="b826b93f54e5a4ebf579ba3a0dba35bb"/></dir><dir name="Paypal"><file name="AvailableCurrencies.php" hash="1204755d7831b4a342c2b9353367e53a"/></dir><dir name="Payperemail"><file name="AvailableCurrencies.php" hash="f6fb7359b7c5d0bc29cc98c4a1b75df9"/></dir><dir name="Paysafecard"><file name="AvailableCurrencies.php" hash="79a55b66aae407b84b5b76286f6194fe"/></dir><file name="ReminderLevel.php" hash="ad85f70f6bdb7b75a9a60ce71349f8ac"/><dir name="Sofortueberweisung"><file name="AvailableCurrencies.php" hash="34e87e1e8cedaabf931116bb5f68b66b"/></dir><file name="States.php" hash="77145e1431f0377b2c7c6812577aae9f"/><file name="StatusesFailed.php" hash="ca0406c3a0d1964b0e99aac3401d4484"/><file name="StatusesPending.php" hash="af8a6a3b57acea25e924090a37efc765"/><file name="StatusesPendingPayment.php" hash="c708bdeab09d6ed426310fb22c8571aa"/><file name="StatusesSuccess.php" hash="932910d9c8f0ae7debfbdaf72d0fd511"/><file name="TaxClasses.php" hash="b3eac25c3c44b3927f3fd5c42f6a84ab"/><file name="TestLive.php" hash="149c848d8dca11d3687054d5408772af"/><dir name="Transfer"><file name="AvailableCurrencies.php" hash="5da4b5d4e0fb953dad592fd6cd6f9530"/></dir><dir name="Visa"><file name="AvailableCurrencies.php" hash="4cf799f67fca45925bd8916ceda2b26c"/></dir><dir name="Visaelectron"><file name="AvailableCurrencies.php" hash="66a9a1dac82405b75aaf0df07166183f"/></dir><dir name="Vpay"><file name="AvailableCurrencies.php" hash="529b13b0b7032e90269453494d101049"/></dir><file name="Yesno.php" hash="b7fd7889636bccfbc1e6db14e804c221"/></dir></dir><dir name="certificate"><file name="Checkout.pem" hash="441f60bb62fdc14434954514b01d0aa3"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="GiftcardController.php" hash="7a117cb306ba0b187a254a01010c6550"/></dir><file name="CheckoutController.php" hash="c285e9d641465c5006c8e83f3ad99171"/><file name="NotifyController.php" hash="13f602d752cb43e2cf2ff7a4b31414b4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3a5da475c9e8eda2d0b40a3085d3f3b3"/><file name="config.xml" hash="5158f8c3b86f143e4a14a43bb4fd7ee5"/><file name="system.xml" hash="fc8a85f25eb497a600bf158f228ea6f1"/></dir><dir name="lib"><file name="Buckaroo.wsdl" hash="4fc7278e90be66fc8101c699f73b6204"/><file name="Import_1.xsd" hash="32c5184fc8f2010a202b2021e1b7fc00"/><file name="Import_10.xsd" hash="a64b4c201518b512fc6bc1ab78f0102f"/><file name="Import_11.xsd" hash="161e2970900419dc387af04e37f3a8ee"/><file name="Import_12.xsd" hash="146273756bb0a9bfd6ea8f5fba22ee9c"/><file name="Import_13.xsd" hash="1727b36ee762f6b1617c49d3e7597f75"/><file name="Import_14.xsd" hash="815f6849ad9b89b0295ffb48082ff619"/><file name="Import_15.xsd" hash="dc6a0cf5ca0cd6a52c2c0e18b7182f5a"/><file name="Import_16.xsd" hash="6511f38274501935bc847881e9fa27ed"/><file name="Import_17.xsd" hash="3ca8df56825b5a88509138faf79de2f8"/><file name="Import_18.xsd" hash="9be4df50a6bdca4bd196f26d2ae4e429"/><file name="Import_19.xsd" hash="9c4cd9b53bdf09b597e420cb58c32a5c"/><file name="Import_2.xsd" hash="bbeaa3381c5b550d2dfad8c049ba68e8"/><file name="Import_20.xsd" hash="cc7fa2b280b8f2d38da43e9fc7b94f86"/><file name="Import_21.xsd" hash="9ca3b39018c8583aa18ca98340288813"/><file name="Import_22.xsd" hash="dedd6c550d812705832feaaef60c721f"/><file name="Import_23.xsd" hash="c7b8bfae66463e58ce68c7f77eec04a4"/><file name="Import_24.xsd" hash="97ff34ab5da093f868dfd6623d934032"/><file name="Import_25.xsd" hash="52024ab7933277cb56aacc558609e67a"/><file name="Import_3.xsd" hash="dead2627684b2cf45f72f5dd9235738d"/><file name="Import_4.xsd" hash="ad27bf7d8bedc5e44f6a9ef862a05cb5"/><file name="Import_5.xsd" hash="a9c07bdedf700b572b89172e71dac0cd"/><file name="Import_6.xsd" hash="a6b2e2ac238b942b075f8cf186a644ed"/><file name="Import_7.xsd" hash="47193b5224627392508a074dd94c912d"/><file name="Import_8.xsd" hash="d167423bf89d1029a58e78ce4a000c0b"/><file name="Import_9.xsd" hash="52518de0039a5167b6d0bf803916c6e2"/></dir><dir name="sql"><dir name="buckaroo3extended_setup"><file name="mysql4-data-upgrade-4.4.2.0-4.5.0.0.php" hash="3f34113aa093ec80a41c67926bdda27b"/><file name="mysql4-data-upgrade-4.6.1-4.7.0.php" hash="e2ffae63c1533bbe6d12e0e0532866dd"/><file name="mysql4-install-0.1.0.php" hash="a2c925736a20cfdc9e6adfdceedfe1ad"/><file name="mysql4-upgrade-0.1.0-2.0.2.php" hash="34983df0c6286b761c2e4be9c6cc7952"/><file name="mysql4-upgrade-2.0.2-4.0.0.php" hash="34983df0c6286b761c2e4be9c6cc7952"/><file name="mysql4-upgrade-4.0.3-4.1.0.php" hash="72423e33d33affb242114b19dda7e68b"/><file name="mysql4-upgrade-4.3.1-4.3.2.php" hash="aa198667eae0c5ba1cb105dcee146864"/><file name="mysql4-upgrade-4.3.3.0-4.4.0.0.php" hash="3f27e188751bcd62c624192a8658c2e8"/><file name="mysql4-upgrade-4.4.0.0-4.4.1.0.php" hash="9353901c8546ed0bd126ee14be081ec6"/><file name="mysql4-upgrade-4.6.1-4.7.0.php" hash="9cfe09a4b22a88390182dd1851d110be"/></dir></dir><file name=".DS_Store" hash="4cd2cd395d6b8853877d77c9f5f4381f"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TIG_Buckaroo3Extended.xml" hash="6a23faf30df008518782b2d2a828c8a4"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="TIG"><file name="buckaroo3extended.xml" hash="0182e265f42911a3c734be4ec8091c94"/></dir></dir><dir name="template"><dir name="buckaroo3extended"><dir name="directdebit"><file name="info.phtml" hash="d1ba310ae081037271ee78d696db690f"/></dir><dir name="onlinegiro"><dir name="checkout"><file name="form.phtml" hash="997a24214a955aea9b2b19e18c8cb658"/></dir></dir><dir name="payperemail"><dir name="checkout"><file name="form.phtml" hash="5bc3425008dcb754c5b9fa544d88ceac"/></dir></dir><dir name="refund"><dir name="system"><dir name="config"><file name="noOptionsAvailable.phtml" hash="38c734121ab4b8554347c1569e0aae01"/></dir></dir></dir><dir name="sales"><dir name="order"><dir name="create"><file name="js.phtml" hash="3edec4e9d05ac156c3cc3314ceada764"/><dir name="totals"><file name="fee.phtml" hash="9864e20a538296885ae34f772708a90f"/></dir></dir><dir name="creditmemo"><dir name="create"><file name="refund_fields.phtml" hash="b09f36c5c42ebe040a15503b44b03e50"/><dir name="totals"><file name="fee.phtml" hash="6292242b0ff50c1187b2829da815e601"/></dir></dir></dir><dir name="totals"><file name="tax.phtml" hash="4bf6a29c289e42375e3bca41f6495bd9"/></dir></dir></dir><dir name="system"><dir name="config"><file name="hint.phtml" hash="7c107d72d94338010dcfa3e4425f968e"/><file name="klarnaCheck.phtml" hash="69395e036253f21fbb9f3cc6a494930b"/><file name="paymentmethodbanner.phtml" hash="d4d30e0fabe6484e4c2181fa1074ce12"/><file name="paypalRegionCheck.phtml" hash="f0638223fc0fbdc4fb6b25e03c4258f1"/><file name="singlehint.phtml" hash="f4d4e28c7899e15b6692dcceb975ad77"/><file name="supportTab.phtml" hash="007d58dee82e88536f5f11f63c81eb3a"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="TIG"><file name="buckaroo3extended.xml" hash="21bd91c1ec958f1f04e886e42fd51718"/></dir></dir><dir name="template"><dir name="buckaroo3extended"><dir name="afterpay"><dir name="checkout"><file name="form.phtml" hash="184bb82bb0413b53ec851ea76aeb4141"/></dir></dir><dir name="afterpay2"><dir name="checkout"><file name="form.phtml" hash="184bb82bb0413b53ec851ea76aeb4141"/></dir></dir><dir name="amex"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="bancontactmrcash"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="cartebancaire"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="cartebleue"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="checkout"><dir name="total"><file name="buckaroo_fee.phtml" hash="070cdb545d718c890f1b372246a26143"/></dir></dir><dir name="customer"><dir name="widget"><file name="dob.phtml" hash="fe142f7345e1908b8354d20f69023269"/></dir></dir><dir name="directdebit"><dir name="checkout"><file name="form.phtml" hash="8a3809bbc3d5e14d000a0a89206b1f0b"/></dir><file name="info.phtml" hash="f494d2b2d8f27df3a40548b8a5e38a99"/></dir><dir name="empayment"><dir name="checkout"><file name="form.phtml" hash="8ef01960e1c13cb9f249299fca967263"/></dir></dir><dir name="eps"><dir name="checkout"><file name="form.phtml" hash="77e7d2894364dbf959c50480b8242ac9"/></dir></dir><dir name="giftcards"><dir name="checkout"><file name="form.phtml" hash="8ef01960e1c13cb9f249299fca967263"/></dir></dir><dir name="giropay"><dir name="checkout"><file name="form.phtml" hash="1d5f7d7fb64e7adcbcd980daff0dbf5d"/></dir></dir><dir name="ideal"><dir name="checkout"><file name="form.phtml" hash="034bcfb4d88904615679d8dcbc4021e6"/></dir></dir><file name="jquery.phtml" hash="7c274dd682ae4273e7a85a477d7125ae"/><dir name="maestro"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="mastercard"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><file name="oneStepCheckout.phtml" hash="bc07be11bfe81f21a38eb332362932e6"/><dir name="onlinegiro"><dir name="checkout"><file name="form.phtml" hash="8b895e7f56531e3beab809270ae1a175"/></dir></dir><dir name="paymentFee"><dir name="checkout"><file name="fee.phtml" hash="80cfb59b392afa5bdb7d012c4782e8fa"/></dir></dir><dir name="paymentguarantee"><dir name="checkout"><file name="form.phtml" hash="50248bddb9fe74eecfd8fd1e9286bacb"/></dir><file name="termsAndConditions.phtml" hash="6f1fd609fc1baf3a541707f6fbe129f7"/></dir><dir name="paypal"><dir name="checkout"><file name="form.phtml" hash="8ef01960e1c13cb9f249299fca967263"/></dir></dir><dir name="payperemail"><dir name="checkout"><file name="form.phtml" hash="405369f9e2ceec15b76970b9f9ed8dfd"/></dir></dir><dir name="paysafecard"><dir name="checkout"><file name="form.phtml" hash="77e7d2894364dbf959c50480b8242ac9"/></dir></dir><file name="saveData.phtml" hash="523e37b63f6a90ac00307551d7bcf3e4"/><dir name="sofortueberweisung"><dir name="checkout"><file name="form.phtml" hash="77e7d2894364dbf959c50480b8242ac9"/></dir></dir><dir name="transfer"><dir name="checkout"><file name="form.phtml" hash="f88cbbb4f63010bd554c3dd5fb974b36"/></dir></dir><dir name="visa"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="visaelectron"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="vpay"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="tig_buckaroo3extended"><file name="supportTab.css" hash="697af7a62a046a2ed7fe0c0df309470a"/><file name="system_config_edit.css" hash="0bb88faa152728f3b84c57ba062da4bb"/></dir></dir><dir name="images"><dir name="tig_buckaroo3extended"><file name="buckaroo_large.png" hash="72ddf928560ce583ed36fafb7ccca4d5"/><file name="buckaroo_logo_medium.gif" hash="a7e5eb51b749720f6fc31d3a4234072e"/><file name="buckaroo_small.png" hash="af486c1bda7ed73a3ab756801aa4973d"/><file name="glyph_error.gif" hash="a138b803d772f552aa2e49e1c506edbd"/><file name="glyph_info.gif" hash="40f72d28be63ecf2b6ef44c7ea730104"/><file name="glyph_manual.png" hash="771db63b6ffc9de1c06da564796adc6e"/><file name="glyph_pdf.png" hash="a5ea929f4014a88d7320d0293913ace3"/><file name="glyph_success.gif" hash="465a056a3ba3d94367f51c3c0b751391"/><file name="glyph_warning.gif" hash="fa817cb6d49efb9855942ef2b739fc6c"/><file name="legend.gif" hash="d8fb0642901868d489d31b426f3e3406"/></dir></dir><dir name="js"><dir name="tig_buckaroo3extended"><file name="jquery-1.4.4.min.js" hash="73a9c334c5ca71d70d092b42064f6476"/></dir><dir name="TIG"><dir name="Buckaroo3Extended"><file name="klarnaCheck.js" hash="4aa9345dc7937b177a0de82e09692c27"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="TIG"><dir name="Buckaroo3Extended"><file name="styles_opc.css" hash="30d7388a4cbc8b37bd6aef80d6eaddac"/><file name="styles_osc.css" hash="4e8f3a8c6358590a302e4f3c8c19cdef"/></dir></dir></dir><dir name="images"><dir name="tig_buckaroo3extended"><file name="ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="icon_asn.gif" hash="0fbd9493e65ab774cc6859da47c3c8cc"/><file name="logo_abn_s.gif" hash="eb6d7cd949e6fbf671c43cb83c7c3e17"/><file name="logo_fortis_s.gif" hash="7f1ad68de127101a83e02c2e5af01fa7"/><file name="logo_friesland_s.gif" hash="d9955dc120b7d4216d9bd19b6d8621c0"/><file name="logo_ing_s.gif" hash="e56fa35285496c73565bfdf82d6967fa"/><file name="logo_knab_s.gif" hash="146e995dbede4e2798c278d6da26b9d2"/><file name="logo_lanschot_s.gif" hash="f68ceb355661c41779d716a6ef8dfdf3"/><file name="logo_rabo_s.gif" hash="8df417edaf2410ff574d9d1ed453c0bc"/><file name="logo_sns_s.gif" hash="78462566d91b21feca3930ccf203e1f4"/><file name="logo_triodos.gif" hash="f3dd4d744232ddf4c1700068a6b3a531"/></dir></dir><dir name="js"><dir name="TIG"><dir name="Buckaroo3Extended"><file name="jQuery-1.4.4.min.js" hash="5450efeb34b29f09b681e70d41649a54"/><file name="oneStepCheckout.js" hash="2a5bdfb79b02a77a9476a8f90ae9f7e6"/><file name="paymentGuaranteeTermsAndConditions.js" hash="04ace8a551d70f8fbf005bb1123f7fa4"/><file name="saveData.js" hash="a4d062d5ae0e72f9f3cd44d0112182f7"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="nl_NL"><file name="TIG_Buckaroo3Extended.csv" hash="ace6b24136168901d8e0dcd93a6ac157"/></dir><dir name="en_US"><file name="TIG_Buckaroo3Extended.csv" hash="1238d1d0c4a8e8a8468dfc1d36549c56"/></dir></target></contents>
77
  <compatible/>
78
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
79
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>tig_buckaroo3extended</name>
4
+ <version>4.13.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US">Creative Commons License</license>
7
  <channel>community</channel>
34
  - Vpay&#xD;
35
  &#xD;
36
  Other services offered by this extension include refunds and paymentfee.</description>
37
+ <notes>==== 4.13.0 ====&#xD;
38
+ &#xFFFC;&#xFFFC;==== Improvements ====&#xD;
39
+ - Extra invulvelden verwijderd bij offline refunds voor Mr. Cash&#xD;
40
+ - Offline refunds bij Mr. Cash ondersteunt nu ook deelrefunds&#xD;
41
+ - Aangepaste styling van de betaalmethodes in OSC en OPC&#xD;
42
+ - Storeview specifieke instellingen worden meegenomen voor PayperEmail&#xD;
43
+ - Aanvullende informatie voor orders die afgewezen zijn door AfterPay in de ordercomments.&#xD;
44
  &#xD;
45
+ ==== Bug fixes ====&#xD;
46
+ - Fix voor de AfterPay afwijzingsmeldingen&#xD;
47
+ - Correcte weergave van betaaltoeslagen onder 1 Euro&#xD;
48
+ - De Billing Agreements pagina geeft geen foutmelding meer bij gebruik van de extensie&#xD;
49
+ &#xFFFC;&#xD;
50
+ ==== 4.12.0 ====&#xD;
51
+ &#xFFFC;==== Improvements ====&#xD;
52
+ - Tweede AfterPay betaalmethode toegevoegd. Zo kan een merchant zowel de digiaccept variant, als de acceptgiro variant tegelijk gebruiken.&#xD;
53
+ &#xD;
54
+ ==== Bug fixes ====&#xD;
55
+ - Correcte weergave Buckaroo fee in transactionele e-mails&#xD;
56
+ - Fix voor custom status bij pending orders&#xD;
57
+ &#xFFFC;&#xD;
58
+ ==== 4.11.0 ====&#xD;
59
+ &#xFFFC;==== New features ====&#xD;
60
+ - MasterPass betaalmethode toegevoegd.&#xD;
61
  &#xD;
62
+ ==== Improvements ====&#xD;
63
+ - IBAN veld bij Afterpay Digiaccept betaalmethode verwijderd&#xD;
64
+ &#xD;
65
+ ==== Bug fixes ====&#xD;
66
+ - Paymentfee label in transactionele e-mail tonen&#xD;
67
  &#xD;
68
  ==== 4.10.1 ====&#xD;
69
  ==== Improvements ====&#xD;
89
  ==== Bug fixes ====&#xD;
90
  - Fixed a problem where the order ID would stay reserved after a payment had failed, causing errors.</notes>
91
  <authors><author><name>TIG</name><user>supporttotal</user><email>servicedesk@totalinternetgroup.nl</email></author></authors>
92
+ <date>2015-09-03</date>
93
+ <time>09:47:49</time>
94
+ <contents><target name="magecommunity"><dir name="TIG"><dir name="Buckaroo3Extended"><dir name="Block"><dir name="Adminhtml"><dir name="Giftcard"><dir name="Edit"><file name="Form.php" hash="cec5b5d92f5f710693e4cb8495cfb6a8"/></dir><file name="Edit.php" hash="28d90558574b93a6cb360b7270991016"/><file name="Grid.php" hash="a3d1b809a0a5c88fb3ff9b74d6b3dd5c"/></dir><file name="Giftcard.php" hash="a3937f82be98c507a28b6fcad86313ee"/><dir name="Sales"><dir name="Order"><dir name="Create"><dir name="Totals"><file name="Fee.php" hash="84d71b5c883b67baa84c2df0bcd8142b"/></dir></dir><dir name="Creditmemo"><dir name="Create"><file name="Fee.php" hash="c294febe98243a2c1f0f74417e07d094"/><file name="RefundFields.php" hash="e237034e28f6f0622de8f9b2ded99590"/></dir><dir name="Totals"><file name="Fee.php" hash="9e7ce33537256a4ee24928932a6de670"/></dir></dir><dir name="Invoice"><dir name="Totals"><file name="Fee.php" hash="f96253212645e3873369e69698f2d9d9"/></dir></dir><dir name="Totals"><file name="Fee.php" hash="6864e33af4fa09ef3bdeb35686701623"/></dir></dir></dir><dir name="System"><dir name="Config"><file name="Hint.php" hash="4586b3c5e42706c2bb3099abcf768b20"/><file name="KlarnaCheck.php" hash="4af2d295960ab6b130d5a00679743973"/><file name="Paymentmethodbanner.php" hash="517693650534e8069de9839c0f5f90f4"/><file name="SellersProtectionCheck.php" hash="fc531673aa166098a19b5c8919c1b992"/><file name="Singlehint.php" hash="78f13dec86b716a2fb6e136c4efbd34f"/><file name="SupportTab.php" hash="0bd8666b7428669839b96a05c794f192"/></dir></dir></dir><dir name="Customer"><dir name="Widget"><file name="Dob.php" hash="c0b2de80572d3acf4228c6e04d5a8a50"/></dir></dir><dir name="PaymentFee"><dir name="Checkout"><dir name="Total"><file name="Fee.php" hash="859c52bdb843bd2a5dca69c1a96b9d85"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><dir name="Totals"><file name="Fee.php" hash="40556128c469edfc7514e8eb46668360"/></dir></dir><dir name="Invoice"><dir name="Totals"><file name="Fee.php" hash="99993c8778754a2aa551a0f263745225"/></dir></dir><dir name="Totals"><file name="Fee.php" hash="f731faca357e5eab220df5c7b0df6d3d"/></dir></dir></dir></dir><dir name="PaymentMethods"><dir name="Afterpay"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="6e3c0bd9eee2fe2be538d221ec96f8f8"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="01a47d3c78466a9efad37d2fecff30f3"/></dir></dir><dir name="Afterpay2"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="89317daa2c708f7a29c515be5381ab80"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="1ae3de4c8e3c9d86a0da556181a1ca20"/></dir></dir><dir name="Amex"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="97996a4a4a6c6b18958147bfcef42de4"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="8dace9e0c5aef7aa47423d37beced0fa"/></dir></dir><dir name="Bancontactmrcash"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="4ecf67c7a2bd57135915105db9d48e39"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="1f7eb6ec2ba19917a46ef9ae877fa453"/></dir></dir><dir name="Cartebancaire"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="5cf43693480003815e8e3b05ac192ab4"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="660156b59b61152aa60d2a5b5b96af89"/></dir></dir><dir name="Cartebleue"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="9f11bef74e08bdf03b3648d216c59de3"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="224854a2564636708415b06a9ac83b08"/></dir></dir><dir name="Checkout"><dir name="Form"><file name="Abstract.php" hash="440290992ee2ac805d6f40e063e02f42"/></dir></dir><dir name="Directdebit"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="8d0f3a1ffd3f2920cb38b7283c8f7a47"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="ed6db2005ec69b7a54e928a0d33e7f00"/></dir><file name="Info.php" hash="dcf3f19dcd8fdcf6db3113439ccfd5b6"/></dir><dir name="Empayment"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="460d4674e572573c5738ce87bf201202"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="ddb8cb90231659f17c5c7ba38ad969b7"/></dir></dir><dir name="Eps"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="a329209f134afe361ef7d9adf957745a"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="01058a7858b1007bc56d2acd08e3274e"/></dir></dir><dir name="Giftcards"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="97996a4a4a6c6b18958147bfcef42de4"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="27eb0ffa3bf234b1326d2618ab479f77"/></dir></dir><dir name="Giropay"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="a384d5ca6369442901387ac5555b061e"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="5956caafb68cb45543a93a02d8d16efa"/></dir></dir><dir name="Ideal"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="98506d7cf7339a1a3bd51aff75a2d41d"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="54c8ad9a18ec06e153c645c8864727b5"/></dir></dir><dir name="Maestro"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="7a9476690ad27d5516fb2d094b361626"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="fd5b8435c163c21d889417f2035f6434"/></dir></dir><dir name="Mastercard"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="e1a5f220e48ae8ac0a6f844b16207a51"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="4514ef760ad660a9525fa87e13f068f2"/></dir></dir><dir name="Masterpass"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="f474094f2b38459d29e5d9eaf945a422"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="00cd5f45d68b9253fda9d28ea44ca553"/></dir></dir><dir name="Onlinegiro"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="5ae5ce5ebf3041535bf17f2711a4f445"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="52f89dd09f299949411ba572e20becc0"/></dir></dir><dir name="Paymentguarantee"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="250e5f514cd312e895aaa6926bff353a"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="6b885fd2a46d3fecde873e76941cb1c2"/></dir></dir><dir name="Paypal"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="20153fa7827484b096d609bf341c5515"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="41dbb35224e46842c01eeea1b2fa1c2f"/></dir></dir><dir name="Payperemail"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="cf526aa3604fc2e59f74840fb6de3acd"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="a4e6609168127b0200df2c9a200ae8c5"/></dir></dir><dir name="Paysafecard"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="ddbccd2574c89997aaed10b08131782b"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="aa28693fe1c5f3e874efc38b15733ee9"/></dir></dir><dir name="Sofortueberweisung"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="a9953aa93ace25c4615e11ca2f5e06c5"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="85fc73af91aab1b43704cac56539e1b3"/></dir></dir><dir name="Transfer"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="5cb8050c05c683f8661cac7e66a3e9ca"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="1ddf724fa739e6ebb402de143f763106"/></dir></dir><dir name="Visa"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="1d9d4dc8aef79cefdd4682bebdc9b0fb"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="53d775fe383da75293031b8b93019f48"/></dir></dir><dir name="Visaelectron"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="f406d49fd695718e620397fe82f66196"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="3cbb7e02bba4eaa57099e8bd6de91511"/></dir></dir><dir name="Vpay"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Advancedbtn.php" hash="0de8e8b98f01fab7e770f5b419d2ff79"/></dir></dir></dir><dir name="Checkout"><file name="Form.php" hash="2cd464f9298f30249baa85d5e9f8233b"/></dir></dir></dir><dir name="Refund"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="NoOptionsAvailable.php" hash="f40e0935fc520a46d16c6d2d93c65a02"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="4a8a9373500521a9b3c8dd92a536ec87"/></dir><dir name="Model"><file name="Abstract.php" hash="dd6633886345bf5ba19df3781c9e06d4"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Buckaroo"><file name="Certificate.php" hash="81662b088ecdd765c6d3219fae334af1"/><file name="Fee.php" hash="3e98f9441b4ceee3ed10f29590243a6a"/></dir></dir></dir></dir></dir><dir name="Certificate"><file name="Certificate.php" hash="ff3ede1ae2fc24b0fb8657f6262ddcca"/></dir><file name="Certificate.php" hash="4f0c237526e019a188b0abd58820ab2a"/><file name="Giftcard.php" hash="8c3125cece761673aef50307e4f6b398"/><dir name="Mysql4"><file name="Setup.php" hash="fede9dbd2f1b214a12aa98bd895018b9"/></dir><dir name="Observer"><file name="Abstract.php" hash="6ac801a678e59a43bd7c29a76f7bff19"/><file name="BackendOrder.php" hash="4efdbd37d08621f508d0c4b1e81548ec"/></dir><file name="Observer.php" hash="48b3c0744ecad5fbfc6bb87f3aecda85"/><dir name="OldPaymentMethods"><file name="OldPaymentMethod.php" hash="528157a9379be2299d4db7170d59cb4e"/></dir><dir name="PaymentFee"><dir name="Order"><dir name="Creditmemo"><dir name="Total"><dir name="Fee"><file name="Abstract.php" hash="7a735d2cdd496f1ab39b5e7fa39385eb"/></dir><file name="Fee.php" hash="932fd6e5229ea0e03bfc8c4a3cdb08b6"/><file name="FeeTax.php" hash="de53ceeec529fe83d61a440397e5ae8f"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Fee.php" hash="c3c18aedec2ec4f8626643db53c7ac67"/><file name="FeeTax.php" hash="55260378223e3bb0e6daace9388e2e03"/><file name="Subtotal.php" hash="2e44bed3b438dc0a44a4fc5c9bb8b426"/></dir></dir><dir name="Pdf"><dir name="Total"><file name="Fee.php" hash="2f837fd9e9c55a921fd505e0b6b34d1d"/><file name="Grandtotal.php" hash="f31d624fffaa5b35c81ced7a251c5c97"/><file name="Tax.php" hash="f0d2374a156c19a88b37f9d76ad56c55"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><dir name="Fee"><file name="Abstract.php" hash="4d4a5e078ed2fb568ac28ce736321d59"/></dir><file name="Fee.php" hash="0a7ec955f8bfe4b42c3482b53dfaa98c"/><file name="FeeTax.php" hash="970b285c1df9ad676b426946b3b21603"/></dir></dir></dir><file name="Service.php" hash="38d9ea54efba391312d6f3b28686d9e7"/><dir name="System"><dir name="Config"><dir name="Source"><file name="FeeTaxClass.php" hash="13fd7cb66310ce16d3f073ff39d108de"/></dir></dir></dir></dir><dir name="PaymentMethods"><dir name="Afterpay"><file name="Observer.php" hash="c69264282577631e768c897b9ad862de"/><file name="PaymentMethod.php" hash="08f0ead679bf505a1a3db6b580600647"/></dir><dir name="Afterpay2"><file name="Observer.php" hash="fc491fd84036c1b971e8b45b64a8703c"/><file name="PaymentMethod.php" hash="5b2dede30a1f0e5030f6d6d3a8a738f0"/></dir><dir name="Amex"><file name="Observer.php" hash="7d1822fd50bcb7cf0870e25e6f23dc22"/><file name="PaymentMethod.php" hash="76aad7b5b1b5eec3565596a46b0bad92"/></dir><dir name="Bancontactmrcash"><file name="Observer.php" hash="f2ba31f1958a13d579949a46ef79dbf8"/><file name="PaymentMethod.php" hash="03f087c748eb59b4c08f12524f88474b"/></dir><dir name="Cartebancaire"><file name="Observer.php" hash="90dfbb6363648b77667a769928a7d74f"/><file name="PaymentMethod.php" hash="8133e6b1b3f68e879200e233fbd88b68"/></dir><dir name="Cartebleue"><file name="Observer.php" hash="42e6154b3ed81a5c62212b76af94ba8d"/><file name="PaymentMethod.php" hash="f6174e8aaa6b9425ef56096fe31a2279"/></dir><dir name="Directdebit"><file name="Observer.php" hash="d69fea8936a47b872022f8d983e9be4a"/><file name="PaymentMethod.php" hash="49cd22ff14b88cc95b394288c673e5b9"/></dir><dir name="Empayment"><file name="Observer.php" hash="b50935e06c48f1288250df3a89c1937a"/><file name="PaymentMethod.php" hash="d870c837eff76d921251c1ae77f7da91"/></dir><dir name="Eps"><file name="Observer.php" hash="beab5315b271c662b88de70f4c37e437"/><file name="PaymentMethod.php" hash="9fdaac7fe5d631e7433d96e44b0a352c"/></dir><dir name="Giftcards"><file name="Observer.php" hash="48bc3bea6473818ee61bd869aa7db9aa"/><file name="PaymentMethod.php" hash="c13e50817ea4b175459aa00ef55ceb99"/></dir><dir name="Giropay"><file name="Observer.php" hash="150c3f7e14fa48582e79c4de971d77fc"/><file name="PaymentMethod.php" hash="597f7589be437f9cc5543a492c944fb1"/></dir><dir name="Ideal"><file name="Observer.php" hash="e4574f85f52883a2f89dc1364398077a"/><file name="PaymentMethod.php" hash="887eb231ed601e191a8d96c8e1c6f1ea"/></dir><dir name="Maestro"><file name="Observer.php" hash="b5679881bfd06e5c98e6acac05343382"/><file name="PaymentMethod.php" hash="726ab3653211cde3a67d8814ad7fceb2"/></dir><dir name="Mastercard"><file name="Observer.php" hash="99b236f76b4346d6b0059b2b5126cf31"/><file name="PaymentMethod.php" hash="3d84627f57dbe5492e85caf35e4d9834"/></dir><dir name="Masterpass"><file name="Observer.php" hash="15dc442b80c536cad21c18a044785f6b"/><file name="PaymentMethod.php" hash="352549517053d396ef2e13743970932c"/></dir><dir name="Onlinegiro"><file name="Observer.php" hash="d8a90c5c36a45dc5845f3f38d86015e7"/><file name="PaymentMethod.php" hash="8e90b5a32e15865f89219c6304ac7eda"/></dir><file name="PaymentMethod.php" hash="9084b7c8e3ce619df8216693dfaf441c"/><dir name="Paymentguarantee"><file name="Observer.php" hash="82783861718c2ac222106247ef7bc610"/><file name="PaymentMethod.php" hash="c37dceb8dbf9c1a7d83bc1cd6431f1a0"/></dir><dir name="Paypal"><file name="Observer.php" hash="42a860b3cd28d3dae91bf0cdcf6cbf29"/><file name="PaymentMethod.php" hash="4304dd8b85e113512c5c21a5b302ce3e"/></dir><dir name="Payperemail"><file name="Observer.php" hash="76591424a703b18948dd60be7c6e5b12"/><file name="PaymentMethod.php" hash="2fd55a378ddede3897da5dccf642e486"/></dir><dir name="Paysafecard"><file name="Observer.php" hash="5954a4b4bf9dd4febd8d84988e7282b9"/><file name="PaymentMethod.php" hash="771fe27ce89c1451bb03d1fb2b3c569e"/></dir><dir name="Sofortueberweisung"><file name="Observer.php" hash="96a4db03f99ed03bfc91ab3b315cc1da"/><file name="PaymentMethod.php" hash="3ce7b2d7c1ea195122174f6b66de7ac8"/></dir><dir name="Transfer"><file name="Observer.php" hash="eea70837020fcc703d2eb383f7926765"/><file name="PaymentMethod.php" hash="34878422839008d966bb7a86dc67477f"/></dir><dir name="Visa"><file name="Observer.php" hash="80182203018d18c7878b683765e9c6d1"/><file name="PaymentMethod.php" hash="cc082b4d6adfc96bf9a3c8b10500aea0"/></dir><dir name="Visaelectron"><file name="Observer.php" hash="ca9f4a9b94b2c3bd00733df160c4493e"/><file name="PaymentMethod.php" hash="1c6c4206cd80c4fcd0c02fd510d322f4"/></dir><dir name="Vpay"><file name="Observer.php" hash="61d59a900b732bb15f82dacb9a59407f"/><file name="PaymentMethod.php" hash="318085aa11380ca26d8486d3e40ab49c"/></dir></dir><file name="Process.php" hash="c457000e41690596888188b96f704040"/><dir name="Refund"><file name="Creditmemo.php" hash="3da1b8bc9cf6fed2962608366858d0e4"/><file name="Observer.php" hash="5b9ad329867e037eb75c4e287cb96530"/><dir name="Request"><file name="Abstract.php" hash="f61f0ffc429b2f67713525d35b69e3ce"/></dir><dir name="Response"><file name="Abstract.php" hash="497c7bb9a2c51709b30b7eb71caf3ed6"/><file name="Push.php" hash="2a68805f66dcb9d710184b5d4831a168"/></dir><dir name="Sources"><file name="StatusesClosedFailed.php" hash="4972f40ca79890943b064dde78ce4dcd"/><file name="StatusesClosedSuccess.php" hash="ee554ae7199ce719ff3752821a3bdd08"/><file name="StatusesCompleteFailed.php" hash="2cdf858b2802f4c7219d47b3ad74f723"/><file name="StatusesCompleteSuccess.php" hash="82e0c3cc3e5464d52382f5d0c283b3fe"/><file name="StatusesProcessingFailed.php" hash="1e312bcc824623a3346bed6f64f1e170"/><file name="StatusesProcessingSuccess.php" hash="4f5fe2bbb1423bf24b595bb76d489cec"/></dir></dir><dir name="Request"><file name="Abstract.php" hash="af034f13f211b4c2f14ab8b567a6932f"/><file name="Availability.php" hash="0a49991bb4a0eaf028f52798121142a7"/></dir><dir name="Resource"><dir name="Certificate"><file name="Collection.php" hash="793d24a8b45acfd95a86cb56f10c4af9"/></dir><file name="Certificate.php" hash="2944bbd321d00f4530a2ae9f420db461"/><dir name="Giftcard"><file name="Collection.php" hash="3f001857a1b75f42bcbb9af0e9ba8bae"/></dir><file name="Giftcard.php" hash="ce7fe75cca48d71fa78441fb42eb17ff"/><file name="Setup.php" hash="0a1ef7d53f0a597cddbe1ea136cb1b80"/></dir><dir name="Response"><file name="Abstract.php" hash="97a4a0da6732a1a8c0bb9841fd739b59"/><file name="BackendOrder.php" hash="518b73cc70ddca0ec659760e0e9b20bc"/><file name="Push.php" hash="1f2b72532139897643946729791a1b48"/><file name="Return.php" hash="27539258c2c3040b1d24361a6863bc06"/></dir><file name="Soap.php" hash="9a56d584132c26b5b4b1bb950ed52009"/><dir name="Sources"><file name="AcceptgiroDirectdebit.php" hash="635aea382493c1fe9497c02ad50dd5c5"/><dir name="Afterpay"><file name="AvailableCurrencies.php" hash="beb11c20245dc8a624df36fa8d2dc543"/></dir><dir name="Afterpay2"><file name="AvailableCurrencies.php" hash="d98e8ed7f4f65f44ee4d7380b02bbca3"/></dir><file name="Allspecificcountries.php" hash="718960abf74dead25882b4c9aed6748b"/><dir name="Amex"><file name="AvailableCurrencies.php" hash="6240bfa85eba943133c0b2ec5d84e703"/></dir><file name="Availablemethods.php" hash="3990954382e47269fc22fcc2ba9d1db5"/><dir name="Bancontactmrcash"><file name="AvailableCurrencies.php" hash="5d1359f1533582c92d59a50f0d3c3b69"/></dir><file name="BusinessToBusiness.php" hash="7433dd041e659bef9d589500a21edc7e"/><dir name="Cartebancaire"><file name="AvailableCurrencies.php" hash="f7e9ab1829a192ecb553422a95c0ba60"/></dir><dir name="Cartebleue"><file name="AvailableCurrencies.php" hash="05dfd6c7bd932c6db5f38f940c217176"/></dir><file name="Certificates.php" hash="17424773cdbdaef39c5961573bd12e47"/><file name="CultureType.php" hash="b77bac794ad88424f0d8bee4b58e57e8"/><dir name="Directdebit"><file name="AvailableCurrencies.php" hash="942251d7321bc013af0067ae61303a20"/></dir><dir name="Empayment"><file name="AvailableCurrencies.php" hash="e1742054645fab1892d1854bf739b548"/></dir><dir name="Eps"><file name="AvailableCurrencies.php" hash="e13ab7ac7dd535bde24b2441ff6a99a4"/></dir><file name="FeePercentageMode.php" hash="c5f13efdcadfb0ecd58a777bd44405c0"/><dir name="Giftcards"><file name="AvailableCards.php" hash="e7ff41b43fd9735391172a6761ce5beb"/><file name="AvailableCurrencies.php" hash="7430c988592a09f106bd0fbc95c87442"/></dir><dir name="Giropay"><file name="AvailableCurrencies.php" hash="ed685c06165b2eb906665a1992d90a4d"/></dir><dir name="Ideal"><file name="AvailableCurrencies.php" hash="f70ac8b2bf244b48865b3607403e5928"/><file name="ServiceVersion.php" hash="d15b8457484c53045d88f1866cd81b95"/></dir><dir name="Maestro"><file name="AvailableCurrencies.php" hash="e18b47ee64702f9d5d45bdf3a3098f55"/></dir><dir name="Mastercard"><file name="AvailableCurrencies.php" hash="c956e85f9da2a52f00978b02a4184391"/></dir><dir name="Masterpass"><file name="AvailableCurrencies.php" hash="e336bae86456987ce7b26121e157282c"/></dir><dir name="Onlinegiro"><file name="AvailableCurrencies.php" hash="6a4009bd81e02367e13c6493c113cec4"/></dir><file name="PaymentMethodArea.php" hash="2fe7d3978305a9fc533129623bc37ef5"/><dir name="Paymentguarantee"><file name="AvailableCurrencies.php" hash="eaab1072f162a21734ee681a8b01aeb3"/></dir><dir name="Paypal"><file name="AvailableCurrencies.php" hash="551f2f942e34da9a93ee4021e93b65a0"/></dir><dir name="Payperemail"><file name="AvailableCurrencies.php" hash="60bf5c055fb3cefb7b986716f1058f61"/></dir><dir name="Paysafecard"><file name="AvailableCurrencies.php" hash="0fa60d24e1a0a8871d856eab408dc1ea"/></dir><file name="ReminderLevel.php" hash="e37cb0ef83fa54d1f034ebec165fd7f6"/><dir name="Sofortueberweisung"><file name="AvailableCurrencies.php" hash="24ddd8be6ec6bee4471b234dcdebde2a"/></dir><file name="States.php" hash="77145e1431f0377b2c7c6812577aae9f"/><file name="StatusesFailed.php" hash="ca0406c3a0d1964b0e99aac3401d4484"/><file name="StatusesPending.php" hash="af8a6a3b57acea25e924090a37efc765"/><file name="StatusesPendingPayment.php" hash="c708bdeab09d6ed426310fb22c8571aa"/><file name="StatusesSuccess.php" hash="932910d9c8f0ae7debfbdaf72d0fd511"/><file name="TaxClasses.php" hash="b3eac25c3c44b3927f3fd5c42f6a84ab"/><file name="TestLive.php" hash="565c66468270e1dfdd2d71b9c80e7e87"/><dir name="Transfer"><file name="AvailableCurrencies.php" hash="a6f184fe5f8084bcfdb738c810149696"/></dir><dir name="Visa"><file name="AvailableCurrencies.php" hash="6b8c04c59ee273f5dbe75c5994153738"/></dir><dir name="Visaelectron"><file name="AvailableCurrencies.php" hash="4d95dc3ec06176f92ea185d8887807f9"/></dir><dir name="Vpay"><file name="AvailableCurrencies.php" hash="a18fe908ab589fd37e178e64683457d6"/></dir><file name="Yesno.php" hash="b7fd7889636bccfbc1e6db14e804c221"/></dir></dir><dir name="certificate"><file name="Checkout.pem" hash="441f60bb62fdc14434954514b01d0aa3"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="GiftcardController.php" hash="7a117cb306ba0b187a254a01010c6550"/></dir><file name="CheckoutController.php" hash="1cbd06d3bd0175312a7ce17117f8d892"/><file name="NotifyController.php" hash="c534a40adfa72e0c902aaba1b7a3e4ca"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c6726e6a4e6577f832112a30b44bc68c"/><file name="config.xml" hash="1526da31e8517c1c7d2322b50fa746d0"/><file name="system.xml" hash="4a9599a7984eaa8ea67668b60823bec6"/></dir><dir name="lib"><file name="Buckaroo.wsdl" hash="4fc7278e90be66fc8101c699f73b6204"/><file name="Import_1.xsd" hash="32c5184fc8f2010a202b2021e1b7fc00"/><file name="Import_10.xsd" hash="a64b4c201518b512fc6bc1ab78f0102f"/><file name="Import_11.xsd" hash="161e2970900419dc387af04e37f3a8ee"/><file name="Import_12.xsd" hash="146273756bb0a9bfd6ea8f5fba22ee9c"/><file name="Import_13.xsd" hash="1727b36ee762f6b1617c49d3e7597f75"/><file name="Import_14.xsd" hash="815f6849ad9b89b0295ffb48082ff619"/><file name="Import_15.xsd" hash="dc6a0cf5ca0cd6a52c2c0e18b7182f5a"/><file name="Import_16.xsd" hash="6511f38274501935bc847881e9fa27ed"/><file name="Import_17.xsd" hash="3ca8df56825b5a88509138faf79de2f8"/><file name="Import_18.xsd" hash="9be4df50a6bdca4bd196f26d2ae4e429"/><file name="Import_19.xsd" hash="9c4cd9b53bdf09b597e420cb58c32a5c"/><file name="Import_2.xsd" hash="bbeaa3381c5b550d2dfad8c049ba68e8"/><file name="Import_20.xsd" hash="cc7fa2b280b8f2d38da43e9fc7b94f86"/><file name="Import_21.xsd" hash="9ca3b39018c8583aa18ca98340288813"/><file name="Import_22.xsd" hash="dedd6c550d812705832feaaef60c721f"/><file name="Import_23.xsd" hash="c7b8bfae66463e58ce68c7f77eec04a4"/><file name="Import_24.xsd" hash="97ff34ab5da093f868dfd6623d934032"/><file name="Import_25.xsd" hash="52024ab7933277cb56aacc558609e67a"/><file name="Import_3.xsd" hash="dead2627684b2cf45f72f5dd9235738d"/><file name="Import_4.xsd" hash="ad27bf7d8bedc5e44f6a9ef862a05cb5"/><file name="Import_5.xsd" hash="a9c07bdedf700b572b89172e71dac0cd"/><file name="Import_6.xsd" hash="a6b2e2ac238b942b075f8cf186a644ed"/><file name="Import_7.xsd" hash="47193b5224627392508a074dd94c912d"/><file name="Import_8.xsd" hash="d167423bf89d1029a58e78ce4a000c0b"/><file name="Import_9.xsd" hash="52518de0039a5167b6d0bf803916c6e2"/></dir><dir name="sql"><dir name="buckaroo3extended_setup"><file name="mysql4-data-upgrade-4.12.0-4.13.0.php" hash="851354a41d84e5a043547376e4974798"/><file name="mysql4-data-upgrade-4.4.2.0-4.5.0.0.php" hash="3f34113aa093ec80a41c67926bdda27b"/><file name="mysql4-data-upgrade-4.6.1-4.7.0.php" hash="e2ffae63c1533bbe6d12e0e0532866dd"/><file name="mysql4-install-0.1.0.php" hash="60db243184184dd2b8b61adbc92e3032"/><file name="mysql4-upgrade-0.1.0-2.0.2.php" hash="34983df0c6286b761c2e4be9c6cc7952"/><file name="mysql4-upgrade-2.0.2-4.0.0.php" hash="34983df0c6286b761c2e4be9c6cc7952"/><file name="mysql4-upgrade-4.0.3-4.1.0.php" hash="d30fcb21bcd10039a9a77e890cdb519d"/><file name="mysql4-upgrade-4.3.1-4.3.2.php" hash="7affe54620a30f9feb8652c3e3b20696"/><file name="mysql4-upgrade-4.3.3.0-4.4.0.0.php" hash="3f27e188751bcd62c624192a8658c2e8"/><file name="mysql4-upgrade-4.4.0.0-4.4.1.0.php" hash="9353901c8546ed0bd126ee14be081ec6"/><file name="mysql4-upgrade-4.6.1-4.7.0.php" hash="9cfe09a4b22a88390182dd1851d110be"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TIG_Buckaroo3Extended.xml" hash="6a23faf30df008518782b2d2a828c8a4"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="TIG"><file name="buckaroo3extended.xml" hash="0182e265f42911a3c734be4ec8091c94"/></dir></dir><dir name="template"><dir name="buckaroo3extended"><dir name="directdebit"><file name="info.phtml" hash="d1ba310ae081037271ee78d696db690f"/></dir><dir name="onlinegiro"><dir name="checkout"><file name="form.phtml" hash="997a24214a955aea9b2b19e18c8cb658"/></dir></dir><dir name="payperemail"><dir name="checkout"><file name="form.phtml" hash="5bc3425008dcb754c5b9fa544d88ceac"/></dir></dir><dir name="refund"><dir name="system"><dir name="config"><file name="noOptionsAvailable.phtml" hash="38c734121ab4b8554347c1569e0aae01"/></dir></dir></dir><dir name="sales"><dir name="order"><dir name="create"><file name="js.phtml" hash="3edec4e9d05ac156c3cc3314ceada764"/><dir name="totals"><file name="fee.phtml" hash="9864e20a538296885ae34f772708a90f"/></dir></dir><dir name="creditmemo"><dir name="create"><file name="refund_fields.phtml" hash="a2e1f0c61a7c299b112122e08146da2e"/><dir name="totals"><file name="fee.phtml" hash="6292242b0ff50c1187b2829da815e601"/></dir></dir></dir><dir name="totals"><file name="tax.phtml" hash="4bf6a29c289e42375e3bca41f6495bd9"/></dir></dir></dir><dir name="system"><dir name="config"><file name="hint.phtml" hash="7c107d72d94338010dcfa3e4425f968e"/><file name="klarnaCheck.phtml" hash="69395e036253f21fbb9f3cc6a494930b"/><file name="paymentmethodbanner.phtml" hash="d4d30e0fabe6484e4c2181fa1074ce12"/><file name="paypalRegionCheck.phtml" hash="f0638223fc0fbdc4fb6b25e03c4258f1"/><file name="singlehint.phtml" hash="f4d4e28c7899e15b6692dcceb975ad77"/><file name="supportTab.phtml" hash="007d58dee82e88536f5f11f63c81eb3a"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="TIG"><file name="buckaroo3extended.xml" hash="21bd91c1ec958f1f04e886e42fd51718"/></dir></dir><dir name="template"><dir name="buckaroo3extended"><dir name="afterpay"><dir name="checkout"><file name="form.phtml" hash="184bb82bb0413b53ec851ea76aeb4141"/></dir></dir><dir name="afterpay2"><dir name="checkout"><file name="form.phtml" hash="184bb82bb0413b53ec851ea76aeb4141"/></dir></dir><dir name="amex"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="bancontactmrcash"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="cartebancaire"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="cartebleue"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="checkout"><dir name="total"><file name="buckaroo_fee.phtml" hash="070cdb545d718c890f1b372246a26143"/></dir></dir><dir name="customer"><dir name="widget"><file name="dob.phtml" hash="fe142f7345e1908b8354d20f69023269"/></dir></dir><dir name="directdebit"><dir name="checkout"><file name="form.phtml" hash="8a3809bbc3d5e14d000a0a89206b1f0b"/></dir><file name="info.phtml" hash="f494d2b2d8f27df3a40548b8a5e38a99"/></dir><dir name="empayment"><dir name="checkout"><file name="form.phtml" hash="8ef01960e1c13cb9f249299fca967263"/></dir></dir><dir name="eps"><dir name="checkout"><file name="form.phtml" hash="77e7d2894364dbf959c50480b8242ac9"/></dir></dir><dir name="giftcards"><dir name="checkout"><file name="form.phtml" hash="8ef01960e1c13cb9f249299fca967263"/></dir></dir><dir name="giropay"><dir name="checkout"><file name="form.phtml" hash="1d5f7d7fb64e7adcbcd980daff0dbf5d"/></dir></dir><dir name="ideal"><dir name="checkout"><file name="form.phtml" hash="5994e8bf263928737f392db6cb75a359"/></dir></dir><file name="jquery.phtml" hash="7c274dd682ae4273e7a85a477d7125ae"/><dir name="maestro"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="mastercard"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><file name="oneStepCheckout.phtml" hash="bc07be11bfe81f21a38eb332362932e6"/><dir name="onlinegiro"><dir name="checkout"><file name="form.phtml" hash="8b895e7f56531e3beab809270ae1a175"/></dir></dir><dir name="paymentFee"><dir name="checkout"><file name="fee.phtml" hash="80cfb59b392afa5bdb7d012c4782e8fa"/></dir></dir><dir name="paymentguarantee"><dir name="checkout"><file name="form.phtml" hash="50248bddb9fe74eecfd8fd1e9286bacb"/></dir><file name="termsAndConditions.phtml" hash="6f1fd609fc1baf3a541707f6fbe129f7"/></dir><dir name="paypal"><dir name="checkout"><file name="form.phtml" hash="8ef01960e1c13cb9f249299fca967263"/></dir></dir><dir name="payperemail"><dir name="checkout"><file name="form.phtml" hash="405369f9e2ceec15b76970b9f9ed8dfd"/></dir></dir><dir name="paysafecard"><dir name="checkout"><file name="form.phtml" hash="77e7d2894364dbf959c50480b8242ac9"/></dir></dir><file name="saveData.phtml" hash="523e37b63f6a90ac00307551d7bcf3e4"/><dir name="sofortueberweisung"><dir name="checkout"><file name="form.phtml" hash="77e7d2894364dbf959c50480b8242ac9"/></dir></dir><dir name="transfer"><dir name="checkout"><file name="form.phtml" hash="f88cbbb4f63010bd554c3dd5fb974b36"/></dir></dir><dir name="visa"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="visaelectron"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir><dir name="vpay"><dir name="checkout"><file name="form.phtml" hash="8de16790a79cd0f57aaa1e281915faa4"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="tig_buckaroo3extended"><file name="supportTab.css" hash="697af7a62a046a2ed7fe0c0df309470a"/><file name="system_config_edit.css" hash="0bb88faa152728f3b84c57ba062da4bb"/></dir></dir><dir name="images"><dir name="tig_buckaroo3extended"><file name="buckaroo_large.png" hash="72ddf928560ce583ed36fafb7ccca4d5"/><file name="buckaroo_logo_medium.gif" hash="a7e5eb51b749720f6fc31d3a4234072e"/><file name="buckaroo_small.png" hash="af486c1bda7ed73a3ab756801aa4973d"/><file name="glyph_error.gif" hash="a138b803d772f552aa2e49e1c506edbd"/><file name="glyph_info.gif" hash="40f72d28be63ecf2b6ef44c7ea730104"/><file name="glyph_manual.png" hash="771db63b6ffc9de1c06da564796adc6e"/><file name="glyph_pdf.png" hash="a5ea929f4014a88d7320d0293913ace3"/><file name="glyph_success.gif" hash="465a056a3ba3d94367f51c3c0b751391"/><file name="glyph_warning.gif" hash="fa817cb6d49efb9855942ef2b739fc6c"/><file name="legend.gif" hash="d8fb0642901868d489d31b426f3e3406"/><file name="tig_logo_medium.png" hash="780a6b187a34886a3748abbc2eee42a1"/></dir></dir><dir name="js"><dir name="tig_buckaroo3extended"><file name="jquery-1.4.4.min.js" hash="73a9c334c5ca71d70d092b42064f6476"/></dir><dir name="TIG"><dir name="Buckaroo3Extended"><file name="klarnaCheck.js" hash="4aa9345dc7937b177a0de82e09692c27"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="TIG"><dir name="Buckaroo3Extended"><file name="styles_opc.css" hash="f89a6cbf2832d79041a6689c4b829ff8"/><file name="styles_osc.css" hash="b53917c3b2dd8a733a2824df63519527"/></dir></dir></dir><dir name="images"><dir name="tig_buckaroo3extended"><file name="ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="icon_asn.gif" hash="0fbd9493e65ab774cc6859da47c3c8cc"/><file name="logo_abn_s.gif" hash="eb6d7cd949e6fbf671c43cb83c7c3e17"/><file name="logo_fortis_s.gif" hash="7f1ad68de127101a83e02c2e5af01fa7"/><file name="logo_friesland_s.gif" hash="d9955dc120b7d4216d9bd19b6d8621c0"/><file name="logo_ing_s.gif" hash="e56fa35285496c73565bfdf82d6967fa"/><file name="logo_knab_s.gif" hash="146e995dbede4e2798c278d6da26b9d2"/><file name="logo_lanschot_s.gif" hash="f68ceb355661c41779d716a6ef8dfdf3"/><file name="logo_rabo_s.gif" hash="8df417edaf2410ff574d9d1ed453c0bc"/><file name="logo_sns_s.gif" hash="78462566d91b21feca3930ccf203e1f4"/><file name="logo_triodos.gif" hash="f3dd4d744232ddf4c1700068a6b3a531"/></dir></dir><dir name="js"><dir name="TIG"><dir name="Buckaroo3Extended"><file name="jQuery-1.4.4.min.js" hash="5450efeb34b29f09b681e70d41649a54"/><file name="oneStepCheckout.js" hash="2a5bdfb79b02a77a9476a8f90ae9f7e6"/><file name="paymentGuaranteeTermsAndConditions.js" hash="04ace8a551d70f8fbf005bb1123f7fa4"/><file name="saveData.js" hash="a4d062d5ae0e72f9f3cd44d0112182f7"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="nl_NL"><file name="TIG_Buckaroo3Extended.csv" hash="68391429cd854b88170093dfbd70ae50"/></dir><dir name="en_US"><file name="TIG_Buckaroo3Extended.csv" hash="1238d1d0c4a8e8a8468dfc1d36549c56"/></dir></target></contents>
95
  <compatible/>
96
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
97
  </package>
skin/adminhtml/default/default/images/tig_buckaroo3extended/tig_logo_medium.png ADDED
Binary file
skin/frontend/base/default/css/TIG/Buckaroo3Extended/styles_opc.css CHANGED
@@ -8,9 +8,12 @@
8
  #checkout-step-payment .buckaroo-method .customer-dob .dob-month input.input-text { width:46px !important; }
9
  #checkout-step-payment .buckaroo-method .customer-dob .dob-year input.input-text { width:134px !important; }
10
 
11
-
12
- #checkout-step-payment .buckaroo-method #radiogroup-container label { display:block; float:none; margin-bottom:2px; text-align:left !important; }
13
- #checkout-step-payment .buckaroo-method #radiogroup-container label img { height:15px; width:auto; margin-top:1px; }
 
 
 
14
 
15
  #checkout-step-payment .buckaroo-method .input-box .disabled { display:block; background:#f2f2f2; border:1px solid #b6b6b6; color:#999; padding:2px; height:15px; width:254px; line-height:16px; overflow:hidden; white-space:nowrap; }
16
  #checkout-step-payment .buckaroo-method .input-box .disabled.stylefix { height:auto; padding:8px;}
8
  #checkout-step-payment .buckaroo-method .customer-dob .dob-month input.input-text { width:46px !important; }
9
  #checkout-step-payment .buckaroo-method .customer-dob .dob-year input.input-text { width:134px !important; }
10
 
11
+ #checkout-step-payment .buckaroo-method .ideal_container {height:20px;}
12
+ #checkout-step-payment .buckaroo-method label { display:block; float:none; margin-bottom:2px; text-align:left !important; }
13
+ #checkout-step-payment .buckaroo-method label img { height:15px; width:auto; margin-top:1px; display:block;}
14
+ #checkout-step-payment .buckaroo-method label .bank_logo {display:block; height:17px; width: 40px; float: left;}
15
+ #checkout-step-payment .buckaroo-method label input {float: left;}
16
+ #checkout-step-payment .buckaroo-method label span.bank_name {display:block; height:17px; width:120px; margin-left: 5px; line-height: 1.2; float: left;}
17
 
18
  #checkout-step-payment .buckaroo-method .input-box .disabled { display:block; background:#f2f2f2; border:1px solid #b6b6b6; color:#999; padding:2px; height:15px; width:254px; line-height:16px; overflow:hidden; white-space:nowrap; }
19
  #checkout-step-payment .buckaroo-method .input-box .disabled.stylefix { height:auto; padding:8px;}
skin/frontend/base/default/css/TIG/Buckaroo3Extended/styles_osc.css CHANGED
@@ -7,8 +7,12 @@
7
  #onestepcheckout-form .buckaroo-method .dob-year { width:0; }
8
  #onestepcheckout-form .buckaroo-method .dob-year input.input-text { width:100px !important; }
9
 
10
- #onestepcheckout-form .buckaroo-method #radiogroup-container label { display:block; float:none; margin-bottom:2px; }
11
- #onestepcheckout-form .buckaroo-method #radiogroup-container label img { height:15px; width:auto; margin-top:1px; }
 
 
 
 
12
 
13
  #onestepcheckout-form .buckaroo-method .disabled { display:block; background:#f2f2f2; border:1px solid #b6b6b6; color:#999; padding:2px; width:220px; height:15px; line-height:16px; overflow:hidden; white-space:nowrap; }
14
 
7
  #onestepcheckout-form .buckaroo-method .dob-year { width:0; }
8
  #onestepcheckout-form .buckaroo-method .dob-year input.input-text { width:100px !important; }
9
 
10
+ #checkout-step-payment .buckaroo-method .ideal_container {height:20px;}
11
+ #onestepcheckout-form .buckaroo-method label { display:block; float:none; margin-bottom:2px; text-align:left !important; }
12
+ #onestepcheckout-form .buckaroo-method label img { height:15px; width:auto; margin-top:1px; display:block;}
13
+ #onestepcheckout-form .buckaroo-method label .bank_logo {display:block; height:17px; width: 40px; float: left;}
14
+ #onestepcheckout-form .buckaroo-method label input {float: left;}
15
+ #onestepcheckout-form .buckaroo-method label span.bank_name {display:block; height:17px; width:120px; margin-left: 5px; line-height: 1.2; float: left;}
16
 
17
  #onestepcheckout-form .buckaroo-method .disabled { display:block; background:#f2f2f2; border:1px solid #b6b6b6; color:#999; padding:2px; width:220px; height:15px; line-height:16px; overflow:hidden; white-space:nowrap; }
18