BillSAFE_3 - Version 14.03.31

Version Notes

Stable Release

Download this release

Release Info

Developer Kristian Büsch
Extension BillSAFE_3
Version 14.03.31
Comparing to
See all releases


Code changes from version 14.03.27 to 14.03.31

app/code/community/Netresearch/Billsafe/Block/Payment/Form.php CHANGED
@@ -23,13 +23,37 @@ class Netresearch_Billsafe_Block_Payment_Form extends Mage_Payment_Block_Form
23
  }
24
  }
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  /**
27
  * Obtain BillSAFE Config
28
  * @return Netresearch_Billsafe_Model_Config
29
  */
30
  protected function _getBillsafeConfig()
31
  {
32
- return Mage::helper('billsafe/data')->getConfig();
33
  }
34
 
35
  /**
@@ -46,7 +70,7 @@ class Netresearch_Billsafe_Block_Payment_Form extends Mage_Payment_Block_Form
46
  */
47
  public function getQuote()
48
  {
49
- return Mage::helper('billsafe/data')->getQuotefromSession();
50
  }
51
 
52
  /**
@@ -91,20 +115,18 @@ class Netresearch_Billsafe_Block_Payment_Form extends Mage_Payment_Block_Form
91
  */
92
  public function getCustomerCompany()
93
  {
94
- $quote = Mage::getSingleton('checkout/session')->getQuote();
95
- $company = $quote->getBillingAddress()->getCompany();
96
- return $company;
97
 
98
  }
99
 
100
  /**
101
  *
102
- * @return true if billsafe direct is enabled, false otherwise
103
  */
104
  public function isBillSafeDirectEnabled()
105
  {
106
- $storeId = $this->_getStoreId();
107
- return $this->_getBillsafeConfig()->isBillSafeDirectEnabled($storeId);
108
  }
109
 
110
  /**
23
  }
24
  }
25
 
26
+ /**
27
+ * @return Netresearch_Billsafe_Helper_Data
28
+ */
29
+ protected function getDataHelper()
30
+ {
31
+ return Mage::helper('billsafe/data');
32
+ }
33
+
34
+ /**
35
+ * @return Netresearch_Billsafe_Helper_Customer
36
+ */
37
+ protected function getCustomerHelper()
38
+ {
39
+ return Mage::helper('billsafe/customer');
40
+ }
41
+
42
+ /**
43
+ * @return Netresearch_Billsafe_Helper_Order
44
+ */
45
+ protected function getOrderHelper()
46
+ {
47
+ return Mage::helper('billsafe/order');
48
+ }
49
+
50
  /**
51
  * Obtain BillSAFE Config
52
  * @return Netresearch_Billsafe_Model_Config
53
  */
54
  protected function _getBillsafeConfig()
55
  {
56
+ return $this->getDataHelper()->getConfig();
57
  }
58
 
59
  /**
70
  */
71
  public function getQuote()
72
  {
73
+ return $this->getDataHelper()->getQuotefromSession();
74
  }
75
 
76
  /**
115
  */
116
  public function getCustomerCompany()
117
  {
118
+
119
+ return $this->getCustomerHelper()->getCustomerCompany();
 
120
 
121
  }
122
 
123
  /**
124
  *
125
+ * @return true if billsafe direct is enabled for checkout, false otherwise
126
  */
127
  public function isBillSafeDirectEnabled()
128
  {
129
+ return $this->getOrderHelper()->isBillsafeOnsiteCheckout($this->getQuote());
 
130
  }
131
 
132
  /**
app/code/community/Netresearch/Billsafe/Helper/Customer.php CHANGED
@@ -29,6 +29,7 @@
29
  */
30
  class Netresearch_Billsafe_Helper_Customer extends Mage_Customer_Helper_Data
31
  {
 
32
 
33
  /**
34
  * Tries to guess customers gender in billsafe required form (f || m)
@@ -40,11 +41,6 @@ class Netresearch_Billsafe_Helper_Customer extends Mage_Customer_Helper_Data
40
  */
41
  public function getCustomerGender($address, $order, $customer)
42
  {
43
- if ($address->getCompany()) {
44
- // B2B, no gender necessary
45
- return '';
46
- }
47
-
48
  $gender = Mage::helper('billsafe/data')->coalesce(
49
  $this->getGenderText($address, 'gender'),
50
  $this->getGenderText($order, 'customer_gender'),
@@ -52,6 +48,23 @@ class Netresearch_Billsafe_Helper_Customer extends Mage_Customer_Helper_Data
52
  Mage::getModel('billsafe/config')->getDefaultCustomerGender($order->getStoreId())
53
  );
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  return ($gender === 'Female') ? 'f' : 'm';
56
  }
57
 
@@ -94,4 +107,35 @@ class Netresearch_Billsafe_Helper_Customer extends Mage_Customer_Helper_Data
94
  ->getOptionText($entity->getData($attributeCode));
95
  }
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  }
29
  */
30
  class Netresearch_Billsafe_Helper_Customer extends Mage_Customer_Helper_Data
31
  {
32
+ protected $_dataHelper = null;
33
 
34
  /**
35
  * Tries to guess customers gender in billsafe required form (f || m)
41
  */
42
  public function getCustomerGender($address, $order, $customer)
43
  {
 
 
 
 
 
44
  $gender = Mage::helper('billsafe/data')->coalesce(
45
  $this->getGenderText($address, 'gender'),
46
  $this->getGenderText($order, 'customer_gender'),
48
  Mage::getModel('billsafe/config')->getDefaultCustomerGender($order->getStoreId())
49
  );
50
 
51
+ // override previous gender configuration with the most common prefixes (DE)
52
+ if (in_array('Herr', array(
53
+ $address->getPrefix(),
54
+ $order->getCustomerPrefix(),
55
+ $customer->getPrefix())
56
+ )) {
57
+ $gender = 'Male';
58
+ }
59
+
60
+ if (in_array('Frau', array(
61
+ $address->getPrefix(),
62
+ $order->getCustomerPrefix(),
63
+ $customer->getPrefix())
64
+ )) {
65
+ $gender = 'Female';
66
+ }
67
+
68
  return ($gender === 'Female') ? 'f' : 'm';
69
  }
70
 
107
  ->getOptionText($entity->getData($attributeCode));
108
  }
109
 
110
+ /**
111
+ * @param Mage_Sales_Model_Quote $quote
112
+ * @return string
113
+ */
114
+ public function getCustomerCompany(Mage_Sales_Model_Quote $quote = null)
115
+ {
116
+ if(is_null($quote)){
117
+ $quote = $this->getDataHelper()->getQuotefromSession();
118
+ }
119
+ return $quote->getBillingAddress()->getCompany();
120
+ }
121
+
122
+ /**
123
+ * @return Netresearch_Billsafe_Helper_Data|null
124
+ */
125
+
126
+ protected function getDataHelper()
127
+ {
128
+ if(is_null($this->_dataHelper)){
129
+ $this->_dataHelper = Mage::helper('billsafe/data');
130
+ }
131
+ return $this->_dataHelper;
132
+ }
133
+
134
+ /**
135
+ * @param Netresearch_Billsafe_Helper_Data $dataHelper
136
+ */
137
+ public function setDataHelper(Netresearch_Billsafe_Helper_Data $dataHelper){
138
+ $this->_dataHelper = $dataHelper;
139
+ }
140
+
141
  }
app/code/community/Netresearch/Billsafe/Helper/Data.php CHANGED
@@ -2,7 +2,7 @@
2
  class Netresearch_Billsafe_Helper_Data extends Mage_Payment_Helper_Data
3
  {
4
  const LOG_FILE_NAME = 'billsafe.log';
5
-
6
  /**
7
  * Returns config model
8
  *
@@ -13,6 +13,25 @@ class Netresearch_Billsafe_Helper_Data extends Mage_Payment_Helper_Data
13
  return Mage::getSingleton('billsafe/config');
14
  }
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  /**
17
  * Checks if logging is enabled and if yes, logs given message to logfile
18
  *
@@ -127,7 +146,7 @@ class Netresearch_Billsafe_Helper_Data extends Mage_Payment_Helper_Data
127
  */
128
  public function isFeeItem($item)
129
  {
130
- $config = Mage::getSingleton('billsafe/config');
131
  $storeId = $this->getStoreIdfromQuote();
132
  return ($config->isPaymentFeeEnabled($storeId) && $config->getPaymentFeeSku($storeId) == $item->getSku());
133
  }
2
  class Netresearch_Billsafe_Helper_Data extends Mage_Payment_Helper_Data
3
  {
4
  const LOG_FILE_NAME = 'billsafe.log';
5
+ protected $_customerHelper = null;
6
  /**
7
  * Returns config model
8
  *
13
  return Mage::getSingleton('billsafe/config');
14
  }
15
 
16
+ /**
17
+ * @return Netresearch_Billsafe_Helper_Customer|null
18
+ */
19
+ public function getCustomerHelper()
20
+ {
21
+ if(is_null($this->_customerHelper)){
22
+ $this->_customerHelper = Mage::helper('billsafe/customer');
23
+ }
24
+ return $this->_customerHelper;
25
+ }
26
+
27
+ /**
28
+ * @param Netresearch_Billsafe_Helper_Customer $customerHelper
29
+ */
30
+ public function setCustomerHelper(Netresearch_Billsafe_Helper_Customer $customerHelper)
31
+ {
32
+ $this->_customerHelper = $customerHelper;
33
+ }
34
+
35
  /**
36
  * Checks if logging is enabled and if yes, logs given message to logfile
37
  *
146
  */
147
  public function isFeeItem($item)
148
  {
149
+ $config = $this->getConfig();
150
  $storeId = $this->getStoreIdfromQuote();
151
  return ($config->isPaymentFeeEnabled($storeId) && $config->getPaymentFeeSku($storeId) == $item->getSku());
152
  }
app/code/community/Netresearch/Billsafe/Helper/Order.php CHANGED
@@ -752,7 +752,7 @@ class Netresearch_Billsafe_Helper_Order extends Mage_Payment_Helper_Data
752
  $payment->save();
753
  } catch (Exception $e) {
754
  $message = $e->getMessage();
755
- Mage::helper('billsafe/data')->log(
756
  'exception during handling getPaymentInstruction. Message is %s', $message
757
  );
758
  }
@@ -810,4 +810,24 @@ class Netresearch_Billsafe_Helper_Order extends Mage_Payment_Helper_Data
810
 
811
  return true;
812
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
813
  }
