tig_buckaroo3extended - Version 4.16.4

Version Notes

===== 4.16.4 =====

Authorize & (partial) capture is nu mogelijk met Afterpay
Partial Refund is nu mogelijk met Afterpay
De refund gerelateerde notices en warnings zijn opgelost
Mogelijke melding Uncaught ReferenceError: jQuery is not defined in de checkout opgelost
PHP7 ondersteuning voor Masterpass
Check toegevoegd voor betaalmethodes om te kijken of de orderbevestiging e-mail verzonden moet worden bij een bepaalde betaalstatus.
Payperemail probleem opgelost waar een syntax error kon ontstaan.
Payperemail beschikbare betaalmethodes ook gekoppeld aan Credit Management.
OneStepCheckout ondersteunde versies geupdate.
Afterpay aanpassing waarbij de korting wordt afgerond op 2 decimalen.
Adresvalidatie is verbeterd.
Overboeking terugkoppeling bij deelbetalingen in order comments.
Link naar plaza.buckaroo.nl opgenomen in support tab.
Betere beschrijving van Afterpay foutmelding bij samengevoegde (combined) paymentflow.

===== 4.15.3 =====

Bij Afterpay betalingen via België wordt er bij telefoonnummers van meer dan 10 tekens "0032" toegevoegd
Na een status 690 vanuit Buckaroo blijft AfterPay nu zichtbaar in decheckout
XSS issue met Buckaroo extensie icm OneStepCheckout en paymentguarantee/transfer opgelost
Ondersteuning Giftwrap toeslag (Enterprise) in combinatie met AfterPay

===== 4.15.2 =====
- Verwijderd configuratieveld voor Afterpay, Giftcard "Verstuur email met betalingsinstructies"
- Spelfouten op supporttab gecorrigeerd
- Correctie van versienummer

===== 4.15.1 =====
- Afterpay oplossing 31 in telefoonnummer

===== 4.15.0 =====
- Merchant kan via Backend zelf feedback instellen voor foutmeldingen
- Payperemail via Backend bij meerdere valuta
- Betaalgarant validatie in de checkout op telefoonnummer
- Order bevestigingse-mail
- jQuery upgrade naar versie 1.12.3
- 691 rejected status vertaling
- eMaestro andere valuta
- Paypermail back-end multistore
- Authentification status A/U wordt inzichtelijk gemaakt
- Refunden met MisterCash
- Nieuwe logo van Buckaroo
- OSC 4.5.5 ondersteuning
- Afterpay van Buckaroo neemt telefoonnummer over van de bestelling

==== 4.14.1 ====
==== Improvements ====
- Compatibiliteit met de Magento Patch SUPEE-6788

==== Bug fixes ====
- Provincie veld is niet meer verplicht voor PayPal verkopersbescherming bij Nederlandse adressen

==== 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.16.4
Comparing to
See all releases


Code changes from version 4.15.2 to 4.16.4

Files changed (65) hide show
  1. app/code/community/TIG/Buckaroo3Extended/Block/Adminhtml/Sales/Order/Invoice/Totals/Fee.php +2 -2
  2. app/code/community/TIG/Buckaroo3Extended/Block/Adminhtml/System/Config/SupportTab.php +34 -4
  3. app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Afterpay/Checkout/Form.php +0 -10
  4. app/code/community/TIG/Buckaroo3Extended/Model/Abstract.php +82 -55
  5. app/code/community/TIG/Buckaroo3Extended/Model/Observer/Abstract.php +165 -18
  6. app/code/community/TIG/Buckaroo3Extended/Model/Observer/CancelAuthorize.php +80 -0
  7. app/code/community/TIG/Buckaroo3Extended/Model/PaymentFee/Order/Creditmemo/Total/Fee.php +24 -2
  8. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Afterpay/Observer.php +522 -17
  9. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Afterpay/PaymentMethod.php +73 -6
  10. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Directdebit/PaymentMethod.php +4 -0
  11. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/PaymentMethod.php +25 -0
  12. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Paypal/PaymentMethod.php +3 -0
  13. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Sofortueberweisung/PaymentMethod.php +3 -0
  14. app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Transfer/PaymentMethod.php +1 -0
  15. app/code/community/TIG/Buckaroo3Extended/Model/Refund/Creditmemo.php +2 -1
  16. app/code/community/TIG/Buckaroo3Extended/Model/Refund/Request/Abstract.php +15 -2
  17. app/code/community/TIG/Buckaroo3Extended/Model/Refund/Response/Abstract.php +4 -4
  18. app/code/community/TIG/Buckaroo3Extended/Model/Request/Abstract.php +63 -2
  19. app/code/community/TIG/Buckaroo3Extended/Model/Request/CancelAuthorize.php +157 -0
  20. app/code/community/TIG/Buckaroo3Extended/Model/Request/Capture.php +157 -0
  21. app/code/community/TIG/Buckaroo3Extended/Model/Response/Abstract.php +50 -18
  22. app/code/community/TIG/Buckaroo3Extended/Model/Response/BackendOrder.php +5 -5
  23. app/code/community/TIG/Buckaroo3Extended/Model/Response/CancelAuthorize.php +173 -0
  24. app/code/community/TIG/Buckaroo3Extended/Model/Response/Capture.php +136 -0
  25. app/code/community/TIG/Buckaroo3Extended/Model/Response/Push.php +49 -35
  26. app/code/community/TIG/Buckaroo3Extended/Model/Response/Quote.php +4 -4
  27. app/code/community/TIG/Buckaroo3Extended/Model/Soap.php +4 -3
  28. app/code/community/TIG/Buckaroo3Extended/Model/Sources/PaymentFlow.php +62 -0
  29. app/code/community/TIG/Buckaroo3Extended/Test/Framework/TIG/Test/Config.php +109 -0
  30. app/code/community/TIG/Buckaroo3Extended/Test/Framework/TIG/Test/Http/Response.php +95 -0
  31. app/code/community/TIG/Buckaroo3Extended/Test/Framework/TIG/Test/TestCase.php +309 -0
  32. app/code/community/TIG/Buckaroo3Extended/Test/Scripts/InstallDependencies.sh +22 -0
  33. app/code/community/TIG/Buckaroo3Extended/Test/Scripts/Setup.sh +49 -0
  34. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Block/Adminhtml/Sales/Order/Invoice/Totals/FeeTest.php +185 -0
  35. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Block/Adminhtml/System/Config/SupportTabTest.php +78 -0
  36. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Helper/DataTest.php +231 -0
  37. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Observer/CancelAuthorizeTest.php +150 -0
  38. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentFee/Order/Creditmemo/Total/FeeTest.php +231 -0
  39. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/Afterpay/ObserverTest.php +297 -0
  40. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/Afterpay/PaymentMethodTest.php +235 -0
  41. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/Afterpay2/ObserverTest.php +297 -0
  42. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/Afterpay2/PaymentMethodTest.php +235 -0
  43. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/PaymentMethodTest.php +106 -0
  44. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Refund/CreditmemoTest.php +130 -0
  45. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Request/CancelAuthorizeTest.php +174 -0
  46. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Request/CaptureTest.php +174 -0
  47. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Response/CancelAuthorizeTest.php +121 -0
  48. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Response/CaptureTest.php +120 -0
  49. app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Sources/PaymentFlowTest.php +87 -0
  50. app/code/community/TIG/Buckaroo3Extended/Test/bootstrap.php +11 -0
  51. app/code/community/TIG/Buckaroo3Extended/Test/phpunit.xml +21 -0
  52. app/code/community/TIG/Buckaroo3Extended/controllers/NotifyController.php +83 -0
  53. app/code/community/TIG/Buckaroo3Extended/etc/config.xml +97 -37
  54. app/code/community/TIG/Buckaroo3Extended/etc/system.xml +72 -46
  55. app/design/adminhtml/default/default/template/buckaroo3extended/system/config/supportTab.phtml +20 -5
  56. app/design/frontend/base/default/template/buckaroo3extended/afterpay/checkout/form.phtml +5 -17
  57. app/design/frontend/base/default/template/buckaroo3extended/afterpay2/checkout/form.phtml +5 -17
  58. app/design/frontend/base/default/template/buckaroo3extended/jquery.phtml +3 -1
  59. app/design/frontend/base/default/template/buckaroo3extended/payperemail/checkout/form.phtml +9 -9
  60. app/design/frontend/rwd/default/template/buckaroo3extended/afterpay/checkout/form.phtml +5 -17
  61. app/design/frontend/rwd/default/template/buckaroo3extended/afterpay2/checkout/form.phtml +5 -17
  62. app/locale/en_US/TIG_Buckaroo3Extended.csv +1 -1
  63. app/locale/nl_NL/TIG_Buckaroo3Extended.csv +5 -2
  64. package.xml +29 -5
  65. skin/frontend/base/default/js/TIG/Buckaroo3Extended/oneStepCheckout.js +4 -4
app/code/community/TIG/Buckaroo3Extended/Block/Adminhtml/Sales/Order/Invoice/Totals/Fee.php CHANGED
@@ -67,8 +67,8 @@ class TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Invoice_Totals_Fee
67
  */
68
  $invoice = $parent->getInvoice();
69
 
70
- $fee = $invoice->getOrder()->getBuckarooFee();
71
- $baseFee = $invoice->getOrder()->getBaseBuckarooFee();
72
 
73
  if ($fee < 0.01 || $baseFee < 0.01) {
74
  return $this;
67
  */
68
  $invoice = $parent->getInvoice();
69
 
70
+ $fee = $invoice->getBuckarooFee();
71
+ $baseFee = $invoice->getBaseBuckarooFee();
72
 
73
  if ($fee < 0.01 || $baseFee < 0.01) {
74
  return $this;
app/code/community/TIG/Buckaroo3Extended/Block/Adminhtml/System/Config/SupportTab.php CHANGED
@@ -1,22 +1,24 @@
1
- <?php
2
  class TIG_Buckaroo3Extended_Block_Adminhtml_System_Config_SupportTab
3
  extends Mage_Adminhtml_Block_Abstract
4
  implements Varien_Data_Form_Element_Renderer_Interface
5
  {
 
 
6
  protected $_template = 'buckaroo3extended/system/config/supportTab.phtml';
7
 
8
  public $buckarooSupport = '<a href="mailto:support@buckaroo.nl">Buckaroo support</a>';
9
  public $anchorClose = '</a>';
10
  public $totalEmail = '<a href="mailto:info@totalinternetgroup.nl">';
11
  public $buckarooUrl = '<a href="http://www.buckaroo.nl">Buckaroo</a>';
12
-
13
  protected function _prepareLayout()
14
  {
15
  //placed here, instead of in layout.xml to make sure it is only loaded for Buckaroo's section
16
  $this->getLayout()->getBlock('head')->addCss('css/tig_buckaroo3extended/supportTab.css');
17
  return parent::_prepareLayout();
18
  }
19
-
20
  /**
21
  * Render fieldset html
22
  *
@@ -27,4 +29,32 @@ class TIG_Buckaroo3Extended_Block_Adminhtml_System_Config_SupportTab
27
  {
28
  return $this->toHtml();
29
  }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
  class TIG_Buckaroo3Extended_Block_Adminhtml_System_Config_SupportTab
3
  extends Mage_Adminhtml_Block_Abstract
4
  implements Varien_Data_Form_Element_Renderer_Interface
5
  {
6
+ const XPATH_TIG_BUCKAROO_STABILITY = 'tig/buckaroo/stability';
7
+
8
  protected $_template = 'buckaroo3extended/system/config/supportTab.phtml';
9
 
10
  public $buckarooSupport = '<a href="mailto:support@buckaroo.nl">Buckaroo support</a>';
11
  public $anchorClose = '</a>';
12
  public $totalEmail = '<a href="mailto:info@totalinternetgroup.nl">';
13
  public $buckarooUrl = '<a href="http://www.buckaroo.nl">Buckaroo</a>';
14
+
15
  protected function _prepareLayout()
16
  {
17
  //placed here, instead of in layout.xml to make sure it is only loaded for Buckaroo's section
18
  $this->getLayout()->getBlock('head')->addCss('css/tig_buckaroo3extended/supportTab.css');
19
  return parent::_prepareLayout();
20
  }
21
+
22
  /**
23
  * Render fieldset html
24
  *
29
  {
30
  return $this->toHtml();
31
  }
32
+
33
+ /**
34
+ * @return mixed
35
+ */
36
+ public function getVersion()
37
+ {
38
+ $config = Mage::getConfig()->getModuleConfig('TIG_Buckaroo3Extended');
39
+
40
+ /** @noinspection PhpUndefinedFieldInspection */
41
+ return $config->version;
42
+ }
43
+
44
+ /**
45
+ * Get the stability from the etc/config.xml file.
46
+ *
47
+ * @return null|string
48
+ */
49
+ public function getStability()
50
+ {
51
+ $config = Mage::getConfig()->getXpath(self::XPATH_TIG_BUCKAROO_STABILITY);
52
+ $version = (string)$config[0];
53
+
54
+ if ($version === 'stable') {
55
+ return null;
56
+ }
57
+
58
+ return $version;
59
+ }
60
+ }
app/code/community/TIG/Buckaroo3Extended/Block/PaymentMethods/Afterpay/Checkout/Form.php CHANGED
@@ -27,16 +27,6 @@ class TIG_Buckaroo3Extended_Block_PaymentMethods_Afterpay_Checkout_Form extends
27
  return $this->getSession()->getData($this->getMethodCode() . '_BPE_CompanyName');
28
  }
29
 
30
- public function getCostCentre()
31
- {
32
- return $this->getSession()->getData($this->getMethodCode() . '_BPE_CostCentre');
33
- }
34
-
35
- public function getVatNumber()
36
- {
37
- return $this->getSession()->getData($this->getMethodCode() . '_BPE_VatNumber');
38
- }
39
-
40
  public function getBusinessSelect()
41
  {
42
  return $this->getSession()->getData($this->getMethodCode() . '_BPE_BusinessSelect');
27
  return $this->getSession()->getData($this->getMethodCode() . '_BPE_CompanyName');
28
  }
29
 
 
 
 
 
 
 
 
 
 
 
30
  public function getBusinessSelect()
31
  {
32
  return $this->getSession()->getData($this->getMethodCode() . '_BPE_BusinessSelect');
app/code/community/TIG/Buckaroo3Extended/Model/Abstract.php CHANGED
@@ -334,76 +334,114 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
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
- case 'buckaroo3extended_maestro': $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_maestro_paymentMethod');
403
- $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_maestro/allowed_currencies', $this->getStoreId());
404
- break;
405
- default: $paymentMethod = null;
406
- $currenciesAllowedConfig = 'EUR';
 
 
 
 
407
  }
408
 
409
  if (!is_null($paymentMethod)) {
@@ -420,18 +458,7 @@ class TIG_Buckaroo3Extended_Model_Abstract extends Mage_Payment_Model_Method_Abs
420
  $currentCurrency = $this->_order->getOrderCurrencyCode();
421
  }
422
 
423
- // currency is not available for this module
424
- if (in_array($currentCurrency, $currenciesAllowed)
425
- && in_array($currentCurrency, $currenciesAllowedConfig))
426
- {
427
- $currency = $currentCurrency;
428
- $totalAmount = $this->_order->getGrandTotal();
429
- } else {
430
- $totalAmount = $this->_order->getBaseGrandTotal();
431
- $currency = $this->_order->getBaseCurrency()->getCode();
432
- }
433
-
434
- return array($currency, $totalAmount);
435
  }
436
 
437
  /**
334
  * @return array
335
  */
336
  protected function _determineAmountAndCurrency()
337
+ {
338
+ $currentCurrency = Mage::app()->getStore()->getCurrentCurrencyCode();
339
+
340
+ if ($this->_order->getOrderCurrencyCode() != $currentCurrency) {
341
+ $currentCurrency = $this->_order->getOrderCurrencyCode();
342
+ }
343
+
344
+ // currency is not available for this module
345
+ if ($this->_currentCurrencyIsAllowed()) {
346
+ $currency = $currentCurrency;
347
+ $totalAmount = $this->_order->getGrandTotal();
348
+ } else {
349
+ $totalAmount = $this->_order->getBaseGrandTotal();
350
+ $currency = $this->_order->getBaseCurrency()->getCode();
351
+ }
352
+
353
+ return array($currency, $totalAmount);
354
+ }
355
+
356
+ /**
357
+ * Check whether the current curreny of the order is allowed
358
+ *
359
+ * @return bool
360
+ */
361
+ protected function _currentCurrencyIsAllowed()
362
  {
363
  $code = $this->_order->getPayment()->getMethod();
364
 
365
  // availability currency codes for this Payment Module
366
+ switch ($code) {
 
367
  case 'buckaroo3extended_ideal':
368
  case 'buckaroogiftcard':
369
  case 'buckaroo2012giftcard':
370
  case 'buckarooideal':
371
  case 'buckaroo':
372
+ case 'buckaroo2012ideal':
373
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_ideal_paymentMethod');
374
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_ideal/allowed_currencies', $this->getStoreId());
375
+ break;
376
  case 'buckaroo3extended_visa':
377
  case 'buckaroocc':
378
+ case 'buckaroo2012creditcard':
379
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_visa_paymentMethod');
380
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_visa/allowed_currencies', $this->getStoreId());
381
+ break;
382
+ case 'buckaroo3extended_amex':
383
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_amex_paymentMethod');
384
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_amex/allowed_currencies', $this->getStoreId());
385
+ break;
386
  case 'buckaroo3extended_mastercard':
387
+ case 'mastercard':
388
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_mastercard_paymentMethod');
389
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_mastercard/allowed_currencies', $this->getStoreId());
390
+ break;
391
  case 'buckaroo3extended_directdebit':
392
  case 'buckaroocollect':
393
+ case 'buckaroo2012machtiging':
394
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_directdebit_paymentMethod');
395
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_directdebit/allowed_currencies', $this->getStoreId());
396
+ break;
397
  case 'buckaroo3extended_paypal':
398
  case 'buckaroopaypal':
399
+ case 'buckaroo2012paypal':
400
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_paypal_paymentMethod');
401
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_paypal/allowed_currencies', $this->getStoreId());
402
+ break;
403
  case 'buckaroo3extended_transfer':
404
  case 'buckarootransfer':
405
+ case 'buckaroo2012overschrijving':
406
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_transfer_paymentMethod');
407
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_transfer/allowed_currencies', $this->getStoreId());
408
+ break;
409
  case 'buckaroo3extended_paymentguarantee':
410
  case 'buckarootransfergarant':
411
+ case 'buckaroo2012betaalgarant':
412
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_paymentguarantee_paymentMethod');
413
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_paymentguarantee/allowed_currencies', $this->getStoreId());
414
+ break;
415
  case 'buckaroo3extended_giropay':
416
  case 'buckaroogiropay':
417
+ case 'buckaroo2012giropay':
418
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_giropay_paymentMethod');
419
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_giropay/allowed_currencies', $this->getStoreId());
420
+ break;
421
  case 'buckaroo3extended_paysafecard':
422
  case 'buckaroocashticket':
423
  case 'buckaroopaysafecard':
424
+ case 'buckaroo2012cashticketpaysafecard':
425
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_paysafecard_paymentMethod');
426
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_paysafecard/allowed_currencies', $this->getStoreId());
427
+ break;
428
  case 'buckaroo3extended_payperemail':
429
  case 'buckaroopayperemail':
430
+ case 'buckaroo2012payperemail':
431
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_payperemail_paymentMethod');
432
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_payperemail/allowed_currencies', $this->getStoreId());
433
+ break;
434
+ case 'buckaroo3extended_sofortueberweisung':
435
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_sofortueberweisung_paymentMethod');
436
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_sofortueberweisung/allowed_currencies', $this->getStoreId());
437
+ break;
438
+ case 'buckaroo3extended_maestro':
439
+ $paymentMethod = Mage::getModel('buckaroo3extended/paymentMethods_maestro_paymentMethod');
440
+ $currenciesAllowedConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_maestro/allowed_currencies', $this->getStoreId());
441
+ break;
442
+ default:
443
+ $paymentMethod = null;
444
+ $currenciesAllowedConfig = 'EUR';
445
  }
446
 
447
  if (!is_null($paymentMethod)) {
458
  $currentCurrency = $this->_order->getOrderCurrencyCode();
459
  }
460
 
461
+ return (in_array($currentCurrency, $currenciesAllowed) && in_array($currentCurrency, $currenciesAllowedConfig));
 
 
 
 
 
 
 
 
 
 
 
462
  }
463
 
464
  /**
app/code/community/TIG/Buckaroo3Extended/Model/Observer/Abstract.php CHANGED
@@ -104,6 +104,7 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
104
  'AmountVat' => $VAT,
105
  'CustomerType' => 1,
106
  'MaxReminderLevel' => $reminderLevel,
 
107
  );
108
 
109
  if (array_key_exists('customVars', $vars) && is_array($vars['customVars']['creditmanagement'])) {
@@ -165,7 +166,7 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
165
  $state = $this->_billingInfo['state'];
166
  $fax = $this->_billingInfo['fax'];
167
  $country = $this->_billingInfo['countryCode'];
168
- $processedPhoneNumber = $this->_processPhoneNumberCM();
169
  $customerLastNamePrefix = $this->_getCustomerLastNamePrefix();
170
  $customerInitials = $this->_getInitialsCM();
171
 
@@ -259,26 +260,49 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
259
  //get address from billingInfo
260
  $address = $this->_billingInfo['address'];
261
 
262
- $ret = array();
263
- $ret['house_number'] = '';
264
- $ret['number_addition'] = '';
265
- if (preg_match('#^(.*?)([0-9]+)(.*)#s', $address, $matches)) {
266
- if ('' == $matches[1]) {
267
- // Number at beginning
268
- $ret['house_number'] = trim($matches[2]);
269
- $ret['street'] = trim($matches[3]);
270
- } else {
271
- // Number at end
272
- $ret['street'] = trim($matches[1]);
273
- $ret['house_number'] = trim($matches[2]);
274
- $ret['number_addition'] = trim($matches[3]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  }
276
- } else {
277
- // No number
278
- $ret['street'] = $address;
279
  }
280
 
281
- return $ret;
 
 
 
 
 
 
282
  }
283
 
284
  /**
@@ -347,6 +371,75 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
347
  return $return;
348
  }
349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  /**
351
  * validate the phonenumber
352
  *
@@ -374,6 +467,35 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
374
  return $number;
375
  }
376
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
377
  /**
378
  * Checks if the number is a mobile number or not.
379
  *
@@ -394,6 +516,31 @@ class TIG_Buckaroo3Extended_Model_Observer_Abstract extends TIG_Buckaroo3Extende
394
  return false;
395
  }
396
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
397
  /**
398
  * @return string
399
  */
104
  'AmountVat' => $VAT,
105
  'CustomerType' => 1,
106
  'MaxReminderLevel' => $reminderLevel,
107
+ 'PaymentMethodsAllowed' => $this->_getPaymentMethodsAllowed(),
108
  );
109
 
110
  if (array_key_exists('customVars', $vars) && is_array($vars['customVars']['creditmanagement'])) {
166
  $state = $this->_billingInfo['state'];
167
  $fax = $this->_billingInfo['fax'];
168
  $country = $this->_billingInfo['countryCode'];
169
+ $processedPhoneNumber = ($country == 'BE' ? $this->_processPhoneNumberCMBe() : $this->_processPhoneNumberCM());
170
  $customerLastNamePrefix = $this->_getCustomerLastNamePrefix();
171
  $customerInitials = $this->_getInitialsCM();
172
 
260
  //get address from billingInfo
261
  $address = $this->_billingInfo['address'];
262
 
263
+ $addressRegexResult = preg_match('#\A(.*?)\s+(\d+[a-zA-Z]{0,1}\s{0,1}[-]{1}\s{0,1}\d*[a-zA-Z]{0,1}|\d+[a-zA-Z-]{0,1}\d*[a-zA-Z]{0,1})#', $address, $matches);
264
+ if (!$addressRegexResult || !is_array($matches)) {
265
+ $addressData = array(
266
+ 'street' => $address,
267
+ 'house_number' => '',
268
+ 'number_addition' => '',
269
+ );
270
+
271
+ return $addressData;
272
+ }
273
+
274
+ $streetname = '';
275
+ $housenumber = '';
276
+ $housenumberExtension = '';
277
+ if (isset($matches[1])) {
278
+ $streetname = $matches[1];
279
+ }
280
+
281
+ if (isset($matches[2])) {
282
+ $housenumber = $matches[2];
283
+ }
284
+
285
+ if (!empty($housenumber)) {
286
+ $housenumber = trim($housenumber);
287
+ $housenumberRegexResult = preg_match('#^([\d]+)(.*)#s', $housenumber, $matches);
288
+ if ($housenumberRegexResult && is_array($matches)) {
289
+ if (isset($matches[1])) {
290
+ $housenumber = $matches[1];
291
+ }
292
+
293
+ if (isset($matches[2])) {
294
+ $housenumberExtension = trim($matches[2]);
295
+ }
296
  }
 
 
 
297
  }
298
 
299
+ $addressData = array(
300
+ 'street' => $streetname,
301
+ 'house_number' => $housenumber,
302
+ 'number_addition' => $housenumberExtension,
303
+ );
304
+
305
+ return $addressData;
306
  }
307
 
308
  /**
371
  return $return;
372
  }
373
 
374
+ /**
375
+ * processes the customer's BE phone number so as to fit the betaalgarant SOAP request
376
+ *
377
+ * @return array
378
+ */
379
+ protected function _processPhoneNumberCMBe()
380
+ {
381
+ $additionalFields = Mage::getSingleton('checkout/session')->getData('additionalFields');
382
+ if (isset($additionalFields['BPE_PhoneNumber'])) {
383
+ $number = $additionalFields['BPE_PhoneNumber'];
384
+ } else {
385
+ $number = ($this->_billingInfo['telephone'])?:'012345678';
386
+ }
387
+
388
+
389
+ //the final output must like this: 003212345678 for mobile: 0032461234567
390
+ //so 13 characters max else number is not valid
391
+ //but for some error correction we try to find if there is some faulty notation
392
+
393
+ $return = array("orginal" => $number, "clean" => false, "mobile" => false, "valid" => false);
394
+ //first strip out the non-numeric characters:
395
+ $match = preg_replace('/[^0-9]/Uis', '', $number);
396
+ if ($match) {
397
+ $number = $match;
398
+ }
399
+
400
+ $return['mobile'] = $this->_isMobileNumberBe($number);
401
+ $numberLength = strlen((string)$number);
402
+
403
+ if (($return['mobile'] && $numberLength == 13) || (!$return['mobile'] && $numberLength == 12)) {
404
+ //if the length equal to 12 or 13 is, then we can check if the number is valid
405
+ $return['valid'] = true;
406
+ $return['clean'] = $number;
407
+ } elseif ($numberLength > 13 || (!$return['mobile'] && $numberLength > 12)) {
408
+ //if the number is bigger then 13, it means that there are probably a zero to much
409
+ $return['clean'] = $this->_isValidNotationBe($number);
410
+ $cleanLength = strlen((string)$return['clean']);
411
+
412
+ if (($return['mobile'] && $cleanLength == 13) || (!$return['mobile'] && $cleanLength == 12)) {
413
+ $return['valid'] = true;
414
+ }
415
+ } elseif (($return['mobile'] && ($numberLength == 11 || $numberLength == 12))
416
+ || (!$return['mobile'] && ($numberLength == 10 || $numberLength == 11))
417
+ ) {
418
+ //if the number is equal to 10, 11 or 12, it means that they used a + in their number instead of 00
419
+ $return['clean'] = $this->_isValidNotationBe($number);
420
+ $cleanLength = strlen((string)$return['clean']);
421
+
422
+ if (($return['mobile'] && $cleanLength == 13) || (!$return['mobile'] && $cleanLength == 12)) {
423
+ $return['valid'] = true;
424
+ }
425
+ } elseif (($return['mobile'] && $numberLength == 10) || (!$return['mobile'] && $numberLength == 9)) {
426
+ //this means that the user has no trailing "0032" and therfore only
427
+ $return['clean'] = '0032'.substr($number, 1);
428
+ $cleanLength = strlen((string)$return['clean']);
429
+
430
+ if (($return['mobile'] && $cleanLength == 13) || (!$return['mobile'] && $cleanLength == 12)) {
431
+ $return['valid'] = true;
432
+ }
433
+ } else {
434
+ $return['mobile'] = $this->_isMobileNumberBe($number);
435
+ //now we can almost say that the number is valid
436
+ $return['valid'] = true;
437
+ $return['clean'] = $number;
438
+ }
439
+
440
+ return $return;
441
+ }
442
+
443
  /**
444
  * validate the phonenumber
445
  *
467
  return $number;
468
  }
469
 
470
+ /**
471
+ * validate the BE phonenumber
472
+ *
473
+ * @param $number
474
+ * @return mixed
475
+ */
476
+ protected function _isValidNotationBe($number) {
477
+ //checks if the number is valid, if not: try to fix it
478
+ $invalidNotations = array("00320", "0320", "320", "32");
479
+
480
+ foreach ($invalidNotations as $invalid) {
481
+ if (strpos(substr($number, 0, strlen($invalid)), $invalid) !== false) {
482
+ $valid = substr($invalid, 0, -1);
483
+ if (substr($valid, 0, 2) == '32') {
484
+ $valid = "00" . $valid;
485
+ }
486
+ if (substr($valid, 0, 2) == '03') {
487
+ $valid = "0" . $valid;
488
+ }
489
+ if ($valid == '3') {
490
+ $valid = "0" . $valid . "2";
491
+ }
492
+ $number = substr_replace($number, $valid, 0, strlen($invalid));
493
+ }
494
+ }
495
+
496
+ return $number;
497
+ }
498
+
499
  /**
500
  * Checks if the number is a mobile number or not.
501
  *
516
  return false;
517
  }
518
 
519
+ /**
520
+ * Checks if the number is a BE mobile number or not.
521
+ *
522
+ * @param string $number
523
+ *
524
+ * @return boolean
525
+ */
526
+ protected function _isMobileNumberBe($number) {
527
+ //this function only checks if it is a BE mobile number, not checking valid notation
528
+ $checkMobileArray = array(
529
+ "3246","32046","046","003246","0032046",
530
+ "3247","32407","047","003247","0032047",
531
+ "3248","32048","048","003248","0032048",
532
+ "3249","32049","049","003249","0032049"
533
+ );
534
+
535
+ foreach ($checkMobileArray as $key => $value) {
536
+ if (strpos(substr($number, 0, strlen($value)), $value) !== false) {
537
+ return true;
538
+ }
539
+ }
540
+
541
+ return false;
542
+ }
543
+
544
  /**
545
  * @return string
546
  */
app/code/community/TIG/Buckaroo3Extended/Model/Observer/CancelAuthorize.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Model_Observer_CancelAuthorize extends Mage_Core_Model_Abstract
40
+ {
41
+ /** @var array */
42
+ private $_allowedMethods = array('afterpay', 'afterpay2');
43
+
44
+ /**
45
+ * @param Varien_Event_Observer $observer
46
+ *
47
+ * @return $this
48
+ */
49
+ public function sales_order_payment_cancel_authorize(Varien_Event_Observer $observer)
50
+ {
51
+ /** @var Mage_Sales_Model_Order_Payment $payment */
52
+ $payment = $observer->getPayment();
53
+ $paymentMethodAction = $payment->getMethodInstance()->getConfigPaymentAction();
54
+
55
+ /** The first characters are "buckaroo3extended_" which are the same for all methods.
56
+ Therefore we don't need to validate this part. */
57
+ $paymentMethodCode = substr($payment->getMethodInstance()->getCode(), 18);
58
+
59
+ if (in_array($paymentMethodCode, $this->_allowedMethods)
60
+ && $paymentMethodAction == Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE
61
+ ) {
62
+ /** @var TIG_Buckaroo3Extended_Model_Request_CancelAuthorize $captureRequest */
63
+ $cancelAuthorizeRequest = Mage::getModel(
64
+ 'buckaroo3extended/request_cancelAuthorize',
65
+ array(
66
+ 'payment' => $payment
67
+ )
68
+ );
69
+
70
+ try {
71
+ $cancelAuthorizeRequest->sendRequest();
72
+ } catch (Exception $e) {
73
+ Mage::helper('buckaroo3extended')->logException($e);
74
+ Mage::throwException($e->getMessage());
75
+ }
76
+ }
77
+
78
+ return $this;
79
+ }
80
+ }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentFee/Order/Creditmemo/Total/Fee.php CHANGED
@@ -44,6 +44,22 @@ class TIG_Buckaroo3Extended_Model_PaymentFee_Order_Creditmemo_Total_Fee
44
  */
45
  const XPATH_BUCKAROO_FEE_INCLUDING_TAX = 'tax/calculation/buckaroo_fee_including_tax';
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  /**
48
  * Get the Buckaroo Payment fee total amount.
49
  *
@@ -59,6 +75,12 @@ class TIG_Buckaroo3Extended_Model_PaymentFee_Order_Creditmemo_Total_Fee
59
  $fee = $creditmemo->getBuckarooFee();
60
  $baseFee = $creditmemo->getBaseBuckarooFee();
61
 
 
 
 
 
 
 
62
  /**
63
  * If the creditmemo has a fee already, we only need to set the totals. This is the case for existing
64
  * creditmemos that are being viewed.
@@ -73,7 +95,7 @@ class TIG_Buckaroo3Extended_Model_PaymentFee_Order_Creditmemo_Total_Fee
73
  * If we are currently in the backend and logged in, we need to check the POST parameters to see if any fee
74
  * amount is to be refunded.
75
  */
76
- if (Mage::helper('buckaroo3extended')->isAdmin() && Mage::getSingleton('admin/session')->isLoggedIn()) {
77
  /**
78
  * This is unfortunately the only way to determine the fee amount that needs to be refunded without
79
  * rewriting a core class. If anybody knows of a better way, please let us know at
@@ -182,7 +204,7 @@ class TIG_Buckaroo3Extended_Model_PaymentFee_Order_Creditmemo_Total_Fee
182
 
183
  if (round($orderBaseFeeRefunded + $baseFee, 4) > $orderBaseFee) {
184
  throw new Mage_Exception(
185
- Mage::helper('buckaroo3extended')->__(
186
  'Maximum Buckaroo Payment fee amount available to refunds is %s.',
187
  $order->formatPriceTxt(
188
  $orderBaseFee - $orderBaseFeeRefunded
44
  */
45
  const XPATH_BUCKAROO_FEE_INCLUDING_TAX = 'tax/calculation/buckaroo_fee_including_tax';
46
 
47
+ /** @var null|TIG_Buckaroo3Extended_Helper_Data */
48
+ protected $_helper = null;
49
+
50
+ /**
51
+ * @return TIG_Buckaroo3Extended_Helper_Data
52
+ */
53
+ protected function getHelper()
54
+ {
55
+ if ($this->_helper === null) {
56
+ $helper = Mage::helper('buckaroo3extended');
57
+ $this->_helper = $helper;
58
+ }
59
+
60
+ return $this->_helper;
61
+ }
62
+
63
  /**
64
  * Get the Buckaroo Payment fee total amount.
65
  *
75
  $fee = $creditmemo->getBuckarooFee();
76
  $baseFee = $creditmemo->getBaseBuckarooFee();
77
 
78
+ $creditmemoInvoice = $creditmemo->getInvoice();
79
+
80
+ if ($creditmemoInvoice && ($creditmemoInvoice->getBuckarooFee() < 0.01 || $creditmemoInvoice->getBaseBuckarooFee() < 0.01)) {
81
+ return $this;
82
+ }
83
+
84
  /**
85
  * If the creditmemo has a fee already, we only need to set the totals. This is the case for existing
86
  * creditmemos that are being viewed.
95
  * If we are currently in the backend and logged in, we need to check the POST parameters to see if any fee
96
  * amount is to be refunded.
97
  */
98
+ if ($this->getHelper()->isAdmin() && Mage::getSingleton('admin/session')->isLoggedIn()) {
99
  /**
100
  * This is unfortunately the only way to determine the fee amount that needs to be refunded without
101
  * rewriting a core class. If anybody knows of a better way, please let us know at
204
 
205
  if (round($orderBaseFeeRefunded + $baseFee, 4) > $orderBaseFee) {
206
  throw new Mage_Exception(
207
+ $this->getHelper()->__(
208
  'Maximum Buckaroo Payment fee amount available to refunds is %s.',
209
  $order->formatPriceTxt(
210
  $orderBaseFee - $orderBaseFeeRefunded
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Afterpay/Observer.php CHANGED
@@ -26,9 +26,20 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
26
  $this->_method = Mage::getStoreConfig('buckaroo/' . $this->_code . '/paymethod', Mage::app()->getStore()->getStoreId());
27
  }
28
 
 
 
 
 
 
 
 
 
 
 
 
29
  $array = array(
30
  $this->_method => array(
31
- 'action' => 'Pay',
32
  'version' => '1',
33
  ),
34
  );
@@ -63,6 +74,8 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
63
  }
64
 
65
  $this->_addAfterpayVariables($vars, $this->_method);
 
 
66
 
67
  $request->setVars($vars);
68
  return $this;
@@ -149,6 +162,147 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
149
  return $this;
150
  }
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  return $this;
153
  }
154
 
@@ -165,6 +319,15 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
165
  $session = Mage::getSingleton('checkout/session');
166
  $additionalFields = $session->getData('additionalFields');
167
 
 
 
 
 
 
 
 
 
 
168
  $requestArray = array();
169
 
170
  //add billing address
@@ -176,7 +339,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
176
  $rawPhoneNumber = $additionalFields['BPE_PhoneNumber'];
177
  }
178
 
179
- $billingPhonenumber = $this->_processPhoneNumber($rawPhoneNumber);
180
  $billingInfo = array(
181
  'BillingTitle' => $billingAddress->getFirstname(),
182
  'BillingGender' => $additionalFields['BPE_Customergender'],
@@ -200,7 +363,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
200
  if($this->isShippingDifferent()){
201
  $shippingAddress = $this->_order->getShippingAddress();
202
  $streetFull = $this->_processAddress($shippingAddress->getStreetFull());
203
- $shippingPhonenumber = $this->_processPhoneNumber($shippingAddress->getTelephone());
204
 
205
  $shippingInfo = array(
206
  'AddressesDiffer' => 'true',
@@ -229,25 +392,34 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
229
  'CustomerIPAddress' => Mage::helper('core/http')->getRemoteAddr(),
230
  'Accept' => $additionalFields['BPE_Accept'],
231
  );
232
- $shippingCosts = round($this->_order->getBaseShippingInclTax(), 2);
 
 
 
 
 
 
 
 
 
233
 
234
  $discount = null;
235
 
236
  if(Mage::helper('buckaroo3extended')->isEnterprise()){
237
- if((double)$this->_order->getGiftCardsAmount() > 0){
238
- $discount = (double)$this->_order->getGiftCardsAmount();
239
  }
240
  }
241
 
242
- if(abs((double)$this->_order->getDiscountAmount()) > 0){
243
- $discount += abs((double)$this->_order->getDiscountAmount());
244
  }
245
 
 
246
 
247
  //add order Info
248
  $orderInfo = array(
249
  'Discount' => $discount,
250
- 'ShippingCosts' => $shippingCosts,
251
  );
252
 
253
  $requestArray = array_merge($requestArray,$customerInfo);
@@ -258,11 +430,40 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
258
  'B2B' => 'true',
259
  'CompanyCOCRegistration' => $additionalFields['BPE_CompanyCOCRegistration'],
260
  'CompanyName' => $additionalFields['BPE_CompanyName'],
261
- 'CostCentre' => $additionalFields['BPE_CostCentre'],
262
- 'VatNumber' => $additionalFields['BPE_VatNumber'],
263
  );
264
  $requestArray = array_merge($requestArray,$b2bInfo);
265
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
  //add all products max 10
267
  $products = $this->_order->getAllItems();
268
  $max = 99;
@@ -280,8 +481,8 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
280
  // because of differences in outcome between TAX settings: Unit, OrderLine and Total.
281
  // Quantity will always be 1 and quantity ordered will be in the article description.
282
  $productPrice = ($item->getBasePrice() * $item->getQtyOrdered())
283
- + $item->getBaseTaxAmount()
284
- + $item->getBaseHiddenTaxAmount();
285
  $productPrice = round($productPrice,2);
286
 
287
 
@@ -298,18 +499,147 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
298
  $i++;
299
  continue;
300
  }
 
301
  break;
302
  }
303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  end($group);// move the internal pointer to the end of the array
305
  $key = (int)key($group);
306
  $feeGroupId = $key+1;
307
  $paymentFeeArray = $this->_getPaymentFeeLine();
308
- if(false !== $paymentFeeArray && is_array($paymentFeeArray)){
 
309
  $group[$feeGroupId] = $paymentFeeArray;
310
  }
311
 
312
- $requestArray = array_merge($requestArray, array('Articles' => $group));
313
 
314
  if (array_key_exists('customVars', $vars) && is_array($vars['customVars'][$this->_method])) {
315
  $vars['customVars'][$this->_method] = array_merge($vars['customVars'][$this->_method], $requestArray);
@@ -318,6 +648,118 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
318
  }
319
  }
320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  protected function _getPaymentFeeLine()
322
  {
323
  $fee = (double) $this->_order->getBuckarooFee();
@@ -335,10 +777,10 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
335
  }
336
 
337
  /**
338
- * @param Mage_Sales_Model_Order_Item $item
339
  * @return array|bool|string
340
  */
341
- protected function _getTaxClassId(Mage_Sales_Model_Order_Item $item)
342
  {
343
  return Mage::getResourceModel('catalog/product')->getAttributeRawValue($item->getProductId(), 'tax_class_id', $item->getStoreId());
344
  }
@@ -455,6 +897,69 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer extends TIG_B
455
  return $return;
456
  }
457
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458
  /**
459
  * Checks if shipping-address is different from billing-address
460
  *
26
  $this->_method = Mage::getStoreConfig('buckaroo/' . $this->_code . '/paymethod', Mage::app()->getStore()->getStoreId());
27
  }
28
 
29
+ $paymentAction = Mage::getStoreConfig(
30
+ 'buckaroo/' . $this->_code . '/payment_action',
31
+ Mage::app()->getStore()->getStoreId()
32
+ );
33
+
34
+ if ($paymentAction == Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE) {
35
+ $serviceAction = 'Authorize';
36
+ } else {
37
+ $serviceAction = 'Pay';
38
+ }
39
+
40
  $array = array(
41
  $this->_method => array(
42
+ 'action' => $serviceAction,
43
  'version' => '1',
44
  ),
45
  );
74
  }
75
 
76
  $this->_addAfterpayVariables($vars, $this->_method);
77
+ $this->_addArticlesVariables($vars, $this->_method);
78
+ $this->_addShippingCostsVariables($vars, $this->_method);
79
 
80
  $request->setVars($vars);
81
  return $this;
162
  return $this;
163
  }
164
 
165
+ $request = $observer->getRequest();
166
+ $this->_order = $request->getOrder();
167
+ $payment = $request->getPayment();
168
+
169
+ $vars = $request->getVars();
170
+
171
+ $this->_addCreditmemoArticlesVariables($vars, $payment, $this->_method);
172
+
173
+ /** @var Mage_Sales_Model_Order $tst */
174
+ $tst = $request->getOrder();
175
+ $tst->getPayment()->canRefundPartialPerInvoice();
176
+
177
+ if ($this->_order->getPayment()->canRefundPartialPerInvoice() && $payment->getCreditmemo()) {
178
+ $this->_addCreditmemoArticlesVariables($vars, $payment, $this->_method);
179
+ }
180
+
181
+ $request->setVars($vars);
182
+
183
+ return $this;
184
+ }
185
+
186
+ /**
187
+ * @param Varien_Event_Observer $observer
188
+ *
189
+ * @return $this
190
+ */
191
+ public function buckaroo3extended_capture_request_addservices(Varien_Event_Observer $observer)
192
+ {
193
+ if($this->_isChosenMethod($observer) === false) {
194
+ return $this;
195
+ }
196
+
197
+ $request = $observer->getRequest();
198
+
199
+ $vars = $request->getVars();
200
+
201
+ if($this->_method == false){
202
+ $this->_method = Mage::getStoreConfig('buckaroo/' . $this->_code . '/paymethod', Mage::app()->getStore()->getStoreId());
203
+ }
204
+
205
+ $array = array(
206
+ $this->_method => array(
207
+ 'action' => 'Capture',
208
+ 'version' => '1',
209
+ ),
210
+ );
211
+
212
+ if (array_key_exists('services', $vars) && is_array($vars['services'])) {
213
+ $vars['services'] = array_merge($vars['services'], $array);
214
+ } else {
215
+ $vars['services'] = $array;
216
+ }
217
+
218
+ $request->setVars($vars);
219
+
220
+ return $this;
221
+ }
222
+
223
+ /**
224
+ * @param Varien_Event_Observer $observer
225
+ *
226
+ * @return $this
227
+ */
228
+ public function buckaroo3extended_capture_request_addcustomvars(Varien_Event_Observer $observer)
229
+ {
230
+ if($this->_isChosenMethod($observer) === false) {
231
+ return $this;
232
+ }
233
+
234
+ $request = $observer->getRequest();
235
+ $this->_billingInfo = $request->getBillingInfo();
236
+ $this->_order = $request->getOrder();
237
+
238
+ $vars = $request->getVars();
239
+
240
+ if (Mage::getStoreConfig('buckaroo/buckaroo3extended_' . $this->_method . '/use_creditmanagement', Mage::app()->getStore()->getStoreId())) {
241
+ $this->_addCustomerVariables($vars);
242
+ $this->_addCreditManagement($vars);
243
+ $this->_addAdditionalCreditManagementVariables($vars);
244
+ }
245
+
246
+ $this->_addAfterpayVariables($vars, $this->_method);
247
+
248
+ /** @var Mage_Sales_Model_Resource_Order_Invoice_Collection $invoiceCollection */
249
+ $invoiceCollection = $this->_order->getInvoiceCollection();
250
+
251
+ /** @var Mage_Sales_Model_Order_Invoice $lastInvoice */
252
+ $lastInvoice = $invoiceCollection->getLastItem();
253
+
254
+ if ($this->_order->getPayment()->canCapturePartial()
255
+ && count($invoiceCollection) > 0
256
+ && $lastInvoice->getBaseGrandTotal() < $this->_order->getBaseGrandTotal()
257
+ ) {
258
+ $this->_addPartialArticlesVariables($vars, $this->_method);
259
+ } else {
260
+ $this->_addArticlesVariables($vars, $this->_method);
261
+ }
262
+
263
+ // Shipping costs only need to be send with the first invoice
264
+ if (count($invoiceCollection) == 1) {
265
+ $this->_addShippingCostsVariables($vars, $this->_method);
266
+ }
267
+
268
+ $request->setVars($vars);
269
+ return $this;
270
+ }
271
+
272
+ /**
273
+ * @param Varien_Event_Observer $observer
274
+ *
275
+ * @return $this
276
+ */
277
+ public function buckaroo3extended_cancelauthorize_request_addservices(Varien_Event_Observer $observer)
278
+ {
279
+ if($this->_isChosenMethod($observer) === false) {
280
+ return $this;
281
+ }
282
+
283
+ $request = $observer->getRequest();
284
+
285
+ $vars = $request->getVars();
286
+
287
+ if($this->_method == false){
288
+ $this->_method = Mage::getStoreConfig('buckaroo/' . $this->_code . '/paymethod', Mage::app()->getStore()->getStoreId());
289
+ }
290
+
291
+ $array = array(
292
+ $this->_method => array(
293
+ 'action' => 'CancelAuthorize',
294
+ 'version' => '1',
295
+ ),
296
+ );
297
+
298
+ if (array_key_exists('services', $vars) && is_array($vars['services'])) {
299
+ $vars['services'] = array_merge($vars['services'], $array);
300
+ } else {
301
+ $vars['services'] = $array;
302
+ }
303
+
304
+ $request->setVars($vars);
305
+
306
  return $this;
307
  }
308
 
319
  $session = Mage::getSingleton('checkout/session');
320
  $additionalFields = $session->getData('additionalFields');
321
 
322
+ $paymentAdditionalInformation = $this->_order->getPayment()->getAdditionalInformation();
323
+ if (is_array($paymentAdditionalInformation)
324
+ && count($paymentAdditionalInformation) > 0
325
+ && isset($paymentAdditionalInformation['BPE_AccountNumber'])
326
+ && strlen($paymentAdditionalInformation['BPE_AccountNumber']) > 0
327
+ ) {
328
+ $additionalFields = $paymentAdditionalInformation;
329
+ }
330
+
331
  $requestArray = array();
332
 
333
  //add billing address
339
  $rawPhoneNumber = $additionalFields['BPE_PhoneNumber'];
340
  }
341
 
342
+ $billingPhonenumber = ($billingAddress->getCountryId() == 'BE' ? $this->_processPhoneNumberBe($rawPhoneNumber) : $this->_processPhoneNumber($rawPhoneNumber));
343
  $billingInfo = array(
344
  'BillingTitle' => $billingAddress->getFirstname(),
345
  'BillingGender' => $additionalFields['BPE_Customergender'],
363
  if($this->isShippingDifferent()){
364
  $shippingAddress = $this->_order->getShippingAddress();
365
  $streetFull = $this->_processAddress($shippingAddress->getStreetFull());
366
+ $shippingPhonenumber = ($shippingAddress->getCountryId() ? $this->_processPhoneNumberBe($shippingAddress->getTelephone()) : $this->_processPhoneNumber($shippingAddress->getTelephone()));
367
 
368
  $shippingInfo = array(
369
  'AddressesDiffer' => 'true',
392
  'CustomerIPAddress' => Mage::helper('core/http')->getRemoteAddr(),
393
  'Accept' => $additionalFields['BPE_Accept'],
394
  );
395
+
396
+ /** @var Mage_Sales_Model_Order|Mage_Sales_Model_Order_Invoice $discountData */
397
+ $discountData = $this->_order;
398
+
399
+ /** @var Mage_Sales_Model_Resource_Order_Invoice_Collection $invoiceCollection */
400
+ $invoiceCollection = $this->_order->getInvoiceCollection();
401
+
402
+ if (count($invoiceCollection) > 0) {
403
+ $discountData = $invoiceCollection->getLastItem();
404
+ }
405
 
406
  $discount = null;
407
 
408
  if(Mage::helper('buckaroo3extended')->isEnterprise()){
409
+ if((double)$discountData->getGiftCardsAmount() > 0){
410
+ $discount = (double)$discountData->getGiftCardsAmount();
411
  }
412
  }
413
 
414
+ if(abs((double)$discountData->getDiscountAmount()) > 0){
415
+ $discount += abs((double)$discountData->getDiscountAmount());
416
  }
417
 
418
+ $discount = round($discount,2);
419
 
420
  //add order Info
421
  $orderInfo = array(
422
  'Discount' => $discount,
 
423
  );
424
 
425
  $requestArray = array_merge($requestArray,$customerInfo);
430
  'B2B' => 'true',
431
  'CompanyCOCRegistration' => $additionalFields['BPE_CompanyCOCRegistration'],
432
  'CompanyName' => $additionalFields['BPE_CompanyName'],
 
 
433
  );
434
  $requestArray = array_merge($requestArray,$b2bInfo);
435
  }
436
+
437
+ if (array_key_exists('customVars', $vars) && is_array($vars['customVars'][$this->_method])) {
438
+ $vars['customVars'][$this->_method] = array_merge($vars['customVars'][$this->_method], $requestArray);
439
+ } else {
440
+ $vars['customVars'][$this->_method] = $requestArray;
441
+ }
442
+ }
443
+
444
+ /**
445
+ * @param $vars
446
+ */
447
+ protected function _addShippingCostsVariables(&$vars)
448
+ {
449
+ $shippingCosts = round($this->_order->getBaseShippingInclTax(), 2);
450
+
451
+ $orderInfo = array(
452
+ 'ShippingCosts' => $shippingCosts,
453
+ );
454
+
455
+ if (array_key_exists('customVars', $vars) && is_array($vars['customVars'][$this->_method])) {
456
+ $vars['customVars'][$this->_method] = array_merge($vars['customVars'][$this->_method], $orderInfo);
457
+ } else {
458
+ $vars['customVars'][$this->_method] = $orderInfo;
459
+ }
460
+ }
461
+
462
+ /**
463
+ * @param array $vars
464
+ */
465
+ protected function _addArticlesVariables(&$vars)
466
+ {
467
  //add all products max 10
468
  $products = $this->_order->getAllItems();
469
  $max = 99;
481
  // because of differences in outcome between TAX settings: Unit, OrderLine and Total.
482
  // Quantity will always be 1 and quantity ordered will be in the article description.
483
  $productPrice = ($item->getBasePrice() * $item->getQtyOrdered())
484
+ + $item->getBaseTaxAmount()
485
+ + $item->getBaseHiddenTaxAmount();
486
  $productPrice = round($productPrice,2);
487
 
488
 
499
  $i++;
500
  continue;
501
  }
502
+
503
  break;
504
  }
505
 
506
+ if (Mage::helper('buckaroo3extended')->isEnterprise()) {
507
+ $gwId = 1;
508
+ $gwTax = Mage::helper('enterprise_giftwrapping')->getWrappingTaxClass($this->_order->getStoreId());
509
+
510
+ if ($this->_order->getGwBasePrice() > 0) {
511
+ $gwPrice = $this->_order->getGwBasePrice() + $this->_order->getGwBaseTaxAmount();
512
+
513
+ $gwOrder = array();
514
+ $gwOrder['ArticleDescription']['value'] = Mage::helper('buckaroo3extended')->__('Gift Wrapping for Order');
515
+ $gwOrder['ArticleId']['value'] = 'gwo_' . $this->_order->getGwId();
516
+ $gwOrder['ArticleQuantity']['value'] = 1;
517
+ $gwOrder['ArticleUnitPrice']['value'] = $gwPrice;
518
+ $gwOrder['ArticleVatcategory']['value'] = $gwTax;
519
+
520
+ $group[] = $gwOrder;
521
+
522
+ $gwId += $this->_order->getGwId();
523
+ }
524
+
525
+ if ($this->_order->getGwItemsBasePrice() > 0) {
526
+ $gwiPrice = $this->_order->getGwItemsBasePrice() + $this->_order->getGwItemsBaseTaxAmount();
527
+
528
+ $gwiOrder = array();
529
+ $gwiOrder['ArticleDescription']['value'] = Mage::helper('buckaroo3extended')->__('Gift Wrapping for Items');
530
+ $gwiOrder['ArticleId']['value'] = 'gwi_' . $gwId;
531
+ $gwiOrder['ArticleQuantity']['value'] = 1;
532
+ $gwiOrder['ArticleUnitPrice']['value'] = $gwiPrice;
533
+ $gwiOrder['ArticleVatcategory']['value'] = $gwTax;
534
+
535
+ $group[] = $gwiOrder;
536
+ }
537
+ }
538
+
539
+ end($group);// move the internal pointer to the end of the array
540
+ $key = (int)key($group);
541
+ $feeGroupId = $key+1;
542
+ $paymentFeeArray = $this->_getPaymentFeeLine();
543
+
544
+ if (false !== $paymentFeeArray && is_array($paymentFeeArray)) {
545
+ $group[$feeGroupId] = $paymentFeeArray;
546
+ }
547
+
548
+ $requestArray = array('Articles' => $group);
549
+
550
+ if (array_key_exists('customVars', $vars) && is_array($vars['customVars'][$this->_method])) {
551
+ $vars['customVars'][$this->_method] = array_merge($vars['customVars'][$this->_method], $requestArray);
552
+ } else {
553
+ $vars['customVars'][$this->_method] = $requestArray;
554
+ }
555
+ }
556
+
557
+ /**
558
+ * @param array $vars
559
+ */
560
+ protected function _addPartialArticlesVariables(&$vars)
561
+ {
562
+ /** @var Mage_Sales_Model_Resource_Order_Invoice_Collection $invoiceCollection */
563
+ $invoiceCollection = $this->_order->getInvoiceCollection();
564
+
565
+ $products = $invoiceCollection->getLastItem()->getAllItems();
566
+ $max = 99;
567
+ $i = 1;
568
+ $group = array();
569
+
570
+ /** @var Mage_Sales_Model_Order_Invoice_Item $item */
571
+ foreach ($products as $item) {
572
+ if (empty($item) || ($item->getOrderItem() && $item->getOrderItem()->getParentItem())) {
573
+ continue;
574
+ }
575
+
576
+ // Changed calculation from unitPrice to orderLinePrice due to impossible to recalculate unitprice,
577
+ // because of differences in outcome between TAX settings: Unit, OrderLine and Total.
578
+ // Quantity will always be 1 and quantity ordered will be in the article description.
579
+ $productPrice = ($item->getBasePrice() * $item->getQty())
580
+ + $item->getBaseTaxAmount()
581
+ + $item->getBaseHiddenTaxAmount();
582
+ $productPrice = round($productPrice,2);
583
+
584
+ $article['ArticleDescription']['value'] = (int) $item->getQty() . 'x ' . $item->getName();
585
+ $article['ArticleId']['value'] = $item->getOrderItemId();
586
+ $article['ArticleQuantity']['value'] = 1;
587
+ $article['ArticleUnitPrice']['value'] = $productPrice;
588
+ $article['ArticleVatcategory']['value'] = $this->_getTaxCategory($this->_getTaxClassId($item));
589
+
590
+ $group[$i] = $article;
591
+
592
+
593
+ if($i <= $max){
594
+ $i++;
595
+ continue;
596
+ }
597
+ break;
598
+ }
599
+
600
+ if (Mage::helper('buckaroo3extended')->isEnterprise() && count($invoiceCollection) == 1) {
601
+ $gwId = 1;
602
+ $gwTax = Mage::helper('enterprise_giftwrapping')->getWrappingTaxClass($this->_order->getStoreId());
603
+
604
+ if ($this->_order->getGwBasePrice() > 0) {
605
+ $gwPrice = $this->_order->getGwBasePrice() + $this->_order->getGwBaseTaxAmount();
606
+
607
+ $gwOrder = array();
608
+ $gwOrder['ArticleDescription']['value'] = Mage::helper('buckaroo3extended')->__('Gift Wrapping for Order');
609
+ $gwOrder['ArticleId']['value'] = 'gwo_' . $this->_order->getGwId();
610
+ $gwOrder['ArticleQuantity']['value'] = 1;
611
+ $gwOrder['ArticleUnitPrice']['value'] = $gwPrice;
612
+ $gwOrder['ArticleVatcategory']['value'] = $gwTax;
613
+
614
+ $group[] = $gwOrder;
615
+
616
+ $gwId += $this->_order->getGwId();
617
+ }
618
+
619
+ if ($this->_order->getGwItemsBasePrice() > 0) {
620
+ $gwiPrice = $this->_order->getGwItemsBasePrice() + $this->_order->getGwItemsBaseTaxAmount();
621
+
622
+ $gwiOrder = array();
623
+ $gwiOrder['ArticleDescription']['value'] = Mage::helper('buckaroo3extended')->__('Gift Wrapping for Items');
624
+ $gwiOrder['ArticleId']['value'] = 'gwi_' . $gwId;
625
+ $gwiOrder['ArticleQuantity']['value'] = 1;
626
+ $gwiOrder['ArticleUnitPrice']['value'] = $gwiPrice;
627
+ $gwiOrder['ArticleVatcategory']['value'] = $gwTax;
628
+
629
+ $group[] = $gwiOrder;
630
+ }
631
+ }
632
+
633
  end($group);// move the internal pointer to the end of the array
634
  $key = (int)key($group);
635
  $feeGroupId = $key+1;
636
  $paymentFeeArray = $this->_getPaymentFeeLine();
637
+
638
+ if (false !== $paymentFeeArray && is_array($paymentFeeArray) && count($invoiceCollection) == 1) {
639
  $group[$feeGroupId] = $paymentFeeArray;
640
  }
641
 
642
+ $requestArray = array('Articles' => $group);
643
 
644
  if (array_key_exists('customVars', $vars) && is_array($vars['customVars'][$this->_method])) {
645
  $vars['customVars'][$this->_method] = array_merge($vars['customVars'][$this->_method], $requestArray);
648
  }
649
  }
650
 
651
+ protected function _addCreditmemoArticlesVariables(&$vars, $payment)
652
+ {
653
+ /** @var Mage_Sales_Model_Resource_Order_Creditmemo_Collection $creditmemoCollection */
654
+ $creditmemoCollection = $this->_order->getCreditmemosCollection();
655
+
656
+ /** @var Mage_Sales_Model_Order_Creditmemo $creditmemo */
657
+ $creditmemo = $payment->getCreditmemo();
658
+ $products = $creditmemo->getAllItems();
659
+ $max = 99;
660
+ $i = 1;
661
+ $group = array();
662
+
663
+ /** @var Mage_Sales_Model_Order_Creditmemo_Item $item */
664
+ foreach ($products as $item) {
665
+ if (empty($item) || ($item->getOrderItem() && $item->getOrderItem()->getParentItem())) {
666
+ continue;
667
+ }
668
+
669
+ $productPrice = ($item->getBasePrice() * $item->getQty())
670
+ + $item->getBaseTaxAmount()
671
+ + $item->getBaseHiddenTaxAmount();
672
+ $productPrice = round($productPrice, 2);
673
+
674
+ $article['ArticleDescription']['value'] = (int) $item->getQty() . 'x ' . $item->getName();
675
+ $article['ArticleId']['value'] = $item->getOrderItemId();
676
+ $article['ArticleQuantity']['value'] = 1;
677
+ $article['ArticleUnitPrice']['value'] = $productPrice;
678
+ $article['ArticleVatcategory']['value'] = $this->_getTaxCategory($this->_getTaxClassId($item->getOrderItem()));
679
+
680
+ $group[$i] = $article;
681
+
682
+ if ($i <= $max) {
683
+ $i++;
684
+ continue;
685
+ }
686
+
687
+ break;
688
+ }
689
+
690
+ if (Mage::helper('buckaroo3extended')->isEnterprise() && count($creditmemoCollection) == 1) {
691
+ $gwId = 1;
692
+ $gwTax = Mage::helper('enterprise_giftwrapping')->getWrappingTaxClass($this->_order->getStoreId());
693
+
694
+ if ($this->_order->getGwBasePrice() > 0) {
695
+ $gwPrice = $this->_order->getGwBasePrice() + $this->_order->getGwBaseTaxAmount();
696
+
697
+ $gwOrder = array();
698
+ $gwOrder['ArticleDescription']['value'] = Mage::helper('buckaroo3extended')->__('Gift Wrapping for Order');
699
+ $gwOrder['ArticleId']['value'] = 'gwo_' . $this->_order->getGwId();
700
+ $gwOrder['ArticleQuantity']['value'] = 1;
701
+ $gwOrder['ArticleUnitPrice']['value'] = $gwPrice;
702
+ $gwOrder['ArticleVatcategory']['value'] = $gwTax;
703
+
704
+ $group[] = $gwOrder;
705
+
706
+ $gwId += $this->_order->getGwId();
707
+ }
708
+
709
+ if ($this->_order->getGwItemsBasePrice() > 0) {
710
+ $gwiPrice = $this->_order->getGwItemsBasePrice() + $this->_order->getGwItemsBaseTaxAmount();
711
+
712
+ $gwiOrder = array();
713
+ $gwiOrder['ArticleDescription']['value'] = Mage::helper('buckaroo3extended')->__('Gift Wrapping for Items');
714
+ $gwiOrder['ArticleId']['value'] = 'gwi_' . $gwId;
715
+ $gwiOrder['ArticleQuantity']['value'] = 1;
716
+ $gwiOrder['ArticleUnitPrice']['value'] = $gwiPrice;
717
+ $gwiOrder['ArticleVatcategory']['value'] = $gwTax;
718
+
719
+ $group[] = $gwiOrder;
720
+ }
721
+ }
722
+
723
+ end($group);// move the internal pointer to the end of the array
724
+ $key = (int)key($group);
725
+ $fee = (double) $creditmemo->getBuckarooFee();
726
+
727
+ if ($fee > 0) {
728
+ $feeTax = (double) $creditmemo->getBuckarooFeeTax();
729
+
730
+ $feeArticle['ArticleDescription']['value'] = 'Servicekosten';
731
+ $feeArticle['ArticleId']['value'] = 1;
732
+ $feeArticle['ArticleQuantity']['value'] = 1;
733
+ $feeArticle['ArticleUnitPrice']['value'] = round($fee + $feeTax, 2);
734
+ $feeArticle['ArticleVatcategory']['value'] = $this->_getTaxCategory(Mage::getStoreConfig('tax/classes/buckaroo_fee', Mage::app()->getStore()->getId()));
735
+
736
+ $feeGroupId = $key+1;
737
+ $group[$feeGroupId] = $feeArticle;
738
+ }
739
+
740
+ $requestArray = array('Articles' => $group);
741
+
742
+ if (array_key_exists('customVars', $vars) && is_array($vars['customVars'][$this->_method])) {
743
+ $vars['customVars'][$this->_method] = array_merge($vars['customVars'][$this->_method], $requestArray);
744
+ } else {
745
+ $vars['customVars'][$this->_method] = $requestArray;
746
+ }
747
+
748
+ $shippingCosts = round($creditmemo->getBaseShippingAmount(), 2);
749
+
750
+ if ($shippingCosts > 0) {
751
+ $shippingInfo = array(
752
+ 'ShippingCosts' => $shippingCosts,
753
+ );
754
+
755
+ if (array_key_exists('customVars', $vars) && is_array($vars['customVars'][$this->_method])) {
756
+ $vars['customVars'][$this->_method] = array_merge($vars['customVars'][$this->_method], $shippingInfo);
757
+ } else {
758
+ $vars['customVars'][$this->_method] = $shippingInfo;
759
+ }
760
+ }
761
+ }
762
+
763
  protected function _getPaymentFeeLine()
764
  {
765
  $fee = (double) $this->_order->getBuckarooFee();
777
  }
778
 
779
  /**
780
+ * @param Mage_Sales_Model_Order_Item|Mage_Sales_Model_Order_Invoice_Item $item
781
  * @return array|bool|string
782
  */
783
+ protected function _getTaxClassId($item)
784
  {
785
  return Mage::getResourceModel('catalog/product')->getAttributeRawValue($item->getProductId(), 'tax_class_id', $item->getStoreId());
786
  }
897
  return $return;
898
  }
899
 
900
+ /**
901
+ * @param $telephoneNumber
902
+ * @return array
903
+ */
904
+ protected function _processPhoneNumberBe($telephoneNumber)
905
+ {
906
+ $number = $telephoneNumber;
907
+
908
+ //the final output must like this: 003212345678 for mobile: 0032461234567
909
+ //so 13 characters max else number is not valid
910
+ //but for some error correction we try to find if there is some faulty notation
911
+
912
+ $return = array("orginal" => $number, "clean" => false, "mobile" => false, "valid" => false);
913
+
914
+ //first strip out the non-numeric characters:
915
+ $match = preg_replace('/[^0-9]/Uis', '', $number);
916
+ if ($match) {
917
+ $number = $match;
918
+ }
919
+
920
+ $return['mobile'] = $this->_isMobileNumberBe($number);
921
+ $numberLength = strlen((string)$number);
922
+
923
+ if (($return['mobile'] && $numberLength == 13) || (!$return['mobile'] && $numberLength == 12)) {
924
+ //if the length equal to 12 or 13 is, then we can check if the number is valid
925
+ $return['valid'] = true;
926
+ $return['clean'] = $number;
927
+ } elseif ($numberLength > 13 || (!$return['mobile'] && $numberLength > 12)) {
928
+ //if the number is bigger then 13, it means that there are probably a zero to much
929
+ $return['clean'] = $this->_isValidNotationBe($number);
930
+ $cleanLength = strlen((string)$return['clean']);
931
+
932
+ if (($return['mobile'] && $cleanLength == 13) || (!$return['mobile'] && $cleanLength == 12)) {
933
+ $return['valid'] = true;
934
+ }
935
+ } elseif (($return['mobile'] && ($numberLength == 11 || $numberLength == 12))
936
+ || (!$return['mobile'] && ($numberLength == 10 || $numberLength == 11))
937
+ ) {
938
+ //if the number is equal to 10, 11 or 12, it means that they used a + in their number instead of 00
939
+ $return['clean'] = $this->_isValidNotationBe($number);
940
+ $cleanLength = strlen((string)$return['clean']);
941
+
942
+ if (($return['mobile'] && $cleanLength == 13) || (!$return['mobile'] && $cleanLength == 12)) {
943
+ $return['valid'] = true;
944
+ }
945
+ } elseif (($return['mobile'] && $numberLength == 10) || (!$return['mobile'] && $numberLength == 9)) {
946
+ //this means that the user has no trailing "0032" and therfore only
947
+ $return['clean'] = '0032'.substr($number, 1);
948
+ $cleanLength = strlen((string)$return['clean']);
949
+
950
+ if (($return['mobile'] && $cleanLength == 13) || (!$return['mobile'] && $cleanLength == 12)) {
951
+ $return['valid'] = true;
952
+ }
953
+ } else {
954
+ $return['mobile'] = $this->_isMobileNumberBe($number);
955
+ //now we can almost say that the number is valid
956
+ $return['valid'] = true;
957
+ $return['clean'] = $number;
958
+ }
959
+
960
+ return $return;
961
+ }
962
+
963
  /**
964
  * Checks if shipping-address is different from billing-address
965
  *
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Afterpay/PaymentMethod.php CHANGED
@@ -30,15 +30,56 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_PaymentMethod extends
30
 
31
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_afterpay_checkout_form';
32
 
 
33
  protected $_canRefund = true;
34
- protected $_canRefundInvoicePartial = false;
35
 
36
- public function getOrderPlaceRedirectUrl()
 
 
 
37
  {
38
- $session = Mage::getSingleton('checkout/session');
 
 
39
 
40
- $post = Mage::app()->getRequest()->getPost();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
 
 
 
 
 
 
 
42
  $accountNumber = isset($post[$this->_code . '_bpe_customer_account_number']) ? $post[$this->_code . '_bpe_customer_account_number'] : '';
43
 
44
  $customerBirthDate = date(
@@ -60,13 +101,22 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_PaymentMethod extends
60
  $additionalArray = array(
61
  'BPE_CompanyCOCRegistration' => $post[$this->_code . '_BPE_CompanyCOCRegistration'],
62
  'BPE_CompanyName' => $post[$this->_code . '_BPE_CompanyName'],
63
- 'BPE_CostCentre' => $post[$this->_code . '_BPE_CostCentre'],
64
- 'BPE_VatNumber' => $post[$this->_code . '_BPE_VatNumber'],
65
  );
66
 
67
  $array = array_merge($array,$additionalArray);
68
  }
69
 
 
 
 
 
 
 
 
 
 
 
 
70
  $session->setData('additionalFields',$array);
71
 
72
  return parent::getOrderPlaceRedirectUrl();
@@ -86,6 +136,12 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_PaymentMethod extends
86
 
87
  $this->getInfoInstance()->setAdditionalInformation('checked_terms_and_conditions', true);
88
 
 
 
 
 
 
 
89
  return parent::validate();
90
  }
91
 
@@ -192,6 +248,17 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_PaymentMethod extends
192
  return false;
193
  }
194
 
 
 
 
 
 
 
 
 
 
 
 
195
  $canUseBuckaroo = TIG_Buckaroo3Extended_Model_Request_Availability::canUseBuckaroo($quote);
196
 
197
  return $canUseBuckaroo;
30
 
31
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_afterpay_checkout_form';
32
 
33
+ protected $_canOrder = true;
34
  protected $_canRefund = true;
35
+ protected $_canRefundInvoicePartial = true;
36
 
37
+ /**
38
+ * {@inheritdoc}
39
+ */
40
+ public function canCapture()
41
  {
42
+ if ($this->getConfigPaymentAction() == Mage_Payment_Model_Method_Abstract::ACTION_ORDER) {
43
+ return false;
44
+ }
45
 
46
+ return $this->_canCapture;
47
+ }
48
+
49
+ /**
50
+ * {@inheritdoc}
51
+ */
52
+ public function capture(Varien_Object $payment, $amount)
53
+ {
54
+ if (!$this->canCapture()) {
55
+ Mage::throwException(Mage::helper('payment')->__('Capture action is not available.'));
56
+ }
57
+
58
+ /** @var TIG_Buckaroo3Extended_Model_Request_Capture $captureRequest */
59
+ $captureRequest = Mage::getModel(
60
+ 'buckaroo3extended/request_capture',
61
+ array(
62
+ 'payment' => $payment
63
+ )
64
+ );
65
+
66
+ try {
67
+ $captureRequest->sendRequest();
68
+ } catch (Exception $e) {
69
+ Mage::helper('buckaroo3extended')->logException($e);
70
+ Mage::throwException($e->getMessage());
71
+ }
72
+
73
+ return $this;
74
+ }
75
 
76
+ /**
77
+ * @param $post
78
+ *
79
+ * @return array
80
+ */
81
+ protected function _getBPEPostData($post)
82
+ {
83
  $accountNumber = isset($post[$this->_code . '_bpe_customer_account_number']) ? $post[$this->_code . '_bpe_customer_account_number'] : '';
84
 
85
  $customerBirthDate = date(
101
  $additionalArray = array(
102
  'BPE_CompanyCOCRegistration' => $post[$this->_code . '_BPE_CompanyCOCRegistration'],
103
  'BPE_CompanyName' => $post[$this->_code . '_BPE_CompanyName'],
 
 
104
  );
105
 
106
  $array = array_merge($array,$additionalArray);
107
  }
108
 
109
+ return $array;
110
+ }
111
+
112
+ public function getOrderPlaceRedirectUrl()
113
+ {
114
+ $session = Mage::getSingleton('checkout/session');
115
+
116
+ $post = Mage::app()->getRequest()->getPost();
117
+
118
+ $array = $this->_getBPEPostData($post);
119
+
120
  $session->setData('additionalFields',$array);
121
 
122
  return parent::getOrderPlaceRedirectUrl();
136
 
137
  $this->getInfoInstance()->setAdditionalInformation('checked_terms_and_conditions', true);
138
 
139
+ $BPEArray = $this->_getBPEPostData($postData);
140
+
141
+ foreach ($BPEArray as $key => $value) {
142
+ $this->getInfoInstance()->setAdditionalInformation($key, $value);
143
+ }
144
+
145
  return parent::validate();
146
  }
147
 
248
  return false;
249
  }
250
 
251
+ //Afterpay B2B cannot be used when ordering with a BE address
252
+ $paymethod = Mage::getStoreConfig('buckaroo/' . $this->_code . '/paymethod', $storeId);
253
+ $business = Mage::getStoreConfig('buckaroo/' . $this->_code . '/business', $storeId);
254
+ if ($quote
255
+ && $paymethod == 'afterpaydigiaccept'
256
+ && $business == '2'
257
+ && $quote->getBillingAddress()->getCountry() == 'BE'
258
+ ) {
259
+ return false;
260
+ }
261
+
262
  $canUseBuckaroo = TIG_Buckaroo3Extended_Model_Request_Availability::canUseBuckaroo($quote);
263
 
264
  return $canUseBuckaroo;
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Directdebit/PaymentMethod.php CHANGED
@@ -10,6 +10,10 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Directdebit_PaymentMethod exten
10
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_directdebit_checkout_form';
11
  protected $_infoBlockType = 'buckaroo3extended/paymentMethods_directdebit_info';
12
 
 
 
 
 
13
  public function getOrderPlaceRedirectUrl()
14
  {
15
  $session = Mage::getSingleton('checkout/session');
10
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_directdebit_checkout_form';
11
  protected $_infoBlockType = 'buckaroo3extended/paymentMethods_directdebit_info';
12
 
13
+ protected $_orderMailStatusses = array( TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_SUCCESS,
14
+ TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_PENDING_PAYMENT);
15
+
16
+
17
  public function getOrderPlaceRedirectUrl()
18
  {
19
  $session = Mage::getSingleton('checkout/session');
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/PaymentMethod.php CHANGED
@@ -35,6 +35,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_PaymentMethod extends Mage_Paym
35
  protected $_canUseCheckout = true;
36
  protected $_canUseForMultishipping = false;
37
  protected $_canSaveCc = false;
 
38
 
39
  protected $_payment;
40
 
@@ -244,4 +245,28 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_PaymentMethod extends Mage_Paym
244
 
245
  return $this;
246
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  }
35
  protected $_canUseCheckout = true;
36
  protected $_canUseForMultishipping = false;
37
  protected $_canSaveCc = false;
38
+ protected $_orderMailStatusses = array( TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_SUCCESS);
39
 
40
  protected $_payment;
41
 
245
 
246
  return $this;
247
  }
248
+
249
+ public function shouldSendOrderConfirmEmailForStatus($status)
250
+ {
251
+ return in_array($status, $this->_orderMailStatusses);
252
+ }
253
+
254
+ public function getConfigData($field, $storeId = null)
255
+ {
256
+ if (null === $storeId) {
257
+ $storeId = $this->getStore();
258
+ }
259
+
260
+ switch ($field) {
261
+ case 'payment_action':
262
+ $pathStart = 'buckaroo';
263
+ break;
264
+ default:
265
+ $pathStart = 'payment';
266
+ break;
267
+ }
268
+
269
+ $path = $pathStart.'/'.$this->getCode().'/'.$field;
270
+ return Mage::getStoreConfig($path, $storeId);
271
+ }
272
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Paypal/PaymentMethod.php CHANGED
@@ -29,4 +29,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Paypal_PaymentMethod extends TI
29
  protected $_code = 'buckaroo3extended_paypal';
30
 
31
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_paypal_checkout_form';
 
 
 
32
  }
29
  protected $_code = 'buckaroo3extended_paypal';
30
 
31
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_paypal_checkout_form';
32
+
33
+ protected $_orderMailStatusses = array( TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_SUCCESS, TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_PENDING_PAYMENT);
34
+
35
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Sofortueberweisung/PaymentMethod.php CHANGED
@@ -9,4 +9,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Sofortueberweisung_PaymentMetho
9
  protected $_code = 'buckaroo3extended_sofortueberweisung';
10
 
11
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_sofortueberweisung_checkout_form';
 
 
 
12
  }
9
  protected $_code = 'buckaroo3extended_sofortueberweisung';
10
 
11
  protected $_formBlockType = 'buckaroo3extended/paymentMethods_sofortueberweisung_checkout_form';
12
+
13
+ protected $_orderMailStatusses = array( TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_SUCCESS, TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_PENDING_PAYMENT);
14
+
15
  }
app/code/community/TIG/Buckaroo3Extended/Model/PaymentMethods/Transfer/PaymentMethod.php CHANGED
@@ -20,6 +20,7 @@ class TIG_Buckaroo3Extended_Model_PaymentMethods_Transfer_PaymentMethod extends
20
 
21
  protected $_canRefund = false;
22
  protected $_canRefundInvoicePartial = false;
 
23
 
24
  public function getOrderPlaceRedirectUrl()
25
  {
20
 
21
  protected $_canRefund = false;
22
  protected $_canRefundInvoicePartial = false;
23
+ protected $_orderMailStatusses = array( TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_SUCCESS, TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_PENDING_PAYMENT);
24
 
25
  public function getOrderPlaceRedirectUrl()
26
  {
app/code/community/TIG/Buckaroo3Extended/Model/Refund/Creditmemo.php CHANGED
@@ -96,6 +96,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
96
 
97
  $order = $this->_order;
98
 
 
99
  $service = Mage::getModel('sales/service_order', $order);
100
 
101
  $savedData = $this->_getItemData($data);
@@ -275,7 +276,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Creditmemo extends TIG_Buckaroo3Extende
275
  $items = array();
276
  foreach ($this->_order->getAllItems() as $orderItem)
277
  {
278
- if (!in_array($orderItem->getId(), array_flip($items))) {
279
 
280
  $creditAmount = 0;
281
  if (isset($this->_postArray['brq_amount_credit'])) {
96
 
97
  $order = $this->_order;
98
 
99
+ /** @var Mage_Sales_Model_Service_Order $service */
100
  $service = Mage::getModel('sales/service_order', $order);
101
 
102
  $savedData = $this->_getItemData($data);
276
  $items = array();
277
  foreach ($this->_order->getAllItems() as $orderItem)
278
  {
279
+ if (!array_key_exists($orderItem->getId(),$items)) {
280
 
281
  $creditAmount = 0;
282
  if (isset($this->_postArray['brq_amount_credit'])) {
app/code/community/TIG/Buckaroo3Extended/Model/Refund/Request/Abstract.php CHANGED
@@ -59,7 +59,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Request_Abstract extends TIG_Buckaroo3E
59
  $this->setOrder($data['payment']->getOrder());
60
  $this->setSession(Mage::getSingleton('core/session'));
61
 
62
- $invoice = $this->loadInvoiceByTransactionId($this->_order->getTransactionKey());
63
 
64
  if ($invoice === false) {
65
  Mage::throwException($this->_getHelper()->__('Refund action is not available.'));
@@ -88,6 +88,19 @@ class TIG_Buckaroo3Extended_Model_Refund_Request_Abstract extends TIG_Buckaroo3E
88
  return $this;
89
  }
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  protected function _sendRefundRequest()
92
  {
93
  $this->_debugEmail .= 'Chosen payment method: ' . $this->_method . "\n";
@@ -110,7 +123,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Request_Abstract extends TIG_Buckaroo3E
110
  $this->_debugEmail .= "Firing request events. \n";
111
  //event that allows individual payment methods to add additional variables such as bankaccount number
112
  Mage::dispatchEvent('buckaroo3extended_refund_request_addservices', array('request' => $this, 'order' => $this->_order));
113
- Mage::dispatchEvent('buckaroo3extended_refund_request_addcustomvars', array('request' => $this, 'order' => $this->_order));
114
 
115
  $this->_debugEmail .= "Events fired! \n";
116
 
59
  $this->setOrder($data['payment']->getOrder());
60
  $this->setSession(Mage::getSingleton('core/session'));
61
 
62
+ $invoice = $this->loadInvoiceByTransactionId($this->_getTransactionId());
63
 
64
  if ($invoice === false) {
65
  Mage::throwException($this->_getHelper()->__('Refund action is not available.'));
88
  return $this;
89
  }
90
 
91
+ /**
92
+ * @return string
93
+ */
94
+ protected function _getTransactionId() {
95
+ if ($this->_payment->getParentTransactionId()) {
96
+ return $this->_payment->getParentTransactionId();
97
+ } elseif ($this->_payment->getLastTransId()) {
98
+ return $this->_payment->getLastTransId();
99
+ }
100
+
101
+ return $this->_order->getTransactionKey();
102
+ }
103
+
104
  protected function _sendRefundRequest()
105
  {
106
  $this->_debugEmail .= 'Chosen payment method: ' . $this->_method . "\n";
123
  $this->_debugEmail .= "Firing request events. \n";
124
  //event that allows individual payment methods to add additional variables such as bankaccount number
125
  Mage::dispatchEvent('buckaroo3extended_refund_request_addservices', array('request' => $this, 'order' => $this->_order));
126
+ Mage::dispatchEvent('buckaroo3extended_refund_request_addcustomvars', array('request' => $this, 'order' => $this->_order, 'payment' => $this->_payment));
127
 
128
  $this->_debugEmail .= "Events fired! \n";
129
 
app/code/community/TIG/Buckaroo3Extended/Model/Refund/Response/Abstract.php CHANGED
@@ -57,7 +57,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Response_Abstract extends TIG_Buckaroo3
57
  }
58
 
59
 
60
- protected function _success()
61
  {
62
  $this->_debugEmail .= 'The refund request has been accepted \n';
63
 
@@ -66,7 +66,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Response_Abstract extends TIG_Buckaroo3
66
  return $this;
67
  }
68
 
69
- protected function _rejected()
70
  {
71
  $this->_debugEmail .= 'The refund request has been rejected \n';
72
 
@@ -79,7 +79,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Response_Abstract extends TIG_Buckaroo3
79
  return $this;
80
  }
81
 
82
- protected function _failed()
83
  {
84
  $this->_debugEmail .= 'The transaction request has failed. \n';
85
 
@@ -90,7 +90,7 @@ class TIG_Buckaroo3Extended_Model_Refund_Response_Abstract extends TIG_Buckaroo3
90
  Mage::throwException(Mage::helper('buckaroo3extended')->__($this->_response->Status->Code->_));
91
  }
92
 
93
- protected function _error()
94
  {
95
  $this->_debugEmail .= 'The transaction request produced an error. \n';
96
 
57
  }
58
 
59
 
60
+ protected function _success($status = self::BUCKAROO_SUCCESS)
61
  {
62
  $this->_debugEmail .= 'The refund request has been accepted \n';
63
 
66
  return $this;
67
  }
68
 
69
+ protected function _rejected($message = '')
70
  {
71
  $this->_debugEmail .= 'The refund request has been rejected \n';
72
 
79
  return $this;
80
  }
81
 
82
+ protected function _failed($message = '')
83
  {
84
  $this->_debugEmail .= 'The transaction request has failed. \n';
85
 
90
  Mage::throwException(Mage::helper('buckaroo3extended')->__($this->_response->Status->Code->_));
91
  }
92
 
93
+ protected function _error($message = '')
94
  {
95
  $this->_debugEmail .= 'The transaction request produced an error. \n';
96
 
app/code/community/TIG/Buckaroo3Extended/Model/Request/Abstract.php CHANGED
@@ -201,7 +201,10 @@ class TIG_Buckaroo3Extended_Model_Request_Abstract extends TIG_Buckaroo3Extended
201
 
202
  protected function _addShopVariables()
203
  {
204
- $returnUrl = Mage::getUrl('buckaroo3extended/notify/return', array('_secure' => true));
 
 
 
205
 
206
  $merchantKey = Mage::getStoreConfig('buckaroo/buckaroo3extended/key', $this->_order->getStoreId());
207
  $description = Mage::getStoreConfig('buckaroo/buckaroo3extended/payment_description', $this->_order->getStoreId());
@@ -272,4 +275,62 @@ class TIG_Buckaroo3Extended_Model_Request_Abstract extends TIG_Buckaroo3Extended
272
 
273
  $this->_debugEmail .= "Refund variables added! \n";
274
  }
275
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
 
202
  protected function _addShopVariables()
203
  {
204
+ $returnUrl = Mage::getUrl('buckaroo3extended/notify/return', array(
205
+ '_secure' => true,
206
+ '_store' => $this->_order->getStoreId(),
207
+ ));
208
 
209
  $merchantKey = Mage::getStoreConfig('buckaroo/buckaroo3extended/key', $this->_order->getStoreId());
210
  $description = Mage::getStoreConfig('buckaroo/buckaroo3extended/payment_description', $this->_order->getStoreId());
275
 
276
  $this->_debugEmail .= "Refund variables added! \n";
277
  }
278
+
279
+ /**
280
+ * Add variables for Capture requests
281
+ */
282
+ protected function _addCaptureVariables()
283
+ {
284
+ $this->_vars['OriginalTransactionKey'] = $this->_order->getTransactionKey();
285
+
286
+ /** @var Mage_Sales_Model_Resource_Order_Invoice_Collection $invoiceCollection */
287
+ $invoiceCollection = $this->_order->getInvoiceCollection();
288
+
289
+ /** @var Mage_Sales_Model_Order_Invoice $lastInvoice */
290
+ $lastInvoice = $invoiceCollection->getLastItem();
291
+
292
+ if ($this->_currentCurrencyIsAllowed()) {
293
+ $partialAmount = $lastInvoice->getGrandTotal();
294
+ } else {
295
+ $partialAmount = $lastInvoice->getBaseGrandTotal();
296
+ }
297
+
298
+ if ($partialAmount < $this->_vars['amountDebit']) {
299
+ $this->_vars['amountDebit'] = $partialAmount;
300
+ $this->_vars['invoiceId'] = $this->_order->getIncrementId() . '-'
301
+ . count($invoiceCollection) . '-' . substr(md5(date("YMDHis")), 0, 6);
302
+ }
303
+
304
+ $this->_debugEmail .= "Capture variables added! \n";
305
+ }
306
+
307
+ /**
308
+ * Add variables for Cancel Authorize requests.
309
+ * AmountDebit and AmountCredit are swapped since this is not a pay request, but a cancel one.
310
+ */
311
+ protected function _addCancelAuthorizeVariables()
312
+ {
313
+ $currentCurrencyIsAllowed = $this->_currentCurrencyIsAllowed();
314
+ $amountDebit = $this->_order->getBaseGrandTotal();
315
+
316
+ if ($currentCurrencyIsAllowed) {
317
+ $amountDebit = $this->_order->getGrandTotal();
318
+ }
319
+
320
+ /** @var Mage_Sales_Model_Resource_Order_Invoice_Collection $invoiceCollection */
321
+ $invoiceCollection = $this->_order->getInvoiceCollection();
322
+
323
+ /** @var Mage_Sales_Model_Order_Invoice $invoice */
324
+ foreach ($invoiceCollection as $invoice) {
325
+ if ($currentCurrencyIsAllowed) {
326
+ $amountDebit -= $invoice->getGrandTotal();
327
+ } else {
328
+ $amountDebit -= $invoice->getBaseGrandTotal();
329
+ }
330
+ }
331
+
332
+ $this->_vars['OriginalTransactionKey'] = $this->_order->getTransactionKey();
333
+ $this->_vars['amountCredit'] = $amountDebit;
334
+ $this->_vars['amountDebit'] = 0;
335
+ }
336
+ }
app/code/community/TIG/Buckaroo3Extended/Model/Request/CancelAuthorize.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Model_Request_CancelAuthorize extends TIG_Buckaroo3Extended_Model_Request_Abstract
40
+ {
41
+ protected $_payment;
42
+
43
+ /**
44
+ * @param $payment
45
+ */
46
+ public function setPayment($payment)
47
+ {
48
+ $this->_payment = $payment;
49
+ }
50
+
51
+ /**
52
+ * @return mixed
53
+ */
54
+ public function getPayment()
55
+ {
56
+ return $this->_payment;
57
+ }
58
+
59
+ /**
60
+ * @param array $params
61
+ */
62
+ public function __construct($params = array())
63
+ {
64
+ $this->setPayment($params['payment']);
65
+ $this->setOrder($params['payment']->getOrder());
66
+
67
+ parent::__construct();
68
+
69
+ // make the response use quote as order
70
+ $this->setResponseModelClass('buckaroo3extended/response_cancelAuthorize');
71
+ }
72
+
73
+ /**
74
+ * The responsemodel in the catch needs extra data that the abstract doesn't provide
75
+ *
76
+ * {@inheritdoc}
77
+ */
78
+ public function sendRequest()
79
+ {
80
+ try {
81
+ return $this->_sendRequest();
82
+ } catch (Exception $e) {
83
+ Mage::helper('buckaroo3extended')->logException($e);
84
+ $responseModel = Mage::getModel($this->_responseModelClass, array(
85
+ 'response' => false,
86
+ 'XML' => false,
87
+ 'debugEmail' => $this->_debugEmail,
88
+ 'payment' => $this->_payment
89
+ ));
90
+ return $responseModel->setOrder($this->_order)
91
+ ->processResponse();
92
+ }
93
+ }
94
+
95
+ /**
96
+ * @return mixed
97
+ */
98
+ protected function _sendRequest()
99
+ {
100
+ Mage::dispatchEvent('buckaroo3extended_request_setmethod', array('request' => $this, 'order' => $this->_order));
101
+
102
+ $this->_debugEmail .= 'Chosen payment method: ' . $this->_method . "\n";
103
+
104
+ $this->_debugEmail .= "\n";
105
+ //forms an array with all payment-independant variables (such as merchantkey, order id etc.) which are required for the transaction request
106
+ $this->_addBaseVariables();
107
+ $this->_addOrderVariables();
108
+ $this->_addShopVariables();
109
+ $this->_addSoftwareVariables();
110
+ $this->_addCancelAuthorizeVariables();
111
+
112
+ $this->_debugEmail .= "Firing request events. \n";
113
+ //event that allows individual payment methods to add additional variables such as bankaccount number
114
+ Mage::dispatchEvent('buckaroo3extended_cancelauthorize_request_addservices', array('request' => $this, 'order' => $this->_order));
115
+ Mage::dispatchEvent('buckaroo3extended_cancelauthorize_request_addcustomvars', array('request' => $this, 'order' => $this->_order));
116
+ Mage::dispatchEvent('buckaroo3extended_cancelauthorize_request_addcustomparameters', array('request' => $this, 'order' => $this->_order));
117
+
118
+ $this->_debugEmail .= "Events fired! \n";
119
+
120
+ //clean the array for a soap request
121
+ $this->setVars($this->_cleanArrayForSoap($this->getVars()));
122
+
123
+ $this->_debugEmail .= "Variable array:" . var_export($this->_vars, true) . "\n\n";
124
+ $this->_debugEmail .= "Building SOAP request... \n";
125
+
126
+ //send the transaction request using SOAP
127
+ /** @var TIG_Buckaroo3Extended_Model_Soap $soap */
128
+ $soap = Mage::getModel('buckaroo3extended/soap', array('vars' => $this->getVars(), 'method' => $this->getMethod()));
129
+ list($response, $responseXML, $requestXML) = $soap->transactionRequest();
130
+
131
+
132
+ $this->_debugEmail .= "The SOAP request has been sent. \n";
133
+
134
+ if (!is_object($requestXML) || !is_object($responseXML)) {
135
+ $this->_debugEmail .= "Request or response was not an object \n";
136
+ } else {
137
+ $this->_debugEmail .= "Request: " . var_export($requestXML->saveXML(), true) . "\n";
138
+ $this->_debugEmail .= "Response: " . var_export($response, true) . "\n";
139
+ $this->_debugEmail .= "Response XML:" . var_export($responseXML->saveXML(), true) . "\n\n";
140
+ }
141
+
142
+ $this->_debugEmail .= "Processing response... \n";
143
+
144
+ //process the response
145
+ $responseModel = Mage::getModel($this->_responseModelClass, array(
146
+ 'response' => $response,
147
+ 'XML' => $responseXML,
148
+ 'debugEmail' => $this->_debugEmail,
149
+ 'payment' => $this->_payment,
150
+ ));
151
+
152
+ if (!$responseModel->getOrder()) {
153
+ $responseModel->setOrder($this->_order);
154
+ }
155
+ return $responseModel->processResponse();
156
+ }
157
+ }
app/code/community/TIG/Buckaroo3Extended/Model/Request/Capture.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Model_Request_Capture extends TIG_Buckaroo3Extended_Model_Request_Abstract
40
+ {
41
+ protected $_payment;
42
+
43
+ /**
44
+ * @param $payment
45
+ */
46
+ public function setPayment($payment)
47
+ {
48
+ $this->_payment = $payment;
49
+ }
50
+
51
+ /**
52
+ * @return mixed
53
+ */
54
+ public function getPayment()
55
+ {
56
+ return $this->_payment;
57
+ }
58
+
59
+ /**
60
+ * @param array $params
61
+ */
62
+ public function __construct($params = array())
63
+ {
64
+ $this->setPayment($params['payment']);
65
+ $this->setOrder($params['payment']->getOrder());
66
+
67
+ parent::__construct();
68
+
69
+ // make the response use quote as order
70
+ $this->setResponseModelClass('buckaroo3extended/response_capture');
71
+ }
72
+
73
+ /**
74
+ * The responsemodel in the catch needs extra data that the abstract doesn't provide
75
+ *
76
+ * {@inheritdoc}
77
+ */
78
+ public function sendRequest()
79
+ {
80
+ try {
81
+ return $this->_sendRequest();
82
+ } catch (Exception $e) {
83
+ Mage::helper('buckaroo3extended')->logException($e);
84
+ $responseModel = Mage::getModel($this->_responseModelClass, array(
85
+ 'response' => false,
86
+ 'XML' => false,
87
+ 'debugEmail' => $this->_debugEmail,
88
+ 'payment' => $this->_payment
89
+ ));
90
+ return $responseModel->setOrder($this->_order)
91
+ ->processResponse();
92
+ }
93
+ }
94
+
95
+ /**
96
+ * @return mixed
97
+ */
98
+ protected function _sendRequest()
99
+ {
100
+ Mage::dispatchEvent('buckaroo3extended_request_setmethod', array('request' => $this, 'order' => $this->_order));
101
+
102
+ $this->_debugEmail .= 'Chosen payment method: ' . $this->_method . "\n";
103
+
104
+ $this->_debugEmail .= "\n";
105
+ //forms an array with all payment-independant variables (such as merchantkey, order id etc.) which are required for the transaction request
106
+ $this->_addBaseVariables();
107
+ $this->_addOrderVariables();
108
+ $this->_addShopVariables();
109
+ $this->_addSoftwareVariables();
110
+ $this->_addCaptureVariables();
111
+
112
+ $this->_debugEmail .= "Firing request events. \n";
113
+ //event that allows individual payment methods to add additional variables such as bankaccount number
114
+ Mage::dispatchEvent('buckaroo3extended_capture_request_addservices', array('request' => $this, 'order' => $this->_order));
115
+ Mage::dispatchEvent('buckaroo3extended_capture_request_addcustomvars', array('request' => $this, 'order' => $this->_order));
116
+ Mage::dispatchEvent('buckaroo3extended_capture_request_addcustomparameters', array('request' => $this, 'order' => $this->_order));
117
+
118
+ $this->_debugEmail .= "Events fired! \n";
119
+
120
+ //clean the array for a soap request
121
+ $this->setVars($this->_cleanArrayForSoap($this->getVars()));
122
+
123
+ $this->_debugEmail .= "Variable array:" . var_export($this->_vars, true) . "\n\n";
124
+ $this->_debugEmail .= "Building SOAP request... \n";
125
+
126
+ //send the transaction request using SOAP
127
+ /** @var TIG_Buckaroo3Extended_Model_Soap $soap */
128
+ $soap = Mage::getModel('buckaroo3extended/soap', array('vars' => $this->getVars(), 'method' => $this->getMethod()));
129
+ list($response, $responseXML, $requestXML) = $soap->transactionRequest();
130
+
131
+
132
+ $this->_debugEmail .= "The SOAP request has been sent. \n";
133
+
134
+ if (!is_object($requestXML) || !is_object($responseXML)) {
135
+ $this->_debugEmail .= "Request or response was not an object \n";
136
+ } else {
137
+ $this->_debugEmail .= "Request: " . var_export($requestXML->saveXML(), true) . "\n";
138
+ $this->_debugEmail .= "Response: " . var_export($response, true) . "\n";
139
+ $this->_debugEmail .= "Response XML:" . var_export($responseXML->saveXML(), true) . "\n\n";
140
+ }
141
+
142
+ $this->_debugEmail .= "Processing response... \n";
143
+
144
+ //process the response
145
+ $responseModel = Mage::getModel($this->_responseModelClass, array(
146
+ 'response' => $response,
147
+ 'XML' => $responseXML,
148
+ 'debugEmail' => $this->_debugEmail,
149
+ 'payment' => $this->_payment,
150
+ ));
151
+
152
+ if (!$responseModel->getOrder()) {
153
+ $responseModel->setOrder($this->_order);
154
+ }
155
+ return $responseModel->processResponse();
156
+ }
157
+ }
app/code/community/TIG/Buckaroo3Extended/Model/Response/Abstract.php CHANGED
@@ -216,14 +216,15 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
216
  */
217
  $payment = $this->_order->getPayment();
218
  $payment->registerAuthorizationNotification($this->_order->getBaseGrandTotal());
219
- $payment->getMethodInstance()->saveAdditionalData($this->_response);
 
220
 
221
  $shouldSend = Mage::getStoreConfig('buckaroo/' . $payment->getMethod() . '/order_email', $this->_order->getStoreId());
222
 
223
  /**
224
- * Do not send order confirmation email when the payment is still pending.
225
  */
226
- if ($status == self::BUCKAROO_PENDING_PAYMENT) {
227
  $shouldSend = false;
228
  }
229
 
@@ -263,11 +264,18 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
263
 
264
  $this->restoreQuote();
265
 
 
 
 
266
 
 
267
 
268
- Mage::getSingleton('core/session')->addError(
269
- $this->_getCorrectFailureMessage($message)
270
- );
 
 
 
271
 
272
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/cancel_on_failed', $this->_order->getStoreId())) {
273
  $this->_returnGiftcards($this->_order);
@@ -323,18 +331,6 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
323
 
324
  $paymentMethod = $this->_order->getPayment()->getMethod();
325
  switch($paymentMethod){
326
- case 'buckaroo3extended_afterpay':
327
- case 'buckaroo3extended_afterpay2':
328
- Mage::getSingleton('checkout/session')->setData('buckarooAfterpayRejected',true);
329
- $message = Mage::helper('buckaroo3extended')->__(
330
- "We are sorry to inform you that the request to pay afterwards with AfterPay is not possible at " .
331
- "this time. This can be due to various (temporary) reasons.<br/><br/> For questions about your " .
332
- "rejection you can contact the customer service of AfterPay. Or you can visit the website of " .
333
- "AfterPay and click 'Frequently asked questions' through this link " .
334
- "<a href='http://www.afterpay.nl/page/consument-faq'>http://www.afterpay.nl/page/consument-faq</a> " .
335
- "in the section 'Datacontrol'.<br/><br/> We advice you to choose a different payment method to complete your order."
336
- );
337
- break;
338
  default:
339
  $message = Mage::helper('buckaroo3extended')->__(
340
  $this->_getCorrectFailureMessage($message)
@@ -437,6 +433,42 @@ class TIG_Buckaroo3Extended_Model_Response_Abstract extends TIG_Buckaroo3Extende
437
  }
438
  }
439
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
440
  /**
441
  * return the giftcard amount, if there is one
442
  * @param $order Mage_Sales_Model_Order
216
  */
217
  $payment = $this->_order->getPayment();
218
  $payment->registerAuthorizationNotification($this->_order->getBaseGrandTotal());
219
+ $paymentMethodInstance = $payment->getMethodInstance();
220
+ $paymentMethodInstance->saveAdditionalData($this->_response);
221
 
222
  $shouldSend = Mage::getStoreConfig('buckaroo/' . $payment->getMethod() . '/order_email', $this->_order->getStoreId());
223
 
224
  /**
225
+ * Only send order confirmation email when payment status allows it.
226
  */
227
+ if (!$paymentMethodInstance->shouldSendOrderConfirmEmailForStatus($status)) {
228
  $shouldSend = false;
229
  }
230
 
264
 
265
  $this->restoreQuote();
266
 
267
+ $parsedResponse = $this->_parseResponse();
268
+ $billingCountry = $this->_order->getBillingAddress()->getCountry();
269
+ $serviceCode = $this->_response->ServiceCode;
270
 
271
+ $errorMessage = $this->_getCorrectFailureMessage($message);
272
 
273
+ if ($billingCountry == 'NL' && $parsedResponse['code'] == 490) {
274
+ $responseErrorMessage = $this->getResponseFailureMessage();
275
+ $errorMessage = strlen($responseErrorMessage) > 0 ? $responseErrorMessage : $errorMessage;
276
+ }
277
+
278
+ Mage::getSingleton('core/session')->addError($errorMessage);
279
 
280
  if (Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/cancel_on_failed', $this->_order->getStoreId())) {
281
  $this->_returnGiftcards($this->_order);
331
 
332
  $paymentMethod = $this->_order->getPayment()->getMethod();
333
  switch($paymentMethod){
 
 
 
 
 
 
 
 
 
 
 
 
334
  default:
335
  $message = Mage::helper('buckaroo3extended')->__(
336
  $this->_getCorrectFailureMessage($message)
433
  }
434
  }
435
 
436
+ /**
437
+ * @return null|string
438
+ */
439
+ private function getResponseFailureMessage()
440
+ {
441
+ $serviceCode = $this->_response->ServiceCode;
442
+
443
+ switch ($serviceCode) {
444
+ case 'afterpaydigiaccept':
445
+ case 'afterpayacceptgiro':
446
+ $transactionType = $this->_response->TransactionType;
447
+ $failureMessage = null;
448
+
449
+ //Only specific Afterpay responses have a custom response message
450
+ if ($transactionType == 'C011' || $transactionType == 'C016') {
451
+ $parsedResponse = $this->_parseResponse();
452
+ $subcodeMessage = explode(':', $parsedResponse['subCode']['message']);
453
+
454
+ if (count($subcodeMessage) > 1) {
455
+ array_shift($subcodeMessage);
456
+ }
457
+
458
+ $failureMessage = trim(implode(':', $subcodeMessage));
459
+ }
460
+ break;
461
+ case 'klarna':
462
+ $failureMessage = $this->_response->ConsumerMessage->HtmlText;
463
+ break;
464
+ default:
465
+ $failureMessage = null;
466
+ break;
467
+ }
468
+
469
+ return $failureMessage;
470
+ }
471
+
472
  /**
473
  * return the giftcard amount, if there is one
474
  * @param $order Mage_Sales_Model_Order
app/code/community/TIG/Buckaroo3Extended/Model/Response/BackendOrder.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  class TIG_Buckaroo3Extended_Model_Response_BackendOrder extends TIG_Buckaroo3Extended_Model_Response_Abstract
3
  {
4
- protected function _success()
5
  {
6
  $this->_debugEmail .= "The request was successful \n";
7
  if(!$this->_order->getEmailSent())
@@ -15,7 +15,7 @@ class TIG_Buckaroo3Extended_Model_Response_BackendOrder extends TIG_Buckaroo3Ext
15
  $this->sendDebugEmail();
16
  }
17
 
18
- protected function _failed()
19
  {
20
  $this->_debugEmail .= 'The request failed \n';
21
  $this->restoreQuote();
@@ -28,7 +28,7 @@ class TIG_Buckaroo3Extended_Model_Response_BackendOrder extends TIG_Buckaroo3Ext
28
  Mage::throwException('An error occurred while processing the payment request, check the Buckaroo debug e-mail for details.');
29
  }
30
 
31
- protected function _error()
32
  {
33
  $this->_debugEmail .= "The request generated an error \n";
34
 
@@ -58,9 +58,9 @@ class TIG_Buckaroo3Extended_Model_Response_BackendOrder extends TIG_Buckaroo3Ext
58
  $this->_success();
59
  }
60
 
61
- protected function _incorrectPayment()
62
  {
63
- $this->_error();
64
  }
65
 
66
  protected function _verifyError()
1
  <?php
2
  class TIG_Buckaroo3Extended_Model_Response_BackendOrder extends TIG_Buckaroo3Extended_Model_Response_Abstract
3
  {
4
+ protected function _success($status = self::BUCKAROO_SUCCESS)
5
  {
6
  $this->_debugEmail .= "The request was successful \n";
7
  if(!$this->_order->getEmailSent())
15
  $this->sendDebugEmail();
16
  }
17
 
18
+ protected function _failed($message = '')
19
  {
20
  $this->_debugEmail .= 'The request failed \n';
21
  $this->restoreQuote();
28
  Mage::throwException('An error occurred while processing the payment request, check the Buckaroo debug e-mail for details.');
29
  }
30
 
31
+ protected function _error($message = '')
32
  {
33
  $this->_debugEmail .= "The request generated an error \n";
34
 
58
  $this->_success();
59
  }
60
 
61
+ protected function _incorrectPayment($message = '')
62
  {
63
+ $this->_error($message);
64
  }
65
 
66
  protected function _verifyError()
app/code/community/TIG/Buckaroo3Extended/Model/Response/CancelAuthorize.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+
40
+ class TIG_Buckaroo3Extended_Model_Response_CancelAuthorize extends TIG_Buckaroo3Extended_Model_Response_BackendOrder
41
+ {
42
+ protected $_payment;
43
+
44
+ /**
45
+ * @param $payment
46
+ */
47
+ public function setPayment($payment)
48
+ {
49
+ $this->_payment = $payment;
50
+ }
51
+
52
+ /**
53
+ * @return mixed
54
+ */
55
+ public function getPayment()
56
+ {
57
+ return $this->_payment;
58
+ }
59
+
60
+ /**
61
+ * {@inheritdoc}
62
+ */
63
+ public function __construct($data)
64
+ {
65
+ if (!empty($data['payment'])) {
66
+ $this->setPayment($data['payment']);
67
+ }
68
+
69
+ parent::__construct($data);
70
+ }
71
+
72
+ /**
73
+ * {@inheritdoc}
74
+ */
75
+ public function processResponse()
76
+ {
77
+ if ($this->_response === false) {
78
+ $this->_debugEmail .= "An error occurred in building or sending the SOAP request.. \n";
79
+ return $this->_error();
80
+ }
81
+
82
+ $this->_debugEmail .= "verifiying authenticity of the response... \n";
83
+ $verified = $this->_verifyResponse();
84
+
85
+ if ($verified !== true) {
86
+ $this->_debugEmail .= "The authenticity of the response could NOT be verified. \n";
87
+ return $this->_verifyError();
88
+ }
89
+ $this->_debugEmail .= "Verified as authentic! \n\n";
90
+
91
+ if (is_object($this->_response)
92
+ && isset($this->_response->Key))
93
+ {
94
+ $this->_payment->setTransactionId($this->_response->Key);
95
+ $this->_debugEmail .= 'Transaction key saved: ' . $this->_response->Key . "\n";
96
+ }
97
+
98
+ $parsedResponse = $this->_parseResponse();
99
+ $this->_addSubCodeComment($parsedResponse);
100
+
101
+ $this->_debugEmail .= "Parsed response: " . var_export($parsedResponse, true) . "\n";
102
+
103
+ $this->_debugEmail .= "Dispatching custom order processing event... \n";
104
+ Mage::dispatchEvent(
105
+ 'buckaroo3extended_response_custom_processing',
106
+ array(
107
+ 'model' => $this,
108
+ 'order' => $this->getOrder(),
109
+ 'response' => $parsedResponse,
110
+ 'responseobject' => $this->_response,
111
+ )
112
+ );
113
+
114
+ return $this->_requiredAction($parsedResponse);
115
+ }
116
+
117
+ /**
118
+ * {@inheritdoc}
119
+ */
120
+ protected function _success($status = self::BUCKAROO_SUCCESS)
121
+ {
122
+ $this->_debugEmail .= "The request was successful \n";
123
+
124
+ $comment = Mage::helper('buckaroo3extended')->__('Buckaroo cancel request was successfully processed.');
125
+ $this->_order->addStatusHistoryComment($comment)->save();
126
+
127
+ $this->sendDebugEmail();
128
+ }
129
+
130
+ /**
131
+ * {@inheritdoc}
132
+ */
133
+ protected function _neutral()
134
+ {
135
+ $this->_debugEmail .= "The request was neutral \n";
136
+
137
+ $this->sendDebugEmail();
138
+ }
139
+
140
+ /**
141
+ * {@inheritdoc}
142
+ */
143
+ protected function _failed($message = '')
144
+ {
145
+ $this->_debugEmail .= 'The request failed \n';
146
+
147
+ $comment = Mage::helper('buckaroo3extended')->__('Unfortunately the Buckaroo cancel request could not be processed succesfully.');
148
+ $this->_order->addStatusHistoryComment($comment)->save();
149
+
150
+ $this->sendDebugEmail();
151
+
152
+ if (Mage::helper('buckaroo3extended')->isAdmin()) {
153
+ Mage::throwException('An error occurred while processing the payment request, check the Buckaroo debug e-mail for details.');
154
+ }
155
+ }
156
+
157
+ /**
158
+ * {@inheritdoc}
159
+ */
160
+ protected function _error($message = '')
161
+ {
162
+ $this->_debugEmail .= "The request generated an error \n";
163
+
164
+ $comment = Mage::helper('buckaroo3extended')->__('Unfortunately the Buckaroo cancel request could not be processed succesfully.');
165
+ $this->_order->addStatusHistoryComment($comment)->save();
166
+
167
+ $this->sendDebugEmail();
168
+
169
+ if (Mage::helper('buckaroo3extended')->isAdmin()) {
170
+ Mage::throwException('An error occurred while processing the payment request, check the Buckaroo debug e-mail for details.');
171
+ }
172
+ }
173
+ }
app/code/community/TIG/Buckaroo3Extended/Model/Response/Capture.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Model_Response_Capture extends TIG_Buckaroo3Extended_Model_Response_BackendOrder
40
+ {
41
+ protected $_payment;
42
+
43
+ /**
44
+ * {@inheritdoc}
45
+ */
46
+ public function __construct($data)
47
+ {
48
+ $this->setPayment($data['payment']);
49
+ parent::__construct($data);
50
+ }
51
+
52
+ /**
53
+ * @param $payment
54
+ */
55
+ public function setPayment($payment)
56
+ {
57
+ $this->_payment = $payment;
58
+ }
59
+
60
+ /**
61
+ * @return mixed
62
+ */
63
+ public function getPayment()
64
+ {
65
+ return $this->_payment;
66
+ }
67
+
68
+ /**
69
+ * {@inheritdoc}
70
+ */
71
+ public function processResponse()
72
+ {
73
+ if ($this->_response === false) {
74
+ $this->_debugEmail .= "An error occurred in building or sending the SOAP request.. \n";
75
+ return $this->_error();
76
+ }
77
+
78
+ $this->_debugEmail .= "verifiying authenticity of the response... \n";
79
+ $verified = $this->_verifyResponse();
80
+
81
+ if ($verified !== true) {
82
+ $this->_debugEmail .= "The authenticity of the response could NOT be verified. \n";
83
+ return $this->_verifyError();
84
+ }
85
+ $this->_debugEmail .= "Verified as authentic! \n\n";
86
+
87
+ if (is_object($this->_response)
88
+ && isset($this->_response->Key))
89
+ {
90
+ $this->_payment->setTransactionId($this->_response->Key);
91
+ $this->_debugEmail .= 'Transaction key saved: ' . $this->_response->Key . "\n";
92
+ }
93
+
94
+ $parsedResponse = $this->_parseResponse();
95
+ $this->_addSubCodeComment($parsedResponse);
96
+
97
+ $this->_debugEmail .= "Parsed response: " . var_export($parsedResponse, true) . "\n";
98
+
99
+ $this->_debugEmail .= "Dispatching custom order processing event... \n";
100
+ Mage::dispatchEvent(
101
+ 'buckaroo3extended_response_custom_processing',
102
+ array(
103
+ 'model' => $this,
104
+ 'order' => $this->getOrder(),
105
+ 'response' => $parsedResponse,
106
+ 'responseobject' => $this->_response,
107
+ )
108
+ );
109
+
110
+ return $this->_requiredAction($parsedResponse);
111
+ }
112
+
113
+ /**
114
+ * {@inheritdoc}
115
+ */
116
+ protected function _success($status = self::BUCKAROO_SUCCESS)
117
+ {
118
+ $this->_debugEmail .= "The request was successful \n";
119
+ if(!$this->_order->getEmailSent())
120
+ {
121
+ $this->_order->sendNewOrderEmail();
122
+ }
123
+
124
+ $this->sendDebugEmail();
125
+ }
126
+
127
+ /**
128
+ * {@inheritdoc}
129
+ */
130
+ protected function _neutral()
131
+ {
132
+ $this->_debugEmail .= "The request was neutral \n";
133
+
134
+ $this->sendDebugEmail();
135
+ }
136
+ }
app/code/community/TIG/Buckaroo3Extended/Model/Response/Push.php CHANGED
@@ -164,6 +164,31 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
164
  return true;
165
  }
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
  /**
169
  * Checks if the post received is valid by checking its signature field.
@@ -320,8 +345,22 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
320
  $this->_autoInvoice();
321
 
322
  $description = Mage::helper('buckaroo3extended')->__($description);
 
323
 
324
- $description .= " (#{$this->_postArray['brq_statuscode']})";
 
 
 
 
 
 
 
 
 
 
 
 
 
325
 
326
  //sets the transaction key if its defined ($trx)
327
  //will retrieve it from the response array, if response actually is an array
@@ -521,6 +560,12 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
521
  return false;
522
  }
523
 
 
 
 
 
 
 
524
  //returns true if invoice has been made, else false
525
  $invoiceSaved = $this->_saveInvoice();
526
 
@@ -586,7 +631,7 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
586
 
587
  //sort the array
588
  $sortableArray = $this->buckarooSort($origArray);
589
-
590
  //check if encoding is used for the received postData
591
  $doUrlDecode = $this->_checkDoubleEncoding($sortableArray['brq_timestamp']);
592
  $this->_debugEmail .= "URL Encoding = " . var_export($doUrlDecode, true) . "\n";
@@ -598,7 +643,7 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
598
  && 'brq_SERVICE_masterpass_ShippingRecipientPhoneNumber' !== $key
599
  ) {
600
  if ($doUrlDecode) {
601
- $value = urldecode($value);
602
  }
603
  }
604
  $signatureString .= $key . '=' . $value;
@@ -628,7 +673,7 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
628
  $hasDoubleEncoding = false;
629
  if (strpos($postFieldTimestamp, '+') !== false) {
630
  $hasDoubleEncoding = true;
631
- }
632
 
633
  return $hasDoubleEncoding;
634
  }
@@ -676,37 +721,6 @@ class TIG_Buckaroo3Extended_Model_Response_Push extends TIG_Buckaroo3Extended_Mo
676
  */
677
  protected function _checkCorrectAmount()
678
  {
679
- /**
680
- * TEMPORARY DIRTY FIX -- REMOVE BEFORE RELEASE
681
- * @todo remove this code
682
- */
683
  return true;
684
-
685
- $amountPaid = $this->_postArray['brq_amount'];
686
-
687
- $this->_debugEmail .= 'Currency used is '
688
- . $this->_postArray['brq_currency']
689
- . '. Order currency is '
690
- . $this->_order->getOrderCurrencyCode()
691
- . ".\n";
692
-
693
- if ($this->_postArray['brq_currency'] == $this->_order->getOrderCurrencyCode()) {
694
- $this->_debugEmail .= "Currency used is same as order currency \n";
695
- $amountOrdered = $this->_order->getGrandTotal();
696
- } else {
697
- $this->_debugEmail .= "Currency used is different from order currency \n";
698
- $amountOrdered = $this->_order->getBaseGrandTotal();
699
- }
700
-
701
- $this->_debugEmail .= "Amount paid: {$amountPaid}. Amount ordered: {$amountOrdered} \n";
702
-
703
- if (($amountPaid - $amountOrdered) > 0.01 || ($amountPaid - $amountOrdered) < -0.01) {
704
- return array(
705
- 'message' => 'Incorrect amount transfered',
706
- 'status' => self::BUCKAROO_INCORRECT_PAYMENT,
707
- );
708
- } else {
709
- return true;
710
- }
711
  }
712
  }
164
  return true;
165
  }
166
 
167
+ /**
168
+ * @return bool
169
+ * @throws Zend_Currency_Exception
170
+ */
171
+ public function processPartialTransferMessage()
172
+ {
173
+ $response = $this->_parsePostResponse($this->_postArray['brq_statuscode']);
174
+
175
+ $description = Mage::helper('buckaroo3extended')->__($response['message']);
176
+ $description .= " (#{$this->_postArray['brq_statuscode']})<br>";
177
+
178
+ if ($this->_postArray['brq_currency'] == $this->_order->getBaseCurrencyCode()) {
179
+ $currencyCode = $this->_order->getBaseCurrencyCode();
180
+ } else {
181
+ $currencyCode = $this->_order->getOrderCurrencyCode();
182
+ }
183
+ $brqAmount = Mage::app()->getLocale()->currency($currencyCode)->toCurrency($this->_postArray['brq_amount']);
184
+
185
+ $description .= 'Partial amount of ' . $brqAmount . ' has been paid';
186
+
187
+ $this->_order->addStatusHistoryComment($description)->save();
188
+
189
+ return true;
190
+ }
191
+
192
 
193
  /**
194
  * Checks if the post received is valid by checking its signature field.
345
  $this->_autoInvoice();
346
 
347
  $description = Mage::helper('buckaroo3extended')->__($description);
348
+ $description .= " (#{$this->_postArray['brq_statuscode']})<br>";
349
 
350
+ $paymentMethod = $this->_order->getPayment()->getMethodInstance();
351
+
352
+ if ($this->_postArray['brq_currency'] == $this->_order->getBaseCurrencyCode()) {
353
+ $currencyCode = $this->_order->getBaseCurrencyCode();
354
+ } else {
355
+ $currencyCode = $this->_order->getOrderCurrencyCode();
356
+ }
357
+ $brqAmount = Mage::app()->getLocale()->currency($currencyCode)->toCurrency($this->_postArray['brq_amount']);
358
+
359
+ if ($paymentMethod->getConfigPaymentAction() != Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE) {
360
+ $description .= 'Total amount of ' . $brqAmount . ' has been paid';
361
+ } else {
362
+ $description .= 'Total amount of ' . $brqAmount . ' has been authorized. Please create an invoice to capture the authorized amount.';
363
+ }
364
 
365
  //sets the transaction key if its defined ($trx)
366
  //will retrieve it from the response array, if response actually is an array
560
  return false;
561
  }
562
 
563
+ //Check if the method has to be authorized first before an invoice can be made
564
+ $paymentMethod = $this->_order->getPayment()->getMethodInstance();
565
+ if ($paymentMethod->getConfigPaymentAction() == Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE) {
566
+ return false;
567
+ }
568
+
569
  //returns true if invoice has been made, else false
570
  $invoiceSaved = $this->_saveInvoice();
571
 
631
 
632
  //sort the array
633
  $sortableArray = $this->buckarooSort($origArray);
634
+
635
  //check if encoding is used for the received postData
636
  $doUrlDecode = $this->_checkDoubleEncoding($sortableArray['brq_timestamp']);
637
  $this->_debugEmail .= "URL Encoding = " . var_export($doUrlDecode, true) . "\n";
643
  && 'brq_SERVICE_masterpass_ShippingRecipientPhoneNumber' !== $key
644
  ) {
645
  if ($doUrlDecode) {
646
+ $value = urldecode($value);
647
  }
648
  }
649
  $signatureString .= $key . '=' . $value;
673
  $hasDoubleEncoding = false;
674
  if (strpos($postFieldTimestamp, '+') !== false) {
675
  $hasDoubleEncoding = true;
676
+ }
677
 
678
  return $hasDoubleEncoding;
679
  }
721
  */
722
  protected function _checkCorrectAmount()
723
  {
 
 
 
 
724
  return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
725
  }
726
  }
app/code/community/TIG/Buckaroo3Extended/Model/Response/Quote.php CHANGED
@@ -78,7 +78,7 @@ class TIG_Buckaroo3Extended_Model_Response_Quote extends TIG_Buckaroo3Extended_M
78
  return $this->_requiredAction($parsedResponse);
79
  }
80
 
81
- protected function _success()
82
  {
83
  $this->sendDebugEmail();
84
 
@@ -86,7 +86,7 @@ class TIG_Buckaroo3Extended_Model_Response_Quote extends TIG_Buckaroo3Extended_M
86
  Mage::throwException('An error occurred while processing the request');
87
  }
88
 
89
- protected function _failed()
90
  {
91
  $this->_debugEmail .= 'The transaction was unsuccessful. \n';
92
  $this->_debugEmail .= "Returning response parameters.\n";
@@ -97,7 +97,7 @@ class TIG_Buckaroo3Extended_Model_Response_Quote extends TIG_Buckaroo3Extended_M
97
  );
98
  }
99
 
100
- protected function _error()
101
  {
102
  $this->_debugEmail .= "The transaction generated an error. \n";
103
  $this->_debugEmail .= "Returning response parameters.\n";
@@ -108,7 +108,7 @@ class TIG_Buckaroo3Extended_Model_Response_Quote extends TIG_Buckaroo3Extended_M
108
  );
109
  }
110
 
111
- protected function _rejected()
112
  {
113
  $this->_debugEmail .= "The transaction generated an error. \n";
114
  $this->_debugEmail .= "Returning response parameters.\n";
78
  return $this->_requiredAction($parsedResponse);
79
  }
80
 
81
+ protected function _success($status = self::BUCKAROO_SUCCESS)
82
  {
83
  $this->sendDebugEmail();
84
 
86
  Mage::throwException('An error occurred while processing the request');
87
  }
88
 
89
+ protected function _failed($message = '')
90
  {
91
  $this->_debugEmail .= 'The transaction was unsuccessful. \n';
92
  $this->_debugEmail .= "Returning response parameters.\n";
97
  );
98
  }
99
 
100
+ protected function _error($message = '')
101
  {
102
  $this->_debugEmail .= "The transaction generated an error. \n";
103
  $this->_debugEmail .= "Returning response parameters.\n";
108
  );
109
  }
110
 
111
+ protected function _rejected($message = '')
112
  {
113
  $this->_debugEmail .= "The transaction generated an error. \n";
114
  $this->_debugEmail .= "Returning response parameters.\n";
app/code/community/TIG/Buckaroo3Extended/Model/Soap.php CHANGED
@@ -131,12 +131,13 @@ final class TIG_Buckaroo3Extended_Model_Soap extends TIG_Buckaroo3Extended_Model
131
  /*when request is a refund; use 'CallCenter' else use channel 'Web' (case sensitive)*/
132
  $requestChannel = 'Web';
133
  $invoiceNumber = $this->_vars['orderId'];
134
- if(round($this->_vars['amountDebit'], 2) == 0
135
- && round($this->_vars['amountCredit'], 2) > 0){
136
- $requestChannel = 'CallCenter';
137
 
 
138
  $invoiceNumber = $this->_vars['invoiceId'];
139
 
 
 
 
140
  }
141
 
142
  $client->thumbprint = $this->_vars['thumbprint'];
131
  /*when request is a refund; use 'CallCenter' else use channel 'Web' (case sensitive)*/
132
  $requestChannel = 'Web';
133
  $invoiceNumber = $this->_vars['orderId'];
 
 
 
134
 
135
+ if (isset($this->_vars['invoiceId'])) {
136
  $invoiceNumber = $this->_vars['invoiceId'];
137
 
138
+ if (round($this->_vars['amountDebit'], 2) == 0 && round($this->_vars['amountCredit'], 2) > 0) {
139
+ $requestChannel = 'CallCenter';
140
+ }
141
  }
142
 
143
  $client->thumbprint = $this->_vars['thumbprint'];
app/code/community/TIG/Buckaroo3Extended/Model/Sources/PaymentFlow.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Model_Sources_PaymentFlow
40
+ {
41
+ /**
42
+ * @return array
43
+ */
44
+ public function toOptionArray()
45
+ {
46
+ $helper = Mage::helper('buckaroo3extended');
47
+
48
+ $array = array(
49
+ array(
50
+ 'value' => Mage_Payment_Model_Method_Abstract::ACTION_ORDER,
51
+ 'label' => $helper->__('Combined')
52
+ ),
53
+ array(
54
+ 'value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE,
55
+ 'label' => $helper->__('Separate authorize and capture')
56
+ ),
57
+ );
58
+
59
+ return $array;
60
+ }
61
+ }
62
+
app/code/community/TIG/Buckaroo3Extended/Test/Framework/TIG/Test/Config.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@tig.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@tig.nl for more information.
35
+ *
36
+ * @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
37
+ * @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
38
+ */
39
+ class TIG_Buckaroo3Extended_Test_Framework_TIG_Test_Config extends Mage_Core_Model_Config
40
+ {
41
+ /**
42
+ * @var array
43
+ */
44
+ protected $_mockModels = array();
45
+
46
+ /**
47
+ * @var array
48
+ */
49
+ protected $_mockResourceModels = array();
50
+
51
+ /**
52
+ * @param string $modelClass
53
+ * @param object $mock
54
+ *
55
+ * @return $this
56
+ */
57
+ public function setModelMock($modelClass, $mock)
58
+ {
59
+ $this->_mockModels[$modelClass] = $mock;
60
+ return $this;
61
+ }
62
+
63
+ /**
64
+ * @param string $modelClass
65
+ * @param object $mock
66
+ *
67
+ * @return $this
68
+ */
69
+ public function setResourceModelMock($modelClass, $mock)
70
+ {
71
+ $this->_mockResourceModels[$modelClass] = $mock;
72
+ return $this;
73
+ }
74
+
75
+ /**
76
+ * @param string $modelClass
77
+ * @param array $constructArguments
78
+ *
79
+ * @return false|Mage_Core_Model_Abstract
80
+ */
81
+ public function getModelInstance($modelClass = '', $constructArguments = array())
82
+ {
83
+ $modelClass = (string) $modelClass;
84
+
85
+ if (array_key_exists($modelClass, $this->_mockModels)) {
86
+ return $this->_mockModels[$modelClass];
87
+ }
88
+
89
+ return parent::getModelInstance($modelClass, $constructArguments);
90
+ }
91
+
92
+ /**
93
+ * Get resource model object by alias
94
+ *
95
+ * @param string $modelClass
96
+ * @param array $constructArguments
97
+ * @return object
98
+ */
99
+ public function getResourceModelInstance($modelClass='', $constructArguments = array())
100
+ {
101
+ $modelClass = (string) $modelClass;
102
+
103
+ if (array_key_exists($modelClass, $this->_mockResourceModels)) {
104
+ return $this->_mockResourceModels[$modelClass];
105
+ }
106
+
107
+ return parent::getResourceModelInstance($modelClass, $constructArguments);
108
+ }
109
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Framework/TIG/Test/Http/Response.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@tig.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@tig.nl for more information.
35
+ *
36
+ * @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
37
+ * @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
38
+ */
39
+ class TIG_Buckaroo3Extended_Test_Framework_TIG_Test_Http_Response extends Mage_Core_Controller_Response_Http
40
+ {
41
+ /**
42
+ * @var bool
43
+ */
44
+ protected $_headersSent = false;
45
+
46
+ /**
47
+ * @param boolean $headersSent
48
+ *
49
+ * @return TIG_Test_Http_Response
50
+ */
51
+ public function setHeadersSent($headersSent)
52
+ {
53
+ $this->_headersSent = $headersSent;
54
+
55
+ return $this;
56
+ }
57
+
58
+ /**
59
+ * @return boolean
60
+ */
61
+ public function getHeadersSent()
62
+ {
63
+ return $this->_headersSent;
64
+ }
65
+
66
+ /**
67
+ * @param bool $throw
68
+ *
69
+ * @return bool
70
+ */
71
+ public function canSendHeaders($throw = false)
72
+ {
73
+ $canSendHeaders = !$this->getHeadersSent();
74
+ return $canSendHeaders;
75
+ }
76
+
77
+ /**
78
+ * @return Mage_Core_Controller_Response_Http
79
+ */
80
+ public function sendHeaders()
81
+ {
82
+ $this->setHeadersSent(true);
83
+
84
+ return $this;
85
+ }
86
+
87
+ /**
88
+ * @return $this
89
+ */
90
+ public function sendResponse()
91
+ {
92
+ return $this;
93
+ }
94
+
95
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Framework/TIG/Test/TestCase.php ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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@tig.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@tig.nl for more information.
35
+ *
36
+ * @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
37
+ * @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
38
+ */
39
+ class TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase extends PHPUnit_Framework_TestCase
40
+ {
41
+ /**
42
+ * Resets and restarts Magento.
43
+ */
44
+ public static function resetMagento()
45
+ {
46
+ Mage::reset();
47
+
48
+ Mage::setIsDeveloperMode(true);
49
+ Mage::app(
50
+ 'admin',
51
+ 'store',
52
+ array(
53
+ 'config_model' => 'TIG_Buckaroo3Extended_Test_Framework_TIG_Test_Config'
54
+ )
55
+ )->setResponse(new TIG_Buckaroo3Extended_Test_Framework_TIG_Test_Http_Response());
56
+
57
+ $handler = set_error_handler(function() {});
58
+
59
+ set_error_handler(function($errno, $errstr, $errfile, $errline) use ($handler) {
60
+ if (E_WARNING === $errno
61
+ && 0 === strpos($errstr, 'include(')
62
+ && substr($errfile, -19) == 'Varien/Autoload.php'
63
+ ) {
64
+ return null;
65
+ }
66
+ return call_user_func(
67
+ $handler, $errno, $errstr, $errfile, $errline
68
+ );
69
+ });
70
+ }
71
+
72
+ public function prepareFrontendDispatch()
73
+ {
74
+ $store = Mage::app()->getDefaultStoreView();
75
+ $store->setConfig('web/url/redirect_to_base', false);
76
+ $store->setConfig('web/url/use_store', false);
77
+ $store->setConfig('advanced/modules_disable_output/Enterprise_Banner', true);
78
+
79
+ Mage::app()->setCurrentStore($store->getCode());
80
+
81
+ $this->registerMockSessions();
82
+ }
83
+
84
+ public function registerMockSessions($modules = null)
85
+ {
86
+ if (!is_array($modules)) {
87
+ $modules = array('core', 'customer', 'checkout', 'catalog', 'reports');
88
+ }
89
+
90
+ if (!in_array('core', $modules)) {
91
+ array_unshift($modules, 'core');
92
+ }
93
+
94
+ foreach ($modules as $module) {
95
+ $class = "$module/session";
96
+ $sessionMock = $this->getMockBuilder(
97
+ Mage::getConfig()->getModelClassName($class)
98
+ )->disableOriginalConstructor()
99
+ ->getMock();
100
+ $sessionMock->expects($this->any())
101
+ ->method('start')
102
+ ->will($this->returnSelf());
103
+ $sessionMock->expects($this->any())
104
+ ->method('init')
105
+ ->will($this->returnSelf());
106
+ $sessionMock->expects($this->any())
107
+ ->method('getMessages')
108
+ ->will($this->returnValue(
109
+ Mage::getModel('core/message_collection')
110
+ ));
111
+ $sessionMock->expects($this->any())
112
+ ->method('getSessionIdQueryParam')
113
+ ->will($this->returnValue(
114
+ Mage_Core_Model_Session_Abstract::SESSION_ID_QUERY_PARAM
115
+ ));
116
+ // $sessionMock->expects($this->any())
117
+ // ->method('getCookieShouldBeReceived')
118
+ // ->will($this->returnValue(false));
119
+ $this->setSingletonMock($class, $sessionMock);
120
+ $this->setModelMock($class, $sessionMock);
121
+ }
122
+
123
+ $cookieMock = $this->getMockBuilder('Mage_Core_Model_Cookie')->getMock();
124
+ $cookieMock->expects($this->any())
125
+ ->method('get')
126
+ ->will($this->returnValue(serialize('dummy')));
127
+ Mage::unregister('_singleton/core/cookie');
128
+ Mage::register('_singleton/core/cookie', $cookieMock);
129
+
130
+ // mock visitor log observer
131
+ $logVisitorMock = $this->getMockBuilder('Mage_Log_Model_Visitor')->getMock();
132
+ $this->setModelMock('log/visitor', $logVisitorMock);
133
+
134
+ /**
135
+ * Fix enterprise catalog permissions issue
136
+ */
137
+ $factoryName = 'enterprise_catalogpermissions/permission_index';
138
+ $className = Mage::getConfig()->getModelClassName($factoryName);
139
+ if (class_exists($className)) {
140
+ $mockPermissions = $this->getMockBuilder($className)->getMock();
141
+ $mockPermissions->expects($this->any())
142
+ ->method('getIndexForCategory')
143
+ ->withAnyParameters()
144
+ ->will($this->returnValue(array()));
145
+
146
+ $this->setSingletonMock($factoryName, $mockPermissions);
147
+ }
148
+ }
149
+
150
+ /**
151
+ * @param string $modelClass
152
+ * @param object $mock
153
+ *
154
+ * @return TIG_Test_TestCase
155
+ */
156
+ public function setModelMock($modelClass, $mock)
157
+ {
158
+ $this->getConfig()->setModelMock($modelClass, $mock);
159
+
160
+ return $this;
161
+ }
162
+ /**
163
+ * @param string $modelClass
164
+ * @param object $mock
165
+ *
166
+ * @return TIG_Test_TestCase
167
+ */
168
+ public function setResourceModelMock($modelClass, $mock)
169
+ {
170
+ $this->getConfig()->setResourceModelMock($modelClass, $mock);
171
+
172
+ return $this;
173
+ }
174
+
175
+ /**
176
+ * @param string $modelClass
177
+ * @param object $mock
178
+ *
179
+ * @return TIG_Test_TestCase
180
+ */
181
+ public function setSingletonMock($modelClass, $mock)
182
+ {
183
+ $registryKey = '_singleton/' . $modelClass;
184
+
185
+ Mage::unregister($registryKey);
186
+ Mage::register($registryKey, $mock);
187
+
188
+ return $this;
189
+ }
190
+
191
+ /**
192
+ * @param $modelClass
193
+ *
194
+ * @return mixed
195
+ */
196
+ public function getSingletonMock($modelClass)
197
+ {
198
+ $registryKey = '_singleton/' . $modelClass;
199
+
200
+ return Mage::registry($registryKey);
201
+ }
202
+
203
+ /**
204
+ * @param string $resourceModelClass
205
+ * @param object $mock
206
+ *
207
+ * @return TIG_Test_TestCase
208
+ */
209
+ public function setResourceSingletonMock($resourceModelClass, $mock)
210
+ {
211
+ $registryKey = '_resource_singleton/' . $resourceModelClass;
212
+
213
+ Mage::unregister($registryKey);
214
+ Mage::register($registryKey, $mock);
215
+
216
+ return $this;
217
+ }
218
+
219
+ /**
220
+ * @param string $helperClass
221
+ * @param object $mock
222
+ *
223
+ * @return TIG_Test_TestCase
224
+ */
225
+ public function setHelperMock($helperClass, $mock)
226
+ {
227
+ $registryKey = '_helper/' . $helperClass;
228
+
229
+ Mage::unregister($registryKey);
230
+ Mage::register($registryKey, $mock);
231
+
232
+ return $this;
233
+ }
234
+
235
+ /**
236
+ * @return TIG_Test_Config
237
+ */
238
+ public function getConfig()
239
+ {
240
+ return Mage::getConfig();
241
+ }
242
+
243
+ /**
244
+ * Returns the instance. Should be overridden.
245
+ *
246
+ * @return null
247
+ */
248
+ protected function _getInstance()
249
+ {
250
+ return null;
251
+ }
252
+
253
+ /**
254
+ * Sets a protected property to the provided value.
255
+ *
256
+ * @param $property
257
+ * @param $value
258
+ * @param null $instance
259
+ *
260
+ * @return $this
261
+ */
262
+ public function setProperty($property, $value, $instance = null)
263
+ {
264
+ if ($instance === null) {
265
+ $instance = $this->_getInstance();
266
+ }
267
+
268
+ $reflection = new ReflectionObject($instance);
269
+ $property = $reflection->getProperty($property);
270
+ $property->setAccessible(true);
271
+ $property->setValue($instance, $value);
272
+
273
+ return $this;
274
+ }
275
+
276
+ /**
277
+ * Updates a specific key.
278
+ *
279
+ * @param $key
280
+ * @param $value
281
+ *
282
+ * @return $this
283
+ */
284
+ public function setRegistryKey($key, $value)
285
+ {
286
+ Mage::unregister($key);
287
+ Mage::register($key, $value);
288
+
289
+ return $this;
290
+ }
291
+
292
+ /**
293
+ * Call public/private method of a class.
294
+ *
295
+ * @param object &$object Instantiated object that we will run method on.
296
+ * @param string $methodName Method name to call
297
+ * @param array $parameters Array of parameters to pass into method.
298
+ *
299
+ * @return mixed Method return.
300
+ */
301
+ public function invokeMethod(&$object, $methodName, array $parameters = array())
302
+ {
303
+ $reflection = new \ReflectionClass(get_class($object));
304
+ $method = $reflection->getMethod($methodName);
305
+ $method->setAccessible(true);
306
+
307
+ return $method->invokeArgs($object, $parameters);
308
+ }
309
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Scripts/InstallDependencies.sh ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ #set -e
4
+ set -x
5
+
6
+ COMPOSER_REQUIRE="";
7
+
8
+ which n98-magerun
9
+ if [ $? != "0" ]; then
10
+ COMPOSER_REQUIRE="${COMPOSER_REQUIRE} n98/magerun"
11
+ fi
12
+
13
+ which modman
14
+ if [ $? != "0" ]; then
15
+ COMPOSER_REQUIRE="${COMPOSER_REQUIRE} colinmollenhour/modman"
16
+ fi
17
+
18
+ if [ ! -z "${COMPOSER_REQUIRE}" ]; then
19
+ composer global require ${COMPOSER_REQUIRE}
20
+ else
21
+ echo "All dependencies installed"
22
+ fi;
app/code/community/TIG/Buckaroo3Extended/Test/Scripts/Setup.sh ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -e
3
+ set -x
4
+
5
+ if [ -z $MAGENTO_DB_HOST ]; then MAGENTO_DB_HOST="localhost"; fi
6
+ if [ -z $MAGENTO_DB_PORT ]; then MAGENTO_DB_PORT="3306"; fi
7
+ if [ -z $MAGENTO_DB_USER ]; then MAGENTO_DB_USER="root"; fi
8
+ if [ -z $MAGENTO_DB_PASS ]; then MAGENTO_DB_PASS=""; fi
9
+ if [ -z $MAGENTO_DB_NAME ]; then MAGENTO_DB_NAME="magento"; fi
10
+
11
+ CURRENT_DIR=`pwd`
12
+ BUILDENV="/tmp/magento"
13
+ mkdir -p ${BUILDENV}
14
+ PUBLIC_DIR="${BUILDENV}/public/"
15
+
16
+ mkdir -p "${PUBLIC_DIR}"
17
+
18
+ echo "Using build directory ${BUILDENV}"
19
+
20
+ echo "Installing Magento version ${MAGENTO_VERSION}"
21
+
22
+ # Create main database
23
+ MYSQLPASS=""
24
+ if [ ! -z $MAGENTO_DB_PASS ]; then MYSQLPASS="-p${MAGENTO_DB_PASS}"; fi
25
+ mysql -u${MAGENTO_DB_USER} ${MYSQLPASS} -h${MAGENTO_DB_HOST} -P${MAGENTO_DB_PORT} -e "DROP DATABASE IF EXISTS \`${MAGENTO_DB_NAME}\`; CREATE DATABASE \`${MAGENTO_DB_NAME}\`;"
26
+
27
+ n98-magerun install \
28
+ --dbHost="${MAGENTO_DB_HOST}" --dbUser="${MAGENTO_DB_USER}" --dbPass="${MAGENTO_DB_PASS}" --dbName="${MAGENTO_DB_NAME}" --dbPort="${MAGENTO_DB_PORT}" \
29
+ --installSampleData=no \
30
+ --useDefaultConfigParams=yes \
31
+ --magentoVersionByName="${MAGENTO_VERSION}" \
32
+ --installationFolder="${PUBLIC_DIR}" \
33
+ --baseUrl="http://magento.local/" || { echo "Installing Magento failed"; exit 1; }
34
+
35
+ mkdir -p "${PUBLIC_DIR}/.modman/project"
36
+
37
+ cp -rf . "${PUBLIC_DIR}/.modman/project"
38
+
39
+ cd "${PUBLIC_DIR}"
40
+
41
+ modman deploy-all
42
+ n98-magerun config:set dev/template/allow_symlink 1
43
+ n98-magerun sys:setup:run
44
+
45
+ cd "${PUBLIC_DIR}/.modman/project";
46
+ mkdir -p "${PUBLIC_DIR}var/session";
47
+ chmod -R 777 "${PUBLIC_DIR}var/session";
48
+
49
+ phpunit -c "${PUBLIC_DIR}/app/code/community/TIG/Buckaroo3Extended/Test/phpunit.xml"
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Block/Adminhtml/Sales/Order/Invoice/Totals/FeeTest.php ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Block_Adminhtml_Sales_Order_Invoice_Totals_FeeTest
40
+ extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
41
+ {
42
+ /** @var null|TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Invoice_Totals_Fee */
43
+ protected $_instance = null;
44
+
45
+ /** @var null|Mage_Sales_Model_Order_Invoice */
46
+ protected $_invoice = null;
47
+
48
+ protected function _getInstance()
49
+ {
50
+ if ($this->_instance === null) {
51
+ $mockInvoice = $this->_getMockInvoice();
52
+
53
+ $mockParentBlock = $this->getMockBuilder('Mage_Adminhtml_Block_Sales_Order_Invoice_Totals')
54
+ ->setMethods(array('getInvoice', 'addTotalBefore'))
55
+ ->getMock();
56
+ $mockParentBlock->expects($this->once())
57
+ ->method('getInvoice')
58
+ ->willReturn($mockInvoice);
59
+ $mockParentBlock->expects($this->any())
60
+ ->method('addTotalBefore');
61
+
62
+ $this->_instance = new TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Invoice_Totals_Fee();
63
+ $this->setProperty('_parentBlock', $mockParentBlock, $this->_instance);
64
+ }
65
+
66
+ return $this->_instance;
67
+ }
68
+
69
+ /**
70
+ * @return Mage_Sales_Model_Order_Invoice
71
+ */
72
+ protected function _getMockInvoice()
73
+ {
74
+ if ($this->_invoice === null) {
75
+ $mockOrder = $this->_getMockOrder();
76
+
77
+ $this->_invoice = $this->getMockBuilder('Mage_Sales_Model_Order_Invoice')
78
+ ->setMethods(array(
79
+ 'getOrder',
80
+ 'getBuckarooFee',
81
+ 'getBaseBuckarooFee',
82
+ 'getBuckarooFeeTax',
83
+ 'getBaseBuckarooFeeTax'
84
+ ))
85
+ ->getMock();
86
+ }
87
+
88
+ return $this->_invoice;
89
+ }
90
+
91
+ /**
92
+ * @return mixed
93
+ */
94
+ protected function _getMockOrder()
95
+ {
96
+ $mockPayment = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
97
+ ->setMethods(array('getMethod'))
98
+ ->getMock();
99
+ $mockPayment->expects($this->any())
100
+ ->method('getMethod')
101
+ ->willReturn('buckaroo3extended_afterpay');
102
+
103
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
104
+ ->setMethods(array('getPayment'))
105
+ ->getMock();
106
+ $mockOrder->expects($this->any())
107
+ ->method('getPayment')
108
+ ->willReturn($mockPayment);
109
+
110
+ return $mockOrder;
111
+ }
112
+
113
+ /**
114
+ * @return array
115
+ */
116
+ public function testInitTotalsDataprovider()
117
+ {
118
+ return array(
119
+ array(
120
+ '2',
121
+ 'once',
122
+ 'once',
123
+ TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Invoice_Totals_Fee::DISPLAY_MODE_BOTH
124
+ ),
125
+ array(
126
+ '3.14',
127
+ 'never',
128
+ 'once',
129
+ TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Invoice_Totals_Fee::DISPLAY_MODE_EXCL
130
+ ),
131
+ array(
132
+ '1.19',
133
+ 'once',
134
+ 'once',
135
+ TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Invoice_Totals_Fee::DISPLAY_MODE_INCL
136
+ ),
137
+ array(
138
+ '0',
139
+ 'never',
140
+ 'never',
141
+ null
142
+ )
143
+ );
144
+ }
145
+
146
+ /**
147
+ * @param $buckarooFee
148
+ * @param $buckarooFeeTaxExpects
149
+ * @param $orderExpects
150
+ * @param $displayMode
151
+ *
152
+ * @dataProvider testInitTotalsDataprovider
153
+ */
154
+ public function testInitTotals(
155
+ $buckarooFee,
156
+ $buckarooFeeTaxExpects,
157
+ $orderExpects,
158
+ $displayMode
159
+ ) {
160
+ $mockOrder = $this->_getMockOrder();
161
+ $mockInvoice = $this->_getMockInvoice();
162
+
163
+ $mockInvoice->expects($this->$buckarooFeeTaxExpects())->method('getBuckarooFeeTax');
164
+ $mockInvoice->expects($this->$buckarooFeeTaxExpects())->method('getBaseBuckarooFeeTax');
165
+ $mockInvoice->expects($this->$orderExpects())->method('getOrder')->willReturn($mockOrder);
166
+
167
+ $store = Mage::app()->getStore();
168
+ $store->setConfig(
169
+ TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Invoice_Totals_Fee::XPATH_DISPLAY_MODE_BUCKAROO_FEE,
170
+ $displayMode
171
+ );
172
+
173
+ $mockInvoice->expects($this->once())
174
+ ->method('getBuckarooFee')
175
+ ->willReturn($buckarooFee);
176
+ $mockInvoice->expects($this->once())
177
+ ->method('getBaseBuckarooFee')
178
+ ->willReturn($buckarooFee);
179
+
180
+ $instance = $this->_getInstance();
181
+ $result = $instance->initTotals();
182
+
183
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Block_Adminhtml_Sales_Order_Invoice_Totals_Fee', $result);
184
+ }
185
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Block/Adminhtml/System/Config/SupportTabTest.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2017 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
+ use TIG_Buckaroo3Extended_Block_Adminhtml_System_Config_SupportTab as SupportTab;
40
+
41
+ class TIG_Buckaroo3Extended_Test_Unit_Block_Adminhtml_System_Config_SupportTabTest
42
+ extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
43
+ {
44
+ /**
45
+ * @return TIG_Buckaroo3Extended_Block_Adminhtml_System_Config_SupportTab
46
+ */
47
+ public function _getInstance()
48
+ {
49
+ return new SupportTab;
50
+ }
51
+
52
+ public function testGetVersion()
53
+ {
54
+ $configValue = Mage::getConfig()->getModuleConfig('TIG_Buckaroo3Extended');
55
+ $expected = (string)$configValue->version;
56
+
57
+ $this->assertEquals($expected, $this->_getInstance()->getVersion());
58
+ }
59
+
60
+ public function getStabilityProvider()
61
+ {
62
+ return array(
63
+ array('stable', null),
64
+ array('beta', 'beta'),
65
+ array('alpha', 'alpha'),
66
+ );
67
+ }
68
+
69
+ /**
70
+ * @dataProvider getStabilityProvider
71
+ */
72
+ public function testGetStability($version, $expected)
73
+ {
74
+ Mage::getConfig()->setNode(SupportTab::XPATH_TIG_BUCKAROO_STABILITY, $version);
75
+
76
+ $this->assertEquals($expected, $this->_getInstance()->getStability());
77
+ }
78
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Helper/DataTest.php ADDED
@@ -0,0 +1,231 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Helper_Data extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Helper_Data */
42
+ protected $_instance = null;
43
+
44
+ protected function _getInstance()
45
+ {
46
+ if ($this->_instance === null) {
47
+ $this->_instance = new TIG_Buckaroo3Extended_Helper_Data();
48
+ }
49
+
50
+ return $this->_instance;
51
+ }
52
+
53
+ /**
54
+ * @return array
55
+ */
56
+ public function testIsOneStepCheckoutProvider()
57
+ {
58
+ return array(
59
+ array(
60
+ 'onestepcheckout',
61
+ true
62
+ ),
63
+ array(
64
+ 'onepage',
65
+ false
66
+ )
67
+ );
68
+ }
69
+
70
+ /**
71
+ * @param $moduleName
72
+ * @param $expected
73
+ *
74
+ * @dataProvider testIsOneStepCheckoutProvider
75
+ */
76
+ public function testIsOneStepCheckout($moduleName, $expected)
77
+ {
78
+ $request = Mage::app()->getRequest();
79
+ $request->setModuleName($moduleName);
80
+
81
+ $instance = $this->_getInstance();
82
+
83
+ $result = $instance->isOneStepCheckout();
84
+ $this->assertEquals($expected, $result);
85
+ }
86
+
87
+ public function testGetFeeLabelProvider()
88
+ {
89
+ return array(
90
+ array(
91
+ false,
92
+ 'Fee'
93
+ ),
94
+ array(
95
+ 'buckaroo_unittest',
96
+ 'Unittest Fee Tax'
97
+ )
98
+ );
99
+ }
100
+
101
+ /**
102
+ * @param $paymentCode
103
+ * @param $feeLabel
104
+ *
105
+ * @dataProvider testGetFeeLabelProvider
106
+ */
107
+ public function testGetFeeLabel($paymentCode, $feeLabel)
108
+ {
109
+ Mage::app()->getStore()->setConfig('buckaroo/' . $paymentCode . '/payment_fee_label', $feeLabel);
110
+
111
+ $instance = $this->_getInstance();
112
+
113
+ $result = $instance->getFeeLabel($paymentCode);
114
+ $this->assertEquals($feeLabel, $result);
115
+ }
116
+
117
+ public function testGetBuckarooFeeLabelProvider()
118
+ {
119
+ return array(
120
+ array(
121
+ false,
122
+ 'Buckaroo Fee'
123
+ ),
124
+ array(
125
+ 'buckaroo_unittest',
126
+ 'Unittest Fee Tax'
127
+ )
128
+ );
129
+ }
130
+
131
+ /**
132
+ * @param $paymentCode
133
+ * @param $feeLabel
134
+ *
135
+ * @dataProvider testGetBuckarooFeeLabelProvider
136
+ */
137
+ public function testGetBuckarooFeeLabel($paymentCode, $feeLabel)
138
+ {
139
+ Mage::app()->getStore()->setConfig('buckaroo/' . $paymentCode . '/payment_fee_label', $feeLabel);
140
+
141
+ $instance = $this->_getInstance();
142
+
143
+ $result = $instance->getBuckarooFeeLabel(null, $paymentCode);
144
+ $this->assertEquals($feeLabel, $result);
145
+ }
146
+
147
+ /**
148
+ * @return array
149
+ */
150
+ public function testCheckSellersProtectionProvider()
151
+ {
152
+ return array(
153
+ array(
154
+ false,
155
+ false,
156
+ false,
157
+ false
158
+ ),
159
+ array(
160
+ true,
161
+ false,
162
+ false,
163
+ false
164
+ ),
165
+ array(
166
+ true,
167
+ true,
168
+ true,
169
+ false
170
+ ),
171
+ array(
172
+ true,
173
+ true,
174
+ false,
175
+ true
176
+ )
177
+ );
178
+ }
179
+
180
+ /**
181
+ * @param $active
182
+ * @param $sellerProtection
183
+ * @param $isVirtual
184
+ * @param $expected
185
+ *
186
+ * @dataProvider testCheckSellersProtectionProvider
187
+ */
188
+ public function testCheckSellersProtection($active, $sellerProtection, $isVirtual, $expected)
189
+ {
190
+ $store = Mage::app()->getStore();
191
+ $store->setConfig('buckaroo/buckaroo3extended_paypal/active', $active);
192
+ $store->setConfig('buckaroo/buckaroo3extended_paypal/sellers_protection', $sellerProtection);
193
+
194
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
195
+ ->setMethods(array('getStoreId', 'getIsVirtual'))
196
+ ->getMock();
197
+ $mockOrder->expects($this->atLeastOnce())
198
+ ->method('getStoreId')
199
+ ->willReturn($store->getId());
200
+ $mockOrder->expects($this->any())
201
+ ->method('getIsVirtual')
202
+ ->willReturn($isVirtual);
203
+
204
+ $instance = $this->_getInstance();
205
+ $result = $instance->checkSellersProtection($mockOrder);
206
+
207
+ $this->assertEquals($expected, $result);
208
+ }
209
+
210
+ public function testGetServiceModel()
211
+ {
212
+ $instance = $this->_getInstance();
213
+
214
+ $result = $instance->getServiceModel();
215
+
216
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentFee_Service', $result);
217
+ }
218
+
219
+ public function testSetServiceModel()
220
+ {
221
+ $mockServiceModel = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_PaymentFee_Service')->getMock();
222
+ $instance = $this->_getInstance();
223
+
224
+ $setResult = $instance->setServiceModel($mockServiceModel);
225
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Helper_Data', $setResult);
226
+
227
+ $getResult = $instance->getServiceModel();
228
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentFee_Service', $getResult);
229
+ $this->assertEquals($mockServiceModel, $getResult);
230
+ }
231
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Observer/CancelAuthorizeTest.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_Observer_CancelAuthorizeTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_Observer_CancelAuthorize */
42
+ protected $_instance = null;
43
+
44
+ /** @var TIG_Buckaroo3Extended_Model_Request_CancelAuthorize */
45
+ protected $_mockCancelAuthorizeRequest;
46
+
47
+ public function setUp()
48
+ {
49
+ $this->registerMockSessions('checkout');
50
+
51
+ $this->_mockCancelAuthorizeRequest = $this
52
+ ->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_CancelAuthorize')
53
+ ->setMethods(array('sendRequest'))
54
+ ->disableOriginalConstructor()
55
+ ->getMock();
56
+
57
+ $this->setModelMock('buckaroo3extended/request_cancelAuthorize', $this->_mockCancelAuthorizeRequest);
58
+ }
59
+
60
+ protected function _getInstance()
61
+ {
62
+ if ($this->_instance === null) {
63
+ $this->_instance = new TIG_Buckaroo3Extended_Model_Observer_CancelAuthorize();
64
+ }
65
+
66
+ return $this->_instance;
67
+ }
68
+
69
+ /**
70
+ * @return PHPUnit_Framework_MockObject_MockObject
71
+ */
72
+ protected function _getMockPayment($paymentAction, $paymentCode)
73
+ {
74
+ $mockPaymentAbstract = $this->getMockBuilder('Mage_Payment_Model_Method_Abstract')
75
+ ->setMethods(array('getConfigPaymentAction', 'getCode'))
76
+ ->getMock();
77
+ $mockPaymentAbstract->expects($this->any())
78
+ ->method('getConfigPaymentAction')
79
+ ->willReturn($paymentAction);
80
+ $mockPaymentAbstract->expects($this->any())
81
+ ->method('getCode')
82
+ ->willReturn($paymentCode);
83
+
84
+ $mockPayment = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
85
+ ->setMethods(array('getMethodInstance'))
86
+ ->getMock();
87
+ $mockPayment->expects($this->any())
88
+ ->method('getMethodInstance')
89
+ ->willReturn($mockPaymentAbstract);
90
+
91
+ return $mockPayment;
92
+ }
93
+
94
+ /**
95
+ * @return array
96
+ */
97
+ public function testSales_order_payment_cancel_authorizeProvider()
98
+ {
99
+ return array(
100
+ array(
101
+ Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE,
102
+ 'buckaroo3extended_afterpay',
103
+ 'once'
104
+ ),
105
+ array(
106
+ Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE,
107
+ 'buckaroo3extended_afterpay2',
108
+ 'once'
109
+ ),
110
+ array(
111
+ Mage_Payment_Model_Method_Abstract::ACTION_ORDER,
112
+ 'buckaroo3extended_afterpay',
113
+ 'never'
114
+ ),
115
+ array(
116
+ Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE,
117
+ 'buckaroo3extended_notAllowedMethod',
118
+ 'never'
119
+ )
120
+ );
121
+ }
122
+
123
+ /**
124
+ * @param $paymentAction
125
+ * @param $paymentMethod
126
+ * @param $sendRequestExpects
127
+ *
128
+ * @dataProvider testSales_order_payment_cancel_authorizeProvider
129
+ */
130
+ public function testSales_order_payment_cancel_authorize($paymentAction, $paymentMethod, $sendRequestExpects)
131
+ {
132
+ $mockPayment = $this->_getMockPayment($paymentAction, $paymentMethod);
133
+
134
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
135
+ ->setMethods(array('getPayment'))
136
+ ->getMock();
137
+ $mockObserver->expects($this->once())
138
+ ->method('getPayment')
139
+ ->willReturn($mockPayment);
140
+
141
+ $this->_mockCancelAuthorizeRequest
142
+ ->expects($this->$sendRequestExpects())
143
+ ->method('sendRequest');
144
+
145
+ $instance = $this->_getInstance();
146
+ $result = $instance->sales_order_payment_cancel_authorize($mockObserver);
147
+
148
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_Observer_CancelAuthorize', $result);
149
+ }
150
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentFee/Order/Creditmemo/Total/FeeTest.php ADDED
@@ -0,0 +1,231 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_PaymentFee_Order_Creditmemo_Total_FeeTest
40
+ extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
41
+ {
42
+ /** @var null|TIG_Buckaroo3Extended_Model_PaymentFee_Order_Creditmemo_Total_Fee */
43
+ protected $_instance = null;
44
+
45
+ /** @var null|Mage_Sales_Model_Order */
46
+ protected $_order = null;
47
+
48
+ /** @var null|Mage_Sales_Model_Order_Invoice */
49
+ protected $_invoice = null;
50
+
51
+ public function setUp()
52
+ {
53
+ $this->registerMockSessions(array('admin'));
54
+ }
55
+
56
+ protected function _getInstance()
57
+ {
58
+ if ($this->_instance === null) {
59
+ $this->_instance = new TIG_Buckaroo3Extended_Model_PaymentFee_Order_Creditmemo_Total_Fee();
60
+ }
61
+
62
+ return $this->_instance;
63
+ }
64
+
65
+ protected function _getMockOrder()
66
+ {
67
+ if ($this->_order === null) {
68
+ $this->_order = $this->getMockBuilder('Mage_Sales_Model_Order')
69
+ ->setMethods(array(
70
+ 'getBuckarooFee',
71
+ 'getBaseBuckarooFee',
72
+ 'getBuckarooFeeRefunded',
73
+ 'getBaseBuckarooFeeRefunded'
74
+ ))
75
+ ->getMock();
76
+ }
77
+
78
+ return $this->_order;
79
+ }
80
+
81
+ protected function _getMockInvoice()
82
+ {
83
+ if ($this->_invoice === null) {
84
+ $this->_invoice = $this->getMockBuilder('Mage_Sales_Model_Order_Invoice')
85
+ ->setMethods(array('getBuckarooFee', 'getBaseBuckarooFee'))
86
+ ->getMock();
87
+ }
88
+
89
+ return $this->_invoice;
90
+ }
91
+
92
+ protected function _getMockCreditmemo()
93
+ {
94
+ $mockOrder = $this->_getMockOrder();
95
+ $mockInvoice = $this->_getMockInvoice();
96
+
97
+ $mockCreditmemo = $this->getMockBuilder('Mage_Sales_Model_Order_Creditmemo')
98
+ ->setMethods(array('getOrder', 'getInvoice', 'getBuckarooFee', 'getBaseBuckarooFee'))
99
+ ->getMock();
100
+ $mockCreditmemo->expects($this->once())
101
+ ->method('getOrder')
102
+ ->willReturn($mockOrder);
103
+ $mockCreditmemo->expects($this->once())
104
+ ->method('getInvoice')
105
+ ->willReturn($mockInvoice);
106
+
107
+ return $mockCreditmemo;
108
+ }
109
+
110
+ /**
111
+ * @return array
112
+ */
113
+ public function testCollectProvider()
114
+ {
115
+ return array(
116
+ array(
117
+ false,
118
+ 'never',
119
+ array(
120
+ 'fee' => 0,
121
+ 'invoiceFee' => 0,
122
+ 'orderFee' => 0,
123
+ 'orderRefundFee' => 0,
124
+ 'paramsFee' => 0
125
+ ),
126
+ 'never',
127
+ 'never'
128
+ ),
129
+ array(
130
+ false,
131
+ 'never',
132
+ array(
133
+ 'fee' => 1.23,
134
+ 'invoiceFee' => 2.34,
135
+ 'orderFee' => 0,
136
+ 'orderRefundFee' => 0,
137
+ 'paramsFee' => 0
138
+ ),
139
+ 'once',
140
+ 'never'
141
+ ),
142
+ array(
143
+ true,
144
+ 'once',
145
+ array(
146
+ 'fee' => 0,
147
+ 'invoiceFee' => 3.45,
148
+ 'orderFee' => 4.56,
149
+ 'orderRefundFee' => 0,
150
+ 'paramsFee' => 4.56
151
+ ),
152
+ 'never',
153
+ 'once'
154
+ ),
155
+ array(
156
+ false,
157
+ 'never',
158
+ array(
159
+ 'fee' => 0,
160
+ 'invoiceFee' => 5.67,
161
+ 'orderFee' => 7.89,
162
+ 'orderRefundFee' => 6.78,
163
+ 'paramsFee' => 0
164
+ ),
165
+ 'once',
166
+ 'never'
167
+ ),
168
+ array(
169
+ false,
170
+ 'never',
171
+ array(
172
+ 'fee' => 0,
173
+ 'invoiceFee' => 8.90,
174
+ 'orderFee' => 0,
175
+ 'orderRefundFee' => 0,
176
+ 'paramsFee' => 0
177
+ ),
178
+ 'never',
179
+ 'never'
180
+ )
181
+ );
182
+ }
183
+
184
+ /**
185
+ * @param $isAdmin
186
+ * @param $isAdminExpects
187
+ * @param $fee
188
+ * @param $updateTotalsExpects
189
+ * @param $updateTotalsParamsExpects
190
+ *
191
+ * @dataProvider testCollectProvider
192
+ */
193
+ public function testCollect($isAdmin, $isAdminExpects, $fee, $updateTotalsExpects, $updateTotalsParamsExpects)
194
+ {
195
+ $adminSession = Mage::getSingleton('admin/session');
196
+ $adminSession->expects($this->$isAdminExpects())
197
+ ->method('isLoggedIn')
198
+ ->willReturn($isAdmin);
199
+
200
+ $mockHelper = $this->getMockBuilder('TIG_Buckaroo3Extended_Helper_Data')
201
+ ->setMethods(array('isAdmin'))
202
+ ->getMock();
203
+ $mockHelper->expects($this->any())
204
+ ->method('isAdmin')
205
+ ->willReturn($isAdmin);
206
+
207
+ $request = Mage::app()->getRequest();
208
+ $request->setParam('creditmemo', array('buckaroo_fee' => $fee['paramsFee']));
209
+
210
+ $mockInvoice = $this->_getMockInvoice();
211
+ $mockInvoice->expects($this->once())->method('getBuckarooFee')->willReturn($fee['invoiceFee']);
212
+ $mockInvoice->expects($this->any())->method('getBaseBuckarooFee')->willReturn($fee['invoiceFee']);
213
+
214
+ $mockOrder = $this->_getMockOrder();
215
+ $mockOrder->expects($this->any())->method('getBuckarooFee')->willReturn($fee['orderFee']);
216
+ $mockOrder->expects($this->any())->method('getBaseBuckarooFee')->willReturn($fee['orderFee']);
217
+ $mockOrder->expects($this->any())->method('getBuckarooFeeRefunded')->willReturn($fee['orderRefundFee']);
218
+ $mockOrder->expects($this->any())->method('getBaseBuckarooFeeRefunded')->willReturn($fee['orderRefundFee']);
219
+
220
+ $mockCreditmemo = $this->_getMockCreditmemo();
221
+ $mockCreditmemo->expects($this->once())->method('getBuckarooFee')->willReturn($fee['fee']);
222
+ $mockCreditmemo->expects($this->once())->method('getBaseBuckarooFee')->willReturn($fee['fee']);
223
+
224
+ $instance = $this->_getInstance();
225
+ $this->setProperty('_helper', $mockHelper, $instance);
226
+
227
+ $result = $instance->collect($mockCreditmemo);
228
+
229
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentFee_Order_Creditmemo_Total_Fee', $result);
230
+ }
231
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/Afterpay/ObserverTest.php ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_PaymentMethods_Afterpay_ObserverTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer */
42
+ protected $_instance = null;
43
+
44
+ protected function _getInstance()
45
+ {
46
+ if ($this->_instance === null) {
47
+ $this->_instance = new TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer();
48
+ }
49
+
50
+ return $this->_instance;
51
+ }
52
+
53
+ protected function _getMockOrder()
54
+ {
55
+ $mockOrderAddress = $this->getMockBuilder('Mage_Sales_Model_Order_Address')
56
+ ->setMethods(null)
57
+ ->getMock();
58
+
59
+ $mockPayment = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
60
+ ->setMethods(array('getMethod'))
61
+ ->getMock();
62
+ $mockPayment->expects($this->any())
63
+ ->method('getMethod')
64
+ ->will($this->returnValue('buckaroo3extended_afterpay'));
65
+
66
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
67
+ ->setMethods(array(
68
+ 'getPayment',
69
+ 'getPaymentMethodUsedForTransaction',
70
+ 'getBillingAddress',
71
+ 'getShippingAddress'
72
+ ))
73
+ ->getMock();
74
+ $mockOrder->expects($this->any())
75
+ ->method('getPayment')
76
+ ->will($this->returnValue($mockPayment));
77
+ $mockOrder->expects($this->any())
78
+ ->method('getPaymentMethodUsedForTransaction')
79
+ ->will($this->returnValue(false));
80
+ $mockOrder->expects($this->any())
81
+ ->method('getBillingAddress')
82
+ ->will($this->returnValue($mockOrderAddress));
83
+ $mockOrder->expects($this->any())
84
+ ->method('getShippingAddress')
85
+ ->will($this->returnValue($mockOrderAddress));
86
+
87
+ return $mockOrder;
88
+ }
89
+
90
+ /**
91
+ * @return array
92
+ */
93
+ public function testBuckaroo3extended_request_addservicesDataprovider()
94
+ {
95
+ return array(
96
+ array(
97
+ Mage_Payment_Model_Method_Abstract::ACTION_ORDER,
98
+ 'Pay'
99
+ ),
100
+ array(
101
+ Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE,
102
+ 'Authorize'
103
+ )
104
+ );
105
+ }
106
+
107
+ /**
108
+ * @param $paymethod
109
+ * @param $expected
110
+ *
111
+ * @dataProvider testBuckaroo3extended_request_addservicesDataprovider
112
+ */
113
+ public function testBuckaroo3extended_request_addservices($paymethod, $expected)
114
+ {
115
+ $this->registerMockSessions(array('checkout'));
116
+
117
+ $mockOrder = $this->_getMockOrder();
118
+
119
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
120
+ ->setMethods(null)
121
+ ->getMock();
122
+
123
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
124
+ ->setMethods(array('getOrder', 'getRequest'))
125
+ ->getMock();
126
+ $mockObserver->expects($this->any())
127
+ ->method('getOrder')
128
+ ->will($this->returnValue($mockOrder));
129
+ $mockObserver->expects($this->any())
130
+ ->method('getRequest')
131
+ ->will($this->returnValue($mockRequest));
132
+
133
+
134
+ $instance = $this->_getInstance();
135
+ Mage::app()->getStore()->setConfig('buckaroo/' . $instance->getCode() . '/payment_action', $paymethod);
136
+
137
+ $resultInstance = $instance->buckaroo3extended_request_addservices($mockObserver);
138
+ $resultVars = $mockRequest->getVars();
139
+
140
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer', $resultInstance);
141
+
142
+ $expectedVars = array(
143
+ 'services' => array(
144
+ $instance->getMethod() => array(
145
+ 'action' => $expected,
146
+ 'version' => '1'
147
+ )
148
+ )
149
+ );
150
+
151
+ $this->assertEquals($expectedVars, $resultVars);
152
+ }
153
+
154
+ public function testBuckaroo3extended_request_addcustomvars()
155
+ {
156
+ $this->registerMockSessions(array('checkout'));
157
+
158
+ $mockOrder = $this->_getMockOrder();
159
+
160
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
161
+ ->setMethods(array('getOrder'))
162
+ ->getMock();
163
+ $mockRequest->expects($this->once())
164
+ ->method('getOrder')
165
+ ->will($this->returnValue($mockOrder));
166
+
167
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
168
+ ->setMethods(array('getOrder', 'getRequest'))
169
+ ->getMock();
170
+ $mockObserver->expects($this->any())
171
+ ->method('getOrder')
172
+ ->will($this->returnValue($mockOrder));
173
+ $mockObserver->expects($this->any())
174
+ ->method('getRequest')
175
+ ->will($this->returnValue($mockRequest));
176
+
177
+ $instance = $this->_getInstance();
178
+ $resultInstance = $instance->buckaroo3extended_request_addcustomvars($mockObserver);
179
+ $resultVars = $mockRequest->getVars();
180
+
181
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer', $resultInstance);
182
+
183
+ // TODO: Let the request fill actual data instead of empty/null values to test against
184
+ $this->assertArrayHasKey('customVars', $resultVars);
185
+ $this->assertArrayHasKey('Articles', $resultVars['customVars'][0]);
186
+ }
187
+
188
+ public function testBuckaroo3extended_capture_request_addservices()
189
+ {
190
+ $this->registerMockSessions(array('checkout'));
191
+
192
+ $mockOrder = $this->_getMockOrder();
193
+
194
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
195
+ ->setMethods(null)
196
+ ->getMock();
197
+
198
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
199
+ ->setMethods(array('getOrder', 'getRequest'))
200
+ ->getMock();
201
+ $mockObserver->expects($this->any())
202
+ ->method('getOrder')
203
+ ->will($this->returnValue($mockOrder));
204
+ $mockObserver->expects($this->any())
205
+ ->method('getRequest')
206
+ ->will($this->returnValue($mockRequest));
207
+
208
+ $instance = $this->_getInstance();
209
+ $resultInstance = $instance->buckaroo3extended_capture_request_addservices($mockObserver);
210
+ $resultVars = $mockRequest->getVars();
211
+
212
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer', $resultInstance);
213
+
214
+ $expectedVars = array(
215
+ 'services' => array(
216
+ $instance->getMethod() => array(
217
+ 'action' => 'Capture',
218
+ 'version' => '1'
219
+ )
220
+ )
221
+ );
222
+
223
+ $this->assertEquals($expectedVars, $resultVars);
224
+ }
225
+
226
+ public function testBuckaroo3extended_capture_request_addcustomvars()
227
+ {
228
+ $this->registerMockSessions(array('checkout'));
229
+
230
+ $mockOrder = $this->_getMockOrder();
231
+
232
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
233
+ ->setMethods(array('getOrder'))
234
+ ->getMock();
235
+ $mockRequest->expects($this->once())
236
+ ->method('getOrder')
237
+ ->will($this->returnValue($mockOrder));
238
+
239
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
240
+ ->setMethods(array('getOrder', 'getRequest'))
241
+ ->getMock();
242
+ $mockObserver->expects($this->any())
243
+ ->method('getOrder')
244
+ ->will($this->returnValue($mockOrder));
245
+ $mockObserver->expects($this->any())
246
+ ->method('getRequest')
247
+ ->will($this->returnValue($mockRequest));
248
+
249
+ $instance = $this->_getInstance();
250
+ $resultInstance = $instance->buckaroo3extended_capture_request_addcustomvars($mockObserver);
251
+ $resultVars = $mockRequest->getVars();
252
+
253
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer', $resultInstance);
254
+
255
+ // TODO: Let the request fill actual data instead of empty/null values to test against
256
+ $this->assertArrayHasKey('customVars', $resultVars);
257
+ $this->assertArrayHasKey('Articles', $resultVars['customVars'][0]);
258
+ }
259
+
260
+ public function testBuckaroo3extended_cancelauthorize_request_addservices()
261
+ {
262
+ $this->registerMockSessions(array('checkout'));
263
+
264
+ $mockOrder = $this->_getMockOrder();
265
+
266
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
267
+ ->setMethods(null)
268
+ ->getMock();
269
+
270
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
271
+ ->setMethods(array('getOrder', 'getRequest'))
272
+ ->getMock();
273
+ $mockObserver->expects($this->any())
274
+ ->method('getOrder')
275
+ ->will($this->returnValue($mockOrder));
276
+ $mockObserver->expects($this->any())
277
+ ->method('getRequest')
278
+ ->will($this->returnValue($mockRequest));
279
+
280
+ $instance = $this->_getInstance();
281
+ $resultInstance = $instance->buckaroo3extended_cancelauthorize_request_addservices($mockObserver);
282
+ $resultVars = $mockRequest->getVars();
283
+
284
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_Observer', $resultInstance);
285
+
286
+ $expectedVars = array(
287
+ 'services' => array(
288
+ $instance->getMethod() => array(
289
+ 'action' => 'CancelAuthorize',
290
+ 'version' => '1'
291
+ )
292
+ )
293
+ );
294
+
295
+ $this->assertEquals($expectedVars, $resultVars);
296
+ }
297
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/Afterpay/PaymentMethodTest.php ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_PaymentMethods_Afterpay_PaymentMethodTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_PaymentMethod */
42
+ protected $_instance = null;
43
+
44
+ public function setUp()
45
+ {
46
+ $this->registerMockSessions();
47
+ Mage::app()->getStore()->setCurrentCurrencyCode('EUR');
48
+
49
+ $params = array(
50
+ 'payment' => $this->_getMockPayment(),
51
+ 'debugEmail' => '',
52
+ 'response' => false,
53
+ 'XML' => false
54
+ );
55
+
56
+ $mockCaptureResponse = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Response_Capture')
57
+ ->setConstructorArgs(array($params))
58
+ ->getMock();
59
+
60
+ $this->setModelMock('buckaroo3extended/response_capture', $mockCaptureResponse);
61
+
62
+ // final classes are not mockable, so mock the superclass instead
63
+ $mockSoap = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Abstract')
64
+ ->setConstructorArgs(
65
+ array(
66
+ 'vars' => array(),
67
+ 'method' => 'buckaroo3extended_afterpay'
68
+ )
69
+ )
70
+ ->getMock();
71
+
72
+ $this->setModelMock('buckaroo3extended/soap', $mockSoap);
73
+ }
74
+
75
+ protected function _getInstance()
76
+ {
77
+ if ($this->_instance === null) {
78
+ $this->_instance = $this
79
+ ->getMockBuilder('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_PaymentMethod')
80
+ ->setMethods(array('getConfigPaymentAction', 'getInfoInstance'))
81
+ ->getMock();
82
+ }
83
+
84
+ return $this->_instance;
85
+ }
86
+
87
+ /**
88
+ * @return mixed
89
+ */
90
+ protected function _getMockPayment()
91
+ {
92
+ $mockOrderAddress = $this->getMockBuilder('Mage_Sales_Model_Order_Address')
93
+ ->setMethods(array('getCountryId'))
94
+ ->getMock();
95
+ $mockOrderAddress->expects($this->any())
96
+ ->method('getCountryId')
97
+ ->will($this->returnValue('NL'));
98
+
99
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
100
+ ->setMethods(array('getPayment', 'getBillingAddress', 'getShippingAddress'))
101
+ ->getMock();
102
+ $mockOrder->expects($this->any())
103
+ ->method('getBillingAddress')
104
+ ->will($this->returnValue($mockOrderAddress));
105
+ $mockOrder->expects($this->any())
106
+ ->method('getShippingAddress')
107
+ ->will($this->returnValue($mockOrderAddress));
108
+
109
+ $mockPaymentInfo = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
110
+ ->setMethods(array('getOrder'))
111
+ ->getMock();
112
+ $mockPaymentInfo->expects($this->any())
113
+ ->method('getOrder')
114
+ ->willReturn($mockOrder);
115
+
116
+ $mockOrder->expects($this->any())
117
+ ->method('getPayment')
118
+ ->willReturn($mockPaymentInfo);
119
+
120
+ return $mockPaymentInfo;
121
+ }
122
+
123
+ public function testCanOrder()
124
+ {
125
+ $instance = $this->_getInstance();
126
+ $result = $instance->canCapture();
127
+
128
+ $this->assertTrue($result);
129
+ }
130
+
131
+ /**
132
+ * @return array
133
+ */
134
+ public function canCaptureTestProvider()
135
+ {
136
+ return array(
137
+ array(
138
+ Mage_Payment_Model_Method_Abstract::ACTION_ORDER,
139
+ false
140
+ ),
141
+ array(
142
+ Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE,
143
+ true
144
+ ),
145
+ array(
146
+ Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE,
147
+ true
148
+ )
149
+ );
150
+ }
151
+
152
+ /**
153
+ * @param $paymentAction
154
+ * @param $expected
155
+ *
156
+ * @dataProvider canCaptureTestProvider
157
+ */
158
+ public function testCanCapture($paymentAction, $expected)
159
+ {
160
+ $instance = $this->_getInstance();
161
+ $instance->expects($this->once())
162
+ ->method('getConfigPaymentAction')
163
+ ->will($this->returnValue($paymentAction));
164
+
165
+ $result = $instance->canCapture();
166
+
167
+ $this->assertEquals($expected, $result);
168
+ }
169
+
170
+ public function testCapture()
171
+ {
172
+ $mockPaymentInfo = $this->_getMockPayment();
173
+ $instance = $this->_getInstance();
174
+
175
+ $result = $instance->capture($mockPaymentInfo, 0);
176
+
177
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_PaymentMethod', $result);
178
+ }
179
+
180
+ /**
181
+ * @expectedException Mage_Core_Exception
182
+ * @expectedExceptionMessage Capture action is not available.
183
+ */
184
+ public function testShouldThrowAnExceptionIfCantCapture()
185
+ {
186
+ $instance = $this->_getInstance();
187
+ $instance->expects($this->once())
188
+ ->method('getConfigPaymentAction')
189
+ ->will($this->returnValue(Mage_Payment_Model_Method_Abstract::ACTION_ORDER));
190
+
191
+ $instance->capture(new Varien_Object(), 0);
192
+ }
193
+
194
+ public function testValidate()
195
+ {
196
+ $mockPaymentInfo = $this->_getMockPayment();
197
+
198
+ $instance = $this->_getInstance();
199
+ $instance->expects($this->any())
200
+ ->method('getInfoInstance')
201
+ ->will($this->returnValue($mockPaymentInfo));
202
+
203
+ $postData = array(
204
+ $instance->getCode() . '_bpe_accept' => 'checked',
205
+ $instance->getCode() . '_bpe_customer_account_number' => 'NL32INGB0000012345',
206
+ $instance->getCode() . '_BPE_Customergender' => 1,
207
+ $instance->getCode() . '_bpe_customer_phone_number' => '0513744112',
208
+ $instance->getCode() . '_BPE_BusinessSelect' => 1,
209
+ 'payment' => array(
210
+ $instance->getCode() => array(
211
+ 'year' => 1990,
212
+ 'month' => 01,
213
+ 'day' => 01
214
+ )
215
+ )
216
+ );
217
+
218
+ $request = Mage::app()->getRequest();
219
+ $request->setPost($postData);
220
+
221
+ $result = $instance->validate();
222
+
223
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay_PaymentMethod', $result);
224
+ }
225
+
226
+ /**
227
+ * @expectedException Mage_Core_Exception
228
+ * @expectedExceptionMessage Please accept the terms and conditions.
229
+ */
230
+ public function testShouldThrowAnExceptionIfNotAcceptedTos()
231
+ {
232
+ $instance = $this->_getInstance();
233
+ $instance->validate();
234
+ }
235
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/Afterpay2/ObserverTest.php ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_PaymentMethods_Afterpay2_ObserverTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_Observer */
42
+ protected $_instance = null;
43
+
44
+ protected function _getInstance()
45
+ {
46
+ if ($this->_instance === null) {
47
+ $this->_instance = new TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_Observer();
48
+ }
49
+
50
+ return $this->_instance;
51
+ }
52
+
53
+ protected function _getMockOrder()
54
+ {
55
+ $mockOrderAddress = $this->getMockBuilder('Mage_Sales_Model_Order_Address')
56
+ ->setMethods(null)
57
+ ->getMock();
58
+
59
+ $mockPayment = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
60
+ ->setMethods(array('getMethod'))
61
+ ->getMock();
62
+ $mockPayment->expects($this->any())
63
+ ->method('getMethod')
64
+ ->will($this->returnValue('buckaroo3extended_afterpay2'));
65
+
66
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
67
+ ->setMethods(array(
68
+ 'getPayment',
69
+ 'getPaymentMethodUsedForTransaction',
70
+ 'getBillingAddress',
71
+ 'getShippingAddress'
72
+ ))
73
+ ->getMock();
74
+ $mockOrder->expects($this->any())
75
+ ->method('getPayment')
76
+ ->will($this->returnValue($mockPayment));
77
+ $mockOrder->expects($this->any())
78
+ ->method('getPaymentMethodUsedForTransaction')
79
+ ->will($this->returnValue(false));
80
+ $mockOrder->expects($this->any())
81
+ ->method('getBillingAddress')
82
+ ->will($this->returnValue($mockOrderAddress));
83
+ $mockOrder->expects($this->any())
84
+ ->method('getShippingAddress')
85
+ ->will($this->returnValue($mockOrderAddress));
86
+
87
+ return $mockOrder;
88
+ }
89
+
90
+ /**
91
+ * @return array
92
+ */
93
+ public function testBuckaroo3extended_request_addservicesDataprovider()
94
+ {
95
+ return array(
96
+ array(
97
+ Mage_Payment_Model_Method_Abstract::ACTION_ORDER,
98
+ 'Pay'
99
+ ),
100
+ array(
101
+ Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE,
102
+ 'Authorize'
103
+ )
104
+ );
105
+ }
106
+
107
+ /**
108
+ * @param $paymethod
109
+ * @param $expected
110
+ *
111
+ * @dataProvider testBuckaroo3extended_request_addservicesDataprovider
112
+ */
113
+ public function testBuckaroo3extended_request_addservices($paymethod, $expected)
114
+ {
115
+ $this->registerMockSessions(array('checkout'));
116
+
117
+ $mockOrder = $this->_getMockOrder();
118
+
119
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
120
+ ->setMethods(null)
121
+ ->getMock();
122
+
123
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
124
+ ->setMethods(array('getOrder', 'getRequest'))
125
+ ->getMock();
126
+ $mockObserver->expects($this->any())
127
+ ->method('getOrder')
128
+ ->will($this->returnValue($mockOrder));
129
+ $mockObserver->expects($this->any())
130
+ ->method('getRequest')
131
+ ->will($this->returnValue($mockRequest));
132
+
133
+
134
+ $instance = $this->_getInstance();
135
+ Mage::app()->getStore()->setConfig('buckaroo/' . $instance->getCode() . '/payment_action', $paymethod);
136
+
137
+ $resultInstance = $instance->buckaroo3extended_request_addservices($mockObserver);
138
+ $resultVars = $mockRequest->getVars();
139
+
140
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_Observer', $resultInstance);
141
+
142
+ $expectedVars = array(
143
+ 'services' => array(
144
+ $instance->getMethod() => array(
145
+ 'action' => $expected,
146
+ 'version' => '1'
147
+ )
148
+ )
149
+ );
150
+
151
+ $this->assertEquals($expectedVars, $resultVars);
152
+ }
153
+
154
+ public function testBuckaroo3extended_request_addcustomvars()
155
+ {
156
+ $this->registerMockSessions(array('checkout'));
157
+
158
+ $mockOrder = $this->_getMockOrder();
159
+
160
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
161
+ ->setMethods(array('getOrder'))
162
+ ->getMock();
163
+ $mockRequest->expects($this->once())
164
+ ->method('getOrder')
165
+ ->will($this->returnValue($mockOrder));
166
+
167
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
168
+ ->setMethods(array('getOrder', 'getRequest'))
169
+ ->getMock();
170
+ $mockObserver->expects($this->any())
171
+ ->method('getOrder')
172
+ ->will($this->returnValue($mockOrder));
173
+ $mockObserver->expects($this->any())
174
+ ->method('getRequest')
175
+ ->will($this->returnValue($mockRequest));
176
+
177
+ $instance = $this->_getInstance();
178
+ $resultInstance = $instance->buckaroo3extended_request_addcustomvars($mockObserver);
179
+ $resultVars = $mockRequest->getVars();
180
+
181
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_Observer', $resultInstance);
182
+
183
+ // TODO: Let the request fill actual data instead of empty/null values to test against
184
+ $this->assertArrayHasKey('customVars', $resultVars);
185
+ $this->assertArrayHasKey('Articles', $resultVars['customVars'][0]);
186
+ }
187
+
188
+ public function testBuckaroo3extended_capture_request_addservices()
189
+ {
190
+ $this->registerMockSessions(array('checkout'));
191
+
192
+ $mockOrder = $this->_getMockOrder();
193
+
194
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
195
+ ->setMethods(null)
196
+ ->getMock();
197
+
198
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
199
+ ->setMethods(array('getOrder', 'getRequest'))
200
+ ->getMock();
201
+ $mockObserver->expects($this->any())
202
+ ->method('getOrder')
203
+ ->will($this->returnValue($mockOrder));
204
+ $mockObserver->expects($this->any())
205
+ ->method('getRequest')
206
+ ->will($this->returnValue($mockRequest));
207
+
208
+ $instance = $this->_getInstance();
209
+ $resultInstance = $instance->buckaroo3extended_capture_request_addservices($mockObserver);
210
+ $resultVars = $mockRequest->getVars();
211
+
212
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_Observer', $resultInstance);
213
+
214
+ $expectedVars = array(
215
+ 'services' => array(
216
+ $instance->getMethod() => array(
217
+ 'action' => 'Capture',
218
+ 'version' => '1'
219
+ )
220
+ )
221
+ );
222
+
223
+ $this->assertEquals($expectedVars, $resultVars);
224
+ }
225
+
226
+ public function testBuckaroo3extended_capture_request_addcustomvars()
227
+ {
228
+ $this->registerMockSessions(array('checkout'));
229
+
230
+ $mockOrder = $this->_getMockOrder();
231
+
232
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
233
+ ->setMethods(array('getOrder'))
234
+ ->getMock();
235
+ $mockRequest->expects($this->once())
236
+ ->method('getOrder')
237
+ ->will($this->returnValue($mockOrder));
238
+
239
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
240
+ ->setMethods(array('getOrder', 'getRequest'))
241
+ ->getMock();
242
+ $mockObserver->expects($this->any())
243
+ ->method('getOrder')
244
+ ->will($this->returnValue($mockOrder));
245
+ $mockObserver->expects($this->any())
246
+ ->method('getRequest')
247
+ ->will($this->returnValue($mockRequest));
248
+
249
+ $instance = $this->_getInstance();
250
+ $resultInstance = $instance->buckaroo3extended_capture_request_addcustomvars($mockObserver);
251
+ $resultVars = $mockRequest->getVars();
252
+
253
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_Observer', $resultInstance);
254
+
255
+ // TODO: Let the request fill actual data instead of empty/null values to test against
256
+ $this->assertArrayHasKey('customVars', $resultVars);
257
+ $this->assertArrayHasKey('Articles', $resultVars['customVars'][0]);
258
+ }
259
+
260
+ public function testBuckaroo3extended_cancelauthorize_request_addservices()
261
+ {
262
+ $this->registerMockSessions(array('checkout'));
263
+
264
+ $mockOrder = $this->_getMockOrder();
265
+
266
+ $mockRequest = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Abstract')
267
+ ->setMethods(null)
268
+ ->getMock();
269
+
270
+ $mockObserver = $this->getMockBuilder('Varien_Event_Observer')
271
+ ->setMethods(array('getOrder', 'getRequest'))
272
+ ->getMock();
273
+ $mockObserver->expects($this->any())
274
+ ->method('getOrder')
275
+ ->will($this->returnValue($mockOrder));
276
+ $mockObserver->expects($this->any())
277
+ ->method('getRequest')
278
+ ->will($this->returnValue($mockRequest));
279
+
280
+ $instance = $this->_getInstance();
281
+ $resultInstance = $instance->buckaroo3extended_cancelauthorize_request_addservices($mockObserver);
282
+ $resultVars = $mockRequest->getVars();
283
+
284
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_Observer', $resultInstance);
285
+
286
+ $expectedVars = array(
287
+ 'services' => array(
288
+ $instance->getMethod() => array(
289
+ 'action' => 'CancelAuthorize',
290
+ 'version' => '1'
291
+ )
292
+ )
293
+ );
294
+
295
+ $this->assertEquals($expectedVars, $resultVars);
296
+ }
297
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/Afterpay2/PaymentMethodTest.php ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_PaymentMethods_Afterpay2_PaymentMethodTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_PaymentMethod */
42
+ protected $_instance = null;
43
+
44
+ public function setUp()
45
+ {
46
+ $this->registerMockSessions();
47
+ Mage::app()->getStore()->setCurrentCurrencyCode('EUR');
48
+
49
+ $params = array(
50
+ 'payment' => $this->_getMockPayment(),
51
+ 'debugEmail' => '',
52
+ 'response' => false,
53
+ 'XML' => false
54
+ );
55
+
56
+ $mockCaptureResponse = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Response_Capture')
57
+ ->setConstructorArgs(array($params))
58
+ ->getMock();
59
+
60
+ $this->setModelMock('buckaroo3extended/response_capture', $mockCaptureResponse);
61
+
62
+ // final classes are not mockable, so mock the superclass instead
63
+ $mockSoap = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Abstract')
64
+ ->setConstructorArgs(
65
+ array(
66
+ 'vars' => array(),
67
+ 'method' => 'buckaroo3extended_afterpay2'
68
+ )
69
+ )
70
+ ->getMock();
71
+
72
+ $this->setModelMock('buckaroo3extended/soap', $mockSoap);
73
+ }
74
+
75
+ protected function _getInstance()
76
+ {
77
+ if ($this->_instance === null) {
78
+ $this->_instance = $this
79
+ ->getMockBuilder('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_PaymentMethod')
80
+ ->setMethods(array('getConfigPaymentAction', 'getInfoInstance'))
81
+ ->getMock();
82
+ }
83
+
84
+ return $this->_instance;
85
+ }
86
+
87
+ /**
88
+ * @return mixed
89
+ */
90
+ protected function _getMockPayment()
91
+ {
92
+ $mockOrderAddress = $this->getMockBuilder('Mage_Sales_Model_Order_Address')
93
+ ->setMethods(array('getCountryId'))
94
+ ->getMock();
95
+ $mockOrderAddress->expects($this->any())
96
+ ->method('getCountryId')
97
+ ->will($this->returnValue('NL'));
98
+
99
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
100
+ ->setMethods(array('getPayment', 'getBillingAddress', 'getShippingAddress'))
101
+ ->getMock();
102
+ $mockOrder->expects($this->any())
103
+ ->method('getBillingAddress')
104
+ ->will($this->returnValue($mockOrderAddress));
105
+ $mockOrder->expects($this->any())
106
+ ->method('getShippingAddress')
107
+ ->will($this->returnValue($mockOrderAddress));
108
+
109
+ $mockPaymentInfo = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
110
+ ->setMethods(array('getOrder'))
111
+ ->getMock();
112
+ $mockPaymentInfo->expects($this->any())
113
+ ->method('getOrder')
114
+ ->willReturn($mockOrder);
115
+
116
+ $mockOrder->expects($this->any())
117
+ ->method('getPayment')
118
+ ->willReturn($mockPaymentInfo);
119
+
120
+ return $mockPaymentInfo;
121
+ }
122
+
123
+ public function testCanOrder()
124
+ {
125
+ $instance = $this->_getInstance();
126
+ $result = $instance->canCapture();
127
+
128
+ $this->assertTrue($result);
129
+ }
130
+
131
+ /**
132
+ * @return array
133
+ */
134
+ public function canCaptureTestProvider()
135
+ {
136
+ return array(
137
+ array(
138
+ Mage_Payment_Model_Method_Abstract::ACTION_ORDER,
139
+ false
140
+ ),
141
+ array(
142
+ Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE,
143
+ true
144
+ ),
145
+ array(
146
+ Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE,
147
+ true
148
+ )
149
+ );
150
+ }
151
+
152
+ /**
153
+ * @param $paymentAction
154
+ * @param $expected
155
+ *
156
+ * @dataProvider canCaptureTestProvider
157
+ */
158
+ public function testCanCapture($paymentAction, $expected)
159
+ {
160
+ $instance = $this->_getInstance();
161
+ $instance->expects($this->once())
162
+ ->method('getConfigPaymentAction')
163
+ ->will($this->returnValue($paymentAction));
164
+
165
+ $result = $instance->canCapture();
166
+
167
+ $this->assertEquals($expected, $result);
168
+ }
169
+
170
+ public function testCapture()
171
+ {
172
+ $mockPaymentInfo = $this->_getMockPayment();
173
+ $instance = $this->_getInstance();
174
+
175
+ $result = $instance->capture($mockPaymentInfo, 0);
176
+
177
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_PaymentMethod', $result);
178
+ }
179
+
180
+ /**
181
+ * @expectedException Mage_Core_Exception
182
+ * @expectedExceptionMessage Capture action is not available.
183
+ */
184
+ public function testShouldThrowAnExceptionIfCantCapture()
185
+ {
186
+ $instance = $this->_getInstance();
187
+ $instance->expects($this->once())
188
+ ->method('getConfigPaymentAction')
189
+ ->will($this->returnValue(Mage_Payment_Model_Method_Abstract::ACTION_ORDER));
190
+
191
+ $instance->capture(new Varien_Object(), 0);
192
+ }
193
+
194
+ public function testValidate()
195
+ {
196
+ $mockPaymentInfo = $this->_getMockPayment();
197
+
198
+ $instance = $this->_getInstance();
199
+ $instance->expects($this->any())
200
+ ->method('getInfoInstance')
201
+ ->will($this->returnValue($mockPaymentInfo));
202
+
203
+ $postData = array(
204
+ $instance->getCode() . '_bpe_accept' => 'checked',
205
+ $instance->getCode() . '_bpe_customer_account_number' => 'NL32INGB0000012345',
206
+ $instance->getCode() . '_BPE_Customergender' => 1,
207
+ $instance->getCode() . '_bpe_customer_phone_number' => '0513744112',
208
+ $instance->getCode() . '_BPE_BusinessSelect' => 1,
209
+ 'payment' => array(
210
+ $instance->getCode() => array(
211
+ 'year' => 1990,
212
+ 'month' => 01,
213
+ 'day' => 01
214
+ )
215
+ )
216
+ );
217
+
218
+ $request = Mage::app()->getRequest();
219
+ $request->setPost($postData);
220
+
221
+ $result = $instance->validate();
222
+
223
+ $this->assertInstanceOf('TIG_Buckaroo3Extended_Model_PaymentMethods_Afterpay2_PaymentMethod', $result);
224
+ }
225
+
226
+ /**
227
+ * @expectedException Mage_Core_Exception
228
+ * @expectedExceptionMessage Please accept the terms and conditions.
229
+ */
230
+ public function testShouldThrowAnExceptionIfNotAcceptedTos()
231
+ {
232
+ $instance = $this->_getInstance();
233
+ $instance->validate();
234
+ }
235
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/PaymentMethods/PaymentMethodTest.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_PaymentMethods_PaymentMethodTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ protected $_code = 'unittest_payment';
42
+
43
+ /** @var null|TIG_Buckaroo3Extended_Model_PaymentMethods_PaymentMethod */
44
+ protected $_instance = null;
45
+
46
+ public function setUp()
47
+ {
48
+ $configData = $this->testGetConfigDataProvider();
49
+
50
+ foreach ($configData as $config) {
51
+ $pathstart = 'payment';
52
+
53
+ if ($config[0] == 'payment_action') {
54
+ $pathstart = 'buckaroo';
55
+ }
56
+
57
+ Mage::app()->getStore()->setConfig($pathstart . '/' . $this->_code . '/' . $config[0], $config[1]);
58
+ }
59
+ }
60
+
61
+ protected function _getInstance()
62
+ {
63
+ if ($this->_instance === null) {
64
+ $this->_instance = new TIG_Buckaroo3Extended_Model_PaymentMethods_PaymentMethod();
65
+ $this->setProperty('_code', $this->_code, $this->_instance);
66
+ }
67
+
68
+ return $this->_instance;
69
+ }
70
+
71
+ public function testGetConfigDataProvider()
72
+ {
73
+ return array(
74
+ array(
75
+ 'active',
76
+ '1'
77
+ ),
78
+ array(
79
+ 'payment_action',
80
+ 'order'
81
+ ),
82
+ array(
83
+ 'title',
84
+ 'Payment Title'
85
+ ),
86
+ array(
87
+ 'sort_order',
88
+ '10'
89
+ )
90
+ );
91
+ }
92
+
93
+ /**
94
+ * @param $field
95
+ * @param $expected
96
+ *
97
+ * @dataProvider testGetConfigDataProvider
98
+ */
99
+ public function testGetConfigData($field, $expected)
100
+ {
101
+ $instance = $this->_getInstance();
102
+ $result = $instance->getConfigData($field);
103
+
104
+ $this->assertEquals($expected, $result);
105
+ }
106
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Refund/CreditmemoTest.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class TIG_Buckaroo3Extended_Model_Refund_CreditmemoTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
3
+ {
4
+ public function createInstanceWithoutConstructor($class)
5
+ {
6
+ $reflector = new ReflectionClass($class);
7
+
8
+ if (method_exists($class, 'newInstanceWithoutConstructor')) {
9
+ return $class->newInstanceWithoutConstructor();
10
+ }
11
+
12
+ $properties = $reflector->getProperties();
13
+ $defaults = $reflector->getDefaultProperties();
14
+
15
+ $serealized = "O:" . strlen($class) . ":\"$class\":".count($properties) .':{';
16
+
17
+ foreach ($properties as $property) {
18
+ $name = $property->getName();
19
+ if ($property->isProtected()) {
20
+ $name = chr(0) . '*' .chr(0) .$name;
21
+ } elseif ($property->isPrivate()) {
22
+ $name = chr(0) . $class. chr(0).$name;
23
+ }
24
+
25
+ $serealized .= serialize($name);
26
+
27
+ if (array_key_exists($property->getName(), $defaults)) {
28
+ $serealized .= serialize($defaults[$property->getName()]);
29
+ } else {
30
+ $serealized .= serialize(null);
31
+ }
32
+ }
33
+
34
+ $serealized .="}";
35
+
36
+ return unserialize($serealized);
37
+ }
38
+
39
+ protected function _getInstance($data = array()){
40
+ $creditmemo = $this->createInstanceWithoutConstructor('TIG_Buckaroo3Extended_Model_Refund_Creditmemo');
41
+
42
+ if(!array_key_exists('order',$data)){
43
+
44
+ }else{
45
+ $this->invokeMethod($creditmemo,'setCurrentOrder',array($data['order']));
46
+ }
47
+
48
+ if(!array_key_exists('storeId',$data)){
49
+ $order = $this->invokeMethod($creditmemo,'getOrder');
50
+ $this->invokeMethod($creditmemo,'setStoreId',array($order->getStoreId()));
51
+ }else{
52
+ $this->invokeMethod($creditmemo,'setStoreId',array($data['storeId']));
53
+ }
54
+
55
+ if(!array_key_exists('payment',$data)){
56
+
57
+ }else{
58
+ $this->invokeMethod($creditmemo,'',array($data['payment']));
59
+ }
60
+
61
+ if(!array_key_exists('postArray',$data)){
62
+
63
+ }else{
64
+ $this->invokeMethod($creditmemo,'setPostArray',array($data['postArray']));
65
+ }
66
+
67
+ if(!array_key_exists('XML',$data)){
68
+
69
+ }else{
70
+ $this->invokeMethod($creditmemo,'setResponseXML',array($data['XML']));
71
+ }
72
+
73
+ if(!array_key_exists('response',$data)){
74
+
75
+ }else{
76
+ $this->invokeMethod($creditmemo,'setResponse',array($data['response']));
77
+ }
78
+
79
+ if(!array_key_exists('debugEmail',$data)){
80
+
81
+ }else{
82
+ $this->invokeMethod($creditmemo,'setDebugEmail',array($data['debugEmail']));
83
+ }
84
+
85
+ return $creditmemo;
86
+ }
87
+
88
+ public function _getCreditmemoDataItemsTestProvider()
89
+ {
90
+ return array(
91
+ array(1, 99),
92
+ array(666, 99),
93
+ );
94
+ }
95
+
96
+ /**
97
+ * @test
98
+ * @dataProvider _getCreditmemoDataItemsTestProvider
99
+ */
100
+ public function _getCreditmemoDataItemsTest($id, $qty){
101
+ $postArray = array('brq_amount_credit'=>3);
102
+
103
+ // Create the mock order item.
104
+ $mockMageOrderItem = $this->getMockBuilder('Mage_Sales_Model_Order_Item')
105
+ ->setMethods(array('getId', 'getQtyRefunded', 'getQtyInvoiced'))
106
+ ->getMock();
107
+ $mockMageOrderItem->method('getId')->will($this->returnValue($id));
108
+ $mockMageOrderItem->method('getQtyRefunded')->will($this->returnValue($qty));
109
+ $mockMageOrderItem->method('getQtyInvoiced')->will($this->returnValue($qty));
110
+
111
+ // Create the mock order.
112
+ $mockMageOrder = $this->getMockBuilder('Mage_Sales_Model_Order')->setMethods(array('getId', 'getAllItems'))->getMock();
113
+ $mockMageOrder->method('getId')->will($this->returnValue(1));
114
+ $mockMageOrder->method('getAllItems')->will($this->returnValue(array(
115
+ $mockMageOrderItem,
116
+ )));
117
+
118
+ $creditmemo = $this->_getInstance(
119
+ array(
120
+ 'postArray'=>$postArray,
121
+ 'order'=>$mockMageOrder,
122
+ ));
123
+ $result = $this->invokeMethod($creditmemo,'_getCreditmemoDataItems');
124
+
125
+ $this->assertArrayHasKey($id,$result);
126
+
127
+ }
128
+
129
+
130
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Request/CancelAuthorizeTest.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_Request_CancelAuthorizeTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_Request_CancelAuthorize */
42
+ protected $_instance = null;
43
+
44
+ public function setUp()
45
+ {
46
+ $this->registerMockSessions();
47
+ Mage::app()->getStore()->setCurrentCurrencyCode('EUR');
48
+
49
+ $params = array(
50
+ 'payment' => $this->_getMockPayment(),
51
+ 'debugEmail' => '',
52
+ 'response' => false,
53
+ 'XML' => false
54
+ );
55
+
56
+ $mockCancelAuthorizeResponse = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Response_CancelAuthorize')
57
+ ->setConstructorArgs(array($params))
58
+ ->getMock();
59
+
60
+ $this->setModelMock('buckaroo3extended/response_cancelAuthorize', $mockCancelAuthorizeResponse);
61
+
62
+ // final classes are not mockable, so mock the superclass instead
63
+ $mockSoap = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Abstract')
64
+ ->setConstructorArgs(
65
+ array(
66
+ 'vars' => array(),
67
+ 'method' => 'buckaroo3extended_afterpay'
68
+ )
69
+ )
70
+ ->getMock();
71
+
72
+ $this->setModelMock('buckaroo3extended/soap', $mockSoap);
73
+ }
74
+
75
+ protected function _getInstance()
76
+ {
77
+ if ($this->_instance === null) {
78
+ $params = array('payment' => $this->_getMockPayment());
79
+
80
+ $this->_instance = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_CancelAuthorize')
81
+ ->setMethods(
82
+ array(
83
+ '_addBaseVariables',
84
+ '_addOrderVariables',
85
+ '_addShopVariables',
86
+ '_addSoftwareVariables',
87
+ '_addCancelAuthorizeVariables'
88
+ )
89
+ )
90
+ ->setConstructorArgs(array($params))
91
+ ->getMock();
92
+ }
93
+
94
+ return $this->_instance;
95
+ }
96
+
97
+ /**
98
+ * @return PHPUnit_Framework_MockObject_MockObject
99
+ */
100
+ protected function _getMockOrderAddress()
101
+ {
102
+ $mockOrderAddress = $this->getMockBuilder('Mage_Sales_Model_Order_Address')
103
+ ->setMethods(array('getData', 'getStreetFull', 'getFirstname'))
104
+ ->getMock();
105
+ $mockOrderAddress->expects($this->any())
106
+ ->method('getData')
107
+ ->will($this->returnValue(array()));
108
+ $mockOrderAddress->expects($this->any())
109
+ ->method('getStreetFull')
110
+ ->will($this->returnValue('Hoofdstraat 90 1'));
111
+ $mockOrderAddress->expects($this->any())
112
+ ->method('getFirstname')
113
+ ->will($this->returnValue('Test'));
114
+
115
+ return $mockOrderAddress;
116
+ }
117
+
118
+ /**
119
+ * @return PHPUnit_Framework_MockObject_MockObject
120
+ */
121
+ protected function _getMockPayment()
122
+ {
123
+ $mockOrderAddress = $this->_getMockOrderAddress();
124
+
125
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
126
+ ->setMethods(array('getBillingAddress', 'getShippingAddress', 'getPayment'))
127
+ ->getMock();
128
+ $mockOrder->expects($this->any())
129
+ ->method('getBillingAddress')
130
+ ->will($this->returnValue($mockOrderAddress));
131
+ $mockOrder->expects($this->any())
132
+ ->method('getShippingAddress')
133
+ ->will($this->returnValue($mockOrderAddress));
134
+
135
+ $mockPayment = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
136
+ ->setMethods(array('getOrder', 'getMethod'))
137
+ ->getMock();
138
+ $mockPayment->expects($this->any())
139
+ ->method('getOrder')
140
+ ->will($this->returnValue($mockOrder));
141
+ $mockPayment->expects($this->any())
142
+ ->method('getMethod')
143
+ ->will($this->returnValue('buckaroo3extended_afterpay'));
144
+
145
+ $mockOrder->expects($this->any())
146
+ ->method('getPayment')
147
+ ->will($this->returnValue($mockPayment));
148
+
149
+ return $mockPayment;
150
+ }
151
+
152
+ public function testGetPayment()
153
+ {
154
+ $payment = $this->_getMockPayment();
155
+
156
+ $instance = $this->_getInstance();
157
+ $result = $instance->getPayment();
158
+
159
+ $this->assertEquals($payment, $result);
160
+ }
161
+
162
+ public function testSendRequest()
163
+ {
164
+ $instance = $this->_getInstance();
165
+
166
+ $instance->expects($this->once())->method('_addBaseVariables');
167
+ $instance->expects($this->once())->method('_addOrderVariables');
168
+ $instance->expects($this->once())->method('_addShopVariables');
169
+ $instance->expects($this->once())->method('_addSoftwareVariables');
170
+ $instance->expects($this->once())->method('_addCancelAuthorizeVariables');
171
+
172
+ $instance->sendRequest();
173
+ }
174
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Request/CaptureTest.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_Request_CaptureTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_Request_Capture */
42
+ protected $_instance = null;
43
+
44
+ public function setUp()
45
+ {
46
+ $this->registerMockSessions();
47
+ Mage::app()->getStore()->setCurrentCurrencyCode('EUR');
48
+
49
+ $params = array(
50
+ 'payment' => $this->_getMockPayment(),
51
+ 'debugEmail' => '',
52
+ 'response' => false,
53
+ 'XML' => false
54
+ );
55
+
56
+ $mockCaptureResponse = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Response_Capture')
57
+ ->setConstructorArgs(array($params))
58
+ ->getMock();
59
+
60
+ $this->setModelMock('buckaroo3extended/response_capture', $mockCaptureResponse);
61
+
62
+ // final classes are not mockable, so mock the superclass instead
63
+ $mockSoap = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Abstract')
64
+ ->setConstructorArgs(
65
+ array(
66
+ 'vars' => array(),
67
+ 'method' => 'buckaroo3extended_afterpay'
68
+ )
69
+ )
70
+ ->getMock();
71
+
72
+ $this->setModelMock('buckaroo3extended/soap', $mockSoap);
73
+ }
74
+
75
+ protected function _getInstance()
76
+ {
77
+ if ($this->_instance === null) {
78
+ $params = array('payment' => $this->_getMockPayment());
79
+
80
+ $this->_instance = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Request_Capture')
81
+ ->setMethods(
82
+ array(
83
+ '_addBaseVariables',
84
+ '_addOrderVariables',
85
+ '_addShopVariables',
86
+ '_addSoftwareVariables',
87
+ '_addCaptureVariables'
88
+ )
89
+ )
90
+ ->setConstructorArgs(array($params))
91
+ ->getMock();
92
+ }
93
+
94
+ return $this->_instance;
95
+ }
96
+
97
+ /**
98
+ * @return PHPUnit_Framework_MockObject_MockObject
99
+ */
100
+ protected function _getMockOrderAddress()
101
+ {
102
+ $mockOrderAddress = $this->getMockBuilder('Mage_Sales_Model_Order_Address')
103
+ ->setMethods(array('getData', 'getStreetFull', 'getFirstname'))
104
+ ->getMock();
105
+ $mockOrderAddress->expects($this->any())
106
+ ->method('getData')
107
+ ->will($this->returnValue(array()));
108
+ $mockOrderAddress->expects($this->any())
109
+ ->method('getStreetFull')
110
+ ->will($this->returnValue('Hoofdstraat 90 1'));
111
+ $mockOrderAddress->expects($this->any())
112
+ ->method('getFirstname')
113
+ ->will($this->returnValue('Test'));
114
+
115
+ return $mockOrderAddress;
116
+ }
117
+
118
+ /**
119
+ * @return PHPUnit_Framework_MockObject_MockObject
120
+ */
121
+ protected function _getMockPayment()
122
+ {
123
+ $mockOrderAddress = $this->_getMockOrderAddress();
124
+
125
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
126
+ ->setMethods(array('getBillingAddress', 'getShippingAddress', 'getPayment'))
127
+ ->getMock();
128
+ $mockOrder->expects($this->any())
129
+ ->method('getBillingAddress')
130
+ ->will($this->returnValue($mockOrderAddress));
131
+ $mockOrder->expects($this->any())
132
+ ->method('getShippingAddress')
133
+ ->will($this->returnValue($mockOrderAddress));
134
+
135
+ $mockPayment = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
136
+ ->setMethods(array('getOrder', 'getMethod'))
137
+ ->getMock();
138
+ $mockPayment->expects($this->any())
139
+ ->method('getOrder')
140
+ ->will($this->returnValue($mockOrder));
141
+ $mockPayment->expects($this->any())
142
+ ->method('getMethod')
143
+ ->will($this->returnValue('buckaroo3extended_afterpay'));
144
+
145
+ $mockOrder->expects($this->any())
146
+ ->method('getPayment')
147
+ ->will($this->returnValue($mockPayment));
148
+
149
+ return $mockPayment;
150
+ }
151
+
152
+ public function testSendRequest()
153
+ {
154
+ $instance = $this->_getInstance();
155
+
156
+ $instance->expects($this->once())->method('_addBaseVariables');
157
+ $instance->expects($this->once())->method('_addOrderVariables');
158
+ $instance->expects($this->once())->method('_addShopVariables');
159
+ $instance->expects($this->once())->method('_addSoftwareVariables');
160
+ $instance->expects($this->once())->method('_addCaptureVariables');
161
+
162
+ $instance->sendRequest();
163
+ }
164
+
165
+ public function testGetPayment()
166
+ {
167
+ $payment = $this->_getMockPayment();
168
+
169
+ $instance = $this->_getInstance();
170
+ $result = $instance->getPayment();
171
+
172
+ $this->assertEquals($payment, $result);
173
+ }
174
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Response/CancelAuthorizeTest.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_Response_CancelAuthorizeTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_Response_CancelAuthorize */
42
+ protected $_instance = null;
43
+
44
+ protected function _getInstance()
45
+ {
46
+ if ($this->_instance === null) {
47
+ $params = array(
48
+ 'payment' => $this->_getMockPayment(),
49
+ 'debugEmail' => '',
50
+ 'response' => true,
51
+ 'XML' => false
52
+ );
53
+
54
+ $this->_instance = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Response_CancelAuthorize')
55
+ ->setMethods(
56
+ array(
57
+ '_verifyResponse',
58
+ '_parseResponse',
59
+ '_addSubCodeComment',
60
+ '_requiredAction'
61
+ )
62
+ )
63
+ ->setConstructorArgs(array($params))
64
+ ->getMock();
65
+ }
66
+
67
+ return $this->_instance;
68
+ }
69
+
70
+ /**
71
+ * @return PHPUnit_Framework_MockObject_MockObject
72
+ */
73
+ protected function _getMockPayment()
74
+ {
75
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
76
+ ->setMethods(array('getPayment'))
77
+ ->getMock();
78
+
79
+ $mockPayment = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
80
+ ->setMethods(array('getOrder', 'getMethod'))
81
+ ->getMock();
82
+ $mockPayment->expects($this->any())
83
+ ->method('getOrder')
84
+ ->will($this->returnValue($mockOrder));
85
+ $mockPayment->expects($this->any())
86
+ ->method('getMethod')
87
+ ->will($this->returnValue('buckaroo3extended_afterpay'));
88
+
89
+ $mockOrder->expects($this->any())
90
+ ->method('getPayment')
91
+ ->will($this->returnValue($mockPayment));
92
+
93
+ return $mockPayment;
94
+ }
95
+
96
+ public function testGetPayment()
97
+ {
98
+ $payment = $this->_getMockPayment();
99
+
100
+ $instance = $this->_getInstance();
101
+ $result = $instance->getPayment();
102
+
103
+ $this->assertEquals($payment, $result);
104
+ }
105
+
106
+ public function testProcessResponse()
107
+ {
108
+ $instance = $this->_getInstance();
109
+ $instance->setOrder($this->_getMockPayment()->getOrder());
110
+
111
+ $instance->expects($this->once())->method('_verifyResponse')->willReturn(true);
112
+ $instance->expects($this->once())->method('_parseResponse')
113
+ ->willReturn(array(
114
+ 'status' => TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_SUCCESS
115
+ ));
116
+ $instance->expects($this->once())->method('_addSubCodeComment');
117
+ $instance->expects($this->once())->method('_requiredAction');
118
+
119
+ $instance->processResponse();
120
+ }
121
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Response/CaptureTest.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_Response_CaptureTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_Response_Capture */
42
+ protected $_instance = null;
43
+
44
+ protected function _getInstance()
45
+ {
46
+ if ($this->_instance === null) {
47
+ $params = array(
48
+ 'payment' => $this->_getMockPayment(),
49
+ 'debugEmail' => '',
50
+ 'response' => true,
51
+ 'XML' => false
52
+ );
53
+
54
+ $this->_instance = $this->getMockBuilder('TIG_Buckaroo3Extended_Model_Response_Capture')
55
+ ->setMethods(array(
56
+ '_verifyResponse',
57
+ '_parseResponse',
58
+ '_addSubCodeComment',
59
+ '_requiredAction'
60
+ ))
61
+ ->setConstructorArgs(array($params))
62
+ ->getMock();
63
+ }
64
+
65
+ return $this->_instance;
66
+ }
67
+
68
+ /**
69
+ * @return PHPUnit_Framework_MockObject_MockObject
70
+ */
71
+ protected function _getMockPayment()
72
+ {
73
+ $mockOrder = $this->getMockBuilder('Mage_Sales_Model_Order')
74
+ ->setMethods(array('getPayment'))
75
+ ->getMock();
76
+
77
+ $mockPayment = $this->getMockBuilder('Mage_Sales_Model_Order_Payment')
78
+ ->setMethods(array('getOrder', 'getMethod'))
79
+ ->getMock();
80
+ $mockPayment->expects($this->any())
81
+ ->method('getOrder')
82
+ ->will($this->returnValue($mockOrder));
83
+ $mockPayment->expects($this->any())
84
+ ->method('getMethod')
85
+ ->will($this->returnValue('buckaroo3extended_afterpay'));
86
+
87
+ $mockOrder->expects($this->any())
88
+ ->method('getPayment')
89
+ ->will($this->returnValue($mockPayment));
90
+
91
+ return $mockPayment;
92
+ }
93
+
94
+ public function testGetPayment()
95
+ {
96
+ $payment = $this->_getMockPayment();
97
+
98
+ $instance = $this->_getInstance();
99
+ $result = $instance->getPayment();
100
+
101
+ $this->assertEquals($payment, $result);
102
+ }
103
+
104
+ public function testProcessResponse()
105
+ {
106
+ $instance = $this->_getInstance();
107
+ $instance->setOrder($this->_getMockPayment()->getOrder());
108
+
109
+ $instance->expects($this->once())->method('_verifyResponse')->willReturn(true);
110
+ $instance->expects($this->once())
111
+ ->method('_parseResponse')
112
+ ->willReturn(array(
113
+ 'status' => TIG_Buckaroo3Extended_Model_Response_Abstract::BUCKAROO_SUCCESS
114
+ ));
115
+ $instance->expects($this->once())->method('_addSubCodeComment');
116
+ $instance->expects($this->once())->method('_requiredAction');
117
+
118
+ $instance->processResponse();
119
+ }
120
+ }
app/code/community/TIG/Buckaroo3Extended/Test/Unit/Model/Sources/PaymentFlowTest.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2016 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
+ class TIG_Buckaroo3Extended_Test_Unit_Model_Sources_PaymentFlowTest extends TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase
40
+ {
41
+ /** @var null|TIG_Buckaroo3Extended_Model_Sources_PaymentFlow */
42
+ protected $_instance = null;
43
+
44
+ protected function _getInstance()
45
+ {
46
+ if ($this->_instance === null) {
47
+ $this->_instance = Mage::getModel('buckaroo3extended/sources_paymentFlow');
48
+ }
49
+
50
+ return $this->_instance;
51
+ }
52
+
53
+ /**
54
+ * @return array
55
+ */
56
+ public function testToOptionArrayProvider()
57
+ {
58
+ return array(
59
+ array(Mage_Payment_Model_Method_Abstract::ACTION_ORDER),
60
+ array(Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE)
61
+ );
62
+ }
63
+
64
+ /**
65
+ * @param $paymentAction
66
+ *
67
+ * @dataProvider testToOptionArrayProvider
68
+ */
69
+ public function testToOptionArray($paymentAction)
70
+ {
71
+ $instance = $this->_getInstance();
72
+ $options = $instance->toOptionArray();
73
+
74
+ $hasOption = false;
75
+
76
+ if (is_array($options)) {
77
+ foreach ($options as $option) {
78
+ if ($option['value'] == $paymentAction) {
79
+ $hasOption = true;
80
+ break;
81
+ }
82
+ }
83
+ }
84
+
85
+ $this->assertTrue($hasOption);
86
+ }
87
+ }
app/code/community/TIG/Buckaroo3Extended/Test/bootstrap.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (strpos(__DIR__, '.modman') !== false) {
4
+ require_once(dirname(__DIR__) . '/../../../../../../../app/Mage.php');
5
+ } else {
6
+ require_once(__DIR__ . '/../../../../../../Mage.php');
7
+ }
8
+
9
+ ini_set('display_errors', true);
10
+ error_reporting(-1);
11
+ TIG_Buckaroo3Extended_Test_Framework_TIG_Test_TestCase::resetMagento();
app/code/community/TIG/Buckaroo3Extended/Test/phpunit.xml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
+ xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.0/phpunit.xsd"
3
+ bootstrap="bootstrap.php"
4
+ colors="true">
5
+
6
+ <testsuites>
7
+ <testsuite>
8
+ <directory>.</directory>
9
+ </testsuite>
10
+ </testsuites>
11
+
12
+ <filter>
13
+ <whitelist>
14
+ <directory>../../Buckaroo3Extended/Unit/Block</directory>
15
+ <directory>../../Buckaroo3Extended/controllers</directory>
16
+ <directory>../../Buckaroo3Extended/Helper</directory>
17
+ <directory>../../Buckaroo3Extended/Model</directory>
18
+ <file>../../Buckaroo3Extended/Exception.php</file>
19
+ </whitelist>
20
+ </filter>
21
+ </phpunit>
app/code/community/TIG/Buckaroo3Extended/controllers/NotifyController.php CHANGED
@@ -84,8 +84,19 @@ class TIG_Buckaroo3Extended_NotifyController extends Mage_Core_Controller_Front_
84
 
85
  $this->_debugEmail = '';
86
  if (isset($postData['brq_invoicenumber'])) {
 
 
 
 
 
 
 
87
  $this->_postArray = $postData;
88
  $orderId = $this->_postArray['brq_invoicenumber'];
 
 
 
 
89
  } else if (isset($postData['bpe_invoice'])) {
90
  $this->_restructurePostArray();
91
  $orderId = $this->_postArray['brq_invoicenumber'];
@@ -199,6 +210,9 @@ class TIG_Buckaroo3Extended_NotifyController extends Mage_Core_Controller_Front_
199
  $redirectData['path'] = 'checkout/cart';
200
  $redirectData['params'] = array();
201
  }
 
 
 
202
  $this->_redirect($redirectData['path'], $redirectData['params']);
203
 
204
  return;
@@ -257,6 +271,23 @@ class TIG_Buckaroo3Extended_NotifyController extends Mage_Core_Controller_Front_
257
  return array($module, $processedPush);
258
  }
259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  if ($this->_pushIsCreditmemo($this->_postArray)) {
261
  list($processedPush, $module) = $this->_updateCreditmemo();
262
  return array($module, $processedPush);
@@ -272,10 +303,38 @@ class TIG_Buckaroo3Extended_NotifyController extends Mage_Core_Controller_Front_
272
  return array($module, $processedPush);
273
  }
274
 
 
 
 
 
 
 
 
 
275
  Mage::throwException('unable to process PUSH');
276
  return false;
277
  }
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  protected function _updateOrderWithKey()
280
  {
281
  $this->_debugEmail .= "Transaction key matches the order. \n";
@@ -343,6 +402,30 @@ class TIG_Buckaroo3Extended_NotifyController extends Mage_Core_Controller_Front_
343
  return $this;
344
  }
345
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  protected function _newRefund()
347
  {
348
  $this->_debugEmail .= "The PUSH constitutes a new refund. \n";
84
 
85
  $this->_debugEmail = '';
86
  if (isset($postData['brq_invoicenumber'])) {
87
+ $invoice = null;
88
+ if (isset($postData['brq_relatedtransaction_refund'])) {
89
+ /** @var Mage_Sales_Model_Order_Invoice $invoice */
90
+ $invoice = Mage::getModel('sales/order_invoice')
91
+ ->load($postData['brq_relatedtransaction_refund'], 'transaction_id');
92
+ }
93
+
94
  $this->_postArray = $postData;
95
  $orderId = $this->_postArray['brq_invoicenumber'];
96
+
97
+ if (null !== $invoice && $invoice->getOrderIncrementId() != $this->_postArray['brq_invoicenumber']) {
98
+ $orderId = $invoice->getOrderIncrementId();
99
+ }
100
  } else if (isset($postData['bpe_invoice'])) {
101
  $this->_restructurePostArray();
102
  $orderId = $this->_postArray['brq_invoicenumber'];
210
  $redirectData['path'] = 'checkout/cart';
211
  $redirectData['params'] = array();
212
  }
213
+ if(!isset($redirectData['params'])){
214
+ $redirectData['params'] = array();
215
+ }
216
  $this->_redirect($redirectData['path'], $redirectData['params']);
217
 
218
  return;
271
  return array($module, $processedPush);
272
  }
273
 
274
+ $amountOrdered = $this->_order->getBaseGrandTotal();
275
+ if ($this->_postArray['brq_currency'] == $this->_order->getOrderCurrencyCode()) {
276
+ $amountOrdered = $this->_order->getGrandTotal();
277
+ }
278
+
279
+ // Save an order comment when a partial payment through transfer has been made
280
+ if ($this->_paymentCode == 'buckaroo3extended_transfer'
281
+ && $this->_postArray['brq_transaction_method'] == 'transfer'
282
+ && $this->_postArray['brq_amount'] < $amountOrdered
283
+ && $this->_order->getTransactionKey() != $this->_postArray['brq_transactions']
284
+ && $this->_order->getIncrementId() == $this->_postArray['brq_invoicenumber']
285
+ && (isset($this->_postArray['brq_websitekey']) && $merchantKey == $this->_postArray['brq_websitekey'])
286
+ ) {
287
+ list($processedPush, $module) = $this->_updateTransferPartialPaid();
288
+ return array($module, $processedPush);
289
+ }
290
+
291
  if ($this->_pushIsCreditmemo($this->_postArray)) {
292
  list($processedPush, $module) = $this->_updateCreditmemo();
293
  return array($module, $processedPush);
303
  return array($module, $processedPush);
304
  }
305
 
306
+ // C012 and C017 are Afterpay Capture transactions which don't need an update
307
+ if ($this->_postArray['brq_transaction_type'] == 'C012'
308
+ || $this->_postArray['brq_transaction_type'] == 'C017'
309
+ ) {
310
+ list($processedPush, $module) = $this->_updateCapture();
311
+ return array($module, $processedPush);
312
+ }
313
+
314
  Mage::throwException('unable to process PUSH');
315
  return false;
316
  }
317
 
318
+ protected function _updateTransferPartialPaid()
319
+ {
320
+ $this->_debugEmail .= "Order has been partial paid by Transer method. \n";
321
+
322
+ /** @var TIG_Buckaroo3Extended_Model_Response_Push $module */
323
+ $module = Mage::getModel(
324
+ 'buckaroo3extended/response_push',
325
+ array(
326
+ 'order' => $this->_order,
327
+ 'postArray' => $this->_postArray,
328
+ 'debugEmail' => $this->_debugEmail,
329
+ 'method' => $this->_paymentCode,
330
+ )
331
+ );
332
+
333
+ $processedPush = $module->processPartialTransferMessage();
334
+
335
+ return array($processedPush, $module);
336
+ }
337
+
338
  protected function _updateOrderWithKey()
339
  {
340
  $this->_debugEmail .= "Transaction key matches the order. \n";
402
  return $this;
403
  }
404
 
405
+ /**
406
+ * Capture updates are currently not supported
407
+ */
408
+ protected function _updateCapture()
409
+ {
410
+ $this->_debugEmail .= "Recieved PUSH to update capture. Unfortunately the module does not support capture updates at this time. The PUSH is ignored.";
411
+
412
+ $debugEmailConfig = Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/debug_email', $this->_order->getStoreId());
413
+ if (empty($debugEmailConfig))
414
+ {
415
+ return;
416
+ }
417
+
418
+ $mail = $this->_debugEmail;
419
+
420
+ mail(
421
+ Mage::getStoreConfig('buckaroo/buckaroo3extended_advanced/debug_email', $this->_order->getStoreId()),
422
+ 'Buckaroo 3 Extended Debug Email',
423
+ $mail
424
+ );
425
+
426
+ return $this;
427
+ }
428
+
429
  protected function _newRefund()
430
  {
431
  $this->_debugEmail .= "The PUSH constitutes a new refund. \n";
app/code/community/TIG/Buckaroo3Extended/etc/config.xml CHANGED
@@ -2,9 +2,14 @@
2
  <config>
3
  <modules>
4
  <TIG_Buckaroo3Extended>
5
- <version>4.15.2</version>
6
  </TIG_Buckaroo3Extended>
7
  </modules>
 
 
 
 
 
8
  <frontend>
9
  <layout>
10
  <updates>
@@ -240,6 +245,15 @@
240
  </buckaroo3extended_refund_observer>
241
  </observers>
242
  </sales_order_payment_refund>
 
 
 
 
 
 
 
 
 
243
  <buckaroo3extended_refund_request_setmethod>
244
  <observers>
245
  <buckaroo3extended_paymentmethod_observer_payperemail>
@@ -460,6 +474,16 @@
460
  </buckaroo3extended_refund_request_addservices>
461
  <buckaroo3extended_refund_request_addcustomvars>
462
  <observers>
 
 
 
 
 
 
 
 
 
 
463
  <buckaroo3extended_paymentmethod_observer_ideal>
464
  <type>Singleton</type>
465
  <class>buckaroo3extended/paymentMethods_ideal_observer</class>
@@ -1117,6 +1141,48 @@
1117
  </buckaroo3extended_paymentmethod_observer_paymentguarantee>
1118
  </observers>
1119
  </buckaroo3extended_response_custom_processing>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1120
  </events>
1121
  </global>
1122
  <default>
@@ -1674,43 +1740,37 @@
1674
  <creditnote>0</creditnote>
1675
  </buckaroo3extended_paymentguarantee>
1676
 
1677
- <!--<buckaroo3extended_afterpay>-->
1678
- <!--<active>0</active>-->
1679
- <!--<mode>0</mode>-->
1680
- <!--<title>Afterpay</title>-->
1681
- <!--<allowspecific>0</allowspecific>-->
1682
- <!--<specificcountry></specificcountry>-->
1683
- <!--<order_status_success></order_status_success>-->
1684
- <!--<order_status_failed></order_status_failed>-->
1685
- <!--<sort_order>25</sort_order>-->
1686
- <!--<limit_by_ip>0</limit_by_ip>-->
1687
- <!--<allowed_currencies>EUR</allowed_currencies>-->
1688
- <!--<allowed_methods>all</allowed_methods>-->
1689
- <!--<duedate>0</duedate>-->
1690
- <!--<payment_fee_label>Fee</payment_fee_label>-->
1691
- <!--<order_email>1</order_email>-->
1692
- <!--<paymethod>afterpayacceptgiro</paymethod>-->
1693
- <!--<business>1</business>-->
1694
- <!--</buckaroo3extended_afterpay>-->
1695
 
1696
- <!--<buckaroo3extended_afterpay2>-->
1697
- <!--<active>0</active>-->
1698
- <!--<mode>0</mode>-->
1699
- <!--<title>Afterpay 2</title>-->
1700
- <!--<allowspecific>0</allowspecific>-->
1701
- <!--<specificcountry></specificcountry>-->
1702
- <!--<order_status_success></order_status_success>-->
1703
- <!--<order_status_failed></order_status_failed>-->
1704
- <!--<sort_order>25</sort_order>-->
1705
- <!--<limit_by_ip>0</limit_by_ip>-->
1706
- <!--<allowed_currencies>EUR</allowed_currencies>-->
1707
- <!--<allowed_methods>all</allowed_methods>-->
1708
- <!--<duedate>0</duedate>-->
1709
- <!--<payment_fee_label>Fee</payment_fee_label>-->
1710
- <!--<order_email>1</order_email>-->
1711
- <!--<paymethod>afterpayacceptgiro</paymethod>-->
1712
- <!--<business>1</business>-->
1713
- <!--</buckaroo3extended_afterpay2>-->
1714
 
1715
  <buckaroo3extended_payperemail>
1716
  <active>0</active>
2
  <config>
3
  <modules>
4
  <TIG_Buckaroo3Extended>
5
+ <version>4.16.4</version>
6
  </TIG_Buckaroo3Extended>
7
  </modules>
8
+ <tig>
9
+ <buckaroo>
10
+ <stability>stable</stability>
11
+ </buckaroo>
12
+ </tig>
13
  <frontend>
14
  <layout>
15
  <updates>
245
  </buckaroo3extended_refund_observer>
246
  </observers>
247
  </sales_order_payment_refund>
248
+ <sales_order_payment_cancel>
249
+ <observers>
250
+ <buckaroo3extended_cancelauthorize_observer>
251
+ <type>Singleton</type>
252
+ <class>buckaroo3extended/observer_cancelAuthorize</class>
253
+ <method>sales_order_payment_cancel_authorize</method>
254
+ </buckaroo3extended_cancelauthorize_observer>
255
+ </observers>
256
+ </sales_order_payment_cancel>
257
  <buckaroo3extended_refund_request_setmethod>
258
  <observers>
259
  <buckaroo3extended_paymentmethod_observer_payperemail>
474
  </buckaroo3extended_refund_request_addservices>
475
  <buckaroo3extended_refund_request_addcustomvars>
476
  <observers>
477
+ <buckaroo3extended_paymentmethod_observer_afterpay>
478
+ <type>Singleton</type>
479
+ <class>buckaroo3extended/paymentMethods_afterpay_observer</class>
480
+ <method>buckaroo3extended_refund_request_addcustomvars</method>
481
+ </buckaroo3extended_paymentmethod_observer_afterpay>
482
+ <buckaroo3extended_paymentmethod_observer_afterpay2>
483
+ <type>Singleton</type>
484
+ <class>buckaroo3extended/paymentMethods_afterpay2_observer</class>
485
+ <method>buckaroo3extended_refund_request_addcustomvars</method>
486
+ </buckaroo3extended_paymentmethod_observer_afterpay2>
487
  <buckaroo3extended_paymentmethod_observer_ideal>
488
  <type>Singleton</type>
489
  <class>buckaroo3extended/paymentMethods_ideal_observer</class>
1141
  </buckaroo3extended_paymentmethod_observer_paymentguarantee>
1142
  </observers>
1143
  </buckaroo3extended_response_custom_processing>
1144
+ <buckaroo3extended_capture_request_addservices>
1145
+ <observers>
1146
+ <buckaroo3extended_paymentmethod_observer_afterpay>
1147
+ <type>Singleton</type>
1148
+ <class>buckaroo3extended/paymentMethods_afterpay_observer</class>
1149
+ <method>buckaroo3extended_capture_request_addservices</method>
1150
+ </buckaroo3extended_paymentmethod_observer_afterpay>
1151
+ <buckaroo3extended_paymentmethod_observer_afterpay2>
1152
+ <type>Singleton</type>
1153
+ <class>buckaroo3extended/paymentMethods_afterpay2_observer</class>
1154
+ <method>buckaroo3extended_capture_request_addservices</method>
1155
+ </buckaroo3extended_paymentmethod_observer_afterpay2>
1156
+ </observers>
1157
+ </buckaroo3extended_capture_request_addservices>
1158
+ <buckaroo3extended_capture_request_addcustomvars>
1159
+ <observers>
1160
+ <buckaroo3extended_paymentmethod_observer_afterpay>
1161
+ <type>Singleton</type>
1162
+ <class>buckaroo3extended/paymentMethods_afterpay_observer</class>
1163
+ <method>buckaroo3extended_capture_request_addcustomvars</method>
1164
+ </buckaroo3extended_paymentmethod_observer_afterpay>
1165
+ <buckaroo3extended_paymentmethod_observer_afterpay2>
1166
+ <type>Singleton</type>
1167
+ <class>buckaroo3extended/paymentMethods_afterpay2_observer</class>
1168
+ <method>buckaroo3extended_capture_request_addcustomvars</method>
1169
+ </buckaroo3extended_paymentmethod_observer_afterpay2>
1170
+ </observers>
1171
+ </buckaroo3extended_capture_request_addcustomvars>
1172
+ <buckaroo3extended_cancelauthorize_request_addservices>
1173
+ <observers>
1174
+ <buckaroo3extended_paymentmethod_observer_afterpay>
1175
+ <type>Singleton</type>
1176
+ <class>buckaroo3extended/paymentMethods_afterpay_observer</class>
1177
+ <method>buckaroo3extended_cancelauthorize_request_addservices</method>
1178
+ </buckaroo3extended_paymentmethod_observer_afterpay>
1179
+ <buckaroo3extended_paymentmethod_observer_afterpay2>
1180
+ <type>Singleton</type>
1181
+ <class>buckaroo3extended/paymentMethods_afterpay2_observer</class>
1182
+ <method>buckaroo3extended_cancelauthorize_request_addservices</method>
1183
+ </buckaroo3extended_paymentmethod_observer_afterpay2>
1184
+ </observers>
1185
+ </buckaroo3extended_cancelauthorize_request_addservices>
1186
  </events>
1187
  </global>
1188
  <default>
1740
  <creditnote>0</creditnote>
1741
  </buckaroo3extended_paymentguarantee>
1742
 
1743
+ <buckaroo3extended_afterpay>
1744
+ <active>0</active>
1745
+ <mode>0</mode>
1746
+ <title>Afterpay</title>
1747
+ <allowspecific>0</allowspecific>
1748
+ <specificcountry></specificcountry>
1749
+ <order_status_success></order_status_success>
1750
+ <order_status_failed></order_status_failed>
1751
+ <sort_order>25</sort_order>
1752
+ <limit_by_ip>0</limit_by_ip>
1753
+ <allowed_currencies>EUR</allowed_currencies>
1754
+ <payment_fee_label>Fee</payment_fee_label>
1755
+ <order_email>1</order_email>
1756
+ <paymethod>afterpayacceptgiro</paymethod>
1757
+ </buckaroo3extended_afterpay>
 
 
 
1758
 
1759
+ <buckaroo3extended_afterpay2>
1760
+ <active>0</active>
1761
+ <mode>0</mode>
1762
+ <title>Afterpay 2</title>
1763
+ <allowspecific>0</allowspecific>
1764
+ <specificcountry></specificcountry>
1765
+ <order_status_success></order_status_success>
1766
+ <order_status_failed></order_status_failed>
1767
+ <sort_order>25</sort_order>
1768
+ <limit_by_ip>0</limit_by_ip>
1769
+ <allowed_currencies>EUR</allowed_currencies>
1770
+ <payment_fee_label>Fee</payment_fee_label>
1771
+ <order_email>1</order_email>
1772
+ <paymethod>afterpayacceptgiro</paymethod>
1773
+ </buckaroo3extended_afterpay2>
 
 
 
1774
 
1775
  <buckaroo3extended_payperemail>
1776
  <active>0</active>
app/code/community/TIG/Buckaroo3Extended/etc/system.xml CHANGED
@@ -259,7 +259,7 @@
259
  </sort_order>
260
  <order_email translate="label comment">
261
  <label>Send order confirmation email</label>
262
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
263
  <frontend_type>select</frontend_type>
264
  <source_model>buckaroo3extended/sources_yesno</source_model>
265
  <sort_order>45</sort_order>
@@ -526,7 +526,7 @@
526
  </allowed_methods>
527
  <order_email translate="label comment">
528
  <label>Send order confirmation email</label>
529
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
530
  <frontend_type>select</frontend_type>
531
  <source_model>buckaroo3extended/sources_yesno</source_model>
532
  <sort_order>45</sort_order>
@@ -828,7 +828,7 @@
828
  </no>
829
  <order_email translate="label comment">
830
  <label>Send order confirmation email</label>
831
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
832
  <frontend_type>select</frontend_type>
833
  <source_model>buckaroo3extended/sources_yesno</source_model>
834
  <sort_order>45</sort_order>
@@ -845,11 +845,24 @@
845
  <show_in_website>1</show_in_website>
846
  <show_in_store>1</show_in_store>
847
  </show_advanced>
 
 
 
 
 
 
 
 
 
 
 
 
 
848
  <payment_fee translate="label comment" module="buckaroo3extended">
849
  <label>Fee</label>
850
  <comment>The above amount is calculated based on de Tax settings in System > Configuration > Sales > Tax.</comment>
851
  <frontend_type>text</frontend_type>
852
- <sort_order>101</sort_order>
853
  <show_in_default>1</show_in_default>
854
  <show_in_website>1</show_in_website>
855
  <show_in_store>1</show_in_store>
@@ -862,7 +875,7 @@
862
  <label>Fee label</label>
863
  <comment>This label will be displayed next to the fee on the checkout, order, invoice and creditmemo pages and pdfs.</comment>
864
  <frontend_type>text</frontend_type>
865
- <sort_order>102</sort_order>
866
  <show_in_default>1</show_in_default>
867
  <show_in_website>1</show_in_website>
868
  <show_in_store>1</show_in_store>
@@ -876,7 +889,7 @@
876
  <comment>Enable or disable specific status.</comment>
877
  <frontend_type>select</frontend_type>
878
  <source_model>buckaroo3extended/sources_yesno</source_model>
879
- <sort_order>110</sort_order>
880
  <show_in_default>1</show_in_default>
881
  <show_in_website>1</show_in_website>
882
  <show_in_store>1</show_in_store>
@@ -890,7 +903,7 @@
890
  <tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip>
891
  <frontend_type>select</frontend_type>
892
  <source_model>buckaroo3extended/sources_statusesSuccess</source_model>
893
- <sort_order>111</sort_order>
894
  <show_in_default>1</show_in_default>
895
  <show_in_website>1</show_in_website>
896
  <show_in_store>1</show_in_store>
@@ -906,7 +919,7 @@
906
  <tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip>
907
  <frontend_type>select</frontend_type>
908
  <source_model>buckaroo3extended/sources_statusesFailed</source_model>
909
- <sort_order>112</sort_order>
910
  <show_in_default>1</show_in_default>
911
  <show_in_website>1</show_in_website>
912
  <show_in_store>1</show_in_store>
@@ -921,7 +934,7 @@
921
  <comment>Maximum order amount allowed.</comment>
922
  <tooltip>The payment method show only for orders with an order amount smaller then the maximum amount.</tooltip>
923
  <frontend_type>text</frontend_type>
924
- <sort_order>113</sort_order>
925
  <show_in_default>1</show_in_default>
926
  <show_in_website>1</show_in_website>
927
  <show_in_store>1</show_in_store>
@@ -934,7 +947,7 @@
934
  <comment>Minimum order amount allowed.</comment>
935
  <tooltip>The payment method show only for orders with an order amount greater than the minimum amount.</tooltip>
936
  <frontend_type>text</frontend_type>
937
- <sort_order>114</sort_order>
938
  <show_in_default>1</show_in_default>
939
  <show_in_website>1</show_in_website>
940
  <show_in_store>1</show_in_store>
@@ -948,7 +961,7 @@
948
  <tooltip>Your contract with Buckaroo must allow for the selected currencies to be used with this payment method.</tooltip>
949
  <frontend_type>multiselect</frontend_type>
950
  <source_model>buckaroo3extended/sources_afterpay_availableCurrencies</source_model>
951
- <sort_order>130</sort_order>
952
  <show_in_default>1</show_in_default>
953
  <show_in_website>1</show_in_website>
954
  <show_in_store>1</show_in_store>
@@ -961,7 +974,7 @@
961
  <label>Payment from applicable countries</label>
962
  <frontend_type>allowspecific</frontend_type>
963
  <source_model>buckaroo3extended/sources_allspecificcountries</source_model>
964
- <sort_order>140</sort_order>
965
  <show_in_default>1</show_in_default>
966
  <show_in_website>1</show_in_website>
967
  <show_in_store>1</show_in_store>
@@ -974,7 +987,7 @@
974
  <comment>Only available when set to 'specific countries'.</comment>
975
  <frontend_type>multiselect</frontend_type>
976
  <source_model>adminhtml/system_config_source_country</source_model>
977
- <sort_order>150</sort_order>
978
  <show_in_default>1</show_in_default>
979
  <show_in_website>1</show_in_website>
980
  <show_in_store>1</show_in_store>
@@ -989,7 +1002,7 @@
989
  <tooltip>Magento developer client restrictions.</tooltip>
990
  <frontend_type>select</frontend_type>
991
  <source_model>buckaroo3extended/sources_yesno</source_model>
992
- <sort_order>160</sort_order>
993
  <show_in_default>1</show_in_default>
994
  <show_in_website>1</show_in_website>
995
  <show_in_store>1</show_in_store>
@@ -1119,7 +1132,7 @@
1119
  </no>
1120
  <order_email translate="label comment">
1121
  <label>Send order confirmation email</label>
1122
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
1123
  <frontend_type>select</frontend_type>
1124
  <source_model>buckaroo3extended/sources_yesno</source_model>
1125
  <sort_order>45</sort_order>
@@ -1136,11 +1149,24 @@
1136
  <show_in_website>1</show_in_website>
1137
  <show_in_store>1</show_in_store>
1138
  </show_advanced>
 
 
 
 
 
 
 
 
 
 
 
 
 
1139
  <payment_fee translate="label comment" module="buckaroo3extended">
1140
  <label>Fee</label>
1141
  <comment>The above amount is calculated based on de Tax settings in System > Configuration > Sales > Tax.</comment>
1142
  <frontend_type>text</frontend_type>
1143
- <sort_order>101</sort_order>
1144
  <show_in_default>1</show_in_default>
1145
  <show_in_website>1</show_in_website>
1146
  <show_in_store>1</show_in_store>
@@ -1153,7 +1179,7 @@
1153
  <label>Fee label</label>
1154
  <comment>This label will be displayed next to the fee on the checkout, order, invoice and creditmemo pages and pdfs.</comment>
1155
  <frontend_type>text</frontend_type>
1156
- <sort_order>102</sort_order>
1157
  <show_in_default>1</show_in_default>
1158
  <show_in_website>1</show_in_website>
1159
  <show_in_store>1</show_in_store>
@@ -1167,7 +1193,7 @@
1167
  <comment>Enable or disable specific status.</comment>
1168
  <frontend_type>select</frontend_type>
1169
  <source_model>buckaroo3extended/sources_yesno</source_model>
1170
- <sort_order>110</sort_order>
1171
  <show_in_default>1</show_in_default>
1172
  <show_in_website>1</show_in_website>
1173
  <show_in_store>1</show_in_store>
@@ -1181,7 +1207,7 @@
1181
  <tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip>
1182
  <frontend_type>select</frontend_type>
1183
  <source_model>buckaroo3extended/sources_statusesSuccess</source_model>
1184
- <sort_order>111</sort_order>
1185
  <show_in_default>1</show_in_default>
1186
  <show_in_website>1</show_in_website>
1187
  <show_in_store>1</show_in_store>
@@ -1197,7 +1223,7 @@
1197
  <tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip>
1198
  <frontend_type>select</frontend_type>
1199
  <source_model>buckaroo3extended/sources_statusesFailed</source_model>
1200
- <sort_order>112</sort_order>
1201
  <show_in_default>1</show_in_default>
1202
  <show_in_website>1</show_in_website>
1203
  <show_in_store>1</show_in_store>
@@ -1212,7 +1238,7 @@
1212
  <comment>Maximum order amount allowed.</comment>
1213
  <tooltip>The payment method show only for orders with an order amount smaller then the maximum amount.</tooltip>
1214
  <frontend_type>text</frontend_type>
1215
- <sort_order>113</sort_order>
1216
  <show_in_default>1</show_in_default>
1217
  <show_in_website>1</show_in_website>
1218
  <show_in_store>1</show_in_store>
@@ -1225,7 +1251,7 @@
1225
  <comment>Minimum order amount allowed.</comment>
1226
  <tooltip>The payment method show only for orders with an order amount greater than the minimum amount.</tooltip>
1227
  <frontend_type>text</frontend_type>
1228
- <sort_order>114</sort_order>
1229
  <show_in_default>1</show_in_default>
1230
  <show_in_website>1</show_in_website>
1231
  <show_in_store>1</show_in_store>
@@ -1239,7 +1265,7 @@
1239
  <tooltip>Your contract with Buckaroo must allow for the selected currencies to be used with this payment method.</tooltip>
1240
  <frontend_type>multiselect</frontend_type>
1241
  <source_model>buckaroo3extended/sources_afterpay2_availableCurrencies</source_model>
1242
- <sort_order>130</sort_order>
1243
  <show_in_default>1</show_in_default>
1244
  <show_in_website>1</show_in_website>
1245
  <show_in_store>1</show_in_store>
@@ -1252,7 +1278,7 @@
1252
  <label>Payment from applicable countries</label>
1253
  <frontend_type>allowspecific</frontend_type>
1254
  <source_model>buckaroo3extended/sources_allspecificcountries</source_model>
1255
- <sort_order>140</sort_order>
1256
  <show_in_default>1</show_in_default>
1257
  <show_in_website>1</show_in_website>
1258
  <show_in_store>1</show_in_store>
@@ -1265,7 +1291,7 @@
1265
  <comment>Only available when set to 'specific countries'.</comment>
1266
  <frontend_type>multiselect</frontend_type>
1267
  <source_model>adminhtml/system_config_source_country</source_model>
1268
- <sort_order>150</sort_order>
1269
  <show_in_default>1</show_in_default>
1270
  <show_in_website>1</show_in_website>
1271
  <show_in_store>1</show_in_store>
@@ -1280,7 +1306,7 @@
1280
  <tooltip>Magento developer client restrictions.</tooltip>
1281
  <frontend_type>select</frontend_type>
1282
  <source_model>buckaroo3extended/sources_yesno</source_model>
1283
- <sort_order>160</sort_order>
1284
  <show_in_default>1</show_in_default>
1285
  <show_in_website>1</show_in_website>
1286
  <show_in_store>1</show_in_store>
@@ -1337,7 +1363,7 @@
1337
  </sort_order>
1338
  <order_email translate="label comment">
1339
  <label>Send order confirmation email</label>
1340
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
1341
  <frontend_type>select</frontend_type>
1342
  <source_model>buckaroo3extended/sources_yesno</source_model>
1343
  <sort_order>45</sort_order>
@@ -1586,7 +1612,7 @@
1586
  </unsecure_hold>
1587
  <order_email translate="label comment">
1588
  <label>Send order confirmation email</label>
1589
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
1590
  <frontend_type>select</frontend_type>
1591
  <source_model>buckaroo3extended/sources_yesno</source_model>
1592
  <sort_order>44</sort_order>
@@ -1824,7 +1850,7 @@
1824
  </unsecure_hold>
1825
  <order_email translate="label comment">
1826
  <label>Send order confirmation email</label>
1827
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
1828
  <frontend_type>select</frontend_type>
1829
  <source_model>buckaroo3extended/sources_yesno</source_model>
1830
  <sort_order>44</sort_order>
@@ -2062,7 +2088,7 @@
2062
  </unsecure_hold>
2063
  <order_email translate="label comment">
2064
  <label>Send order confirmation email</label>
2065
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
2066
  <frontend_type>select</frontend_type>
2067
  <source_model>buckaroo3extended/sources_yesno</source_model>
2068
  <sort_order>44</sort_order>
@@ -2279,7 +2305,7 @@
2279
  </sort_order>
2280
  <order_email translate="label comment">
2281
  <label>Send order confirmation email</label>
2282
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
2283
  <frontend_type>select</frontend_type>
2284
  <source_model>buckaroo3extended/sources_yesno</source_model>
2285
  <sort_order>44</sort_order>
@@ -2534,7 +2560,7 @@
2534
  </unsecure_hold>
2535
  <order_email translate="label comment">
2536
  <label>Send order confirmation email</label>
2537
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
2538
  <frontend_type>select</frontend_type>
2539
  <source_model>buckaroo3extended/sources_yesno</source_model>
2540
  <sort_order>49</sort_order>
@@ -2751,7 +2777,7 @@
2751
  </sort_order>
2752
  <order_email translate="label comment">
2753
  <label>Send order confirmation email</label>
2754
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
2755
  <frontend_type>select</frontend_type>
2756
  <source_model>buckaroo3extended/sources_yesno</source_model>
2757
  <sort_order>44</sort_order>
@@ -2985,7 +3011,7 @@
2985
  </sort_order>
2986
  <order_email translate="label comment">
2987
  <label>Send order confirmation email</label>
2988
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
2989
  <frontend_type>select</frontend_type>
2990
  <source_model>buckaroo3extended/sources_yesno</source_model>
2991
  <sort_order>44</sort_order>
@@ -3219,7 +3245,7 @@
3219
  </sort_order>
3220
  <order_email translate="label comment">
3221
  <label>Send order confirmation email</label>
3222
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
3223
  <frontend_type>select</frontend_type>
3224
  <source_model>buckaroo3extended/sources_yesno</source_model>
3225
  <sort_order>44</sort_order>
@@ -3563,7 +3589,7 @@
3563
  </reminder_level>
3564
  <order_email translate="label comment">
3565
  <label>Send order confirmation email</label>
3566
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
3567
  <frontend_type>select</frontend_type>
3568
  <source_model>buckaroo3extended/sources_yesno</source_model>
3569
  <sort_order>59</sort_order>
@@ -3845,7 +3871,7 @@
3845
  </reminder_level>
3846
  <order_email translate="label comment">
3847
  <label>Send order confirmation email</label>
3848
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
3849
  <frontend_type>select</frontend_type>
3850
  <source_model>buckaroo3extended/sources_yesno</source_model>
3851
  <sort_order>54</sort_order>
@@ -4079,7 +4105,7 @@
4079
  <!--</sort_order>-->
4080
  <!--<order_email translate="label comment">-->
4081
  <!--<label>Send order confirmation email</label>-->
4082
- <!--<comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>-->
4083
  <!--<frontend_type>select</frontend_type>-->
4084
  <!--<source_model>buckaroo3extended/sources_yesno</source_model>-->
4085
  <!--<sort_order>44</sort_order>-->
@@ -4313,7 +4339,7 @@
4313
  </sort_order>
4314
  <order_email translate="label comment">
4315
  <label>Send order confirmation email</label>
4316
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
4317
  <frontend_type>select</frontend_type>
4318
  <source_model>buckaroo3extended/sources_yesno</source_model>
4319
  <sort_order>54</sort_order>
@@ -4531,7 +4557,7 @@
4531
  </sort_order>
4532
  <order_email translate="label comment">
4533
  <label>Send order confirmation email</label>
4534
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
4535
  <frontend_type>select</frontend_type>
4536
  <source_model>buckaroo3extended/sources_yesno</source_model>
4537
  <sort_order>44</sort_order>
@@ -4749,7 +4775,7 @@
4749
  </sort_order>
4750
  <order_email translate="label comment">
4751
  <label>Send order confirmation email</label>
4752
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
4753
  <frontend_type>select</frontend_type>
4754
  <source_model>buckaroo3extended/sources_yesno</source_model>
4755
  <sort_order>44</sort_order>
@@ -4967,7 +4993,7 @@
4967
  </sort_order>
4968
  <order_email translate="label comment">
4969
  <label>Send order confirmation email</label>
4970
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
4971
  <frontend_type>select</frontend_type>
4972
  <source_model>buckaroo3extended/sources_yesno</source_model>
4973
  <sort_order>44</sort_order>
@@ -5196,7 +5222,7 @@
5196
  </cards_allowed>
5197
  <order_email translate="label comment">
5198
  <label>Send order confirmation email</label>
5199
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
5200
  <frontend_type>select</frontend_type>
5201
  <source_model>buckaroo3extended/sources_yesno</source_model>
5202
  <sort_order>64</sort_order>
@@ -5511,7 +5537,7 @@
5511
  </reminder_level>
5512
  <order_email translate="label comment">
5513
  <label>Send order confirmation email</label>
5514
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
5515
  <frontend_type>select</frontend_type>
5516
  <source_model>buckaroo3extended/sources_yesno</source_model>
5517
  <sort_order>64</sort_order>
@@ -5803,7 +5829,7 @@
5803
  </reminder_level>
5804
  <order_email translate="label comment">
5805
  <label>Send order confirmation email</label>
5806
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
5807
  <frontend_type>select</frontend_type>
5808
  <source_model>buckaroo3extended/sources_yesno</source_model>
5809
  <sort_order>54</sort_order>
@@ -6037,7 +6063,7 @@
6037
  </sort_order>
6038
  <order_email translate="label comment">
6039
  <label>Send order confirmation email</label>
6040
- <comment>Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.</comment>
6041
  <frontend_type>select</frontend_type>
6042
  <source_model>buckaroo3extended/sources_yesno</source_model>
6043
  <sort_order>44</sort_order>
259
  </sort_order>
260
  <order_email translate="label comment">
261
  <label>Send order confirmation email</label>
262
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
263
  <frontend_type>select</frontend_type>
264
  <source_model>buckaroo3extended/sources_yesno</source_model>
265
  <sort_order>45</sort_order>
526
  </allowed_methods>
527
  <order_email translate="label comment">
528
  <label>Send order confirmation email</label>
529
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
530
  <frontend_type>select</frontend_type>
531
  <source_model>buckaroo3extended/sources_yesno</source_model>
532
  <sort_order>45</sort_order>
828
  </no>
829
  <order_email translate="label comment">
830
  <label>Send order confirmation email</label>
831
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
832
  <frontend_type>select</frontend_type>
833
  <source_model>buckaroo3extended/sources_yesno</source_model>
834
  <sort_order>45</sort_order>
845
  <show_in_website>1</show_in_website>
846
  <show_in_store>1</show_in_store>
847
  </show_advanced>
848
+ <payment_action translate="label comment" module="buckaroo3extended">
849
+ <label>Payment flow</label>
850
+ <comment>Whether to use separate authorize and capture calls or to use a combined 'pay' call.</comment>
851
+ <frontend_type>select</frontend_type>
852
+ <source_model>buckaroo3extended/sources_paymentFlow</source_model>
853
+ <sort_order>110</sort_order>
854
+ <show_in_default>1</show_in_default>
855
+ <show_in_website>1</show_in_website>
856
+ <show_in_store>1</show_in_store>
857
+ <depends>
858
+ <show_advanced>1</show_advanced>
859
+ </depends>
860
+ </payment_action>
861
  <payment_fee translate="label comment" module="buckaroo3extended">
862
  <label>Fee</label>
863
  <comment>The above amount is calculated based on de Tax settings in System > Configuration > Sales > Tax.</comment>
864
  <frontend_type>text</frontend_type>
865
+ <sort_order>120</sort_order>
866
  <show_in_default>1</show_in_default>
867
  <show_in_website>1</show_in_website>
868
  <show_in_store>1</show_in_store>
875
  <label>Fee label</label>
876
  <comment>This label will be displayed next to the fee on the checkout, order, invoice and creditmemo pages and pdfs.</comment>
877
  <frontend_type>text</frontend_type>
878
+ <sort_order>130</sort_order>
879
  <show_in_default>1</show_in_default>
880
  <show_in_website>1</show_in_website>
881
  <show_in_store>1</show_in_store>
889
  <comment>Enable or disable specific status.</comment>
890
  <frontend_type>select</frontend_type>
891
  <source_model>buckaroo3extended/sources_yesno</source_model>
892
+ <sort_order>140</sort_order>
893
  <show_in_default>1</show_in_default>
894
  <show_in_website>1</show_in_website>
895
  <show_in_store>1</show_in_store>
903
  <tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip>
904
  <frontend_type>select</frontend_type>
905
  <source_model>buckaroo3extended/sources_statusesSuccess</source_model>
906
+ <sort_order>150</sort_order>
907
  <show_in_default>1</show_in_default>
908
  <show_in_website>1</show_in_website>
909
  <show_in_store>1</show_in_store>
919
  <tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip>
920
  <frontend_type>select</frontend_type>
921
  <source_model>buckaroo3extended/sources_statusesFailed</source_model>
922
+ <sort_order>160</sort_order>
923
  <show_in_default>1</show_in_default>
924
  <show_in_website>1</show_in_website>
925
  <show_in_store>1</show_in_store>
934
  <comment>Maximum order amount allowed.</comment>
935
  <tooltip>The payment method show only for orders with an order amount smaller then the maximum amount.</tooltip>
936
  <frontend_type>text</frontend_type>
937
+ <sort_order>170</sort_order>
938
  <show_in_default>1</show_in_default>
939
  <show_in_website>1</show_in_website>
940
  <show_in_store>1</show_in_store>
947
  <comment>Minimum order amount allowed.</comment>
948
  <tooltip>The payment method show only for orders with an order amount greater than the minimum amount.</tooltip>
949
  <frontend_type>text</frontend_type>
950
+ <sort_order>180</sort_order>
951
  <show_in_default>1</show_in_default>
952
  <show_in_website>1</show_in_website>
953
  <show_in_store>1</show_in_store>
961
  <tooltip>Your contract with Buckaroo must allow for the selected currencies to be used with this payment method.</tooltip>
962
  <frontend_type>multiselect</frontend_type>
963
  <source_model>buckaroo3extended/sources_afterpay_availableCurrencies</source_model>
964
+ <sort_order>190</sort_order>
965
  <show_in_default>1</show_in_default>
966
  <show_in_website>1</show_in_website>
967
  <show_in_store>1</show_in_store>
974
  <label>Payment from applicable countries</label>
975
  <frontend_type>allowspecific</frontend_type>
976
  <source_model>buckaroo3extended/sources_allspecificcountries</source_model>
977
+ <sort_order>200</sort_order>
978
  <show_in_default>1</show_in_default>
979
  <show_in_website>1</show_in_website>
980
  <show_in_store>1</show_in_store>
987
  <comment>Only available when set to 'specific countries'.</comment>
988
  <frontend_type>multiselect</frontend_type>
989
  <source_model>adminhtml/system_config_source_country</source_model>
990
+ <sort_order>210</sort_order>
991
  <show_in_default>1</show_in_default>
992
  <show_in_website>1</show_in_website>
993
  <show_in_store>1</show_in_store>
1002
  <tooltip>Magento developer client restrictions.</tooltip>
1003
  <frontend_type>select</frontend_type>
1004
  <source_model>buckaroo3extended/sources_yesno</source_model>
1005
+ <sort_order>220</sort_order>
1006
  <show_in_default>1</show_in_default>
1007
  <show_in_website>1</show_in_website>
1008
  <show_in_store>1</show_in_store>
1132
  </no>
1133
  <order_email translate="label comment">
1134
  <label>Send order confirmation email</label>
1135
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
1136
  <frontend_type>select</frontend_type>
1137
  <source_model>buckaroo3extended/sources_yesno</source_model>
1138
  <sort_order>45</sort_order>
1149
  <show_in_website>1</show_in_website>
1150
  <show_in_store>1</show_in_store>
1151
  </show_advanced>
1152
+ <payment_action translate="label comment" module="buckaroo3extended">
1153
+ <label>Payment flow</label>
1154
+ <comment>Whether to use separate authorize and capture calls or to use a combined 'pay' call.</comment>
1155
+ <frontend_type>select</frontend_type>
1156
+ <source_model>buckaroo3extended/sources_paymentFlow</source_model>
1157
+ <sort_order>110</sort_order>
1158
+ <show_in_default>1</show_in_default>
1159
+ <show_in_website>1</show_in_website>
1160
+ <show_in_store>1</show_in_store>
1161
+ <depends>
1162
+ <show_advanced>1</show_advanced>
1163
+ </depends>
1164
+ </payment_action>
1165
  <payment_fee translate="label comment" module="buckaroo3extended">
1166
  <label>Fee</label>
1167
  <comment>The above amount is calculated based on de Tax settings in System > Configuration > Sales > Tax.</comment>
1168
  <frontend_type>text</frontend_type>
1169
+ <sort_order>120</sort_order>
1170
  <show_in_default>1</show_in_default>
1171
  <show_in_website>1</show_in_website>
1172
  <show_in_store>1</show_in_store>
1179
  <label>Fee label</label>
1180
  <comment>This label will be displayed next to the fee on the checkout, order, invoice and creditmemo pages and pdfs.</comment>
1181
  <frontend_type>text</frontend_type>
1182
+ <sort_order>130</sort_order>
1183
  <show_in_default>1</show_in_default>
1184
  <show_in_website>1</show_in_website>
1185
  <show_in_store>1</show_in_store>
1193
  <comment>Enable or disable specific status.</comment>
1194
  <frontend_type>select</frontend_type>
1195
  <source_model>buckaroo3extended/sources_yesno</source_model>
1196
+ <sort_order>140</sort_order>
1197
  <show_in_default>1</show_in_default>
1198
  <show_in_website>1</show_in_website>
1199
  <show_in_store>1</show_in_store>
1207
  <tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip>
1208
  <frontend_type>select</frontend_type>
1209
  <source_model>buckaroo3extended/sources_statusesSuccess</source_model>
1210
+ <sort_order>150</sort_order>
1211
  <show_in_default>1</show_in_default>
1212
  <show_in_website>1</show_in_website>
1213
  <show_in_store>1</show_in_store>
1223
  <tooltip>To make a new status available it needs to be assigned to the correct state. See Magento documentation about state and status.</tooltip>
1224
  <frontend_type>select</frontend_type>
1225
  <source_model>buckaroo3extended/sources_statusesFailed</source_model>
1226
+ <sort_order>160</sort_order>
1227
  <show_in_default>1</show_in_default>
1228
  <show_in_website>1</show_in_website>
1229
  <show_in_store>1</show_in_store>
1238
  <comment>Maximum order amount allowed.</comment>
1239
  <tooltip>The payment method show only for orders with an order amount smaller then the maximum amount.</tooltip>
1240
  <frontend_type>text</frontend_type>
1241
+ <sort_order>170</sort_order>
1242
  <show_in_default>1</show_in_default>
1243
  <show_in_website>1</show_in_website>
1244
  <show_in_store>1</show_in_store>
1251
  <comment>Minimum order amount allowed.</comment>
1252
  <tooltip>The payment method show only for orders with an order amount greater than the minimum amount.</tooltip>
1253
  <frontend_type>text</frontend_type>
1254
+ <sort_order>180</sort_order>
1255
  <show_in_default>1</show_in_default>
1256
  <show_in_website>1</show_in_website>
1257
  <show_in_store>1</show_in_store>
1265
  <tooltip>Your contract with Buckaroo must allow for the selected currencies to be used with this payment method.</tooltip>
1266
  <frontend_type>multiselect</frontend_type>
1267
  <source_model>buckaroo3extended/sources_afterpay2_availableCurrencies</source_model>
1268
+ <sort_order>190</sort_order>
1269
  <show_in_default>1</show_in_default>
1270
  <show_in_website>1</show_in_website>
1271
  <show_in_store>1</show_in_store>
1278
  <label>Payment from applicable countries</label>
1279
  <frontend_type>allowspecific</frontend_type>
1280
  <source_model>buckaroo3extended/sources_allspecificcountries</source_model>
1281
+ <sort_order>200</sort_order>
1282
  <show_in_default>1</show_in_default>
1283
  <show_in_website>1</show_in_website>
1284
  <show_in_store>1</show_in_store>
1291
  <comment>Only available when set to 'specific countries'.</comment>
1292
  <frontend_type>multiselect</frontend_type>
1293
  <source_model>adminhtml/system_config_source_country</source_model>
1294
+ <sort_order>210</sort_order>
1295
  <show_in_default>1</show_in_default>
1296
  <show_in_website>1</show_in_website>
1297
  <show_in_store>1</show_in_store>
1306
  <tooltip>Magento developer client restrictions.</tooltip>
1307
  <frontend_type>select</frontend_type>
1308
  <source_model>buckaroo3extended/sources_yesno</source_model>
1309
+ <sort_order>220</sort_order>
1310
  <show_in_default>1</show_in_default>
1311
  <show_in_website>1</show_in_website>
1312
  <show_in_store>1</show_in_store>
1363
  </sort_order>
1364
  <order_email translate="label comment">
1365
  <label>Send order confirmation email</label>
1366
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
1367
  <frontend_type>select</frontend_type>
1368
  <source_model>buckaroo3extended/sources_yesno</source_model>
1369
  <sort_order>45</sort_order>
1612
  </unsecure_hold>
1613
  <order_email translate="label comment">
1614
  <label>Send order confirmation email</label>
1615
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
1616
  <frontend_type>select</frontend_type>
1617
  <source_model>buckaroo3extended/sources_yesno</source_model>
1618
  <sort_order>44</sort_order>
1850
  </unsecure_hold>
1851
  <order_email translate="label comment">
1852
  <label>Send order confirmation email</label>
1853
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
1854
  <frontend_type>select</frontend_type>
1855
  <source_model>buckaroo3extended/sources_yesno</source_model>
1856
  <sort_order>44</sort_order>
2088
  </unsecure_hold>
2089
  <order_email translate="label comment">
2090
  <label>Send order confirmation email</label>
2091
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
2092
  <frontend_type>select</frontend_type>
2093
  <source_model>buckaroo3extended/sources_yesno</source_model>
2094
  <sort_order>44</sort_order>
2305
  </sort_order>
2306
  <order_email translate="label comment">
2307
  <label>Send order confirmation email</label>
2308
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
2309
  <frontend_type>select</frontend_type>
2310
  <source_model>buckaroo3extended/sources_yesno</source_model>
2311
  <sort_order>44</sort_order>
2560
  </unsecure_hold>
2561
  <order_email translate="label comment">
2562
  <label>Send order confirmation email</label>
2563
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
2564
  <frontend_type>select</frontend_type>
2565
  <source_model>buckaroo3extended/sources_yesno</source_model>
2566
  <sort_order>49</sort_order>
2777
  </sort_order>
2778
  <order_email translate="label comment">
2779
  <label>Send order confirmation email</label>
2780
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
2781
  <frontend_type>select</frontend_type>
2782
  <source_model>buckaroo3extended/sources_yesno</source_model>
2783
  <sort_order>44</sort_order>
3011
  </sort_order>
3012
  <order_email translate="label comment">
3013
  <label>Send order confirmation email</label>
3014
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
3015
  <frontend_type>select</frontend_type>
3016
  <source_model>buckaroo3extended/sources_yesno</source_model>
3017
  <sort_order>44</sort_order>
3245
  </sort_order>
3246
  <order_email translate="label comment">
3247
  <label>Send order confirmation email</label>
3248
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
3249
  <frontend_type>select</frontend_type>
3250
  <source_model>buckaroo3extended/sources_yesno</source_model>
3251
  <sort_order>44</sort_order>
3589
  </reminder_level>
3590
  <order_email translate="label comment">
3591
  <label>Send order confirmation email</label>
3592
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
3593
  <frontend_type>select</frontend_type>
3594
  <source_model>buckaroo3extended/sources_yesno</source_model>
3595
  <sort_order>59</sort_order>
3871
  </reminder_level>
3872
  <order_email translate="label comment">
3873
  <label>Send order confirmation email</label>
3874
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
3875
  <frontend_type>select</frontend_type>
3876
  <source_model>buckaroo3extended/sources_yesno</source_model>
3877
  <sort_order>54</sort_order>
4105
  <!--</sort_order>-->
4106
  <!--<order_email translate="label comment">-->
4107
  <!--<label>Send order confirmation email</label>-->
4108
+ <!--<comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>-->
4109
  <!--<frontend_type>select</frontend_type>-->
4110
  <!--<source_model>buckaroo3extended/sources_yesno</source_model>-->
4111
  <!--<sort_order>44</sort_order>-->
4339
  </sort_order>
4340
  <order_email translate="label comment">
4341
  <label>Send order confirmation email</label>
4342
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
4343
  <frontend_type>select</frontend_type>
4344
  <source_model>buckaroo3extended/sources_yesno</source_model>
4345
  <sort_order>54</sort_order>
4557
  </sort_order>
4558
  <order_email translate="label comment">
4559
  <label>Send order confirmation email</label>
4560
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
4561
  <frontend_type>select</frontend_type>
4562
  <source_model>buckaroo3extended/sources_yesno</source_model>
4563
  <sort_order>44</sort_order>
4775
  </sort_order>
4776
  <order_email translate="label comment">
4777
  <label>Send order confirmation email</label>
4778
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
4779
  <frontend_type>select</frontend_type>
4780
  <source_model>buckaroo3extended/sources_yesno</source_model>
4781
  <sort_order>44</sort_order>
4993
  </sort_order>
4994
  <order_email translate="label comment">
4995
  <label>Send order confirmation email</label>
4996
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
4997
  <frontend_type>select</frontend_type>
4998
  <source_model>buckaroo3extended/sources_yesno</source_model>
4999
  <sort_order>44</sort_order>
5222
  </cards_allowed>
5223
  <order_email translate="label comment">
5224
  <label>Send order confirmation email</label>
5225
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
5226
  <frontend_type>select</frontend_type>
5227
  <source_model>buckaroo3extended/sources_yesno</source_model>
5228
  <sort_order>64</sort_order>
5537
  </reminder_level>
5538
  <order_email translate="label comment">
5539
  <label>Send order confirmation email</label>
5540
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
5541
  <frontend_type>select</frontend_type>
5542
  <source_model>buckaroo3extended/sources_yesno</source_model>
5543
  <sort_order>64</sort_order>
5829
  </reminder_level>
5830
  <order_email translate="label comment">
5831
  <label>Send order confirmation email</label>
5832
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
5833
  <frontend_type>select</frontend_type>
5834
  <source_model>buckaroo3extended/sources_yesno</source_model>
5835
  <sort_order>54</sort_order>
6063
  </sort_order>
6064
  <order_email translate="label comment">
6065
  <label>Send order confirmation email</label>
6066
+ <comment>Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).</comment>
6067
  <frontend_type>select</frontend_type>
6068
  <source_model>buckaroo3extended/sources_yesno</source_model>
6069
  <sort_order>44</sort_order>
app/design/adminhtml/default/default/template/buckaroo3extended/system/config/supportTab.phtml CHANGED
@@ -1,14 +1,29 @@
1
- <?php $_helper = $this->helper('buckaroo3extended'); ?>
 
 
 
 
 
 
2
  <tr>
3
  <td>
4
- <h2 class="content-heading"><?php echo $_helper->__('BPE 3.0 version');?> <?php echo Mage::getConfig()->getModuleConfig("TIG_Buckaroo3Extended")->version;?></h2>
 
 
 
 
 
 
 
 
 
5
  <table id="supportWrap" cellpadding="0" cellspacing="0">
6
  <tr>
7
  <td class="col-left">
8
  <div class="text-box">
9
  <h3><?php echo $_helper->__('Quick reference guide');?></h3>
10
  <ol>
11
- <li><strong><?php echo $_helper->__('Log in to the ');?> <a target="_blank" href="https://payment.buckaroo.nl/"><?php echo $_helper->__('Buckaroo Payment Plaza');?></a> <?php echo $_helper->__(' to collect the following security settings:');?></strong>
12
  <ol>
13
  <li><?php echo $_helper->__('(Merchant) Key - Profile &rarr; Websites &rarr; Key.');?></li>
14
  <li><?php echo $_helper->__('Secret Key - Configuration &rarr; Secret key for Digitale signature &rarr; Secret Key.');?></li>
@@ -67,7 +82,7 @@
67
  <li><?php echo $_helper->__('Magento Enterprise Edition version');?> 1.12, 1.13 &amp; 1.14</li>
68
  </ul>
69
  <ul>
70
- <li><?php echo $_helper->__('OneStepCheckout version');?> 4.0.7 - 4.5.5</li>
71
  </ul>
72
  </div>
73
  <div class="text-box">
@@ -78,7 +93,7 @@
78
  <table class="contact">
79
  <tr>
80
  <td class="first"><?php echo $_helper->__('Buckaroo Payment Plaza:');?></td>
81
- <td class="last"><a target="_blank" href="https://payment.buckaroo.nl/">payment.buckaroo.nl</a></td>
82
  <td class="buckaroo_logo" rowspan="3"><a href="http://www.buckaroo.nl" target="_blank"><img src="<?php echo $this->getSkinUrl('images/tig_buckaroo3extended/'); ?>buckaroo_small.png" alt="" /></a></td>
83
  </tr>
84
  <tr>
1
+ <?php
2
+ /** @var TIG_Buckaroo3Extended_Block_Adminhtml_System_Config_SupportTab $this */
3
+
4
+ $_helper = $this->helper('buckaroo3extended');
5
+ $version = $this->getVersion();
6
+ $stability = $this->getStability();
7
+ ?>
8
  <tr>
9
  <td>
10
+ <h2 class="content-heading">
11
+ <?php
12
+ echo $_helper->__('BPE 3.0 version') . ' ';
13
+ echo $version;
14
+
15
+ if ($stability !== null) {
16
+ echo ' - ' . $stability;
17
+ }
18
+ ?>
19
+ </h2>
20
  <table id="supportWrap" cellpadding="0" cellspacing="0">
21
  <tr>
22
  <td class="col-left">
23
  <div class="text-box">
24
  <h3><?php echo $_helper->__('Quick reference guide');?></h3>
25
  <ol>
26
+ <li><strong><?php echo $_helper->__('Log in to the ');?> <a target="_blank" href="https://plaza.buckaroo.nl/"><?php echo $_helper->__('Buckaroo Payment Plaza');?></a> <?php echo $_helper->__(' to collect the following security settings:');?></strong>
27
  <ol>
28
  <li><?php echo $_helper->__('(Merchant) Key - Profile &rarr; Websites &rarr; Key.');?></li>
29
  <li><?php echo $_helper->__('Secret Key - Configuration &rarr; Secret key for Digitale signature &rarr; Secret Key.');?></li>
82
  <li><?php echo $_helper->__('Magento Enterprise Edition version');?> 1.12, 1.13 &amp; 1.14</li>
83
  </ul>
84
  <ul>
85
+ <li><?php echo $_helper->__('OneStepCheckout version');?>4.0.7, 4.1, 4.2 & 4.5.5</li>
86
  </ul>
87
  </div>
88
  <div class="text-box">
93
  <table class="contact">
94
  <tr>
95
  <td class="first"><?php echo $_helper->__('Buckaroo Payment Plaza:');?></td>
96
+ <td class="last"><a target="_blank" href="https://plaza.buckaroo.nl/">plaza.buckaroo.nl</a></td>
97
  <td class="buckaroo_logo" rowspan="3"><a href="http://www.buckaroo.nl" target="_blank"><img src="<?php echo $this->getSkinUrl('images/tig_buckaroo3extended/'); ?>buckaroo_small.png" alt="" /></a></td>
98
  </tr>
99
  <tr>
app/design/frontend/base/default/template/buckaroo3extended/afterpay/checkout/form.phtml CHANGED
@@ -49,7 +49,11 @@
49
 
50
  <?php $currentBusiness = $this->getBusiness(); ?>
51
 
52
- <?php $currentBusiness = ($this->getPaymethod() == 'afterpaydigiaccept')? $currentBusiness : '1'; ?>
 
 
 
 
53
 
54
  <?php if($currentBusiness == '1'): ?>
55
 
@@ -70,14 +74,6 @@
70
  <div class="input-box">
71
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
72
  </div>
73
- <label class="required" for="<?php echo $_code;?>_BPE_CostCentre"><?php echo $this->__('Cost Center');?></label>
74
- <div class="input-box">
75
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CostCentre" id="<?php echo $_code;?>_BPE_CostCentre" value="<?php echo $this->escapeHtml($this->getCostCentre());?>" />
76
- </div>
77
- <label class="required" for="<?php echo $_code;?>_BPE_VatNumber"><?php echo $this->__('VAT Number');?></label>
78
- <div class="input-box">
79
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_VatNumber" id="<?php echo $_code;?>_BPE_VatNumber" value="<?php echo $this->escapeHtml($this->getVatNumber());?>" />
80
- </div>
81
  </div>
82
  </li>
83
 
@@ -106,14 +102,6 @@
106
  <div class="input-box">
107
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
108
  </div>
109
- <label class="required" for="<?php echo $_code;?>_BPE_CostCentre"><?php echo $this->__('Cost Center');?></label>
110
- <div class="input-box">
111
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CostCentre" id="<?php echo $_code;?>_BPE_CostCentre" value="<?php echo $this->escapeHtml($this->getCostCentre());?>" />
112
- </div>
113
- <label class="required" for="<?php echo $_code;?>_BPE_VatNumber"><?php echo $this->__('VAT Number');?></label>
114
- <div class="input-box">
115
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_VatNumber" id="<?php echo $_code;?>_BPE_VatNumber" value="<?php echo $this->escapeHtml($this->getVatNumber());?>" />
116
- </div>
117
  </div>
118
  </li>
119
 
49
 
50
  <?php $currentBusiness = $this->getBusiness(); ?>
51
 
52
+ <?php
53
+ if ($this->getPaymethod() != 'afterpaydigiaccept' || $this->getBillingCountry() == 'BE') {
54
+ $currentBusiness = '1';
55
+ }
56
+ ?>
57
 
58
  <?php if($currentBusiness == '1'): ?>
59
 
74
  <div class="input-box">
75
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
76
  </div>
 
 
 
 
 
 
 
 
77
  </div>
78
  </li>
79
 
102
  <div class="input-box">
103
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
104
  </div>
 
 
 
 
 
 
 
 
105
  </div>
106
  </li>
107
 
app/design/frontend/base/default/template/buckaroo3extended/afterpay2/checkout/form.phtml CHANGED
@@ -49,7 +49,11 @@
49
 
50
  <?php $currentBusiness = $this->getBusiness(); ?>
51
 
52
- <?php $currentBusiness = ($this->getPaymethod() == 'afterpaydigiaccept')? $currentBusiness : '1'; ?>
 
 
 
 
53
 
54
  <?php if($currentBusiness == '1'): ?>
55
 
@@ -70,14 +74,6 @@
70
  <div class="input-box">
71
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
72
  </div>
73
- <label class="required" for="<?php echo $_code;?>_BPE_CostCentre"><?php echo $this->__('Cost Center');?></label>
74
- <div class="input-box">
75
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CostCentre" id="<?php echo $_code;?>_BPE_CostCentre" value="<?php echo $this->escapeHtml($this->getCostCentre());?>" />
76
- </div>
77
- <label class="required" for="<?php echo $_code;?>_BPE_VatNumber"><?php echo $this->__('VAT Number');?></label>
78
- <div class="input-box">
79
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_VatNumber" id="<?php echo $_code;?>_BPE_VatNumber" value="<?php echo $this->escapeHtml($this->getVatNumber());?>" />
80
- </div>
81
  </div>
82
  </li>
83
 
@@ -106,14 +102,6 @@
106
  <div class="input-box">
107
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
108
  </div>
109
- <label class="required" for="<?php echo $_code;?>_BPE_CostCentre"><?php echo $this->__('Cost Center');?></label>
110
- <div class="input-box">
111
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CostCentre" id="<?php echo $_code;?>_BPE_CostCentre" value="<?php echo $this->escapeHtml($this->getCostCentre());?>" />
112
- </div>
113
- <label class="required" for="<?php echo $_code;?>_BPE_VatNumber"><?php echo $this->__('VAT Number');?></label>
114
- <div class="input-box">
115
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_VatNumber" id="<?php echo $_code;?>_BPE_VatNumber" value="<?php echo $this->escapeHtml($this->getVatNumber());?>" />
116
- </div>
117
  </div>
118
  </li>
119
 
49
 
50
  <?php $currentBusiness = $this->getBusiness(); ?>
51
 
52
+ <?php
53
+ if ($this->getPaymethod() != 'afterpaydigiaccept' || $this->getBillingCountry() == 'BE') {
54
+ $currentBusiness = '1';
55
+ }
56
+ ?>
57
 
58
  <?php if($currentBusiness == '1'): ?>
59
 
74
  <div class="input-box">
75
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
76
  </div>
 
 
 
 
 
 
 
 
77
  </div>
78
  </li>
79
 
102
  <div class="input-box">
103
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
104
  </div>
 
 
 
 
 
 
 
 
105
  </div>
106
  </li>
107
 
app/design/frontend/base/default/template/buckaroo3extended/jquery.phtml CHANGED
@@ -1,5 +1,7 @@
1
  <script>
2
- jQuery.noConflict();
 
 
3
  </script>
4
  <![if !lt IE 9]>
5
  <script type="text/javascript" src="<?php echo $this->getSkinUrl('js/TIG/Buckaroo3Extended/jquery-1.12.3.min.js', array('_secure' => true)); ?>"></script>
1
  <script>
2
+ if(jQuery) {
3
+ jQuery.noConflict();
4
+ }
5
  </script>
6
  <![if !lt IE 9]>
7
  <script type="text/javascript" src="<?php echo $this->getSkinUrl('js/TIG/Buckaroo3Extended/jquery-1.12.3.min.js', array('_secure' => true)); ?>"></script>
app/design/frontend/base/default/template/buckaroo3extended/payperemail/checkout/form.phtml CHANGED
@@ -13,29 +13,29 @@ $email = $this->getEmail();
13
  <li>
14
  <label for="<?php echo $_code;?>_BPE_Customergender" class="required"><?php echo $this->__('Salutation') ?>: <em>*</em></label>
15
  <div class="input-box">
16
- <select name="<?php echo $_code;?>_BPE_Customergender" class="validate-select validate-number" id="<?php echo $_code;?>_BPE_Customergender" title="<?php echo $this->__('Salutation');?>">
17
  <option value=''><?php echo $this->__('Select'); ?></option>
18
  <option value="1" <?php echo ($this->getGender()===1)?'selected':'';?>><?php echo $this->__('Mr.'); ?></option>
19
  <option value="2" <?php echo ($this->getGender()===2)?'selected':'';?>><?php echo $this->__('Mrs.'); ?></option>
20
  </select>
21
- </div>
22
  </li>
23
  <li>
24
  <label for="<?php echo $_code;?>_BPE_Customerfirstname" class="required"><?php echo $this->__('First name') ?>: <em>*</em></label>
25
  <div class="input-box">
26
- <input class="input-text required-entry" type="input" title="<?php echo $this->__('First name') ?>" name="<?php echo $_code;?>_BPE_Customerfirstname" value="<?php this->escapeHtml($firstname); ?>" id="<?php echo $_code;?>_BPE_Customerfirstname" />
27
  </div>
28
  </li>
29
- <li>
30
- <label for="<?php echo $_code;?>_BPE_Customerlastname" class="required"><?php echo $this->__('Last name') ?>: <em>*</em></label>
31
- <div class="input-box">
32
- <input class="input-text required-entry" type="input" title="<?php echo $this->__('Last name') ?>" name="<?php echo $_code;?>_BPE_Customerlastname" value="<?php this->escapeHtml($lastname); ?>" id="<?php echo $_code;?>_BPE_Customerlastname" />
33
- </div>
34
  </li>
35
  <li>
36
  <label for="<?php echo $_code;?>_BPE_Customermail" class="required"><?php echo $this->__('E-mail address') ?>: <em>*</em></label>
37
  <div class="input-box">
38
- <input class="input-text required-entry validate-email" type="input" title="<?php echo $this->__('E-mail address') ?>" name="<?php echo $_code;?>_BPE_Customermail" value="<?php this->escapeHtml($email); ?>" id="<?php echo $_code;?>_BPE_Customermail" />
39
  </div>
40
  </li>
41
  <li>
13
  <li>
14
  <label for="<?php echo $_code;?>_BPE_Customergender" class="required"><?php echo $this->__('Salutation') ?>: <em>*</em></label>
15
  <div class="input-box">
16
+ <select name="<?php echo $_code;?>_BPE_Customergender" class="validate-select validate-number" id="<?php echo $_code;?>_BPE_Customergender" title="<?php echo $this->__('Salutation');?>">
17
  <option value=''><?php echo $this->__('Select'); ?></option>
18
  <option value="1" <?php echo ($this->getGender()===1)?'selected':'';?>><?php echo $this->__('Mr.'); ?></option>
19
  <option value="2" <?php echo ($this->getGender()===2)?'selected':'';?>><?php echo $this->__('Mrs.'); ?></option>
20
  </select>
21
+ </div>
22
  </li>
23
  <li>
24
  <label for="<?php echo $_code;?>_BPE_Customerfirstname" class="required"><?php echo $this->__('First name') ?>: <em>*</em></label>
25
  <div class="input-box">
26
+ <input class="input-text required-entry" type="input" title="<?php echo $this->__('First name') ?>" name="<?php echo $_code;?>_BPE_Customerfirstname" value="<?php echo $this->escapeHtml($firstname); ?>" id="<?php echo $_code;?>_BPE_Customerfirstname" />
27
  </div>
28
  </li>
29
+ <li>
30
+ <label for="<?php echo $_code;?>_BPE_Customerlastname" class="required"><?php echo $this->__('Last name') ?>: <em>*</em></label>
31
+ <div class="input-box">
32
+ <input class="input-text required-entry" type="input" title="<?php echo $this->__('Last name') ?>" name="<?php echo $_code;?>_BPE_Customerlastname" value="<?php echo $this->escapeHtml($lastname); ?>" id="<?php echo $_code;?>_BPE_Customerlastname" />
33
+ </div>
34
  </li>
35
  <li>
36
  <label for="<?php echo $_code;?>_BPE_Customermail" class="required"><?php echo $this->__('E-mail address') ?>: <em>*</em></label>
37
  <div class="input-box">
38
+ <input class="input-text required-entry validate-email" type="input" title="<?php echo $this->__('E-mail address') ?>" name="<?php echo $_code;?>_BPE_Customermail" value="<?php echo $this->escapeHtml($email); ?>" id="<?php echo $_code;?>_BPE_Customermail" />
39
  </div>
40
  </li>
41
  <li>
app/design/frontend/rwd/default/template/buckaroo3extended/afterpay/checkout/form.phtml CHANGED
@@ -48,7 +48,11 @@
48
 
49
  <?php $currentBusiness = $this->getBusiness(); ?>
50
 
51
- <?php $currentBusiness = ($this->getPaymethod() == 'afterpaydigiaccept')? $currentBusiness : '1'; ?>
 
 
 
 
52
 
53
  <?php if($currentBusiness == '1'): ?>
54
 
@@ -69,14 +73,6 @@
69
  <div class="input-box">
70
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
71
  </div>
72
- <label class="required" for="<?php echo $_code;?>_BPE_CostCentre"><?php echo $this->__('Cost Center');?></label>
73
- <div class="input-box">
74
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CostCentre" id="<?php echo $_code;?>_BPE_CostCentre" value="<?php echo $this->escapeHtml($this->getCostCentre());?>" />
75
- </div>
76
- <label class="required" for="<?php echo $_code;?>_BPE_VatNumber"><?php echo $this->__('VAT Number');?></label>
77
- <div class="input-box">
78
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_VatNumber" id="<?php echo $_code;?>_BPE_VatNumber" value="<?php echo $this->escapeHtml($this->getVatNumber());?>" />
79
- </div>
80
  </div>
81
  </li>
82
 
@@ -105,14 +101,6 @@
105
  <div class="input-box">
106
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
107
  </div>
108
- <label class="required" for="<?php echo $_code;?>_BPE_CostCentre"><?php echo $this->__('Cost Center');?></label>
109
- <div class="input-box">
110
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CostCentre" id="<?php echo $_code;?>_BPE_CostCentre" value="<?php echo $this->escapeHtml($this->getCostCentre());?>" />
111
- </div>
112
- <label class="required" for="<?php echo $_code;?>_BPE_VatNumber"><?php echo $this->__('VAT Number');?></label>
113
- <div class="input-box">
114
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_VatNumber" id="<?php echo $_code;?>_BPE_VatNumber" value="<?php echo $this->escapeHtml($this->getVatNumber());?>" />
115
- </div>
116
  </div>
117
  </li>
118
 
48
 
49
  <?php $currentBusiness = $this->getBusiness(); ?>
50
 
51
+ <?php
52
+ if ($this->getPaymethod() != 'afterpaydigiaccept' || $this->getBillingCountry() == 'BE') {
53
+ $currentBusiness = '1';
54
+ }
55
+ ?>
56
 
57
  <?php if($currentBusiness == '1'): ?>
58
 
73
  <div class="input-box">
74
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
75
  </div>
 
 
 
 
 
 
 
 
76
  </div>
77
  </li>
78
 
101
  <div class="input-box">
102
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
103
  </div>
 
 
 
 
 
 
 
 
104
  </div>
105
  </li>
106
 
app/design/frontend/rwd/default/template/buckaroo3extended/afterpay2/checkout/form.phtml CHANGED
@@ -49,7 +49,11 @@
49
 
50
  <?php $currentBusiness = $this->getBusiness(); ?>
51
 
52
- <?php $currentBusiness = ($this->getPaymethod() == 'afterpaydigiaccept')? $currentBusiness : '1'; ?>
 
 
 
 
53
 
54
  <?php if($currentBusiness == '1'): ?>
55
 
@@ -70,14 +74,6 @@
70
  <div class="input-box">
71
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
72
  </div>
73
- <label class="required" for="<?php echo $_code;?>_BPE_CostCentre"><?php echo $this->__('Cost Center');?></label>
74
- <div class="input-box">
75
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CostCentre" id="<?php echo $_code;?>_BPE_CostCentre" value="<?php echo $this->escapeHtml($this->getCostCentre());?>" />
76
- </div>
77
- <label class="required" for="<?php echo $_code;?>_BPE_VatNumber"><?php echo $this->__('VAT Number');?></label>
78
- <div class="input-box">
79
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_VatNumber" id="<?php echo $_code;?>_BPE_VatNumber" value="<?php echo $this->escapeHtml($this->getVatNumber());?>" />
80
- </div>
81
  </div>
82
  </li>
83
 
@@ -106,14 +102,6 @@
106
  <div class="input-box">
107
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
108
  </div>
109
- <label class="required" for="<?php echo $_code;?>_BPE_CostCentre"><?php echo $this->__('Cost Center');?></label>
110
- <div class="input-box">
111
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CostCentre" id="<?php echo $_code;?>_BPE_CostCentre" value="<?php echo $this->escapeHtml($this->getCostCentre());?>" />
112
- </div>
113
- <label class="required" for="<?php echo $_code;?>_BPE_VatNumber"><?php echo $this->__('VAT Number');?></label>
114
- <div class="input-box">
115
- <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_VatNumber" id="<?php echo $_code;?>_BPE_VatNumber" value="<?php echo $this->escapeHtml($this->getVatNumber());?>" />
116
- </div>
117
  </div>
118
  </li>
119
 
49
 
50
  <?php $currentBusiness = $this->getBusiness(); ?>
51
 
52
+ <?php
53
+ if ($this->getPaymethod() != 'afterpaydigiaccept' || $this->getBillingCountry() == 'BE') {
54
+ $currentBusiness = '1';
55
+ }
56
+ ?>
57
 
58
  <?php if($currentBusiness == '1'): ?>
59
 
74
  <div class="input-box">
75
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
76
  </div>
 
 
 
 
 
 
 
 
77
  </div>
78
  </li>
79
 
102
  <div class="input-box">
103
  <input class="input-text required-entry" type="text" name="<?php echo $_code;?>_BPE_CompanyName" id="<?php echo $_code;?>_BPE_CompanyName" value="<?php echo $this->escapeHtml($this->getCompanyName());?>" />
104
  </div>
 
 
 
 
 
 
 
 
105
  </div>
106
  </li>
107
 
app/locale/en_US/TIG_Buckaroo3Extended.csv CHANGED
@@ -146,7 +146,7 @@
146
  "WARNING: Paypal Seller Protection requires additional configuration. Please read the documentation before proceding.","WARNING: Paypal Seller Protection requires additional configuration. Please read the documentation before proceding."
147
  "EPS","EPS"
148
  "Send order confirmation email","Send order confirmation email"
149
- "Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.","Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method."
150
  "Status Success received for order %s while the order currently the status %s has.","Status Success received for order %s while the order currently the status %s has."
151
  "here","here"
152
  "Convert your account number to IBAN %s","Convert your account number to IBAN %s."
146
  "WARNING: Paypal Seller Protection requires additional configuration. Please read the documentation before proceding.","WARNING: Paypal Seller Protection requires additional configuration. Please read the documentation before proceding."
147
  "EPS","EPS"
148
  "Send order confirmation email","Send order confirmation email"
149
+ "Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).","Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet)."
150
  "Status Success received for order %s while the order currently the status %s has.","Status Success received for order %s while the order currently the status %s has."
151
  "here","here"
152
  "Convert your account number to IBAN %s","Convert your account number to IBAN %s."
app/locale/nl_NL/TIG_Buckaroo3Extended.csv CHANGED
@@ -286,7 +286,7 @@
286
  "WARNING: Paypal Seller Protection requires additional configuration. Please consult Buckaroo for more information.","LET OP: Het gebruik van de PayPal verkopersbescherming vereist aanvullende instellingen in de configuratie van Magento. Raadpleeg Buckaroo voor meer informatie."
287
  "EPS","EPS"
288
  "Send order confirmation email","Verstuur order bevestigings email"
289
- "Enable to send an order confirmation email to the customer when the payment is succesfull. Specific for this payment method.","Activeer om een order bevestigings email te versturen wanneer de betaling succesvol is afgerond. Specifiek voor deze betaalmethode."
290
  "Status Success received for order %s while the order currently the status %s has.","Voor order %s is de status Success ontvangen terwijl de order de status %s heeft."
291
  "here","hier"
292
  "Convert your account number to IBAN %s","Converteer nu %s uw rekeningnummer naar IBAN."
@@ -312,7 +312,6 @@
312
  "This label will be displayed next to the fee on the checkout, order, invoice and creditmemo pages and pdfs.","Het label wordt getoond naast de betaaltoeslag tijdens de checkout en op de order, invoice, creditmemo pagina's en PDF."
313
  "Company Name","Bedrijfsnaam"
314
  "COC Number","KvK nummer"
315
- "Cost Center","Kostenplaats"
316
  "High VAT tax classes","BTW Hoog tarief"
317
  "Middle VAT tax classes","BTW Middel tarief"
318
  "Low VAT tax classes","BTW Laag tarief"
@@ -360,3 +359,7 @@ TIG_Buckaroo3Extended::Fee label, Betaaltoeslag label
360
  "Default message","Standaard bericht"
361
  "Set response message for the default message when a payment fails but there is no response code.","Bericht wanneer een betaling is mislukt, maar er geen code teruggekoppeld is."
362
  "Custom default error messages","Aangepaste foutmelding teksten"
 
 
 
 
286
  "WARNING: Paypal Seller Protection requires additional configuration. Please consult Buckaroo for more information.","LET OP: Het gebruik van de PayPal verkopersbescherming vereist aanvullende instellingen in de configuratie van Magento. Raadpleeg Buckaroo voor meer informatie."
287
  "EPS","EPS"
288
  "Send order confirmation email","Verstuur order bevestigings email"
289
+ "Activate to send an order confirmation e-mail when the order has been successfully placed. Specific for this payment method. This does not automatically mean that the payment has been made (yet).","Activeer om een orderbevestigingsemail te versturen wanneer de order succesvol is afgerond. Specifiek voor deze betaalmethode. Dit betekent niet automatisch dat de betaling ook (al) geslaagd is."
290
  "Status Success received for order %s while the order currently the status %s has.","Voor order %s is de status Success ontvangen terwijl de order de status %s heeft."
291
  "here","hier"
292
  "Convert your account number to IBAN %s","Converteer nu %s uw rekeningnummer naar IBAN."
312
  "This label will be displayed next to the fee on the checkout, order, invoice and creditmemo pages and pdfs.","Het label wordt getoond naast de betaaltoeslag tijdens de checkout en op de order, invoice, creditmemo pagina's en PDF."
313
  "Company Name","Bedrijfsnaam"
314
  "COC Number","KvK nummer"
 
315
  "High VAT tax classes","BTW Hoog tarief"
316
  "Middle VAT tax classes","BTW Middel tarief"
317
  "Low VAT tax classes","BTW Laag tarief"
359
  "Default message","Standaard bericht"
360
  "Set response message for the default message when a payment fails but there is no response code.","Bericht wanneer een betaling is mislukt, maar er geen code teruggekoppeld is."
361
  "Custom default error messages","Aangepaste foutmelding teksten"
362
+ "Payment flow","Betaalflow"
363
+ "Whether to use separate authorize and capture calls or to use a combined 'pay' call.","Of er een aparte authorize en capture call gedaan wordt of dat er een samengestelde 'pay' call gebruikt wordt."
364
+ "Combined","Samengesteld"
365
+ "Separate authorize and capture","Losse authorize en capture"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>tig_buckaroo3extended</name>
4
- <version>4.15.2</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,7 +34,31 @@ 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.15.2 =====&#xD;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  - Verwijderd configuratieveld voor Afterpay, Giftcard "Verstuur email met betalingsinstructies"&#xD;
39
  - Spelfouten op supporttab gecorrigeerd&#xD;
40
  - Correctie van versienummer&#xD;
@@ -119,9 +143,9 @@ Other services offered by this extension include refunds and paymentfee.</descri
119
  ==== Bug fixes ====&#xD;
120
  - Fixed a problem where the order ID would stay reserved after a payment had failed, causing errors.</notes>
121
  <authors><author><name>TIG</name><user>supporttotal</user><email>servicedesk@tig.nl</email></author></authors>
122
- <date>2016-06-22</date>
123
- <time>13:25:21</time>
124
- <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"/></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="Responsehint.php" hash="863d4dc447ba4f0cf40d9c6299a21d16"/><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="ca58bdd7d2e9e99735527eef123d3fa4"/></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="3faffbb86131ff8d6776af24c05f45f0"/></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="52dcedb162abe6fe2dd122f22fc08a38"/><file name="StateCodes.php" hash="b2c6d80d88c652415341c1babede7c57"/></dir><dir name="Model"><file name="Abstract.php" hash="73801105c22d72cad686b63ebcdd605b"/><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="Masterpass"><file name="V06.php" hash="b1d34af77b257b0dd56962751dddc2f7"/></dir><dir name="Mysql4"><file name="Setup.php" hash="fede9dbd2f1b214a12aa98bd895018b9"/></dir><dir name="Observer"><file name="Abstract.php" hash="4f0c8bb9a852e40c70eb9edbe83e46b6"/><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="6e8db6a2709154f632802365eee10097"/><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="95fb14bf2c3f2ecfebac34d8a001c33b"/><file name="PaymentMethod.php" hash="03f087c748eb59b4c08f12524f88474b"/></dir><dir name="Cartebancaire"><file name="Observer.php" hash="db1c2c5db148ad30bc7761479b3a8846"/><file name="PaymentMethod.php" hash="8133e6b1b3f68e879200e233fbd88b68"/></dir><dir name="Cartebleue"><file name="Observer.php" hash="a9fa28a790f5f12e5a526c3cb6adbfbd"/><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="3fff3090241dee02cc181562ccc0be98"/><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="6e3fe42e721da075efa8911a83626596"/><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="69fd392ab40081481ad39e1b617b85d9"/><file name="PaymentMethod.php" hash="3d84627f57dbe5492e85caf35e4d9834"/></dir><dir name="Masterpass"><file name="Observer.php" hash="ba554ffffe8ec4480736d18f0020b4be"/><file name="PaymentMethod.php" hash="352549517053d396ef2e13743970932c"/></dir><dir name="MasterpassLightbox"><file name="Observer.php" hash="cc05e04c811371b248c9276548254ac6"/><file name="PaymentMethod.php" hash="0bbdfcaf60690820bf5833d020786a1a"/></dir><dir name="Onlinegiro"><file name="Observer.php" hash="d8a90c5c36a45dc5845f3f38d86015e7"/><file name="PaymentMethod.php" hash="8e90b5a32e15865f89219c6304ac7eda"/></dir><file name="PaymentMethod.php" hash="6348e1a3623b5001514e89433b5a43be"/><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="27ea4f86eafdecc760e74211f40b4b4b"/><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="a1377476448aec0d20ac32e6427e4522"/><file name="Observer.php" hash="5b9ad329867e037eb75c4e287cb96530"/><dir name="Request"><file name="Abstract.php" hash="f61f0ffc429b2f67713525d35b69e3ce"/></dir><dir name="Response"><file name="Abstract.php" hash="599926ddf21a56d49bdc67b39cc17289"/><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="8e3217a059c52962801b2704d65159a0"/><file name="Availability.php" hash="40e8eea102893209b430196372c1b5a6"/><file name="Quote.php" hash="be0df87844e191275fcfd03047d6289c"/><file name="QuoteFinal.php" hash="f827a4953d6adc0d8681970351ffda84"/></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="f9e5bfc1b2f3d07361309459ba68f1b9"/><file name="BackendOrder.php" hash="518b73cc70ddca0ec659760e0e9b20bc"/><file name="MasterPass.php" hash="dab1fab67ec634d50252e7bcc66b02e5"/><file name="Push.php" hash="b2dcc91a046b26609082433320dbfa72"/><file name="Quote.php" hash="bdd684bbf370122a93813b44676fb520"/><file name="Return.php" hash="27539258c2c3040b1d24361a6863bc06"/></dir><file name="Soap.php" hash="b7162876f9d83e5f81597928ca199d3d"/><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="BuckarooAdminhtml"><file name="GiftcardController.php" hash="5765e2d0040b99d44e22c9fd1827fada"/></dir><file name="CheckoutController.php" hash="1cbd06d3bd0175312a7ce17117f8d892"/><file name="NotifyController.php" hash="1459dd86582340f596a260273911c742"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cdf9286c052532056b1cc8ced7b6bf8e"/><file name="config.xml" hash="12353d448461ec4d189a9cf809d95762"/><file name="masterpass.xml" hash="025bbcb407a45ac231fff82c58b647ee"/><file name="system.xml" hash="e7dd02f318c9a603ca92c223c78a92ae"/></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="3d3223602759340631c3be1e41d18ed6"/><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="888f1e7bfcd3bf57a2c56b7b711b6066"/></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="7c547d1c9faa7aa02347ff738c9cc1d1"/></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"><dir name="totals"><file name="fee.phtml" hash="6292242b0ff50c1187b2829da815e601"/></dir></dir></dir><dir name="totals"><file name="tax.phtml" hash="7db3608df63c4ffaf5e65811599d8cd7"/></dir></dir></dir><dir name="system"><dir name="config"><file name="hint.phtml" hash="9d1628612dfe61352b7ae8240e03b8e8"/><file name="klarnaCheck.phtml" hash="69395e036253f21fbb9f3cc6a494930b"/><file name="paymentmethodbanner.phtml" hash="d4d30e0fabe6484e4c2181fa1074ce12"/><file name="paypalRegionCheck.phtml" hash="170712863a97ce788da8a2c059077b4f"/><file name="responsehint.phtml" hash="83838dea3098a5cad8897cafcf3ed13b"/><file name="singlehint.phtml" hash="f4d4e28c7899e15b6692dcceb975ad77"/><file name="supportTab.phtml" hash="ec675b6abef80399322bf77a60586c52"/></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="5815d16f39fba71e12fa0157b7b2ca2a"/></dir></dir><dir name="template"><dir name="buckaroo3extended"><dir name="afterpay"><dir name="checkout"><file name="form.phtml" hash="c28bf21060748d980db9cc3c9144daca"/></dir></dir><dir name="afterpay2"><dir name="checkout"><file name="form.phtml" hash="c28bf21060748d980db9cc3c9144daca"/></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="da32523018be24ce13d9a90cc4b763cb"/></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="dd6426c314a69355760b84a6e5c8ce87"/></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="1ac26917b0f10e0c4d6e5301a58d0036"/><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="baa443e095599199b4b435908ce5c9be"/></dir></dir><dir name="paymentFee"><dir name="checkout"><file name="fee.phtml" hash="a980dc262ab66e63ffe2ca7cd5a846bf"/></dir></dir><dir name="paymentguarantee"><dir name="checkout"><file name="form.phtml" hash="9d5d7312832c1214bc0edcd2b8cf0199"/></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="28c81dddb1a483ba5fd80a4918cf3d18"/></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="1f7c8034db909e2ca067871f972fb2ba"/></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 name="rwd"><dir name="default"><dir name="template"><dir name="buckaroo3extended"><dir name="afterpay"><dir name="checkout"><file name="form.phtml" hash="efdb4b77dae8eb448e4ac9e8913484b3"/></dir></dir><dir name="afterpay2"><dir name="checkout"><file name="form.phtml" hash="3758d78f83c3e1581c74fdb3c3df4cbb"/></dir></dir><dir name="amex"><dir name="checkout"><file name="form.phtml" hash="489ab613e6035a0df55d64570c296873"/></dir></dir><dir name="bancontactmrcash"><dir name="checkout"><file name="form.phtml" hash="fc71bc66b3ce270b5f7d3f27edd64cad"/></dir></dir><dir name="cartebancaire"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></dir></dir><dir name="cartebleue"><dir name="checkout"><file name="form.phtml" hash="733b3a75405d26a5ee080d73b534d52f"/></dir></dir><dir name="directdebit"><dir name="checkout"><file name="form.phtml" hash="9a593b3b851fba8b20c235b754cb4922"/></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="677ef0a2383d31130c30e431dfa072a6"/></dir></dir><dir name="giftcards"><dir name="checkout"><file name="form.phtml" hash="677ef0a2383d31130c30e431dfa072a6"/></dir></dir><dir name="giropay"><dir name="checkout"><file name="form.phtml" hash="eb814a8ed955ef8cc9b5ee48284f3fae"/></dir></dir><dir name="ideal"><dir name="checkout"><file name="form.phtml" hash="0af09a938c81a157f11798c410fd3920"/></dir></dir><dir name="maestro"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></dir></dir><dir name="mastercard"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></dir></dir><dir name="onlinegiro"><dir name="checkout"><file name="form.phtml" hash="3de12383589d167d18922053902103c8"/></dir></dir><dir name="paymentguarantee"><dir name="checkout"><file name="form.phtml" hash="7e540e4870127d8856eb11195aae9ddc"/></dir><file name="termsAndConditions.phtml" hash="6f1fd609fc1baf3a541707f6fbe129f7"/></dir><dir name="paypal"><dir name="checkout"><file name="form.phtml" hash="6fa92b1eb2fb616a99fd1f9d2bc4e141"/></dir></dir><dir name="payperemail"><dir name="checkout"><file name="form.phtml" hash="77f0a46a225cd376f9961c30bc6f87e4"/></dir></dir><dir name="paysafecard"><dir name="checkout"><file name="form.phtml" hash="677ef0a2383d31130c30e431dfa072a6"/></dir></dir><dir name="sofortueberweisung"><dir name="checkout"><file name="form.phtml" hash="677ef0a2383d31130c30e431dfa072a6"/></dir></dir><dir name="transfer"><dir name="checkout"><file name="form.phtml" hash="0212c8314291eb9fd9f89a7edaca37bf"/></dir></dir><dir name="visa"><dir name="checkout"><file name="form.phtml" hash="733b3a75405d26a5ee080d73b534d52f"/></dir></dir><dir name="visaelectron"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></dir></dir><dir name="vpay"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></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="6b382c7f59572e02d78432d10d9938b6"/></dir></dir><dir name="images"><dir name="tig_buckaroo3extended"><file name="buckaroo_large.png" hash="8ab58aeeaabed3d11f62a8c56f3a9be6"/><file name="buckaroo_logo_medium.gif" hash="a7e5eb51b749720f6fc31d3a4234072e"/><file name="buckaroo_small.png" hash="96ed717a3c3617dd415ccefaef7f81d4"/><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_bunq_s.gif" hash="22202450a7f8f4ca1c3a1c19254e90c7"/><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="afterpayObserver.js" hash="60a91402a6eb574b9e12c6a0399fcf40"/><file name="jquery-1.12.3.min.js" hash="c07f2267a050732b752cc3e7a06850ac"/><file name="oneStepCheckout.js" hash="23ba52c444142e978c5d1ce7305c1142"/><file name="paymentGuaranteeObserver.js" hash="2f679ce4b928874b4ad34fe7b6951912"/><file name="saveData.js" hash="06aa4d9d8b1133ed452f045e850c9fac"/></dir></dir></dir></dir></dir><dir name="rwd"><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="c7609d8546a9dcaf545abcd8c5e11657"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="nl_NL"><file name="TIG_Buckaroo3Extended.csv" hash="789f2d1f29acd6c38dfa404c8808b6a4"/></dir><dir name="en_US"><file name="TIG_Buckaroo3Extended.csv" hash="1238d1d0c4a8e8a8468dfc1d36549c56"/></dir></target></contents>
125
  <compatible/>
126
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
127
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>tig_buckaroo3extended</name>
4
+ <version>4.16.4</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.16.4 =====&#xD;
38
+ &#xD;
39
+ Authorize &amp; (partial) capture is nu mogelijk met Afterpay&#xD;
40
+ Partial Refund is nu mogelijk met Afterpay&#xD;
41
+ De refund gerelateerde notices en warnings zijn opgelost&#xD;
42
+ Mogelijke melding Uncaught ReferenceError: jQuery is not defined in de checkout opgelost&#xD;
43
+ PHP7 ondersteuning voor Masterpass&#xD;
44
+ Check toegevoegd voor betaalmethodes om te kijken of de orderbevestiging e-mail verzonden moet worden bij een bepaalde betaalstatus.&#xD;
45
+ Payperemail probleem opgelost waar een syntax error kon ontstaan.&#xD;
46
+ Payperemail beschikbare betaalmethodes ook gekoppeld aan Credit Management.&#xD;
47
+ OneStepCheckout ondersteunde versies geupdate.&#xD;
48
+ Afterpay aanpassing waarbij de korting wordt afgerond op 2 decimalen.&#xD;
49
+ Adresvalidatie is verbeterd.&#xD;
50
+ Overboeking terugkoppeling bij deelbetalingen in order comments.&#xD;
51
+ Link naar plaza.buckaroo.nl opgenomen in support tab.&#xD;
52
+ Betere beschrijving van Afterpay foutmelding bij samengevoegde (combined) paymentflow. &#xD;
53
+ &#xD;
54
+ ===== 4.15.3 =====&#xD;
55
+ &#xD;
56
+ Bij Afterpay betalingen via Belgi&#xEB; wordt er bij telefoonnummers van meer dan 10 tekens "0032" toegevoegd&#xD;
57
+ Na een status 690 vanuit Buckaroo blijft AfterPay nu zichtbaar in decheckout&#xD;
58
+ XSS issue met Buckaroo extensie icm OneStepCheckout en paymentguarantee/transfer opgelost&#xD;
59
+ Ondersteuning Giftwrap toeslag (Enterprise) in combinatie met AfterPay&#xD;
60
+ &#xD;
61
+ ===== 4.15.2 =====&#xD;
62
  - Verwijderd configuratieveld voor Afterpay, Giftcard "Verstuur email met betalingsinstructies"&#xD;
63
  - Spelfouten op supporttab gecorrigeerd&#xD;
64
  - Correctie van versienummer&#xD;
143
  ==== Bug fixes ====&#xD;
144
  - Fixed a problem where the order ID would stay reserved after a payment had failed, causing errors.</notes>
145
  <authors><author><name>TIG</name><user>supporttotal</user><email>servicedesk@tig.nl</email></author></authors>
146
+ <date>2017-03-21</date>
147
+ <time>13:46:59</time>
148
+ <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"/></dir><dir name="Totals"><file name="Fee.php" hash="9e7ce33537256a4ee24928932a6de670"/></dir></dir><dir name="Invoice"><dir name="Totals"><file name="Fee.php" hash="02b3285322aaffc4601110d3af652958"/></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="Responsehint.php" hash="863d4dc447ba4f0cf40d9c6299a21d16"/><file name="SellersProtectionCheck.php" hash="fc531673aa166098a19b5c8919c1b992"/><file name="Singlehint.php" hash="78f13dec86b716a2fb6e136c4efbd34f"/><file name="SupportTab.php" hash="72af8448a699279c08314cc409aa7e60"/></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="56ebbf7666fec6fdbac2ce281df624b4"/></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="ca58bdd7d2e9e99735527eef123d3fa4"/></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="3faffbb86131ff8d6776af24c05f45f0"/></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="52dcedb162abe6fe2dd122f22fc08a38"/><file name="StateCodes.php" hash="b2c6d80d88c652415341c1babede7c57"/></dir><dir name="Model"><file name="Abstract.php" hash="4c40873ec4ee2c4ca8376e3bf0aff76b"/><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="Masterpass"><file name="V06.php" hash="b1d34af77b257b0dd56962751dddc2f7"/></dir><dir name="Mysql4"><file name="Setup.php" hash="fede9dbd2f1b214a12aa98bd895018b9"/></dir><dir name="Observer"><file name="Abstract.php" hash="0da92e66f696841c6cd5a38c7d97bcd0"/><file name="BackendOrder.php" hash="4efdbd37d08621f508d0c4b1e81548ec"/><file name="CancelAuthorize.php" hash="95467a0bba4ef1866b776e6e9f5b04bb"/></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="3e23ca47e8cf258c66634641b6cc7341"/><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="be27cfaeb5c896107fe91bb1c76abe3f"/><file name="PaymentMethod.php" hash="50d7193485a3707fd6161da5ed7b3060"/></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="95fb14bf2c3f2ecfebac34d8a001c33b"/><file name="PaymentMethod.php" hash="03f087c748eb59b4c08f12524f88474b"/></dir><dir name="Cartebancaire"><file name="Observer.php" hash="db1c2c5db148ad30bc7761479b3a8846"/><file name="PaymentMethod.php" hash="8133e6b1b3f68e879200e233fbd88b68"/></dir><dir name="Cartebleue"><file name="Observer.php" hash="a9fa28a790f5f12e5a526c3cb6adbfbd"/><file name="PaymentMethod.php" hash="f6174e8aaa6b9425ef56096fe31a2279"/></dir><dir name="Directdebit"><file name="Observer.php" hash="d69fea8936a47b872022f8d983e9be4a"/><file name="PaymentMethod.php" hash="b59d4e9b1e42d6d676a15862ea4c3f61"/></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="3fff3090241dee02cc181562ccc0be98"/><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="6e3fe42e721da075efa8911a83626596"/><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="69fd392ab40081481ad39e1b617b85d9"/><file name="PaymentMethod.php" hash="3d84627f57dbe5492e85caf35e4d9834"/></dir><dir name="Masterpass"><file name="Observer.php" hash="ba554ffffe8ec4480736d18f0020b4be"/><file name="PaymentMethod.php" hash="352549517053d396ef2e13743970932c"/></dir><dir name="MasterpassLightbox"><file name="Observer.php" hash="cc05e04c811371b248c9276548254ac6"/><file name="PaymentMethod.php" hash="0bbdfcaf60690820bf5833d020786a1a"/></dir><dir name="Onlinegiro"><file name="Observer.php" hash="d8a90c5c36a45dc5845f3f38d86015e7"/><file name="PaymentMethod.php" hash="8e90b5a32e15865f89219c6304ac7eda"/></dir><file name="PaymentMethod.php" hash="f6fe4765524e29482cf5cab93b2110bf"/><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="8034f02e364ee7ac274a1e787008966f"/></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="fae36ddacd55c479d7f409ca92295eb5"/></dir><dir name="Transfer"><file name="Observer.php" hash="eea70837020fcc703d2eb383f7926765"/><file name="PaymentMethod.php" hash="d1f2ca5a359e6457e9b861a30b547c48"/></dir><dir name="Visa"><file name="Observer.php" hash="27ea4f86eafdecc760e74211f40b4b4b"/><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="07b3af614309ae8657d0d32415ef18ab"/><file name="Observer.php" hash="5b9ad329867e037eb75c4e287cb96530"/><dir name="Request"><file name="Abstract.php" hash="5a251e085934061d776d910ee4c18ecd"/></dir><dir name="Response"><file name="Abstract.php" hash="c3c365b8c0a4c3a40d029ff75fb6b78d"/><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="60c0dedb91ff754268cec523355a3b48"/><file name="Availability.php" hash="40e8eea102893209b430196372c1b5a6"/><file name="CancelAuthorize.php" hash="31bd2563fb5fdd4870f23110a237521e"/><file name="Capture.php" hash="6afa5b8fde10a42d3d6d5c162115c987"/><file name="Quote.php" hash="be0df87844e191275fcfd03047d6289c"/><file name="QuoteFinal.php" hash="f827a4953d6adc0d8681970351ffda84"/></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="fbf54096f555bc4a8399567115ecd346"/><file name="BackendOrder.php" hash="5f3df5dfe178efb3999bbe706982f7ff"/><file name="CancelAuthorize.php" hash="9c4a680404f3d56b6ca0175a12ed3f5a"/><file name="Capture.php" hash="9d15f826b32fbdec6ea0afd2c8a0ef26"/><file name="MasterPass.php" hash="dab1fab67ec634d50252e7bcc66b02e5"/><file name="Push.php" hash="adcbad1e5597d4508e68965a84ee1e82"/><file name="Quote.php" hash="6b269a5ddc937fd6e91df49449693bf6"/><file name="Return.php" hash="27539258c2c3040b1d24361a6863bc06"/></dir><file name="Soap.php" hash="5f7eebe6b6393182abcada0af5491113"/><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="PaymentFlow.php" hash="8d45a39e39a4f678f7aea4d61aaceb02"/><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="Test"><dir name="Framework"><dir name="TIG"><dir name="Test"><file name="Config.php" hash="588f21c9becc52884448a93c113032fd"/><dir name="Http"><file name="Response.php" hash="f5c2da432cc610f2a1e1f90bd5acb8fe"/></dir><file name="TestCase.php" hash="df5cb2bb21d364937fb667102457337d"/></dir></dir></dir><dir name="Scripts"><file name="InstallDependencies.sh" hash="eb8a6342f971170c6879c9912f33c238"/><file name="Setup.sh" hash="5d515327c23f3d5cb67ad78a04bc563c"/></dir><dir name="Unit"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Invoice"><dir name="Totals"><file name="FeeTest.php" hash="5c0085f57b31b56fc64d6906f6ea0180"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><file name="SupportTabTest.php" hash="615f5149e9bceb8e5f98e356c5ca724c"/></dir></dir></dir></dir><dir name="Helper"><file name="DataTest.php" hash="be70da9228b7e3daaacb4f90f8e0866f"/></dir><dir name="Model"><dir name="Observer"><file name="CancelAuthorizeTest.php" hash="b5049222354fa9f3ee98da61bd905251"/></dir><dir name="PaymentFee"><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="FeeTest.php" hash="c7824989757f93903596de033c1ccdb8"/></dir></dir></dir></dir><dir name="PaymentMethods"><dir name="Afterpay"><file name="ObserverTest.php" hash="ba3e7b85a62544f0f8e9d9f0fdb95ea4"/><file name="PaymentMethodTest.php" hash="a70137933fdc546a50825fc77eb7dc4f"/></dir><dir name="Afterpay2"><file name="ObserverTest.php" hash="664840ad142890a3b4c6c63c9023f12c"/><file name="PaymentMethodTest.php" hash="97e16221059b0e9492122a784a086356"/></dir><file name="PaymentMethodTest.php" hash="c1977e3376fda06425aad7ae1ade044b"/></dir><dir name="Refund"><file name="CreditmemoTest.php" hash="e2ebcd257c9816316cb919c0d0a63008"/></dir><dir name="Request"><file name="CancelAuthorizeTest.php" hash="ec7b5b3ff11409d17e432c928a6fe7c3"/><file name="CaptureTest.php" hash="ed0d99da7f7742be235132b4941341db"/></dir><dir name="Response"><file name="CancelAuthorizeTest.php" hash="1dbdd699e110afa0945c52c06d785086"/><file name="CaptureTest.php" hash="fbf22b33ff383c6a05677af77a5fef8f"/></dir><dir name="Sources"><file name="PaymentFlowTest.php" hash="314bcaf4fd850976bac9b61172f31c8f"/></dir></dir></dir><file name="bootstrap.php" hash="b8c283971a766a2be8ded61df13dab2d"/><file name="phpunit.xml" hash="c2854e9145988f68b29840e5325083ac"/></dir><dir name="certificate"><file name="Checkout.pem" hash="441f60bb62fdc14434954514b01d0aa3"/></dir><dir name="controllers"><dir name="BuckarooAdminhtml"><file name="GiftcardController.php" hash="5765e2d0040b99d44e22c9fd1827fada"/></dir><file name="CheckoutController.php" hash="1cbd06d3bd0175312a7ce17117f8d892"/><file name="NotifyController.php" hash="32fd050c9c956c3ec5e8402f24028ae0"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cdf9286c052532056b1cc8ced7b6bf8e"/><file name="config.xml" hash="1f1b7a1e339f988b33f7499067c910b6"/><file name="masterpass.xml" hash="025bbcb407a45ac231fff82c58b647ee"/><file name="system.xml" hash="fc72df1855b3c03f3398ad1ed0c53586"/></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="3d3223602759340631c3be1e41d18ed6"/><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="888f1e7bfcd3bf57a2c56b7b711b6066"/></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="7c547d1c9faa7aa02347ff738c9cc1d1"/></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"><dir name="totals"><file name="fee.phtml" hash="6292242b0ff50c1187b2829da815e601"/></dir></dir></dir><dir name="totals"><file name="tax.phtml" hash="7db3608df63c4ffaf5e65811599d8cd7"/></dir></dir></dir><dir name="system"><dir name="config"><file name="hint.phtml" hash="9d1628612dfe61352b7ae8240e03b8e8"/><file name="klarnaCheck.phtml" hash="69395e036253f21fbb9f3cc6a494930b"/><file name="paymentmethodbanner.phtml" hash="d4d30e0fabe6484e4c2181fa1074ce12"/><file name="paypalRegionCheck.phtml" hash="170712863a97ce788da8a2c059077b4f"/><file name="responsehint.phtml" hash="83838dea3098a5cad8897cafcf3ed13b"/><file name="singlehint.phtml" hash="f4d4e28c7899e15b6692dcceb975ad77"/><file name="supportTab.phtml" hash="348957b4e0c087b5404341cd16f87fd8"/></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="5815d16f39fba71e12fa0157b7b2ca2a"/></dir></dir><dir name="template"><dir name="buckaroo3extended"><dir name="afterpay"><dir name="checkout"><file name="form.phtml" hash="37975b73101806baf840d1d16771ee73"/></dir></dir><dir name="afterpay2"><dir name="checkout"><file name="form.phtml" hash="37975b73101806baf840d1d16771ee73"/></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="da32523018be24ce13d9a90cc4b763cb"/></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="dd6426c314a69355760b84a6e5c8ce87"/></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="6b1b0555738c327617c19405f10eeb75"/><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="baa443e095599199b4b435908ce5c9be"/></dir></dir><dir name="paymentFee"><dir name="checkout"><file name="fee.phtml" hash="a980dc262ab66e63ffe2ca7cd5a846bf"/></dir></dir><dir name="paymentguarantee"><dir name="checkout"><file name="form.phtml" hash="9d5d7312832c1214bc0edcd2b8cf0199"/></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="6407ca9e8d67e2da85f4d7ccf070ea90"/></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="1f7c8034db909e2ca067871f972fb2ba"/></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 name="rwd"><dir name="default"><dir name="template"><dir name="buckaroo3extended"><dir name="afterpay"><dir name="checkout"><file name="form.phtml" hash="f095f0393adad6723925df4f6b7a3464"/></dir></dir><dir name="afterpay2"><dir name="checkout"><file name="form.phtml" hash="53f8c2de36bbb143319c2251443b2f0f"/></dir></dir><dir name="amex"><dir name="checkout"><file name="form.phtml" hash="489ab613e6035a0df55d64570c296873"/></dir></dir><dir name="bancontactmrcash"><dir name="checkout"><file name="form.phtml" hash="fc71bc66b3ce270b5f7d3f27edd64cad"/></dir></dir><dir name="cartebancaire"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></dir></dir><dir name="cartebleue"><dir name="checkout"><file name="form.phtml" hash="733b3a75405d26a5ee080d73b534d52f"/></dir></dir><dir name="directdebit"><dir name="checkout"><file name="form.phtml" hash="9a593b3b851fba8b20c235b754cb4922"/></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="677ef0a2383d31130c30e431dfa072a6"/></dir></dir><dir name="giftcards"><dir name="checkout"><file name="form.phtml" hash="677ef0a2383d31130c30e431dfa072a6"/></dir></dir><dir name="giropay"><dir name="checkout"><file name="form.phtml" hash="eb814a8ed955ef8cc9b5ee48284f3fae"/></dir></dir><dir name="ideal"><dir name="checkout"><file name="form.phtml" hash="0af09a938c81a157f11798c410fd3920"/></dir></dir><dir name="maestro"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></dir></dir><dir name="mastercard"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></dir></dir><dir name="onlinegiro"><dir name="checkout"><file name="form.phtml" hash="3de12383589d167d18922053902103c8"/></dir></dir><dir name="paymentguarantee"><dir name="checkout"><file name="form.phtml" hash="7e540e4870127d8856eb11195aae9ddc"/></dir><file name="termsAndConditions.phtml" hash="6f1fd609fc1baf3a541707f6fbe129f7"/></dir><dir name="paypal"><dir name="checkout"><file name="form.phtml" hash="6fa92b1eb2fb616a99fd1f9d2bc4e141"/></dir></dir><dir name="payperemail"><dir name="checkout"><file name="form.phtml" hash="77f0a46a225cd376f9961c30bc6f87e4"/></dir></dir><dir name="paysafecard"><dir name="checkout"><file name="form.phtml" hash="677ef0a2383d31130c30e431dfa072a6"/></dir></dir><dir name="sofortueberweisung"><dir name="checkout"><file name="form.phtml" hash="677ef0a2383d31130c30e431dfa072a6"/></dir></dir><dir name="transfer"><dir name="checkout"><file name="form.phtml" hash="0212c8314291eb9fd9f89a7edaca37bf"/></dir></dir><dir name="visa"><dir name="checkout"><file name="form.phtml" hash="733b3a75405d26a5ee080d73b534d52f"/></dir></dir><dir name="visaelectron"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></dir></dir><dir name="vpay"><dir name="checkout"><file name="form.phtml" hash="889a0b99aff44ddde4218a9f436b6543"/></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="6b382c7f59572e02d78432d10d9938b6"/></dir></dir><dir name="images"><dir name="tig_buckaroo3extended"><file name="buckaroo_large.png" hash="8ab58aeeaabed3d11f62a8c56f3a9be6"/><file name="buckaroo_logo_medium.gif" hash="a7e5eb51b749720f6fc31d3a4234072e"/><file name="buckaroo_small.png" hash="96ed717a3c3617dd415ccefaef7f81d4"/><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_bunq_s.gif" hash="22202450a7f8f4ca1c3a1c19254e90c7"/><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="afterpayObserver.js" hash="60a91402a6eb574b9e12c6a0399fcf40"/><file name="jquery-1.12.3.min.js" hash="c07f2267a050732b752cc3e7a06850ac"/><file name="oneStepCheckout.js" hash="77d8f8c922176fb681ae4295b7e657d1"/><file name="paymentGuaranteeObserver.js" hash="2f679ce4b928874b4ad34fe7b6951912"/><file name="saveData.js" hash="06aa4d9d8b1133ed452f045e850c9fac"/></dir></dir></dir></dir></dir><dir name="rwd"><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="c7609d8546a9dcaf545abcd8c5e11657"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="nl_NL"><file name="TIG_Buckaroo3Extended.csv" hash="4020f8621ad95d876dcccdd08a3ba23a"/></dir><dir name="en_US"><file name="TIG_Buckaroo3Extended.csv" hash="be4f5d1d56243642e668db3d41fce50a"/></dir></target></contents>
149
  <compatible/>
150
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
151
  </package>
skin/frontend/base/default/js/TIG/Buckaroo3Extended/oneStepCheckout.js CHANGED
@@ -30,11 +30,11 @@ jQuery_1123("#billing\\:firstname").change(
30
  sendData(jQuery_1123('#buckaroo3extended_payperemail_BPE_Customerfirstname'));
31
  }
32
 
33
- jQuery_1123('#buckaroo3extended_paymentguarantee_BPE_Customername').html(
34
  firstname + ' ' + jQuery_1123("#billing\\:lastname").val()
35
  );
36
 
37
- jQuery_1123('#buckaroo3extended_transfer_BPE_Customername').html(
38
  firstname + ' ' + jQuery_1123("#billing\\:lastname").val()
39
  );
40
 
@@ -71,11 +71,11 @@ jQuery_1123("#billing\\:lastname").change(
71
  sendData(jQuery_1123('#buckaroo3extended_payperemail_BPE_Customerlastname'));
72
  }
73
 
74
- jQuery_1123('#buckaroo3extended_paymentguarantee_BPE_Customername').html(
75
  jQuery_1123("#billing\\:firstname").val() + ' ' + lastname
76
  );
77
 
78
- jQuery_1123('#buckaroo3extended_transfer_BPE_Customername').html(
79
  jQuery_1123("#billing\\:firstname").val() + ' ' + lastname
80
  );
81
 
30
  sendData(jQuery_1123('#buckaroo3extended_payperemail_BPE_Customerfirstname'));
31
  }
32
 
33
+ jQuery_1123('#buckaroo3extended_paymentguarantee_BPE_Customername').val(
34
  firstname + ' ' + jQuery_1123("#billing\\:lastname").val()
35
  );
36
 
37
+ jQuery_1123('#buckaroo3extended_transfer_BPE_Customername').val(
38
  firstname + ' ' + jQuery_1123("#billing\\:lastname").val()
39
  );
40
 
71
  sendData(jQuery_1123('#buckaroo3extended_payperemail_BPE_Customerlastname'));
72
  }
73
 
74
+ jQuery_1123('#buckaroo3extended_paymentguarantee_BPE_Customername').val(
75
  jQuery_1123("#billing\\:firstname").val() + ' ' + lastname
76
  );
77
 
78
+ jQuery_1123('#buckaroo3extended_transfer_BPE_Customername').val(
79
  jQuery_1123("#billing\\:firstname").val() + ' ' + lastname
80
  );
81