752
  $payment->save();
753
  } catch (Exception $e) {
754
  $message = $e->getMessage();
755
+ $this->getHelper()->log(
756
  'exception during handling getPaymentInstruction. Message is %s', $message
757
  );
758
  }
810
 
811
  return true;
812
  }
813
+
814
+ /**
815
+ * Check if current order applies for BillSAFE Onsite Checkout.
816
+ *
817
+ * @return boolean
818
+ */
819
+ public function isBillsafeOnsiteCheckout(Mage_Sales_Model_Quote $quote = null)
820
+ {
821
+ if (!$quote) {
822
+ $quote = $this->getHelper()->getQuotefromSession();
823
+ }
824
+
825
+ // onsite checkout must be enabled via config
826
+ $onsiteConfig = Mage::getModel('billsafe/config')
827
+ ->isBillSafeDirectEnabled($quote->getStoreId());
828
+ // b2b orders (company is set in quote) must use redirect gateway
829
+ $onsiteCompany = !Mage::helper('billsafe/customer')
830
+ ->getCustomerCompany($quote);
831
+ return ($onsiteConfig && $onsiteCompany);
832
+ }
833
  }
app/code/community/Netresearch/Billsafe/Model/Config.php CHANGED
@@ -373,9 +373,7 @@ class Netresearch_Billsafe_Model_Config extends Varien_Object
373
  */
374
  public function isBillSafeDirectEnabled($storeId = null)
375
  {
376
- return (boolean)Mage::getStoreConfig(
377
- self::CONFIG_PATH_BILLSAFE_DIRECT, $storeId
378
- );
379
  }
380
 
381
  /**
373
  */
374
  public function isBillSafeDirectEnabled($storeId = null)
375
  {
376
+ return Mage::getStoreConfigFlag(self::CONFIG_PATH_BILLSAFE_DIRECT, $storeId);
 
 
377
  }
378
 
379
  /**
app/code/community/Netresearch/Billsafe/Model/Config/Abstract.php CHANGED
@@ -7,25 +7,68 @@
7
  */
8
  class Netresearch_Billsafe_Model_Config_Abstract extends Mage_Core_Model_Config_Data
9
  {
10
- protected $dataHelper = null;
 
 
 
 
 
11
 
12
  /**
13
- * @param null $dataHelper
14
  */
15
- public function setDataHelper($dataHelper)
16
  {
17
- $this->dataHelper = $dataHelper;
18
  }
19
 
20
  /**
21
- * @return null
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  */
23
  public function getDataHelper()
24
  {
25
- if (null === $this->dataHelper) {
26
- $this->dataHelper = Mage::helper('billsafe/data');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  }
28
- return $this->dataHelper;
29
  }
30
 
31
 
7
  */
8
  class Netresearch_Billsafe_Model_Config_Abstract extends Mage_Core_Model_Config_Data
9
  {
10
+
11
+ protected $_config;
12
+ protected $_dataHelper;
13
+ protected $_customerHelper;
14
+
15
+
16
 
17
  /**
18
+ * @param mixed $config
19
  */
20
+ public function setConfig(Netresearch_Billsafe_Model_Config $config)
21
  {
22
+ $this->_config = $config;
23
  }
24
 
25
  /**
26
+ * @return Netresearch_Billsafe_Model_Config
27
+ */
28
+ public function getConfig()
29
+ {
30
+ if(is_null($this->_config)){
31
+ $this->_config = Mage::getSingleton('billsafe/config');
32
+ }
33
+ return $this->_config;
34
+ }
35
+
36
+ /**
37
+ * @param Netresearch_Billsafe_Helper_Data $dataHelper
38
+ */
39
+ public function setDataHelper(Netresearch_Billsafe_Helper_Data $dataHelper)
40
+ {
41
+ $this->_dataHelper = $dataHelper;
42
+ }
43
+
44
+ /**
45
+ * @return Netresearch_Billsafe_Helper_Data
46
  */
47
  public function getDataHelper()
48
  {
49
+ if(is_null($this->_dataHelper)){
50
+ $this->_dataHelper = Mage::helper('billsafe/data');
51
+ }
52
+ return $this->_dataHelper;
53
+ }
54
+
55
+ /**
56
+ * @param Netresearch_Billsafe_Helper_Customer $customerHelper
57
+ */
58
+ public function setCustomerHelper(Netresearch_Billsafe_Helper_Customer $customerHelper)
59
+ {
60
+ $this->_customerHelper = $customerHelper;
61
+ }
62
+
63
+ /**
64
+ * @return Netresearch_Billsafe_Helper_Customer
65
+ */
66
+ public function getCustomerHelper()
67
+ {
68
+ if(is_null($this->_customerHelper)){
69
+ $this->_customerHelper = Mage::helper('billsafe/customer');
70
  }
71
+ return $this->_customerHelper;
72
  }
73
 
74
 
app/code/community/Netresearch/Billsafe/Model/Payment.php CHANGED
@@ -24,6 +24,8 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
24
  protected $_formBlockType = 'billsafe/payment_form';
25
  protected $_availableCheck = true;
26
  protected $_unavailableMessage = '';
 
 
27
 
28
  /**
29
  * Setter for config in for unit testing
@@ -57,7 +59,7 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
57
  */
58
  public function setDataHelper(Netresearch_Billsafe_Helper_Data $dataHelper)
59
  {
60
- $this->dataHelper = $dataHelper;
61
  }
62
 
63
  /**
@@ -65,10 +67,29 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
65
  */
66
  public function getDataHelper()
67
  {
68
- if (null == $this->dataHelper) {
69
- $this->dataHelper = Mage::helper('billsafe/data');
70
  }
71
- return $this->dataHelper;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
 
@@ -83,10 +104,10 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
83
  */
84
  public function isAvailable($quote = null)
85
  {
86
- if (Mage::getModel('billsafe/config')->isBillsafeDirectEnabled()
87
  && true === Mage::getSingleton('customer/session')->getData('authorize_failed')
88
  && $quote instanceof Mage_Sales_Model_Quote
89
- && Mage::helper('billsafe/order')->generateAddressHash($quote->getBillingAddress())
90
  == Mage::getSingleton('customer/session')->getData('billsafe_billingAddrHash')
91
  ) {
92
  return false;
@@ -110,7 +131,7 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
110
  return false;
111
  }
112
  // Check Min and Fax of Fee
113
- if (Mage::getModel('billsafe/config')->isPaymentFeeEnabled($quote->getStoreId())) {
114
  $feeProduct = Mage::helper('paymentfee/data')->getUpdatedFeeProduct();
115
  $avoidOverMax = $this->getConfig()->isBillsafeExeedingMaxFeeAmount($quote->getStoreId());
116
  $avoidBelowMin = $this->getConfig()->isBillsafeExeedingMinFeeAmount($quote->getStoreId());
@@ -193,7 +214,7 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
193
  try {
194
  if ($quote->getBillingAddress() instanceof Mage_Sales_Model_Quote_Address
195
  && 0 < strlen($quote->getBillingAddress()->getPostcode())) {
196
- $prevalidateResult = Mage::helper('billsafe/order')->prevalidateOrder($quote);
197
  if (strtolower(trim($prevalidateResult->ack)) != 'ok' ||
198
  (property_exists($prevalidateResult, 'invoice') &&
199
  (bool) $prevalidateResult->invoice->isAvailable == false)
@@ -266,18 +287,17 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
266
  */
267
  public function getOrderPlaceRedirectUrl()
268
  {
269
- if (false == Mage::getModel('billsafe/config')->isBillSafeDirectEnabled(
270
- )
271
- ) {
272
- return sprintf(
273
- '%s?token=%s', $this->getClient()->getConfig()->getGatewayUrl(
274
- Mage::helper('billsafe/data')->getStoreIdfromQuote()
275
- ), Mage::registry(
276
- Netresearch_Billsafe_Model_Config::TOKEN_REGISTRY_KEY
277
- )
278
- );
279
  }
280
- return '';
 
 
 
 
 
 
281
  }
282
 
283
  /**
@@ -293,17 +313,15 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
293
 
294
  parent::authorize($payment, $amount);
295
  $order = $this->getInfoInstance()->getOrder();
 
296
  $section = $this->getCheckoutSection($order);
297
  $buyerMessage = "Please select another payment method!";
298
- if (true == Mage::getModel('billsafe/config')->isBillSafeDirectEnabled()
299
- ) {
300
- $quote = $order->getQuote();
301
  $result = array();
302
 
303
-
304
  try {
305
- $result = Mage::helper('billsafe/order')->processOrder($quote, $order);
306
- Mage::helper('billsafe/data')->log('result ' . Zend_Json::encode($result));
307
  if (!array_key_exists('success', $result) || $result['success'] === false) {
308
  if (array_key_exists('buyerMessage', $result)) {
309
  $buyerMessage = $result['buyerMessage'];
@@ -311,7 +329,7 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
311
  'authorize_failed',
312
  true
313
  );
314
- $addressHash = Mage::helper('billsafe/order')
315
  ->generateAddressHash($quote->getBillingAddress());
316
  Mage::getSingleton('customer/session')->setData(
317
  'billsafe_billingAddrHash',
@@ -321,7 +339,7 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
321
  Mage::getSingleton('checkout/type_onepage')->getCheckout()
322
  ->setGotoSection($section);
323
  Mage::throwException(
324
- Mage::helper('billsafe/data')->__($buyerMessage)
325
  );
326
  }
327
  if (array_key_exists('transactionId', $result)) {
@@ -335,7 +353,7 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
335
  )
336
  ->setTransactionId($result['transactionId'])
337
  ->setTxnId($result['transactionId']);
338
- $state = Mage::getModel('billsafe/config')
339
  ->getBillSafeOrderStatus($order->getStoreId());
340
  if ('pending' == $state) {
341
  $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
@@ -344,7 +362,7 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
344
  $text = 'Successful BillSAFE payment.<br/>Transaction ID: ' .
345
  '%d.<br/>BillSAFE Transaction Status: ACCEPTED.';
346
  $notice = $this->getDataHelper()->__($text, $result['transactionId']);
347
- Mage::helper('billsafe/order')->getPaymentInstruction($order);
348
  $order->setState($state, true, $notice)->save();
349
  }
350
  } catch (Exception $e) {
@@ -362,7 +380,7 @@ class Netresearch_Billsafe_Model_Payment extends Mage_Payment_Model_Method_Abstr
362
  Mage::throwException(
363
  sprintf(
364
  '%s',
365
- Mage::helper('billsafe/data')->__($buyerMessage)
366
  )
367
  );
368
  }
24
  protected $_formBlockType = 'billsafe/payment_form';
25
  protected $_availableCheck = true;
26
  protected $_unavailableMessage = '';
27
+ protected $_orderHelper;
28
+ protected $_dataHelper;
29
 
30
  /**
31
  * Setter for config in for unit testing
59
  */
60
  public function setDataHelper(Netresearch_Billsafe_Helper_Data $dataHelper)
61
  {
62
+ $this->_dataHelper = $dataHelper;
63
  }
64
 
65
  /**
67
  */
68
  public function getDataHelper()
69
  {
70
+ if (null == $this->_dataHelper) {
71
+ $this->_dataHelper = Mage::helper('billsafe/data');
72
  }
73
+ return $this->_dataHelper;
74
+ }
75
+
76
+ /**
77
+ * @param Netresearch_Billsafe_Helper_Order $orderHelper
78
+ */
79
+ public function setOrderHelper(Netresearch_Billsafe_Helper_Order $orderHelper)
80
+ {
81
+ $this->_orderHelper = $orderHelper;
82
+ }
83
+
84
+ /**
85
+ * @return Netresearch_Billsafe_Helper_Order
86
+ */
87
+ public function getOrderHelper()
88
+ {
89
+ if(null == $this->_orderHelper){
90
+ $this->_orderHelper = Mage::helper('billsafe/order');
91
+ }
92
+ return $this->_orderHelper;
93
  }
94
 
95
 
104
  */
105
  public function isAvailable($quote = null)
106
  {
107
+ if ($this->getOrderHelper()->isBillsafeOnsiteCheckout($quote)
108
  && true === Mage::getSingleton('customer/session')->getData('authorize_failed')
109
  && $quote instanceof Mage_Sales_Model_Quote
110
+ && $this->getOrderHelper()->generateAddressHash($quote->getBillingAddress())
111
  == Mage::getSingleton('customer/session')->getData('billsafe_billingAddrHash')
112
  ) {
113
  return false;
131
  return false;
132
  }
133
  // Check Min and Fax of Fee
134
+ if ($this->getConfig()->isPaymentFeeEnabled($quote->getStoreId())) {
135
  $feeProduct = Mage::helper('paymentfee/data')->getUpdatedFeeProduct();
136
  $avoidOverMax = $this->getConfig()->isBillsafeExeedingMaxFeeAmount($quote->getStoreId());
137
  $avoidBelowMin = $this->getConfig()->isBillsafeExeedingMinFeeAmount($quote->getStoreId());
214
  try {
215
  if ($quote->getBillingAddress() instanceof Mage_Sales_Model_Quote_Address
216
  && 0 < strlen($quote->getBillingAddress()->getPostcode())) {
217
+ $prevalidateResult = $this->getOrderHelper()->prevalidateOrder($quote);
218
  if (strtolower(trim($prevalidateResult->ack)) != 'ok' ||
219
  (property_exists($prevalidateResult, 'invoice') &&
220
  (bool) $prevalidateResult->invoice->isAvailable == false)
287
  */
288
  public function getOrderPlaceRedirectUrl()
289
  {
290
+ if ($this->getOrderHelper()->isBillsafeOnsiteCheckout()) {
291
+ // direct API communication, no gateway redirect
292
+ return '';
 
 
 
 
 
 
 
293
  }
294
+
295
+ $storeId = $this->getDataHelper()->getStoreIdfromQuote();
296
+ return sprintf(
297
+ '%s?token=%s',
298
+ $this->getClient()->getConfig()->getGatewayUrl($storeId),
299
+ Mage::registry(Netresearch_Billsafe_Model_Config::TOKEN_REGISTRY_KEY)
300
+ );
301
  }
302
 
303
  /**
313
 
314
  parent::authorize($payment, $amount);
315
  $order = $this->getInfoInstance()->getOrder();
316
+ $quote = $order->getQuote();
317
  $section = $this->getCheckoutSection($order);
318
  $buyerMessage = "Please select another payment method!";
319
+ if ($this->getOrderHelper()->isBillsafeOnsiteCheckout($quote)) {
 
 
320
  $result = array();
321
 
 
322
  try {
323
+ $result = $this->getOrderHelper()->processOrder($quote, $order);
324
+ $this->getDataHelper()->log('result ' . Zend_Json::encode($result));
325
  if (!array_key_exists('success', $result) || $result['success'] === false) {
326
  if (array_key_exists('buyerMessage', $result)) {
327
  $buyerMessage = $result['buyerMessage'];
329
  'authorize_failed',
330
  true
331
  );
332
+ $addressHash = $this->getOrderHelper()
333
  ->generateAddressHash($quote->getBillingAddress());
334
  Mage::getSingleton('customer/session')->setData(
335
  'billsafe_billingAddrHash',
339
  Mage::getSingleton('checkout/type_onepage')->getCheckout()
340
  ->setGotoSection($section);
341
  Mage::throwException(
342
+ $this->getDataHelper()->__($buyerMessage)
343
  );
344
  }
345
  if (array_key_exists('transactionId', $result)) {
353
  )
354
  ->setTransactionId($result['transactionId'])
355
  ->setTxnId($result['transactionId']);
356
+ $state = $this->getConfig()
357
  ->getBillSafeOrderStatus($order->getStoreId());
358
  if ('pending' == $state) {
359
  $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
362
  $text = 'Successful BillSAFE payment.<br/>Transaction ID: ' .
363
  '%d.<br/>BillSAFE Transaction Status: ACCEPTED.';
364
  $notice = $this->getDataHelper()->__($text, $result['transactionId']);
365
+ $this->getOrderHelper()->getPaymentInstruction($order);
366
  $order->setState($state, true, $notice)->save();
367
  }
368
  } catch (Exception $e) {
380
  Mage::throwException(
381
  sprintf(
382
  '%s',
383
+ $this->getDataHelper()->__($buyerMessage)
384
  )
385
  );
386
  }
app/code/community/Netresearch/Billsafe/Test/Helper/CustomerTest.php CHANGED
@@ -62,7 +62,9 @@ class Netresearch_Billsafe_Test_Helper_CustomerTest
62
  null, null, null,
63
  null, null, 'MyCustomerGender',
64
  null, 'MyOrderGender', null,
65
- 'MyAddressGender', null, null
 
 
66
  ));
67
  $this->replaceByMock('helper', 'billsafe/customer', $helperMock);
68
 
@@ -90,12 +92,19 @@ class Netresearch_Billsafe_Test_Helper_CustomerTest
90
  );
91
  $this->assertEquals('m', $gender);
92
 
93
- // Gender not necessary with B2B orders
94
  $address->setCompany('Foo AG');
95
  $gender = Mage::helper('billsafe/customer')->getCustomerGender(
96
  $address, $order, $customer
97
  );
98
- $this->assertEquals('', $gender);
 
 
 
 
 
 
 
99
  }
100
 
101
  public function testGetGenderText()
62
  null, null, null,
63
  null, null, 'MyCustomerGender',
64
  null, 'MyOrderGender', null,
65
+ 'MyAddressGender', null, null,
66
+ null, null, null,
67
+ null, null, null
68
  ));
69
  $this->replaceByMock('helper', 'billsafe/customer', $helperMock);
70
 
92
  );
93
  $this->assertEquals('m', $gender);
94
 
95
+ // B2B orders also need the gender parameter
96
  $address->setCompany('Foo AG');
97
  $gender = Mage::helper('billsafe/customer')->getCustomerGender(
98
  $address, $order, $customer
99
  );
100
+ $this->assertEquals('f', $gender);
101
+
102
+ // Assume prefix was given in customer account
103
+ $customer->setPrefix('Herr');
104
+ $gender = Mage::helper('billsafe/customer')->getCustomerGender(
105
+ $address, $order, $customer
106
+ );
107
+ $this->assertEquals('m', $gender);
108
  }
109
 
110
  public function testGetGenderText()
app/code/community/Netresearch/Billsafe/Test/Helper/DataTest.php CHANGED
@@ -224,11 +224,14 @@ class Netresearch_Billsafe_Test_Helper_DataTest
224
  $configModelMock->expects($this->any())
225
  ->method('getPaymentFeeSku')
226
  ->will($this->returnValue('fee'));
227
-
 
 
 
228
  $this->replaceByMock('model', 'billsafe/config', $configModelMock);
229
-
230
- $this->assertFalse(Mage::helper('billsafe/data')->isFeeItem($itemTwo));
231
- $this->assertTrue(Mage::helper('billsafe/data')->isFeeItem($itemOne));
232
  }
233
 
234
 
@@ -251,4 +254,17 @@ class Netresearch_Billsafe_Test_Helper_DataTest
251
  $method->setAccessible(true);
252
  return $method;
253
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  }
224
  $configModelMock->expects($this->any())
225
  ->method('getPaymentFeeSku')
226
  ->will($this->returnValue('fee'));
227
+ $helperMock = $this->getHelperMock('billsafe/data', array('getStoreIdfromQuote'));
228
+ $helperMock->expects($this->any())
229
+ ->method('getStoreIdfromQuote')
230
+ ->will($this->returnValue(null));
231
  $this->replaceByMock('model', 'billsafe/config', $configModelMock);
232
+ $this->mockSessions();
233
+ $this->assertFalse($helperMock->isFeeItem($itemTwo));
234
+ $this->assertTrue($helperMock->isFeeItem($itemOne));
235
  }
236
 
237
 
254
  $method->setAccessible(true);
255
  return $method;
256
  }
257
+
258
+ protected function mockSessions()
259
+ {
260
+ $sessionMock = $this->getModelMockBuilder('checkout/session')
261
+ ->disableOriginalConstructor() // This one removes session_start and other methods usage
262
+ ->getMock();
263
+ $this->replaceByMock('singleton', 'checkout/session', $sessionMock);
264
+
265
+ $sessionMock = $this->getModelMockBuilder('customer/session')
266
+ ->disableOriginalConstructor() // This one removes session_start and other methods usage
267
+ ->getMock();
268
+ $this->replaceByMock('singleton', 'customer/session', $sessionMock);
269
+ }
270
  }
app/code/community/Netresearch/Billsafe/Test/Model/Adminhtml/System/Config/Source/GenderTest.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Netresearch_Billsafe_Test_Model_Adminhtml_System_Config_Source_GenderTest
3
+ extends EcomDev_PHPUnit_Test_Case
4
+ {
5
+ /**
6
+ * @test
7
+ */
8
+ public function toOptionArray()
9
+ {
10
+ /* @var $source Netresearch_Billsafe_Model_Adminhtml_System_Config_Source_Gender */
11
+ $source = Mage::getModel('billsafe/adminhtml_system_config_source_gender');
12
+ $optionArray = $source->toOptionArray();
13
+
14
+ $this->assertInternalType('array', $optionArray);
15
+ $this->assertArrayHasKey('Male', $optionArray);
16
+ $this->assertArrayHasKey('Female', $optionArray);
17
+ $this->assertContains('Male', $optionArray);
18
+ $this->assertContains('Female', $optionArray);
19
+ }
20
+ }
app/code/community/Netresearch/Billsafe/Test/Model/PaymentTest.php CHANGED
@@ -36,7 +36,7 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
36
  $helperMock->expects($this->any())
37
  ->method('prevalidateOrder')
38
  ->will($this->returnValue($fakeResponse));
39
- $this->replaceByMock('helper', 'billsafe/order', $helperMock);
40
  $this->assertFalse($model->prevalidateOrder($quote));
41
 
42
  $fakeResponse = new stdClass();
@@ -50,7 +50,7 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
50
  $helperMock->expects($this->any())
51
  ->method('prevalidateOrder')
52
  ->will($this->returnValue($fakeResponse));
53
- $this->replaceByMock('helper', 'billsafe/order', $helperMock);
54
  $this->assertFalse($model->prevalidateOrder($quote));
55
  $this->assertFalse($model->isAvailableCheck());
56
  $this->assertEquals('foo', $model->getUnavailableMessage());
@@ -88,6 +88,8 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
88
  public function testAuthorizeSuccessFalse()
89
  {
90
  $order = Mage::getModel('sales/order')->load(11);
 
 
91
  $payment = $order->getPayment();
92
  $amount = $order->getBaseGrandTotal();
93
  $infoInstance = new Varien_Object();
@@ -118,10 +120,14 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
118
 
119
 
120
  // data helper
121
- $dataHelperMock = $this->getHelperMock('billsafe/data', array('getStoreIdfromQuote'));
 
122
  $dataHelperMock->expects($this->any())
123
  ->method('getStoreIdfromQuote')
124
  ->will($this->returnValue(null));
 
 
 
125
  $this->replaceByMock('helper', 'billsafe/data', $dataHelperMock);
126
 
127
  $paymentModelMock = $this->getModelMock('billsafe/payment', array('getInfoInstance', 'cancel'));
@@ -146,6 +152,8 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
146
  public function testAuthorizeSuccessTrue()
147
  {
148
  $order = Mage::getModel('sales/order')->load(11);
 
 
149
  $payment = $order->getPayment();
150
  $amount = $order->getBaseGrandTotal();
151
  $infoInstance = new Varien_Object();
@@ -191,11 +199,14 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
191
  $this->replaceByMock('helper', 'billsafe/order', $orderHelperMock);
192
 
193
  // data helper
194
- $dataHelperMock = $this->getHelperMock('billsafe/data', array('getStoreIdfromQuote'));
 
195
  $dataHelperMock->expects($this->any())
196
  ->method('getStoreIdfromQuote')
197
  ->will($this->returnValue(null));
198
- $this->replaceByMock('helper', 'billsafe/data', $dataHelperMock);
 
 
199
 
200
  $paymentModelMock = $this->getModelMock('billsafe/payment', array('getInfoInstance', 'cancel'));
201
  $paymentModelMock->expects($this->any())
@@ -204,7 +215,7 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
204
  $paymentModelMock->expects($this->any())
205
  ->method('cancel')
206
  ->will($this->returnValue(null));
207
- $this->replaceByMock('model', 'billsafe/payment', $paymentModelMock);
208
 
209
  $paymentModelMock->authorize($payment, $amount);
210
  $this->assertEquals('123', $payment->getTransactionId());
@@ -222,7 +233,8 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
222
  $configMock->expects($this->any())
223
  ->method('getBillSafeOrderStatus')
224
  ->will($this->returnValue(Mage_Sales_Model_Order::STATE_PROCESSING));
225
- $this->replaceByMock('model', 'billsafe/config', $configMock);
 
226
  $paymentModelMock->authorize($payment, $amount);
227
  $this->assertEquals(Mage_Sales_Model_Order::STATE_PROCESSING, $order->getState());
228
  }
@@ -236,6 +248,8 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
236
  $this->mockDataHelperForQuote();
237
 
238
  $order = Mage::getModel('sales/order')->load(11);
 
 
239
  $payment = $order->getPayment();
240
  $amount = $order->getBaseGrandTotal();
241
  $infoInstance = new Varien_Object();
@@ -285,7 +299,9 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
285
  $this->mockDataHelperForQuote();
286
 
287
  $order = Mage::getModel('sales/order')->load(11);
288
- ;
 
 
289
  $infoInstance = new Varien_Object();
290
  $infoInstance->setOrder($order);
291
 
@@ -298,7 +314,7 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
298
  ->will($this->returnValue(false));
299
 
300
  $clientMock = $this->getModelMock('billsafe/client', array('prepareOrder'));
301
- $clientMock->expects($this->once())
302
  ->method('prepareOrder')
303
  ->will($this->throwException(new Exception('catch me')));
304
  $this->replaceByMock('model', 'billsafe/client', $clientMock);
@@ -391,7 +407,8 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
391
  {
392
  $path = Netresearch_Billsafe_Model_Config::CONFIG_PATH_ACTIVE;
393
  $storeFirst = Mage::app()->getStore(0)->load(0);
394
-
 
395
  $storeFirst->setConfig($path, 0);
396
  $quote = Mage::getModel('sales/quote')->load(1);
397
  $this->assertFalse(Mage::getModel('billsafe/payment')->isAvailable($quote));
@@ -466,12 +483,13 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
466
  ->will($this->returnValue($customer));
467
  $this->replaceByMock('singleton', 'customer/session', $sessionMock);
468
 
469
- $configModelMock = $this->getModelMock('billsafe/config', array('getBillSafeMinAmount'));
 
 
 
470
  $configModelMock->expects($this->any())
471
  ->method('getBillSafeMinAmount')
472
  ->will($this->returnValue(15));
473
-
474
- $configModelMock = $this->getModelMock('billsafe/config', array('getBillSafeMaxAmount'));
475
  $configModelMock->expects($this->any())
476
  ->method('getBillSafeMaxAmount')
477
  ->will($this->returnValue(10));
@@ -508,9 +526,8 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
508
  $configModelMock = $this->getModelMock('billsafe/config', array(
509
  'getBillSafeMinAmount',
510
  'getBillSafeMaxAmount',
511
- 'isBillsafeExeedingMaxFeeAmount'
512
- )
513
- );
514
  $configModelMock->expects($this->any())
515
  ->method('getBillSafeMinAmount')
516
  ->will($this->returnValue(15));
@@ -567,9 +584,8 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
567
  'getBillSafeMinAmount',
568
  'getBillSafeMaxAmount',
569
  'isBillsafeExeedingMaxFeeAmount',
570
- 'isBillsafeExeedingMinFeeAmount'
571
- )
572
- );
573
  $configModelMock->expects($this->any())
574
  ->method('getBillSafeMinAmount')
575
  ->will($this->returnValue(15));
@@ -630,8 +646,7 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
630
  $configModelMock = $this->getModelMock('billsafe/config', array(
631
  'getBillSafeMinAmount',
632
  'getBillSafeMaxAmount',
633
- )
634
- );
635
  $configModelMock->expects($this->any())
636
  ->method('getBillSafeMinAmount')
637
  ->will($this->returnValue(15));
@@ -690,8 +705,7 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
690
  $configModelMock = $this->getModelMock('billsafe/config', array(
691
  'getBillSafeMinAmount',
692
  'getBillSafeMaxAmount',
693
- )
694
- );
695
  $configModelMock->expects($this->any())
696
  ->method('getBillSafeMinAmount')
697
  ->will($this->returnValue(15));
@@ -699,7 +713,6 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
699
  $configModelMock->expects($this->any())
700
  ->method('getBillSafeMaxAmount')
701
  ->will($this->returnValue(999));
702
-
703
  $this->replaceByMock('model', 'billsafe/config', $configModelMock);
704
 
705
  $paymentModelMock = $this->getModelMock('billsafe/payment', array(
@@ -734,7 +747,7 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
734
  */
735
  public function testIsAvailableReturnsFalseIfPrevalidateOrdercheckFails()
736
  {
737
-
738
  $tax = new Varien_Object();
739
  $tax->setValue(10);
740
  $quote = $this->getModelMock('sales/quote', array('getTotals'));
@@ -825,8 +838,7 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
825
  $configModelMock = $this->getModelMock('billsafe/config', array(
826
  'getBillSafeMinAmount',
827
  'getBillSafeMaxAmount',
828
- )
829
- );
830
  $configModelMock->expects($this->any())
831
  ->method('getBillSafeMinAmount')
832
  ->will($this->returnValue(15));
@@ -973,10 +985,15 @@ class Netresearch_Billsafe_Test_Model_PaymentTest extends EcomDev_PHPUnit_Test_C
973
 
974
  protected function mockDataHelperForQuote()
975
  {
976
- $dataHelperMock = $this->getHelperMock('billsafe/data', array('getStoreIdfromQuote'));
 
977
  $dataHelperMock->expects($this->any())
978
- ->method('getStoreIdfromQuote')
979
- ->will($this->returnValue(null));
 
 
 
 
980
  $this->replaceByMock('helper', 'billsafe/data', $dataHelperMock);
981
  }
982
  }
36
  $helperMock->expects($this->any())
37
  ->method('prevalidateOrder')
38
  ->will($this->returnValue($fakeResponse));
39
+ $model->setOrderHelper($helperMock);
40
  $this->assertFalse($model->prevalidateOrder($quote));
41
 
42
  $fakeResponse = new stdClass();
50
  $helperMock->expects($this->any())
51
  ->method('prevalidateOrder')
52
  ->will($this->returnValue($fakeResponse));
53
+ $model->setOrderHelper($helperMock);
54
  $this->assertFalse($model->prevalidateOrder($quote));
55
  $this->assertFalse($model->isAvailableCheck());
56
  $this->assertEquals('foo', $model->getUnavailableMessage());
88
  public function testAuthorizeSuccessFalse()
89
  {
90
  $order = Mage::getModel('sales/order')->load(11);
91
+ $quote = Mage::getModel('sales/quote')->load(1);
92
+ $order->setQuote($quote);
93
  $payment = $order->getPayment();
94
  $amount = $order->getBaseGrandTotal();
95
  $infoInstance = new Varien_Object();
120
 
121
 
122
  // data helper
123
+ $dataHelperMock = $this->getHelperMock('billsafe/data',
124
+ array('getStoreIdfromQuote', 'getCustomerCompany'));
125
  $dataHelperMock->expects($this->any())
126
  ->method('getStoreIdfromQuote')
127
  ->will($this->returnValue(null));
128
+ $dataHelperMock->expects($this->any())
129
+ ->method('getCustomerCompany')
130
+ ->will($this->returnValue(null));
131
  $this->replaceByMock('helper', 'billsafe/data', $dataHelperMock);
132
 
133
  $paymentModelMock = $this->getModelMock('billsafe/payment', array('getInfoInstance', 'cancel'));
152
  public function testAuthorizeSuccessTrue()
153
  {
154
  $order = Mage::getModel('sales/order')->load(11);
155
+ $quote = Mage::getModel('sales/quote')->load(1);
156
+ $order->setQuote($quote);
157
  $payment = $order->getPayment();
158
  $amount = $order->getBaseGrandTotal();
159
  $infoInstance = new Varien_Object();
199
  $this->replaceByMock('helper', 'billsafe/order', $orderHelperMock);
200
 
201
  // data helper
202
+ $dataHelperMock = $this->getHelperMock('billsafe/data',
203
+ array('getStoreIdfromQuote', 'getCustomerCompany'));
204
  $dataHelperMock->expects($this->any())
205
  ->method('getStoreIdfromQuote')
206
  ->will($this->returnValue(null));
207
+ $dataHelperMock->expects($this->any())
208
+ ->method('getCustomerCompany')
209
+ ->will($this->returnValue(null));
210
 
211
  $paymentModelMock = $this->getModelMock('billsafe/payment', array('getInfoInstance', 'cancel'));
212
  $paymentModelMock->expects($this->any())
215
  $paymentModelMock->expects($this->any())
216
  ->method('cancel')
217
  ->will($this->returnValue(null));
218
+ $paymentModelMock->setDataHelper($dataHelperMock);
219
 
220
  $paymentModelMock->authorize($payment, $amount);
221
  $this->assertEquals('123', $payment->getTransactionId());
233
  $configMock->expects($this->any())
234
  ->method('getBillSafeOrderStatus')
235
  ->will($this->returnValue(Mage_Sales_Model_Order::STATE_PROCESSING));
236
+
237
+ $paymentModelMock->setConfig($configMock);
238
  $paymentModelMock->authorize($payment, $amount);
239
  $this->assertEquals(Mage_Sales_Model_Order::STATE_PROCESSING, $order->getState());
240
  }
248
  $this->mockDataHelperForQuote();
249
 
250
  $order = Mage::getModel('sales/order')->load(11);
251
+ $quote = Mage::getModel('sales/quote')->load(1);
252
+ $order->setQuote($quote);
253
  $payment = $order->getPayment();
254
  $amount = $order->getBaseGrandTotal();
255
  $infoInstance = new Varien_Object();
299
  $this->mockDataHelperForQuote();
300
 
301
  $order = Mage::getModel('sales/order')->load(11);
302
+ $quote = Mage::getModel('sales/quote')->load(1);
303
+ $order->setQuote($quote);
304
+
305
  $infoInstance = new Varien_Object();
306
  $infoInstance->setOrder($order);
307
 
314
  ->will($this->returnValue(false));
315
 
316
  $clientMock = $this->getModelMock('billsafe/client', array('prepareOrder'));
317
+ $clientMock->expects($this->any())
318
  ->method('prepareOrder')
319
  ->will($this->throwException(new Exception('catch me')));
320
  $this->replaceByMock('model', 'billsafe/client', $clientMock);
407
  {
408
  $path = Netresearch_Billsafe_Model_Config::CONFIG_PATH_ACTIVE;
409
  $storeFirst = Mage::app()->getStore(0)->load(0);
410
+ $this->mockSessions();
411
+ $this->mockDataHelperForQuote();
412
  $storeFirst->setConfig($path, 0);
413
  $quote = Mage::getModel('sales/quote')->load(1);
414
  $this->assertFalse(Mage::getModel('billsafe/payment')->isAvailable($quote));
483
  ->will($this->returnValue($customer));
484
  $this->replaceByMock('singleton', 'customer/session', $sessionMock);
485
 
486
+ $configModelMock = $this->getModelMock('billsafe/config', array(
487
+ 'getBillSafeMinAmount',
488
+ 'getBillSafeMaxAmount',
489
+ ));
490
  $configModelMock->expects($this->any())
491
  ->method('getBillSafeMinAmount')
492
  ->will($this->returnValue(15));
 
 
493
  $configModelMock->expects($this->any())
494
  ->method('getBillSafeMaxAmount')
495
  ->will($this->returnValue(10));
526
  $configModelMock = $this->getModelMock('billsafe/config', array(
527
  'getBillSafeMinAmount',
528
  'getBillSafeMaxAmount',
529
+ 'isBillsafeExeedingMaxFeeAmount',
530
+ ));
 
531
  $configModelMock->expects($this->any())
532
  ->method('getBillSafeMinAmount')
533
  ->will($this->returnValue(15));
584
  'getBillSafeMinAmount',
585
  'getBillSafeMaxAmount',
586
  'isBillsafeExeedingMaxFeeAmount',
587
+ 'isBillsafeExeedingMinFeeAmount',
588
+ ));
 
589
  $configModelMock->expects($this->any())
590
  ->method('getBillSafeMinAmount')
591
  ->will($this->returnValue(15));
646
  $configModelMock = $this->getModelMock('billsafe/config', array(
647
  'getBillSafeMinAmount',
648
  'getBillSafeMaxAmount',
649
+ ));
 
650
  $configModelMock->expects($this->any())
651
  ->method('getBillSafeMinAmount')
652
  ->will($this->returnValue(15));
705
  $configModelMock = $this->getModelMock('billsafe/config', array(
706
  'getBillSafeMinAmount',
707
  'getBillSafeMaxAmount',
708
+ ));
 
709
  $configModelMock->expects($this->any())
710
  ->method('getBillSafeMinAmount')
711
  ->will($this->returnValue(15));
713
  $configModelMock->expects($this->any())
714
  ->method('getBillSafeMaxAmount')
715
  ->will($this->returnValue(999));
 
716
  $this->replaceByMock('model', 'billsafe/config', $configModelMock);
717
 
718
  $paymentModelMock = $this->getModelMock('billsafe/payment', array(
747
  */
748
  public function testIsAvailableReturnsFalseIfPrevalidateOrdercheckFails()
749
  {
750
+ $this->mockSessions();
751
  $tax = new Varien_Object();
752
  $tax->setValue(10);
753
  $quote = $this->getModelMock('sales/quote', array('getTotals'));
838
  $configModelMock = $this->getModelMock('billsafe/config', array(
839
  'getBillSafeMinAmount',
840
  'getBillSafeMaxAmount',
841
+ ));
 
842
  $configModelMock->expects($this->any())
843
  ->method('getBillSafeMinAmount')
844
  ->will($this->returnValue(15));
985
 
986
  protected function mockDataHelperForQuote()
987
  {
988
+ $dataHelperMock = $this->getHelperMock('billsafe/data',
989
+ array('getStoreIdfromQuote', 'getCustomerCompany'));
990
  $dataHelperMock->expects($this->any())
991
+ ->method('getStoreIdfromQuote')
992
+ ->will($this->returnValue(null));
993
+ $dataHelperMock->expects($this->any())
994
+ ->method('getCustomerCompany')
995
+ ->will($this->returnValue(null));
996
+
997
  $this->replaceByMock('helper', 'billsafe/data', $dataHelperMock);
998
  }
999
  }
app/code/community/Netresearch/Billsafe/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Netresearch_Billsafe>
5
- <version>14.03.27</version>
6
  </Netresearch_Billsafe>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Netresearch_Billsafe>
5
+ <version>14.03.31</version>
6
  </Netresearch_Billsafe>
7
  </modules>
8
 
doc/Netresearch_Billsafe/.gitkeep DELETED
File without changes
doc/Netresearch_Billsafe/ChangeLog.pdf CHANGED
@@ -71,7 +71,7 @@ endobj
71
  % 'R7': class PDFInfo
72
  7 0 obj
73
  << /Author ()
74
- /CreationDate (D:20140327143413-01'00')
75
  /Keywords ()
76
  /Producer (ReportLab http://www.reportlab.com)
77
  /Subject (\(unspecified\))
@@ -87,7 +87,7 @@ endobj
87
  % 'R9': class PDFStream
88
  9 0 obj
89
  % page stream
90
- << /Length 9701 >>
91
  stream
92
  1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
93
  q
@@ -108,25 +108,27 @@ q
108
  1 0 0 1 62.69291 638.3307 cm
109
  Q
110
  q
111
- 1 0 0 1 62.69291 212.3307 cm
112
  1 1 1 rg
113
- n 0 426 469.8898 -18 re f*
114
  .878431 .878431 .878431 rg
115
- n 0 408 469.8898 -144 re f*
116
  1 1 1 rg
117
- n 0 264 469.8898 -120 re f*
118
  .878431 .878431 .878431 rg
119
- n 0 144 469.8898 -54 re f*
120
  1 1 1 rg
121
- n 0 90 469.8898 -54 re f*
122
  .878431 .878431 .878431 rg
 
 
123
  n 0 36 469.8898 -36 re f*
124
  .960784 .960784 .862745 rg
125
- n 0 426 469.8898 -18 re f*
126
  0 .533333 .603922 rg
127
  BT /F1 10 Tf 12 TL ET
128
  q
129
- 1 0 0 1 6 411 cm
130
  q
131
  .960784 .960784 .862745 rg
132
  n 0 0 46.73622 12 re f*
@@ -137,7 +139,7 @@ BT 1 0 0 1 0 4.82 Tm /F2 10 Tf 12 TL 2.52811 0 Td (Revision) Tj T* -2.52811 0 Td
137
  Q
138
  Q
139
  q
140
- 1 0 0 1 64.73622 411 cm
141
  q
142
  .960784 .960784 .862745 rg
143
  n 0 0 46.73622 12 re f*
@@ -148,7 +150,7 @@ BT 1 0 0 1 0 4.82 Tm /F2 10 Tf 12 TL 12.53311 0 Td (Date) Tj T* -12.53311 0 Td E
148
  Q
149
  Q
150
  q
151
- 1 0 0 1 123.4724 411 cm
152
  q
153
  .960784 .960784 .862745 rg
154
  n 0 0 340.4173 12 re f*
@@ -160,6 +162,57 @@ Q
160
  Q
161
  0 0 0 rg
162
  q
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  1 0 0 1 6 393 cm
164
  q
165
  0 0 0 rg
@@ -286,7 +339,7 @@ q
286
  1 0 0 1 23 -3 cm
287
  q
288
  0 0 0 rg
289
- BT 1 0 0 1 0 4.82 Tm /F1 10 Tf 12 TL (Display API error messages in customer session) Tj T* ET
290
  Q
291
  Q
292
  q
@@ -685,24 +738,25 @@ q
685
  1 j
686
  0 0 0 RG
687
  .25 w
 
688
  n 0 408 m 469.8898 408 l S
689
  n 0 264 m 469.8898 264 l S
690
  n 0 144 m 469.8898 144 l S
691
  n 0 90 m 469.8898 90 l S
692
  n 0 36 m 469.8898 36 l S
693
- n 58.73622 0 m 58.73622 426 l S
694
- n 117.4724 0 m 117.4724 426 l S
695
- n 0 426 m 469.8898 426 l S
696
  n 0 0 m 469.8898 0 l S
697
- n 0 0 m 0 426 l S
698
- n 469.8898 0 m 469.8898 426 l S
699
  Q
700
  Q
701
  q
702
- 1 0 0 1 62.69291 212.3307 cm
703
  Q
704
  q
705
- 1 0 0 1 62.69291 212.3307 cm
706
  Q
707
  q
708
  1 0 0 1 426.3422 728.5039 cm
@@ -764,17 +818,17 @@ xref
764
  0000018047 00000 n
765
  0000018280 00000 n
766
  0000018385 00000 n
767
- 0000028188 00000 n
768
- 0000028271 00000 n
769
- 0000028364 00000 n
770
  trailer
771
  << /ID
772
  % ReportLab generated PDF document -- digest (http://www.reportlab.com)
773
- [(\254rg\303\376\005\273\343\242\013\256\235]\010]P) (\254rg\303\376\005\273\343\242\013\256\235]\010]P)]
774
 
775
  /Info 7 0 R
776
  /Root 6 0 R
777
  /Size 13 >>
778
  startxref
779
- 28411
780
  %%EOF
71
  % 'R7': class PDFInfo
72
  7 0 obj
73
  << /Author ()
74
+ /CreationDate (D:20140331104417-01'00')
75
  /Keywords ()
76
  /Producer (ReportLab http://www.reportlab.com)
77
  /Subject (\(unspecified\))
87
  % 'R9': class PDFStream
88
  9 0 obj
89
  % page stream
90
+ << /Length 10482 >>
91
  stream
92
  1 0 0 1 0 0 cm BT /F1 12 Tf 14.4 TL ET
93
  q
108
  1 0 0 1 62.69291 638.3307 cm
109
  Q
110
  q
111
+ 1 0 0 1 62.69291 176.3307 cm
112
  1 1 1 rg
113
+ n 0 462 469.8898 -18 re f*
114
  .878431 .878431 .878431 rg
115
+ n 0 444 469.8898 -36 re f*
116
  1 1 1 rg
117
+ n 0 408 469.8898 -144 re f*
118
  .878431 .878431 .878431 rg
119
+ n 0 264 469.8898 -120 re f*
120
  1 1 1 rg
121
+ n 0 144 469.8898 -54 re f*
122
  .878431 .878431 .878431 rg
123
+ n 0 90 469.8898 -54 re f*
124
+ 1 1 1 rg
125
  n 0 36 469.8898 -36 re f*
126
  .960784 .960784 .862745 rg
127
+ n 0 462 469.8898 -18 re f*
128
  0 .533333 .603922 rg
129
  BT /F1 10 Tf 12 TL ET
130
  q
131
+ 1 0 0 1 6 447 cm
132
  q
133
  .960784 .960784 .862745 rg
134
  n 0 0 46.73622 12 re f*
139
  Q
140
  Q
141
  q
142
+ 1 0 0 1 64.73622 447 cm
143
  q
144
  .960784 .960784 .862745 rg
145
  n 0 0 46.73622 12 re f*
150
  Q
151
  Q
152
  q
153
+ 1 0 0 1 123.4724 447 cm
154
  q
155
  .960784 .960784 .862745 rg
156
  n 0 0 340.4173 12 re f*
162
  Q
163
  0 0 0 rg
164
  q
165
+ 1 0 0 1 6 429 cm
166
+ q
167
+ 0 0 0 rg
168
+ BT 1 0 0 1 0 4.82 Tm /F1 10 Tf 12 TL (14.03.31) Tj T* ET
169
+ Q
170
+ Q
171
+ q
172
+ 1 0 0 1 64.73622 429 cm
173
+ q
174
+ 0 0 0 rg
175
+ BT 1 0 0 1 0 4.82 Tm /F1 10 Tf 12 TL (2014-03-31) Tj T* ET
176
+ Q
177
+ Q
178
+ q
179
+ 1 0 0 1 123.4724 429 cm
180
+ q
181
+ 0 0 0 rg
182
+ BT 1 0 0 1 0 4.82 Tm /F1 10 Tf 12 TL (Features:) Tj T* ET
183
+ Q
184
+ Q
185
+ q
186
+ 1 0 0 1 123.4724 423 cm
187
+ Q
188
+ q
189
+ 1 0 0 1 123.4724 423 cm
190
+ Q
191
+ q
192
+ 1 0 0 1 123.4724 411 cm
193
+ 0 0 0 rg
194
+ BT /F1 10 Tf 12 TL ET
195
+ q
196
+ 1 0 0 1 6 -3 cm
197
+ q
198
+ 0 0 0 rg
199
+ BT 1 0 0 1 0 4.82 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
200
+ Q
201
+ Q
202
+ q
203
+ 1 0 0 1 23 -3 cm
204
+ q
205
+ 0 0 0 rg
206
+ BT 1 0 0 1 0 4.82 Tm /F1 10 Tf 12 TL (Apply redirect gateway for B2B orders) Tj T* ET
207
+ Q
208
+ Q
209
+ q
210
+ Q
211
+ Q
212
+ q
213
+ 1 0 0 1 123.4724 411 cm
214
+ Q
215
+ q
216
  1 0 0 1 6 393 cm
217
  q
218
  0 0 0 rg
339
  1 0 0 1 23 -3 cm
340
  q
341
  0 0 0 rg
342
+ BT 1 0 0 1 0 4.82 Tm /F1 10 Tf 12 TL (Display API error messages in checkout session) Tj T* ET
343
  Q
344
  Q
345
  q
738
  1 j
739
  0 0 0 RG
740
  .25 w
741
+ n 0 444 m 469.8898 444 l S
742
  n 0 408 m 469.8898 408 l S
743
  n 0 264 m 469.8898 264 l S
744
  n 0 144 m 469.8898 144 l S
745
  n 0 90 m 469.8898 90 l S
746
  n 0 36 m 469.8898 36 l S
747
+ n 58.73622 0 m 58.73622 462 l S
748
+ n 117.4724 0 m 117.4724 462 l S
749
+ n 0 462 m 469.8898 462 l S
750
  n 0 0 m 469.8898 0 l S
751
+ n 0 0 m 0 462 l S
752
+ n 469.8898 0 m 469.8898 462 l S
753
  Q
754
  Q
755
  q
756
+ 1 0 0 1 62.69291 176.3307 cm
757
  Q
758
  q
759
+ 1 0 0 1 62.69291 176.3307 cm
760
  Q
761
  q
762
  1 0 0 1 426.3422 728.5039 cm
818
  0000018047 00000 n
819
  0000018280 00000 n
820
  0000018385 00000 n
821
+ 0000028970 00000 n
822
+ 0000029053 00000 n
823
+ 0000029146 00000 n
824
  trailer
825
  << /ID
826
  % ReportLab generated PDF document -- digest (http://www.reportlab.com)
827
+ [(\353f\224\011\004\215\005S*C7E\244\211M\260) (\353f\224\011\004\215\005S*C7E\244\211M\260)]
828
 
829
  /Info 7 0 R
830
  /Root 6 0 R
831
  /Size 13 >>
832
  startxref
833
+ 29193
834
  %%EOF
doc/Netresearch_Billsafe/README.pdf CHANGED
@@ -1339,7 +1339,7 @@ endobj
1339
  % 'R77': class PDFInfo
1340
  77 0 obj
1341
  << /Author ()
1342
- /CreationDate (D:20140327143410-01'00')
1343
  /Keywords ()
1344
  /Producer (ReportLab http://www.reportlab.com)
1345
  /Subject (\(unspecified\))
@@ -3664,7 +3664,7 @@ xref
3664
  trailer
3665
  << /ID
3666
  % ReportLab generated PDF document -- digest (http://www.reportlab.com)
3667
- [(\003!\011u\311k\030\212\272\314\212C|\014\2265) (\003!\011u\311k\030\212\272\314\212C|\014\2265)]
3668
 
3669
  /Info 77 0 R
3670
  /Root 76 0 R
1339
  % 'R77': class PDFInfo
1340
  77 0 obj
1341
  << /Author ()
1342
+ /CreationDate (D:20140331104414-01'00')
1343
  /Keywords ()
1344
  /Producer (ReportLab http://www.reportlab.com)
1345
  /Subject (\(unspecified\))
3664
  trailer
3665
  << /ID
3666
  % ReportLab generated PDF document -- digest (http://www.reportlab.com)
3667
+ [(\334\346\222VwF\220\230L\012\037\215D\374\342a) (\334\346\222VwF\220\230L\012\037\215D\374\342a)]
3668
 
3669
  /Info 77 0 R
3670
  /Root 76 0 R
package.xml CHANGED
@@ -1,2 +1,2 @@
1
  <?xml version="1.0"?>
2
- <package><name>BillSAFE_3</name><version>14.03.27</version><stability>stable</stability><license>OSL3</license><channel>community</channel><extends></extends><summary>Billsafe Extension</summary><description>Billsafe Extension</description><notes>Stable Release</notes><authors><author><name>Kristian B&#xFC;sch</name><user>kbuesch</user><email>kbuesch@paypal.com</email></author></authors><date>2014-03-27</date><time>6:34:13</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="doc"><dir name="Netresearch_Billsafe"><file name="ChangeLog.pdf" hash="b502a63b3a29004ea6bbb9909994729b"/><file name="README.pdf" hash="f3ddee3c586bf3ad4e11148e2468511d"/></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="billsafe.css" hash="30652ade50b6207cfd38fa0d86230ba0"/></dir></dir></dir></dir></dir><dir name="app"><dir name="locale"><dir name="de_DE"><file name="Netresearch_Billsafe.csv" hash="1784e93b821ea46bd32bc92c2f449bae"/><file name="Netresearch_PaymentFee.csv" hash="ee08fa2cb6ed0a660db7df18696f5e17"/></dir><dir name="en_US"><file name="Netresearch_PaymentFee.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="billsafe"><file name="info.phtml" hash="229d7e88ed38ba2a413c9323e12c1aa0"/><dir name="customer"><dir name="widget"><file name="dob.phtml" hash="c394734c5a350a2e47c143f2398935cb"/></dir></dir><dir name="payment"><file name="form.phtml" hash="ca6ec537cfc8c0434341757c9ec286d5"/></dir></dir></dir><dir name="layout"><file name="billsafe.xml" hash="7ba46fd84f8faa378ab61e32dfa9ceac"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="billsafe"><file name="info.phtml" hash="8183491543dcffc7f66af9fb06740e80"/><dir name="pdf"><file name="info.phtml" hash="125e58bd1eb021106ad45c0e9b960f01"/><file name="mrg.phtml" hash="68c1f430c50cdb9d413369a7defa6a03"/></dir><dir name="system"><dir name="config"><file name="paymentfeecheck.phtml" hash="cd5cfb1357c3885965dcfaf9b3da4eaa"/></dir></dir></dir></dir><dir name="layout"><file name="billsafe.xml" hash="53acc9efc6bd47aefacee3162e7b9995"/></dir></dir></dir></dir></dir><dir name="code"><dir name="community"><dir name="Netresearch"><dir name="PaymentFee"><dir name="Test"><dir name="Model"><file name="ObserverTest.php" hash="32ba1f9b3fb8e8a9372da43f8fc9368e"/></dir><dir name="Config"><file name="ConfigTest.php" hash="cf41bf5d7cb77e4d9a4de4dbb5186512"/></dir></dir><dir name="Helper"><file name="Data.php" hash="41ca5369190288ea1eb14e2a591b6d97"/></dir><dir name="Model"><file name="Observer.php" hash="2e4d2b0faaf6af72e209c7fb40b81b51"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Payment"><file name="Methods.php" hash="5e49ffdd605a2b9dcc21c351c3afb075"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FeeController.php" hash="5763a58bfd3f11b3ae41d5949724f0e8"/></dir></dir><dir name="etc"><file name="config.xml" hash="6beccc3c342a85000f0f454fc43b8503"/><file name="system.xml" hash="32ac7aabae936ec08aefb6b112f88b26"/></dir></dir><dir name="Billsafe"><dir name="sql"><dir name="billsafe_setup"><file name="mysql4-install-0.1.0.php" hash="9906e49a293cc8511f2ce53be301b3d3"/><file name="mysql4-upgrade-11.09.14-11.11.07.php" hash="f74406fe3e100c69a020bca556ad1ce3"/></dir></dir><dir name="Test"><dir name="Controller"><file name="PaymentControllerTest.php" hash="1825fe25aa4b82523aadd10a53074747"/></dir><dir name="Helper"><file name="CustomerTest.php" hash="d06fbac6ee3a1c19133367ebee38818a"/><file name="DataTest.php" hash="8e5d93c8a4dd94b65cac266944aee474"/><file name="OrderTest.php" hash="4a4c95b8dd473647275be83b90959e75"/><dir name="OrderTest"><dir name="fixtures"><file name="orders.yaml" hash="14e05b7bda0018f195e61f8bb596f160"/></dir></dir></dir><dir name="Model"><file name="ClientTest.php" hash="8d9eb45c6bf9e6da59e698e82ba96d69"/><file name="ConfigTest.php" hash="e5e74426f5a04ed24b2acc81a10a93f7"/><file name="ObserverTest.php" hash="2d2dcdd46f2b4f5c4d9bef41271a23e1"/><file name="PaymentTest.php" hash="e53abb917874dc1f719bd6e4c1a2422a"/></dir><dir name="Block"><file name="InfoTest.php" hash="7d1973a3d3e71f2d543484c8e873f3d8"/><dir name="Payment"><file name="FormTest.php" hash="53a4a81423abd719cd1c41203a582f8f"/></dir><dir name="Customer"><dir name="Widget"><file name="DobTest.php" hash="279ab2bebbef665ebb1a44c8ef93327a"/></dir></dir></dir><dir name="var"><dir name="fixtures"><file name="orders.yaml" hash="fa584305dffb6954f37ea98d398175cc"/></dir></dir></dir><dir name="Helper"><file name="Customer.php" hash="82a236b4d0c8c7335cb49e8b26794eea"/><file name="Data.php" hash="b215a1f328ba65dc801a7b3cb9effe9c"/><file name="Order.php" hash="65a34cd5871a732344410233df189807"/></dir><dir name="Model"><file name="Client.php" hash="ba10a42551a612663fbdf97426e276c5"/><file name="Config.php" hash="6bd396ea4d4d339d2419e8fdfa1bec33"/><file name="Observer.php" hash="8ef95cb35694c3552bb38e3c44538c53"/><file name="Payment.php" hash="96225dca07957f3aedc060fa8e505794"/><dir name="Pdf"><dir name="Engine"><dir name="Invoice"><file name="Default.php" hash="463521a517d8cc7ef027d7373c2375cd"/></dir></dir><dir name="Items"><dir name="Invoice"><file name="Info.php" hash="b8d7c058b38ebfd786b570dcd626347c"/></dir></dir></dir><dir name="Client"><file name="Base.php" hash="16fbeffcc20585f6e43fda3b0c083d57"/></dir><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Gender.php" hash="df8f8d18e152cce92297c797262b3671"/></dir></dir></dir></dir><dir name="Config"><file name="Abstract.php" hash="ba80caef00c09f165720fa9f9036024a"/><file name="Maxamount.php" hash="698d7e25b131a3b9dbdee12c4b88e620"/><file name="Maxfee.php" hash="0bdefd9ca9a666719760279b55c86c2d"/></dir></dir><dir name="controllers"><file name="PaymentController.php" hash="299ecad019a40491d7835a7247b72108"/></dir><dir name="Block"><file name="Info.php" hash="fcdafba1b69989b09535c9ae414ba180"/><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Totalbar.php" hash="db5c1edc70c1fe25e3852785c4c3f0b8"/></dir></dir><dir name="System"><dir name="Config"><file name="Paymentfeecheck.php" hash="fdace6ddea9c5c2fac8b264df834012e"/></dir></dir></dir><dir name="Payment"><file name="Form.php" hash="c69c723d686a2f2d6b8f90dbb212f3d1"/></dir><dir name="Customer"><dir name="Widget"><file name="Dob.php" hash="26a34b88060d80e5b1f1e6412b1eb7d4"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="1030f0162d916f21a7ff22f44c5b8fd0"/><file name="system.xml" hash="2f37ec7440fde44699363ae80975a159"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Netresearch_Billsafe.xml" hash="8d4f15dddfcc1034a78b4e9782db7770"/><file name="Netresearch_PaymentFee.xml" hash="66173a1777313e72fbee83b510f9d59d"/></dir></dir></dir></target></contents></package>
1
  <?xml version="1.0"?>
2
+ <package><name>BillSAFE_3</name><version>14.03.31</version><stability>stable</stability><license>OSL3</license><channel>community</channel><extends></extends><summary>Billsafe Extension</summary><description>Billsafe Extension</description><notes>Stable Release</notes><authors><author><name>Kristian B&#xFC;sch</name><user>kbuesch</user><email>kbuesch@paypal.com</email></author></authors><date>2014-03-31</date><time>1:44:18</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="doc"><dir name="Netresearch_Billsafe"><file name="ChangeLog.pdf" hash="728e27080371aa1beaf602804a742661"/><file name="README.pdf" hash="b46f1279f115d3253961766922f20ec0"/></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="billsafe.css" hash="30652ade50b6207cfd38fa0d86230ba0"/></dir></dir></dir></dir></dir><dir name="app"><dir name="locale"><dir name="de_DE"><file name="Netresearch_Billsafe.csv" hash="1784e93b821ea46bd32bc92c2f449bae"/><file name="Netresearch_PaymentFee.csv" hash="ee08fa2cb6ed0a660db7df18696f5e17"/></dir><dir name="en_US"><file name="Netresearch_PaymentFee.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="billsafe"><file name="info.phtml" hash="229d7e88ed38ba2a413c9323e12c1aa0"/><dir name="customer"><dir name="widget"><file name="dob.phtml" hash="c394734c5a350a2e47c143f2398935cb"/></dir></dir><dir name="payment"><file name="form.phtml" hash="ca6ec537cfc8c0434341757c9ec286d5"/></dir></dir></dir><dir name="layout"><file name="billsafe.xml" hash="7ba46fd84f8faa378ab61e32dfa9ceac"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="billsafe"><file name="info.phtml" hash="8183491543dcffc7f66af9fb06740e80"/><dir name="pdf"><file name="info.phtml" hash="125e58bd1eb021106ad45c0e9b960f01"/><file name="mrg.phtml" hash="68c1f430c50cdb9d413369a7defa6a03"/></dir><dir name="system"><dir name="config"><file name="paymentfeecheck.phtml" hash="cd5cfb1357c3885965dcfaf9b3da4eaa"/></dir></dir></dir></dir><dir name="layout"><file name="billsafe.xml" hash="53acc9efc6bd47aefacee3162e7b9995"/></dir></dir></dir></dir></dir><dir name="code"><dir name="community"><dir name="Netresearch"><dir name="PaymentFee"><dir name="Test"><dir name="Model"><file name="ObserverTest.php" hash="32ba1f9b3fb8e8a9372da43f8fc9368e"/></dir><dir name="Config"><file name="ConfigTest.php" hash="cf41bf5d7cb77e4d9a4de4dbb5186512"/></dir></dir><dir name="Helper"><file name="Data.php" hash="41ca5369190288ea1eb14e2a591b6d97"/></dir><dir name="Model"><file name="Observer.php" hash="2e4d2b0faaf6af72e209c7fb40b81b51"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Payment"><file name="Methods.php" hash="5e49ffdd605a2b9dcc21c351c3afb075"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FeeController.php" hash="5763a58bfd3f11b3ae41d5949724f0e8"/></dir></dir><dir name="etc"><file name="config.xml" hash="6beccc3c342a85000f0f454fc43b8503"/><file name="system.xml" hash="32ac7aabae936ec08aefb6b112f88b26"/></dir></dir><dir name="Billsafe"><dir name="sql"><dir name="billsafe_setup"><file name="mysql4-install-0.1.0.php" hash="9906e49a293cc8511f2ce53be301b3d3"/><file name="mysql4-upgrade-11.09.14-11.11.07.php" hash="f74406fe3e100c69a020bca556ad1ce3"/></dir></dir><dir name="Test"><dir name="Controller"><file name="PaymentControllerTest.php" hash="1825fe25aa4b82523aadd10a53074747"/></dir><dir name="Helper"><file name="CustomerTest.php" hash="60cb8197887c5bf362db5ea665ff6604"/><file name="DataTest.php" hash="cb48454feb34eea45f18294d68a48ab5"/><file name="OrderTest.php" hash="4a4c95b8dd473647275be83b90959e75"/><dir name="OrderTest"><dir name="fixtures"><file name="orders.yaml" hash="14e05b7bda0018f195e61f8bb596f160"/></dir></dir></dir><dir name="Model"><file name="ClientTest.php" hash="8d9eb45c6bf9e6da59e698e82ba96d69"/><file name="ConfigTest.php" hash="e5e74426f5a04ed24b2acc81a10a93f7"/><file name="ObserverTest.php" hash="2d2dcdd46f2b4f5c4d9bef41271a23e1"/><file name="PaymentTest.php" hash="1054a12c8bc977c9ed199f857aedac6b"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="GenderTest.php" hash="d197bd797a59d302f5fbc72e250adfa4"/></dir></dir></dir></dir></dir><dir name="Block"><file name="InfoTest.php" hash="7d1973a3d3e71f2d543484c8e873f3d8"/><dir name="Payment"><file name="FormTest.php" hash="53a4a81423abd719cd1c41203a582f8f"/></dir><dir name="Customer"><dir name="Widget"><file name="DobTest.php" hash="279ab2bebbef665ebb1a44c8ef93327a"/></dir></dir></dir><dir name="var"><dir name="fixtures"><file name="orders.yaml" hash="fa584305dffb6954f37ea98d398175cc"/></dir></dir></dir><dir name="Helper"><file name="Customer.php" hash="f37e82ba46d0bdd0dae0dfefbe44d5f9"/><file name="Data.php" hash="9316a51a592dd4733a58773576a403b5"/><file name="Order.php" hash="f0237c7d737ca56d4b4ff1483bd4abf2"/></dir><dir name="Model"><file name="Client.php" hash="ba10a42551a612663fbdf97426e276c5"/><file name="Config.php" hash="0dee7481cf47eb6f01ef1f96fd1af591"/><file name="Observer.php" hash="8ef95cb35694c3552bb38e3c44538c53"/><file name="Payment.php" hash="b807a6dd17ad7874f1a785f509e2ac9d"/><dir name="Pdf"><dir name="Engine"><dir name="Invoice"><file name="Default.php" hash="463521a517d8cc7ef027d7373c2375cd"/></dir></dir><dir name="Items"><dir name="Invoice"><file name="Info.php" hash="b8d7c058b38ebfd786b570dcd626347c"/></dir></dir></dir><dir name="Client"><file name="Base.php" hash="16fbeffcc20585f6e43fda3b0c083d57"/></dir><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Gender.php" hash="df8f8d18e152cce92297c797262b3671"/></dir></dir></dir></dir><dir name="Config"><file name="Abstract.php" hash="ad34cab87ff92104c4e1f495faf2c22e"/><file name="Maxamount.php" hash="698d7e25b131a3b9dbdee12c4b88e620"/><file name="Maxfee.php" hash="0bdefd9ca9a666719760279b55c86c2d"/></dir></dir><dir name="controllers"><file name="PaymentController.php" hash="299ecad019a40491d7835a7247b72108"/></dir><dir name="Block"><file name="Info.php" hash="fcdafba1b69989b09535c9ae414ba180"/><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Totalbar.php" hash="db5c1edc70c1fe25e3852785c4c3f0b8"/></dir></dir><dir name="System"><dir name="Config"><file name="Paymentfeecheck.php" hash="fdace6ddea9c5c2fac8b264df834012e"/></dir></dir></dir><dir name="Payment"><file name="Form.php" hash="408222b6f364337775177d55e9e395d6"/></dir><dir name="Customer"><dir name="Widget"><file name="Dob.php" hash="26a34b88060d80e5b1f1e6412b1eb7d4"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="d4ac55f534a578563a5db89aa3de88cd"/><file name="system.xml" hash="2f37ec7440fde44699363ae80975a159"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Netresearch_Billsafe.xml" hash="8d4f15dddfcc1034a78b4e9782db7770"/><file name="Netresearch_PaymentFee.xml" hash="66173a1777313e72fbee83b510f9d59d"/></dir></dir></dir></target></contents></package>