Avenla_KlarnaCheckout - Version 1.0.9

Version Notes

Klarna Checkout module

Download this release

Release Info

Developer Avenla Oy
Extension Avenla_KlarnaCheckout
Version 1.0.9
Comparing to
See all releases


Code changes from version 1.0.8 to 1.0.9

app/code/community/Avenla/KlarnaCheckout/Block/Adminhtml/System/Config/Field/Pclass.php CHANGED
@@ -32,10 +32,10 @@ class Avenla_KlarnaCheckout_Block_Adminhtml_System_Config_Field_Pclass extends M
32
  public function getButtonHtml()
33
  {
34
  $html = $this->getLayout()->createBlock('adminhtml/widget_button')
35
- ->setType('button')
36
- ->setLabel(Mage::helper('klarnaCheckout')->__('Update PClasses'))
37
- ->setOnClick("javascript:updatePClasses(); return false;")
38
- ->toHtml();
39
 
40
  return $html;
41
  }
32
  public function getButtonHtml()
33
  {
34
  $html = $this->getLayout()->createBlock('adminhtml/widget_button')
35
+ ->setType('button')
36
+ ->setLabel(Mage::helper('klarnaCheckout')->__('Update PClasses'))
37
+ ->setOnClick("javascript:updatePClasses(); return false;")
38
+ ->toHtml();
39
 
40
  return $html;
41
  }
app/code/community/Avenla/KlarnaCheckout/Block/KCO/Confirmation.php CHANGED
@@ -37,8 +37,9 @@ class Avenla_KlarnaCheckout_Block_KCO_Confirmation extends Mage_Core_Block_Templ
37
  $order->fetch();
38
  $result = "";
39
 
40
- if(Mage::getModel('klarnaCheckout/config')->getGoogleAnalyticsNo() !== false && isset($_SESSION['klarna_checkout']))
41
- $result .= $this->getGoogleCode($order);
 
42
 
43
  $result .= $order['gui']['snippet'];
44
 
@@ -53,16 +54,33 @@ class Avenla_KlarnaCheckout_Block_KCO_Confirmation extends Mage_Core_Block_Templ
53
  return $result;
54
  }
55
 
56
- /**
57
  * Get Google Analytics Ecommerce tracking code
58
  *
59
- * @param Klarna_Checkout_Order $ko
60
- * @return string
61
  */
62
- private function getGoogleCode($ko)
63
  {
64
- if(count($ko['cart']['items']) < 1)
65
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  foreach($ko['cart']['items'] as $p){
68
  $shipping_fee = "";
@@ -70,26 +88,47 @@ class Avenla_KlarnaCheckout_Block_KCO_Confirmation extends Mage_Core_Block_Templ
70
  $shipping_fee = $p['total_price_including_tax'];
71
  }
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  $gc .= 'var _gaq = _gaq || [];';
74
  $gc .= '_gaq.push(["_setAccount", "' . Mage::getModel('klarnaCheckout/config')->getGoogleAnalyticsNo() . '"]);';
75
- $gc .= '_gaq.push(["_trackPageview"]);';
76
- $gc .= '_gaq.push(["_addTrans",';
77
- $gc .= '"' . $ko['merchant_reference']['orderid1'] . '",';
78
- $gc .= '"' . Mage::app()->getStore()->getName() . '",';
79
- $gc .= '"' . $ko['cart']['total_price_including_tax'] / 100 . '",';
80
- $gc .= '"' . $ko['cart']['total_tax_amount'] / 100 . '",';
81
- $gc .= '"' . $shipping_fee / 100 . '",';
82
- $gc .= '"' . $ko['billing_address']['city'] . '",';
83
- $gc .= '"",' ;
84
- $gc .= '"' . $ko['billing_address']['country'] . '"';
85
- $gc .= ']);' . "\n";
86
-
87
  foreach ($ko['cart']['items'] as $p){
88
 
89
- if($p['type'] == 'shipping_fee')
90
  continue;
91
 
92
- $cat = "";
93
  $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $p['reference']);
94
  if($product){
95
  $categoryIds = Mage::getModel('catalog/product')
@@ -100,18 +139,17 @@ class Avenla_KlarnaCheckout_Block_KCO_Confirmation extends Mage_Core_Block_Templ
100
  $cat = Mage::getModel('catalog/category')->load(end($categoryIds))->getName();
101
  }
102
 
103
- $gc .= '_gaq.push(["_addItem",';
104
- $gc .= '"' . $ko['merchant_reference']['orderid1'] . '",';
105
- $gc .= '"' . $p['reference'] . '",';
106
- $gc .= '"' . $p['name'] . '",';
107
- $gc .= '"' . $cat . '",';
108
- $gc .= '"' . $p['unit_price'] / 100 . '",';
109
- $gc .= '"' . $p['quantity'] . '"';
110
- $gc .= ']);' . "\n";
111
-
112
  }
113
 
114
- $gc .= '_gaq.push(["_set", "currencyCode", "EUR"]); ';
115
  $gc .= '_gaq.push(["_trackTrans"]);';
116
  $gc .= '(function() { ';
117
  $gc .= 'var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true; ';
@@ -121,6 +159,71 @@ class Avenla_KlarnaCheckout_Block_KCO_Confirmation extends Mage_Core_Block_Templ
121
  $gc .= '//]]>' . "\n";
122
  $gc .= '</script>';
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  return $gc;
125
  }
126
  }
37
  $order->fetch();
38
  $result = "";
39
 
40
+ if(Mage::getModel('klarnaCheckout/config')->getGoogleAnalyticsNo() !== false && isset($_SESSION['klarna_checkout'])){
41
+ $result .= $this->getAnalyticsCode($order);
42
+ }
43
 
44
  $result .= $order['gui']['snippet'];
45
 
54
  return $result;
55
  }
56
 
57
+ /**
58
  * Get Google Analytics Ecommerce tracking code
59
  *
60
+ * @param Klarna_Checkout_Order $ko
61
+ * @return string
62
  */
63
+ private function getAnalyticsCode($ko)
64
  {
65
+ $type = Mage::getModel('klarnaCheckout/config')->getGoogleAnalyticsType();
66
+ $orderId = false;
67
+
68
+ if(strlen($ko['merchant_reference']['orderid2']) > 0){
69
+ $mo = Mage::getModel('sales/order')->load($ko['merchant_reference']['orderid1'], 'increment_id');
70
+ if($mo->getId()){
71
+ $orderId = $ko['merchant_reference']['orderid1'];
72
+ }
73
+ }
74
+
75
+ if(!$orderId){
76
+ $quote = Mage::getModel('sales/quote')->load($ko['merchant_reference']['orderid1']);
77
+ $quote->reserveOrderId();
78
+ $quote->save();
79
+ $orderId = $quote->getReservedOrderId();
80
+ }
81
+
82
+ if(count($ko['cart']['items']) < 1)
83
+ return;
84
 
85
  foreach($ko['cart']['items'] as $p){
86
  $shipping_fee = "";
88
  $shipping_fee = $p['total_price_including_tax'];
89
  }
90
 
91
+ if($type == Avenla_KlarnaCheckout_Model_Config::ANALYTICS_UNIVERSAL){
92
+ return $this->getUniversalAnalyticsCode($ko, $shipping_fee, $orderId);
93
+ }
94
+ else{
95
+ return $this->getClassicAnalyticsCode($ko, $shipping_fee, $orderId);
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Get classic Google Analytics Ecommerce tracking code
101
+ *
102
+ * @param Klarna_Checkout_Order $ko
103
+ * @param string $shipping_fee
104
+ * @param string $orderId
105
+ * @return string
106
+ */
107
+ private function getClassicAnalyticsCode($ko, $shipping_fee, $orderId)
108
+ {
109
+
110
+ $gc = '<script type="text/javascript">';
111
+ $gc .= "//<![CDATA[\n";
112
  $gc .= 'var _gaq = _gaq || [];';
113
  $gc .= '_gaq.push(["_setAccount", "' . Mage::getModel('klarnaCheckout/config')->getGoogleAnalyticsNo() . '"]);';
114
+
115
+ $gc .= sprintf("_gaq.push(['_addTrans', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s']);",
116
+ $orderId,
117
+ Mage::app()->getStore()->getName(),
118
+ $ko['cart']['total_price_including_tax'] / 100,
119
+ $ko['cart']['total_tax_amount'] / 100,
120
+ $shipping_fee / 100,
121
+ $ko['billing_address']['city'],
122
+ null,
123
+ $ko['billing_address']['country']
124
+ );
125
+
126
  foreach ($ko['cart']['items'] as $p){
127
 
128
+ if($p['type'] == 'shipping_fee')
129
  continue;
130
 
131
+
132
  $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $p['reference']);
133
  if($product){
134
  $categoryIds = Mage::getModel('catalog/product')
139
  $cat = Mage::getModel('catalog/category')->load(end($categoryIds))->getName();
140
  }
141
 
142
+ $gc .= sprintf("_gaq.push(['_addItem', '%s', '%s', '%s', '%s', '%s', '%s']);",
143
+ $orderId,
144
+ $p['reference'],
145
+ $p['name'],
146
+ null,
147
+ $p['unit_price'] / 100,
148
+ $p['quantity']
149
+ );
 
150
  }
151
 
152
+ $gc .= '_gaq.push(["_set", "currencyCode", "'. $ko['purchase_currency'].'"]); ';
153
  $gc .= '_gaq.push(["_trackTrans"]);';
154
  $gc .= '(function() { ';
155
  $gc .= 'var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true; ';
159
  $gc .= '//]]>' . "\n";
160
  $gc .= '</script>';
161
 
162
+ return $gc;
163
+ }
164
+
165
+ /**
166
+ * Get Universal Google Analytics Ecommerce tracking code
167
+ *
168
+ * @param Klarna_Checkout_Order $ko
169
+ * @param string $shipping_fee
170
+ * @param string $orderId
171
+ * @return string
172
+ */
173
+ public function getUniversalAnalyticsCode($ko, $shipping_fee, $orderId)
174
+ {
175
+ $gc = '<script type="text/javascript">';
176
+ $gc .= "//<![CDATA[\n";
177
+ $gc .= "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){";
178
+ $gc .= "(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),";
179
+ $gc .= "m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)";
180
+ $gc .= "})(window,document,'script','//www.google-analytics.com/analytics.js','ga');";
181
+
182
+ $gc .= "ga('create', '" . Mage::getModel('klarnaCheckout/config')->getGoogleAnalyticsNo() . "', 'auto');";
183
+
184
+ $gc .= "ga('require', 'ecommerce');";
185
+ $gc .= sprintf("ga('ecommerce:addTransaction', {
186
+ 'id': '%s',
187
+ 'affiliation': '%s',
188
+ 'revenue': '%s',
189
+ 'tax': '%s',
190
+ 'shipping': '%s',
191
+ 'currency': '%s'
192
+ });",
193
+ $orderId,
194
+ Mage::app()->getStore()->getName(),
195
+ $ko['cart']['total_price_including_tax'] / 100,
196
+ $ko['cart']['total_tax_amount'] / 100,
197
+ $shipping_fee / 100,
198
+ $ko['purchase_currency']
199
+ );
200
+
201
+ foreach ($ko['cart']['items'] as $p){
202
+
203
+ if($p['type'] == 'shipping_fee')
204
+ continue;
205
+
206
+ $gc .= sprintf("ga('ecommerce:addItem', {
207
+ 'id': '%s',
208
+ 'sku': '%s',
209
+ 'name': '%s',
210
+ 'category': '%s',
211
+ 'price': '%s',
212
+ 'quantity': '%s'
213
+ });",
214
+ $orderId,
215
+ $p['reference'],
216
+ $p['name'],
217
+ null,
218
+ $p['unit_price'] / 100,
219
+ $p['quantity']
220
+ );
221
+ }
222
+ $gc .= "ga('ecommerce:send');";
223
+
224
+ $gc .= '//]]>' . "\n";
225
+ $gc .= '</script>';
226
+
227
  return $gc;
228
  }
229
  }
app/code/community/Avenla/KlarnaCheckout/Block/Widgets/Logo.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is released under a custom license by Avenla Oy.
4
+ * All rights reserved
5
+ *
6
+ * License and more information can be found at http://productdownloads.avenla.com/magento-modules/klarna-checkout/
7
+ * For questions and support - klarna-support@avenla.com
8
+ *
9
+ * @category Avenla
10
+ * @package Avenla_KlarnaCheckout
11
+ * @copyright Copyright (c) Avenla Oy
12
+ * @link http://www.avenla.fi
13
+ */
14
+
15
+ /**
16
+ * Avenla KlarnaCheckout
17
+ *
18
+ * @category Avenla
19
+ * @package Avenla_KlarnaCheckout
20
+ */
21
+
22
+ class Avenla_KlarnaCheckout_Block_Widgets_Logo extends Mage_Core_Block_Abstract implements Mage_Widget_Block_Interface
23
+ {
24
+ protected function _toHtml()
25
+ {
26
+ $width = intval($this->getData('width'));
27
+
28
+ if($width < 1)
29
+ $width = 350;
30
+
31
+ $country = Mage::helper('klarnaCheckout')->getLocale(Mage::getStoreConfig('general/country/default', Mage::app()->getStore()));
32
+ $country = str_replace('-', '_', $country);
33
+ $imgSrc = 'https://cdn.klarna.com/1.0/shared/image/generic/logo/'.$country.'/basic/'.$this->getData('background').'.png?width='.$width.'&eid='. Mage::getModel('klarnaCheckout/config')->getKlarnaEid();
34
+
35
+ return '<img src='.$imgSrc.' />';
36
+ }
37
+ }
app/code/community/Avenla/KlarnaCheckout/Block/Widgets/Methods.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is released under a custom license by Avenla Oy.
4
+ * All rights reserved
5
+ *
6
+ * License and more information can be found at http://productdownloads.avenla.com/magento-modules/klarna-checkout/
7
+ * For questions and support - klarna-support@avenla.com
8
+ *
9
+ * @category Avenla
10
+ * @package Avenla_KlarnaCheckout
11
+ * @copyright Copyright (c) Avenla Oy
12
+ * @link http://www.avenla.fi
13
+ */
14
+
15
+ /**
16
+ * Avenla KlarnaCheckout
17
+ *
18
+ * @category Avenla
19
+ * @package Avenla_KlarnaCheckout
20
+ */
21
+
22
+ class Avenla_KlarnaCheckout_Block_Widgets_Methods extends Mage_Core_Block_Template implements Mage_Widget_Block_Interface
23
+ {
24
+ protected function _toHtml()
25
+ {
26
+ $beforeBodyEnd = $this->getLayout()->getBlock('before_body_end');
27
+ $script = $this->getLayout()->createBlock('core/text')->setText('<script async src="https://cdn.klarna.com/1.0/code/client/all.js"></script>');
28
+ $beforeBodyEnd->append($script);
29
+
30
+ $this->setTemplate('KCO/widget/methods.phtml');
31
+ $width = intval($this->getData('width'));
32
+
33
+ if($width < 1)
34
+ $width = 350;
35
+
36
+ $this->setWidth($width);
37
+ $locale = strtolower(Mage::app()->getLocale()->getLocaleCode());
38
+ $this->setLocale($locale);
39
+
40
+ return parent::_toHtml();
41
+ }
42
+
43
+
44
+ }
app/code/community/Avenla/KlarnaCheckout/Model/Config.php CHANGED
@@ -20,13 +20,15 @@
20
  */
21
  class Avenla_KlarnaCheckout_Model_Config extends Varien_Object
22
  {
23
- const KCO_LIVE_URL = 'https://checkout.klarna.com';
24
- const KCO_DEMO_URL = 'https://checkout.testdrive.klarna.com';
25
- const KCO_LIVE_S_URL = 'https://online.klarna.com';
26
- const KCO_DEMO_S_URL = 'https://testdrive.klarna.com';
27
- const KLARNA_DOC_URL = 'http://developers.klarna.com/';
28
- const ONLINE_GUI_URL = 'https://merchants.klarna.com';
29
- const LICENSE_URL = 'http://productdownloads.avenla.com/magento-modules/klarna-checkout/license';
 
 
30
 
31
  /**
32
  * Return config var
@@ -129,6 +131,16 @@ class Avenla_KlarnaCheckout_Model_Config extends Varien_Object
129
  return $this->getConfigData('google_analytics');
130
  }
131
 
 
 
 
 
 
 
 
 
 
 
132
  /**
133
  * Get method title
134
  *
20
  */
21
  class Avenla_KlarnaCheckout_Model_Config extends Varien_Object
22
  {
23
+ const KCO_LIVE_URL = 'https://checkout.klarna.com';
24
+ const KCO_DEMO_URL = 'https://checkout.testdrive.klarna.com';
25
+ const KCO_LIVE_S_URL = 'https://online.klarna.com';
26
+ const KCO_DEMO_S_URL = 'https://testdrive.klarna.com';
27
+ const KLARNA_DOC_URL = 'http://developers.klarna.com/';
28
+ const ONLINE_GUI_URL = 'https://merchants.klarna.com';
29
+ const LICENSE_URL = 'http://productdownloads.avenla.com/magento-modules/klarna-checkout/license';
30
+ const ANALYTICS_UNIVERSAL = 'universal';
31
+ const ANALYTICS_CLASSIC = 'analytics';
32
 
33
  /**
34
  * Return config var
131
  return $this->getConfigData('google_analytics');
132
  }
133
 
134
+ /**
135
+ * Get Google Analytics account type
136
+ *
137
+ * @return string
138
+ */
139
+ public function getGoogleAnalyticsType()
140
+ {
141
+ return $this->getConfigData('google_analytics_type');
142
+ }
143
+
144
  /**
145
  * Get method title
146
  *
app/code/community/Avenla/KlarnaCheckout/Model/KCO.php CHANGED
@@ -62,7 +62,7 @@ class Avenla_KlarnaCheckout_Model_KCO extends Mage_Payment_Model_Method_Abstract
62
 
63
  if(in_array($quote->getShippingAddress()->getShippingMethod(), $this->getConfig()->getDisallowedShippingMethods()))
64
  return false;
65
-
66
  return parent::isAvailable($quote) &&
67
  $connectionStatus &&
68
  (Mage::getSingleton('customer/session')->isLoggedIn() || Mage::helper('checkout')->isAllowedGuestCheckout($quote)) &&
62
 
63
  if(in_array($quote->getShippingAddress()->getShippingMethod(), $this->getConfig()->getDisallowedShippingMethods()))
64
  return false;
65
+
66
  return parent::isAvailable($quote) &&
67
  $connectionStatus &&
68
  (Mage::getSingleton('customer/session')->isLoggedIn() || Mage::helper('checkout')->isAllowedGuestCheckout($quote)) &&
app/code/community/Avenla/KlarnaCheckout/Model/Order.php CHANGED
@@ -264,7 +264,7 @@ class Avenla_KlarnaCheckout_Model_Order extends Klarna_Checkout_Order
264
  $taxClasses = Mage::helper("core")->jsonDecode(Mage::helper("tax")->getAllRatesByProductClass());
265
  if(isset($taxClasses["value_".$taxClass]))
266
  $taxRate = $taxClasses["value_".$taxClass];
267
-
268
  $shippingCosts = array(
269
  'type' => 'shipping_fee',
270
  'reference' => 'shipping_fee',
264
  $taxClasses = Mage::helper("core")->jsonDecode(Mage::helper("tax")->getAllRatesByProductClass());
265
  if(isset($taxClasses["value_".$taxClass]))
266
  $taxRate = $taxClasses["value_".$taxClass];
267
+
268
  $shippingCosts = array(
269
  'type' => 'shipping_fee',
270
  'reference' => 'shipping_fee',
app/code/community/Avenla/KlarnaCheckout/Model/Source/AnalyticsType.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is released under a custom license by Avenla Oy.
4
+ * All rights reserved
5
+ *
6
+ * License and more information can be found at http://productdownloads.avenla.com/magento-modules/klarna-checkout/
7
+ * For questions and support - klarna-support@avenla.com
8
+ *
9
+ * @category Avenla
10
+ * @package Avenla_KlarnaCheckout
11
+ * @copyright Copyright (c) Avenla Oy
12
+ * @link http://www.avenla.fi
13
+ */
14
+
15
+ /**
16
+ * Avenla KlarnaCheckout
17
+ *
18
+ * @category Avenla
19
+ * @package Avenla_KlarnaCheckout
20
+ */
21
+
22
+ class Avenla_KlarnaCheckout_Model_Source_AnalyticsType
23
+ {
24
+ public function toOptionArray()
25
+ {
26
+ return array(
27
+ array(
28
+ 'value' => Avenla_KlarnaCheckout_Model_Config::ANALYTICS_UNIVERSAL,
29
+ 'label' => Mage::helper('klarnaCheckout')->__('Universal Analytics')
30
+ ),
31
+ array(
32
+ 'value' => Avenla_KlarnaCheckout_Model_Config::ANALYTICS_CLASSIC,
33
+ 'label' => Mage::helper('klarnaCheckout')->__('Google Analytics')
34
+ )
35
+ );
36
+ }
37
+
38
+ }
app/code/community/Avenla/KlarnaCheckout/controllers/Adminhtml/KCOController.php CHANGED
@@ -26,7 +26,7 @@ class Avenla_KlarnaCheckout_Adminhtml_KCOController extends Mage_Adminhtml_Contr
26
  */
27
  public function updatePClassesAction()
28
  {
29
- $result = Mage::getModel('klarnaCheckout/api')->updatePClasses();
30
  Mage::app()->getResponse()->setBody($result);
31
  }
32
  }
26
  */
27
  public function updatePClassesAction()
28
  {
29
+ $result = Mage::getModel('klarnaCheckout/api')->updatePClasses();
30
  Mage::app()->getResponse()->setBody($result);
31
  }
32
  }
app/code/community/Avenla/KlarnaCheckout/controllers/KCOController.php CHANGED
@@ -71,17 +71,17 @@ class Avenla_KlarnaCheckout_KCOController extends Mage_Core_Controller_Front_Act
71
 
72
  if($ko != null){
73
  $_SESSION['klarna_checkout'] = $sessionId = $ko->getLocation();
74
-
75
- if($quote->getShippingAddress()->getPostcode() == null)
76
- $result['msg'] = $this->__("Please fill in your post code");
77
-
78
- if($quote->getShippingAddress()->getCountry() == null)
79
- $result['msg'] = $this->__("Please select country");
80
-
81
- if (!$quote->isVirtual() && $quote->getShippingAddress()->getShippingMethod() == null)
82
- $result['msg'] = $this->__("Please select shipping method to use Klarna Checkout");
83
-
84
- $result['klarnaframe'] = $ko['gui']['snippet'];
85
  }
86
  }
87
 
@@ -270,6 +270,7 @@ class Avenla_KlarnaCheckout_KCOController extends Mage_Core_Controller_Front_Act
270
  $mo->getPayment()->save();
271
 
272
  $update['merchant_reference']['orderid1'] = $mo->getIncrementId();
 
273
  $update['status'] = 'created';
274
  $ko->update($update);
275
 
71
 
72
  if($ko != null){
73
  $_SESSION['klarna_checkout'] = $sessionId = $ko->getLocation();
74
+ if(!$quote->isVirtual()){
75
+ if($quote->getShippingAddress()->getPostcode() == null)
76
+ $result['msg'] = $this->__("Please fill in your post code");
77
+
78
+ if($quote->getShippingAddress()->getCountry() == null)
79
+ $result['msg'] = $this->__("Please select country");
80
+
81
+ if ($quote->getShippingAddress()->getShippingMethod() == null)
82
+ $result['msg'] = $this->__("Please select shipping method to use Klarna Checkout");
83
+ }
84
+ $result['klarnaframe'] = $ko['gui']['snippet'];
85
  }
86
  }
87
 
270
  $mo->getPayment()->save();
271
 
272
  $update['merchant_reference']['orderid1'] = $mo->getIncrementId();
273
+ $update['merchant_reference']['orderid2'] = $quoteID;
274
  $update['status'] = 'created';
275
  $ko->update($update);
276
 
app/code/community/Avenla/KlarnaCheckout/etc/config.xml CHANGED
@@ -23,7 +23,7 @@
23
  <config>
24
  <modules>
25
  <Avenla_KlarnaCheckout>
26
- <version>1.0.8</version>
27
  </Avenla_KlarnaCheckout>
28
  </modules>
29
  <global>
23
  <config>
24
  <modules>
25
  <Avenla_KlarnaCheckout>
26
+ <version>1.0.9</version>
27
  </Avenla_KlarnaCheckout>
28
  </modules>
29
  <global>
app/code/community/Avenla/KlarnaCheckout/etc/system.xml CHANGED
@@ -31,7 +31,7 @@
31
  <fields>
32
  <klarna_notice translate="label" module="klarnaCheckout">
33
  <frontend_model>klarnaCheckout/adminhtml_system_config_fieldset_info</frontend_model>
34
- <sort_order>2</sort_order>
35
  <show_in_default>1</show_in_default>
36
  <show_in_website>1</show_in_website>
37
  <show_in_store>1</show_in_store>
@@ -134,11 +134,20 @@
134
  <show_in_website>1</show_in_website>
135
  <show_in_store>1</show_in_store>
136
  </google_analytics>
 
 
 
 
 
 
 
 
 
137
  <default_checkout translate="label">
138
  <label>Hide links to default Checkout</label>
139
  <frontend_type>select</frontend_type>
140
  <source_model>adminhtml/system_config_source_yesno</source_model>
141
- <sort_order>14</sort_order>
142
  <show_in_default>1</show_in_default>
143
  <show_in_website>1</show_in_website>
144
  <show_in_store>1</show_in_store>
@@ -147,7 +156,7 @@
147
  <label>Cart page layout</label>
148
  <frontend_type>select</frontend_type>
149
  <source_model>klarnaCheckout/source_kcolayout</source_model>
150
- <sort_order>15</sort_order>
151
  <show_in_default>1</show_in_default>
152
  <show_in_website>1</show_in_website>
153
  <show_in_store>1</show_in_store>
@@ -156,7 +165,7 @@
156
  <label>Disabled shipping methods</label>
157
  <frontend_type>multiselect</frontend_type>
158
  <source_model>klarnaCheckout/source_shippingmethods</source_model>
159
- <sort_order>16</sort_order>
160
  <show_in_default>1</show_in_default>
161
  <show_in_website>1</show_in_website>
162
  <show_in_store>1</show_in_store>
@@ -166,7 +175,7 @@
166
  <label>Show part payment widget on product page</label>
167
  <frontend_type>select</frontend_type>
168
  <source_model>klarnaCheckout/source_ppwidget</source_model>
169
- <sort_order>17</sort_order>
170
  <show_in_default>1</show_in_default>
171
  <show_in_website>1</show_in_website>
172
  <show_in_store>1</show_in_store>
@@ -176,7 +185,7 @@
176
  <label>Part payment widget layout</label>
177
  <frontend_type>select</frontend_type>
178
  <source_model>klarnaCheckout/source_pplayout</source_model>
179
- <sort_order>18</sort_order>
180
  <show_in_default>1</show_in_default>
181
  <show_in_website>1</show_in_website>
182
  <show_in_store>1</show_in_store>
@@ -185,7 +194,7 @@
185
  <label>Show newsletter subscription checkbox</label>
186
  <frontend_type>select</frontend_type>
187
  <source_model>adminhtml/system_config_source_yesno</source_model>
188
- <sort_order>19</sort_order>
189
  <show_in_default>1</show_in_default>
190
  <show_in_website>1</show_in_website>
191
  <show_in_store>1</show_in_store>
@@ -195,7 +204,7 @@
195
  <comment><![CDATA[Only if you have gift messages are enabled.]]></comment>
196
  <frontend_type>select</frontend_type>
197
  <source_model>adminhtml/system_config_source_yesno</source_model>
198
- <sort_order>20</sort_order>
199
  <show_in_default>1</show_in_default>
200
  <show_in_website>1</show_in_website>
201
  <show_in_store>1</show_in_store>
@@ -204,7 +213,7 @@
204
  <label>Update PClasses</label>
205
  <frontend_type>button</frontend_type>
206
  <frontend_model>klarnaCheckout/adminhtml_system_config_field_pclass</frontend_model>
207
- <sort_order>21</sort_order>
208
  <show_in_default>1</show_in_default>
209
  <show_in_website>1</show_in_website>
210
  <show_in_store>1</show_in_store>
31
  <fields>
32
  <klarna_notice translate="label" module="klarnaCheckout">
33
  <frontend_model>klarnaCheckout/adminhtml_system_config_fieldset_info</frontend_model>
34
+ <sort_order>1</sort_order>
35
  <show_in_default>1</show_in_default>
36
  <show_in_website>1</show_in_website>
37
  <show_in_store>1</show_in_store>
134
  <show_in_website>1</show_in_website>
135
  <show_in_store>1</show_in_store>
136
  </google_analytics>
137
+ <google_analytics_type translate="label">
138
+ <label>Google Analytics account Type</label>
139
+ <frontend_type>select</frontend_type>
140
+ <source_model>klarnaCheckout/source_analyticsType</source_model>
141
+ <sort_order>14</sort_order>
142
+ <show_in_default>1</show_in_default>
143
+ <show_in_website>1</show_in_website>
144
+ <show_in_store>1</show_in_store>
145
+ </google_analytics_type>
146
  <default_checkout translate="label">
147
  <label>Hide links to default Checkout</label>
148
  <frontend_type>select</frontend_type>
149
  <source_model>adminhtml/system_config_source_yesno</source_model>
150
+ <sort_order>15</sort_order>
151
  <show_in_default>1</show_in_default>
152
  <show_in_website>1</show_in_website>
153
  <show_in_store>1</show_in_store>
156
  <label>Cart page layout</label>
157
  <frontend_type>select</frontend_type>
158
  <source_model>klarnaCheckout/source_kcolayout</source_model>
159
+ <sort_order>16</sort_order>
160
  <show_in_default>1</show_in_default>
161
  <show_in_website>1</show_in_website>
162
  <show_in_store>1</show_in_store>
165
  <label>Disabled shipping methods</label>
166
  <frontend_type>multiselect</frontend_type>
167
  <source_model>klarnaCheckout/source_shippingmethods</source_model>
168
+ <sort_order>17</sort_order>
169
  <show_in_default>1</show_in_default>
170
  <show_in_website>1</show_in_website>
171
  <show_in_store>1</show_in_store>
175
  <label>Show part payment widget on product page</label>
176
  <frontend_type>select</frontend_type>
177
  <source_model>klarnaCheckout/source_ppwidget</source_model>
178
+ <sort_order>18</sort_order>
179
  <show_in_default>1</show_in_default>
180
  <show_in_website>1</show_in_website>
181
  <show_in_store>1</show_in_store>
185
  <label>Part payment widget layout</label>
186
  <frontend_type>select</frontend_type>
187
  <source_model>klarnaCheckout/source_pplayout</source_model>
188
+ <sort_order>19</sort_order>
189
  <show_in_default>1</show_in_default>
190
  <show_in_website>1</show_in_website>
191
  <show_in_store>1</show_in_store>
194
  <label>Show newsletter subscription checkbox</label>
195
  <frontend_type>select</frontend_type>
196
  <source_model>adminhtml/system_config_source_yesno</source_model>
197
+ <sort_order>20</sort_order>
198
  <show_in_default>1</show_in_default>
199
  <show_in_website>1</show_in_website>
200
  <show_in_store>1</show_in_store>
204
  <comment><![CDATA[Only if you have gift messages are enabled.]]></comment>
205
  <frontend_type>select</frontend_type>
206
  <source_model>adminhtml/system_config_source_yesno</source_model>
207
+ <sort_order>21</sort_order>
208
  <show_in_default>1</show_in_default>
209
  <show_in_website>1</show_in_website>
210
  <show_in_store>1</show_in_store>
213
  <label>Update PClasses</label>
214
  <frontend_type>button</frontend_type>
215
  <frontend_model>klarnaCheckout/adminhtml_system_config_field_pclass</frontend_model>
216
+ <sort_order>22</sort_order>
217
  <show_in_default>1</show_in_default>
218
  <show_in_website>1</show_in_website>
219
  <show_in_store>1</show_in_store>
app/code/community/Avenla/KlarnaCheckout/etc/widget.xml ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+
4
+ This file is released under a custom license by Avenla Oy.
5
+ All rights reserved
6
+
7
+ License and more information can be found at http://productdownloads.avenla.com/magento-modules/klarna-checkout/
8
+ For questions and support - klarna-support@avenla.com
9
+
10
+ @category Avenla
11
+ @package Avenla_KlarnaCheckout
12
+ @copyright Copyright (c) Avenla Oy
13
+ @link http://www.avenla.fi
14
+
15
+
16
+
17
+ Avenla KlarnaCheckout
18
+
19
+ @category Avenla
20
+ @package Avenla_KlarnaCheckout
21
+
22
+ -->
23
+ <widgets>
24
+ <klarnaCheckout_methods type="klarnaCheckout/widgets_methods">
25
+ <name>Klarna Checkout payment methods</name>
26
+ <description type="desc">View your Klarna Checkout payment methods with Klarna tooltip</description>
27
+ <parameters>
28
+ <methodslayout>
29
+ <required>1</required>
30
+ <visible>1</visible>
31
+ <label>Layout</label>
32
+ <type>select</type>
33
+ <values>
34
+ <sinle_row translate="label">
35
+ <value>long</value>
36
+ <label>One row</label>
37
+ </sinle_row>
38
+ <two_rows translate="label">
39
+ <value>short</value>
40
+ <label>Two rows</label>
41
+ </two_rows>
42
+ </values>
43
+ </methodslayout>
44
+ <color>
45
+ <required>1</required>
46
+ <visible>1</visible>
47
+ <label>Color</label>
48
+ <type>select</type>
49
+ <values>
50
+ <blue translate="label">
51
+ <value>blue</value>
52
+ <label>Blue</label>
53
+ </blue>
54
+ <white translate="label">
55
+ <value>white</value>
56
+ <label>White</label>
57
+ </white>
58
+ </values>
59
+ </color>
60
+ <tooltiplayout>
61
+ <required>1</required>
62
+ <visible>1</visible>
63
+ <label>Tooltip layout</label>
64
+ <type>select</type>
65
+ <values>
66
+ <blue translate="label">
67
+ <value>blue</value>
68
+ <label>Blue</label>
69
+ </blue>
70
+ <white translate="label">
71
+ <value>white</value>
72
+ <label>White</label>
73
+ </white>
74
+ </values>
75
+ </tooltiplayout>
76
+ <width>
77
+ <required>1</required>
78
+ <visible>1</visible>
79
+ <label>Width</label>
80
+ <type>text</type>
81
+ </width>
82
+ </parameters>
83
+
84
+ </klarnaCheckout_methods>
85
+ <klarnaCheckout_logo type="klarnaCheckout/widgets_logo">
86
+ <name>Klarna logo</name>
87
+ <description type="desc">View Klarna logo</description>
88
+ <parameters>
89
+ <background>
90
+ <required>1</required>
91
+ <visible>1</visible>
92
+ <label>Background</label>
93
+ <type>select</type>
94
+ <values>
95
+ <light translate="label">
96
+ <value>blue-black</value>
97
+ <label>Light</label>
98
+ </light>
99
+ <dark translate="label">
100
+ <value>white</value>
101
+ <label>Dark</label>
102
+ </dark>
103
+ </values>
104
+ </background>
105
+ <width>
106
+ <required>1</required>
107
+ <visible>1</visible>
108
+ <label>Width</label>
109
+ <type>text</type>
110
+ </width>
111
+ </parameters>
112
+ </klarnaCheckout_logo>
113
+ </widgets>
app/design/frontend/base/default/template/KCO/widget/methods.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is released under a custom license by Avenla Oy.
4
+ * All rights reserved
5
+ *
6
+ * License and more information can be found at http://productdownloads.avenla.com/magento-modules/klarna-checkout/
7
+ * For questions and support - klarna-support@avenla.com
8
+ *
9
+ * @category Avenla
10
+ * @package Avenla_KlarnaCheckout
11
+ * @copyright Copyright (c) Avenla Oy
12
+ * @link http://www.avenla.fi
13
+ */
14
+
15
+ /**
16
+ * Avenla KlarnaCheckout
17
+ *
18
+ * @category Avenla
19
+ * @package Avenla_KlarnaCheckout
20
+ */
21
+ ?>
22
+ <div class="klarna-widget klarna-badge-tooltip"
23
+ data-eid="<?php echo Mage::getModel('klarnaCheckout/config')->getKlarnaEid(); ?>"
24
+ data-locale="<?php echo $this->getLocale(); ?>"
25
+ data-badge-name="<?php echo $this->getData('methodslayout'); ?>-<?php echo $this->getData('color') ?>"
26
+ data-badge-width="<?php echo $this->getWidth(); ?>"
27
+ data-layout="<?php echo $this->getData('tooltiplayout'); ?>">
28
+ </div>
app/locale/fi_FI/Avenla_KlarnaCheckout.csv CHANGED
@@ -48,7 +48,6 @@
48
  "Please use the same post code for your quote and Klarna.", "Toimitustavan valinnassa tulee käyttää samaa postinumeroa kuin Klarnan tilaajan tiedoissa."
49
  "Hide links to default Checkout", "Piilota linkit kassasivulle"
50
  "Text shown in Klarna link at Magento Checkout", "Kassan linkissä näytettävä teksti"
51
- "Please specify a shipping method.", "Ole hyvä ja täytä puhelinnumerosi."
52
  "Cart page layout", "Ostoskori sivun asettelu"
53
  "Show newsletter subscription checkbox", "Näytä valintaruutu uutiskirjeen tilaamiseen"
54
  "Default", "Oletus"
@@ -66,3 +65,19 @@
66
  "Klarna widget", "Klarna näyttö"
67
  "Custom widget on product page", "Kustomoitu näyttö tuotesivulla"
68
  "Custom widget on product page and product listing", "Kustomoitu näyttö tuotesivulla sekä tuotelistauksessa"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  "Please use the same post code for your quote and Klarna.", "Toimitustavan valinnassa tulee käyttää samaa postinumeroa kuin Klarnan tilaajan tiedoissa."
49
  "Hide links to default Checkout", "Piilota linkit kassasivulle"
50
  "Text shown in Klarna link at Magento Checkout", "Kassan linkissä näytettävä teksti"
 
51
  "Cart page layout", "Ostoskori sivun asettelu"
52
  "Show newsletter subscription checkbox", "Näytä valintaruutu uutiskirjeen tilaamiseen"
53
  "Default", "Oletus"
65
  "Klarna widget", "Klarna näyttö"
66
  "Custom widget on product page", "Kustomoitu näyttö tuotesivulla"
67
  "Custom widget on product page and product listing", "Kustomoitu näyttö tuotesivulla sekä tuotelistauksessa"
68
+ "Klarna Checkout payment methods", "Klarna Checkout maksutavat"
69
+ "View your Klarna Checkout payment methods with Klarna tooltip", "Näytä Klarna Checkout maksutapasi Klarnan infoikkunan kanssa"
70
+ "View Klarna logo", "Näytä Klarna logo"
71
+ "Layout", "Ulkoasu"
72
+ "One row", "Yhdellä rivillä"
73
+ "Two rows", "Kahdella rivillä"
74
+ "Blue", "Sininen"
75
+ "White", "Valkoinen"
76
+ "Color", "Väri"
77
+ "Tooltip layout", "Infoikkunan ulkoasu"
78
+ "Width", "Leveys"
79
+ "Background", "Tausta"
80
+ "Light", "Vaalea"
81
+ "Dark", "Tumma"
82
+ "Google Analytics account Type", "Google Analytics tilin tyyppi"
83
+
lib/KlarnaCheckout/Checkout/UserAgent.php CHANGED
@@ -66,7 +66,7 @@ class Klarna_Checkout_UserAgent
66
  ),
67
  'Module' => array(
68
  'name' => 'KlarnaCheckout.MagentoModule',
69
- 'version' => '1.0.8'
70
  )
71
  );
72
  }
66
  ),
67
  'Module' => array(
68
  'name' => 'KlarnaCheckout.MagentoModule',
69
+ 'version' => '1.0.9'
70
  )
71
  );
72
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Avenla_KlarnaCheckout</name>
4
- <version>1.0.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://productdownloads.avenla.com/magento-modules/klarna-checkout/">Custom license by Avenla Oy</license>
7
  <channel>community</channel>
@@ -13,9 +13,9 @@ For questions and support - klarna-support@avenla.com&#xD;
13
  </description>
14
  <notes>Klarna Checkout module</notes>
15
  <authors><author><name>Avenla Oy</name><user>Avenla</user><email>info@avenla.fi</email></author></authors>
16
- <date>2014-10-22</date>
17
- <time>12:43:27</time>
18
- <contents><target name="magecommunity"><dir name="Avenla"><dir name="KlarnaCheckout"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Field"><file name="Pclass.php" hash="99f758992b958ae9097d2026984dff7d"/></dir><dir name="Fieldset"><file name="Info.php" hash="a7fd2dde41ccfe8477267a45be3abf5a"/></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><file name="Price.php" hash="15be72dbe2723bb2d72c6977abd4d8a7"/></dir></dir><dir name="KCO"><file name="Confirmation.php" hash="1b46e67d919f16cb5cd33459c9cc3c1f"/><file name="Info.php" hash="2af961abb2eb0609b84f8da5281332ad"/><file name="Newsletter.php" hash="8d02745a2c814101ae61b2bf00e8901e"/></dir><file name="KCO.php" hash="1abf22f4408a872572c1f8babed730d6"/></dir><dir name="Helper"><file name="Api.php" hash="40f14b72afdcf758b97b564ebe27d0c6"/><file name="Data.php" hash="a5591fd65aa1358570421b4aba6c93c6"/></dir><dir name="Model"><file name="Api.php" hash="016856fd21d1b0e414b34e20e4f436ff"/><file name="Config.php" hash="659c403d06c646ed31d1344f19a62511"/><file name="KCO.php" hash="8c15a8882acbce2bd8630228e9cccc04"/><file name="Newsletter.php" hash="9696df5adee53302fba4d614656350f2"/><file name="Observer.php" hash="032c1dc5216c5da585e82b797948dc71"/><file name="Order.php" hash="faa6f986f28d46fe502d9616a2517a4f"/><dir name="Source"><file name="Countries.php" hash="0440b3ecc5528cf42dbb937eb7d9c0cb"/><file name="Kcolayout.php" hash="9ece6e53ebb4e39e3c1d4d534d71cb27"/><file name="Orderlocale.php" hash="a88769cf211991c70a0f51185bc53fb0"/><file name="Pplayout.php" hash="455484dbea2ff0770aa17e42851b81a6"/><file name="Ppwidget.php" hash="4e1de2ee86a2f5bf5100e211bc01b8f2"/><file name="Servermode.php" hash="df4420b3831b1a1e1ec04daa53711a4d"/><file name="Shippingmethods.php" hash="fecb931e29be4ae008c678cc1d760a02"/><file name="Taxclass.php" hash="c770ce5721c820c27895580e4d2de4b1"/></dir><file name="Validator.php" hash="cb8148baee0988c4a59eb6d9c5b1989d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="KCOController.php" hash="c161d3eb39f4d3a9f27985934e7144af"/></dir><file name="CartController.php" hash="891403418045004e6c047c0173dc7c6a"/><file name="KCOController.php" hash="b89898a8bd2af9817fc646458cc0ddac"/></dir><dir name="etc"><file name="config.xml" hash="e910749c0d6f73f81411b308a4e20932"/><file name="system.xml" hash="eb86aa4041195a9ed8e98ffbf98958b8"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="KCO"><file name="info.phtml" hash="92048d26b2b4f751e4c83ddddab89448"/><dir name="system"><dir name="config"><dir name="field"><file name="pclass.phtml" hash="8566542d14d0dce48dc6aabaf5181007"/></dir><dir name="fieldset"><file name="info.phtml" hash="36a21983fcc4816b7c8a6b8fe9f2e78c"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="KCO"><file name="KCO.phtml" hash="c71d63a2599d086c0937cbd23426d20b"/><dir name="cart"><file name="crosssell.phtml" hash="e7f78cb99e14ab680b794524b8666812"/><file name="giftmessage.phtml" hash="4cb99583d6ce811a3a576a6e20ff0f99"/><dir name="item"><file name="default.phtml" hash="9190b3fad2f2ed57ea2ffbed2e1faa02"/></dir><file name="shipping.phtml" hash="b940c98adec4e3fd455ffc04094a1a4f"/></dir><file name="cart.phtml" hash="4d0d54548f1a20ed359f8e517767d233"/><file name="cart_twocolumns.phtml" hash="6e296c790b5c3a96cdb313ee4829b977"/><dir name="catalog"><dir name="product"><file name="price.phtml" hash="8f32fd038bed9521f6f576d736408ca9"/></dir></dir><file name="info.phtml" hash="a87d8ee70c92a10445fa864a63d042ba"/><file name="link.phtml" hash="d2c3dac8b2cde4b52854019e990b3b11"/><file name="newsletter.phtml" hash="87c3730ed525d3810a5df0a9180bf993"/><dir name="onepage"><file name="link.phtml" hash="a05ab2ebf5f0ed225c2f3967e2bceced"/></dir></dir></dir><dir name="layout"><file name="KCO.xml" hash="63e485d105bbe6c6969fe85e336deea9"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Klarna"><file name="Country.php" hash="40360c3964fc6193e7fb922845eb419b"/><file name="Currency.php" hash="a709407428d86521cc0775cbeb281523"/><file name="Encoding.php" hash="f8f8e744303ff7ce7f4b226331e7bdcf"/><file name="Exceptions.php" hash="933b2811e910da817743766cdde8ffeb"/><file name="Flags.php" hash="b407a1373adf5f172bef3e3d01e81cdb"/><file name="Klarna.php" hash="c92501977a6fc642715045a49e29b50a"/><file name="Language.php" hash="8e40aed0dece8f0a3fbe07e37451af16"/><dir name="checkout"><file name="checkouthtml.intf.php" hash="81e0740254585f2af67895df28093d35"/><file name="threatmetrix.class.php" hash="6ce1bfded90b6b3bb329176ff4c7acac"/></dir><dir name="examples"><file name="activate.php" hash="85a84a8eaeec830949551dfd98fe0236"/><file name="activateInvoice.php" hash="cfac2ed57d0c79679fb35ca723eaffab"/><file name="activatePart.php" hash="b46475c2d9f5b326ff2cd65586a1de6e"/><file name="activateReservation.php" hash="bd9b0e5717eaa32ebf6b5d31ad66e5d4"/><file name="addTransaction.php" hash="6426b7965de733bb17ddc7f74ee3949f"/><file name="calc_monthly_cost.php" hash="30e78c4d40db82643396f9289749a898"/><file name="cancelReservation.php" hash="ae8d00e19c671f6cfe8454a5bb590ab1"/><file name="changeReservation.php" hash="43d9486d29326a8c33a4fda466612149"/><file name="checkOrderStatus.php" hash="bef76f120b3e486790d78b50f4101701"/><file name="creditInvoice.php" hash="8edca171c9f7be2a3c15b23ff166048e"/><file name="creditPart.php" hash="5497b9307da7cccadbf4a6c0dc943876"/><file name="deleteInvoice.php" hash="6d2a6e53c64e7a1aacb79c775a46da5b"/><file name="emailInvoice.php" hash="764fbd5fab4f52dacd767a3f7ac17234"/><file name="fetchPClasses.php" hash="aac08dc4d9cfece6ac9e9a9c4e7b20cc"/><file name="getAddresses.php" hash="ebd79224ea702c92e99a407a53d42da0"/><file name="getPClasses.php" hash="8e444c98a7c63b82512af1f4ce35ac65"/><file name="invoiceAddress.php" hash="97475403b1db4264c0add60930380434"/><file name="invoiceAmount.php" hash="2f5dc326549b179cf99c27518b715e88"/><file name="invoicePartAmount.php" hash="87bf68e855bfdd4f6ba3547091104c97"/><file name="reserveAmount.php" hash="1a97ef5c39f5a2c6d97660504cbbfa10"/><file name="reserveOCR.php" hash="9349b5ea9807060cba4b5f3fcd14369f"/><file name="returnAmount.php" hash="02caca4d76b6d055d504023c770961a4"/><file name="sendInvoice.php" hash="9139eef562746840d09f9d9d5a465c21"/><file name="splitReservation.php" hash="0e09421de645d97c3b74485d51edacfd"/><file name="update.php" hash="3e3561165f4c6727731afe451b0f87d6"/><file name="updateChargeAmount.php" hash="34de26a7f6a089bdb18f67eae1f903c7"/><file name="updateGoodsQty.php" hash="e4f9ee36f56b47924ba35cda500cf13e"/><file name="updateOrderNo.php" hash="cdd594a386072f7bffbf05d2ecdcb9b7"/></dir><file name="klarnaaddr.php" hash="b090d4b0a819fdb7cc58815a8643de18"/><file name="klarnacalc.php" hash="3ab728bf3889240b881f282122fd25fd"/><file name="klarnaconfig.php" hash="a3a4011dccda60fcf3567f56254699ff"/><file name="klarnapclass.php" hash="26a8fd1df0806788f6719cb894787f76"/><dir name="pclasses"><file name="jsonstorage.class.php" hash="e59e526d9dcc17d1ca92ded188750672"/><file name="mysqlstorage.class.php" hash="896a5cd4edf461ef517e0bb2e328707b"/><file name="sqlstorage.class.php" hash="bb7ba4359e7e69424c9f0ecdafc0c9ae"/><file name="storage.intf.php" hash="26db57484b6db3d717c0150ffaa87b19"/><file name="xmlstorage.class.php" hash="4f13939bf8d73f2724f858dd17f219de"/></dir><dir name="transport"><dir name="xmlrpc-3.0.0.beta"><dir name="lib"><file name="xmlrpc.inc" hash="5a74ea2a831648febc9b2c8f809b252c"/><file name="xmlrpc_wrappers.inc" hash="5aa00141ead09fc5498d9a3c9fcab888"/><file name="xmlrpcs.inc" hash="158b97bda79333e9b40793d876b6e98f"/></dir></dir></dir></dir><dir name="KlarnaCheckout"><dir name="Checkout"><file name="BasicConnector.php" hash="e15b4e83aa79afa7c98dbbfb865d7a7a"/><file name="ConnectionErrorException.php" hash="e07a9ccb71869c98036b085b146171fa"/><file name="Connector.php" hash="5378924b60a858f14a41882a8c90c6bc"/><file name="ConnectorException.php" hash="b4304fc99da372305dc4ad40e849a4a9"/><file name="ConnectorInterface.php" hash="f7e0c91db42f54cc4a9858cc1ef47e1a"/><file name="Digest.php" hash="28bde4dc8443bbcc5ad7d04ea9d9c5eb"/><file name="Exception.php" hash="43b4516fe4fe5aa98e1f9b382f504ab7"/><dir name="HTTP"><file name="CURLFactory.php" hash="7fa2aecea60eaf467b1965d2335935d9"/><file name="CURLHandle.php" hash="0b7d459eec95a0f17f420d0493e828bc"/><file name="CURLHandleInterface.php" hash="ddcf0889e242f1f15e6df047386e8403"/><file name="CURLHeaders.php" hash="0807a7b2e579490e08576b4d30f1d1d8"/><file name="CURLTransport.php" hash="a50ed245e0246b6ecc27042bd457bb86"/><file name="Request.php" hash="d7718e7e503a8b4c355aff2b31d0c174"/><file name="Response.php" hash="6be76eb703d424b77e9ea1b37f4825f2"/><file name="Transport.php" hash="c8dd8f3560c310dc78b84bfa057419b5"/><file name="TransportInterface.php" hash="8395efa365907d216633370d79d5380b"/></dir><file name="Order.php" hash="29309d953e7b3b3ae411a6ee913410d9"/><file name="ResourceInterface.php" hash="93a56d28ccf5a29010fb33f15d53ae32"/><file name="UserAgent.php" hash="4817af9e0b3a3b99236d240cfffbbdb7"/></dir><file name="Checkout.php" hash="e28fbfb7516e27bb792d7b3fba8c8853"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="KCO"><file name="dropdown.png" hash="a408e177ff3130bdb4bb491935700df4"/><file name="kco.css" hash="293485490a353852b62c2ede827da28b"/><file name="klarna_simplifying.png" hash="280abffdadbbd0d372a8505c4c83a9e8"/><file name="loader.gif" hash="5e51d58f5d9bd09ab814d9ca9347d3b9"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Avenla_KlarnaCheckout.xml" hash="22b47fd5cc2c12370457a51ffff752d6"/></dir></target><target name="magelocale"><dir name="fi_FI"><file name="Avenla_KlarnaCheckout.csv" hash="0d44f78f6c9495701e380cb0ffc9b972"/></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.2.16</min><max>6.0.0</max></php></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Avenla_KlarnaCheckout</name>
4
+ <version>1.0.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://productdownloads.avenla.com/magento-modules/klarna-checkout/">Custom license by Avenla Oy</license>
7
  <channel>community</channel>
13
  </description>
14
  <notes>Klarna Checkout module</notes>
15
  <authors><author><name>Avenla Oy</name><user>Avenla</user><email>info@avenla.fi</email></author></authors>
16
+ <date>2014-11-26</date>
17
+ <time>14:22:38</time>
18
+ <contents><target name="magecommunity"><dir name="Avenla"><dir name="KlarnaCheckout"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Field"><file name="Pclass.php" hash="85f4411a44787934e4a4c0a7873cc7a2"/></dir><dir name="Fieldset"><file name="Info.php" hash="a7fd2dde41ccfe8477267a45be3abf5a"/></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><file name="Price.php" hash="15be72dbe2723bb2d72c6977abd4d8a7"/></dir></dir><dir name="KCO"><file name="Confirmation.php" hash="57515baadc5229ac55654913b88e6d28"/><file name="Info.php" hash="2af961abb2eb0609b84f8da5281332ad"/><file name="Newsletter.php" hash="8d02745a2c814101ae61b2bf00e8901e"/></dir><file name="KCO.php" hash="1abf22f4408a872572c1f8babed730d6"/><dir name="Widgets"><file name="Logo.php" hash="cddd29b3e350d1639db3808a83ad80e8"/><file name="Methods.php" hash="05cf4a02e055559dc591124bfd95d836"/></dir></dir><dir name="Helper"><file name="Api.php" hash="40f14b72afdcf758b97b564ebe27d0c6"/><file name="Data.php" hash="a5591fd65aa1358570421b4aba6c93c6"/></dir><dir name="Model"><file name="Api.php" hash="016856fd21d1b0e414b34e20e4f436ff"/><file name="Config.php" hash="b1f9e72a16bbe14b7969dfb8f421ac53"/><file name="KCO.php" hash="7bf03d404dad46a5f30631c95addb2fc"/><file name="Newsletter.php" hash="9696df5adee53302fba4d614656350f2"/><file name="Observer.php" hash="032c1dc5216c5da585e82b797948dc71"/><file name="Order.php" hash="5fb07853594f239adea667cd1e531b08"/><dir name="Source"><file name="AnalyticsType.php" hash="ad52d555ff3cd3cd18e760b2d7ac242a"/><file name="Countries.php" hash="0440b3ecc5528cf42dbb937eb7d9c0cb"/><file name="Kcolayout.php" hash="9ece6e53ebb4e39e3c1d4d534d71cb27"/><file name="Orderlocale.php" hash="a88769cf211991c70a0f51185bc53fb0"/><file name="Pplayout.php" hash="455484dbea2ff0770aa17e42851b81a6"/><file name="Ppwidget.php" hash="4e1de2ee86a2f5bf5100e211bc01b8f2"/><file name="Servermode.php" hash="df4420b3831b1a1e1ec04daa53711a4d"/><file name="Shippingmethods.php" hash="fecb931e29be4ae008c678cc1d760a02"/><file name="Taxclass.php" hash="c770ce5721c820c27895580e4d2de4b1"/></dir><file name="Validator.php" hash="cb8148baee0988c4a59eb6d9c5b1989d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="KCOController.php" hash="f7c15ba5e99541a2e5d9693ad6325c7b"/></dir><file name="CartController.php" hash="891403418045004e6c047c0173dc7c6a"/><file name="KCOController.php" hash="9d2d4a2ce1af74c8f57eedd89c5cb67e"/></dir><dir name="etc"><file name="config.xml" hash="2ecf301e23f37c08a29a8be2066872bd"/><file name="system.xml" hash="25a701bb6c6a956b453b0d7c31e90f2f"/><file name="widget.xml" hash="3dbffcaef836b334f5e7c1c675738275"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="KCO"><file name="info.phtml" hash="92048d26b2b4f751e4c83ddddab89448"/><dir name="system"><dir name="config"><dir name="field"><file name="pclass.phtml" hash="8566542d14d0dce48dc6aabaf5181007"/></dir><dir name="fieldset"><file name="info.phtml" hash="36a21983fcc4816b7c8a6b8fe9f2e78c"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="KCO"><file name="KCO.phtml" hash="c71d63a2599d086c0937cbd23426d20b"/><dir name="cart"><file name="crosssell.phtml" hash="e7f78cb99e14ab680b794524b8666812"/><file name="giftmessage.phtml" hash="4cb99583d6ce811a3a576a6e20ff0f99"/><dir name="item"><file name="default.phtml" hash="9190b3fad2f2ed57ea2ffbed2e1faa02"/></dir><file name="shipping.phtml" hash="b940c98adec4e3fd455ffc04094a1a4f"/></dir><file name="cart.phtml" hash="4d0d54548f1a20ed359f8e517767d233"/><file name="cart_twocolumns.phtml" hash="6e296c790b5c3a96cdb313ee4829b977"/><dir name="catalog"><dir name="product"><file name="price.phtml" hash="8f32fd038bed9521f6f576d736408ca9"/></dir></dir><file name="info.phtml" hash="a87d8ee70c92a10445fa864a63d042ba"/><file name="link.phtml" hash="d2c3dac8b2cde4b52854019e990b3b11"/><file name="newsletter.phtml" hash="87c3730ed525d3810a5df0a9180bf993"/><dir name="onepage"><file name="link.phtml" hash="a05ab2ebf5f0ed225c2f3967e2bceced"/></dir><dir name="widget"><file name="methods.phtml" hash="7415fafbd8f2acf134c4ac81c30f4bd4"/></dir></dir></dir><dir name="layout"><file name="KCO.xml" hash="63e485d105bbe6c6969fe85e336deea9"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Klarna"><file name="Country.php" hash="40360c3964fc6193e7fb922845eb419b"/><file name="Currency.php" hash="a709407428d86521cc0775cbeb281523"/><file name="Encoding.php" hash="f8f8e744303ff7ce7f4b226331e7bdcf"/><file name="Exceptions.php" hash="933b2811e910da817743766cdde8ffeb"/><file name="Flags.php" hash="b407a1373adf5f172bef3e3d01e81cdb"/><file name="Klarna.php" hash="c92501977a6fc642715045a49e29b50a"/><file name="Language.php" hash="8e40aed0dece8f0a3fbe07e37451af16"/><dir name="checkout"><file name="checkouthtml.intf.php" hash="81e0740254585f2af67895df28093d35"/><file name="threatmetrix.class.php" hash="6ce1bfded90b6b3bb329176ff4c7acac"/></dir><dir name="examples"><file name="activate.php" hash="85a84a8eaeec830949551dfd98fe0236"/><file name="activateInvoice.php" hash="cfac2ed57d0c79679fb35ca723eaffab"/><file name="activatePart.php" hash="b46475c2d9f5b326ff2cd65586a1de6e"/><file name="activateReservation.php" hash="bd9b0e5717eaa32ebf6b5d31ad66e5d4"/><file name="addTransaction.php" hash="6426b7965de733bb17ddc7f74ee3949f"/><file name="calc_monthly_cost.php" hash="30e78c4d40db82643396f9289749a898"/><file name="cancelReservation.php" hash="ae8d00e19c671f6cfe8454a5bb590ab1"/><file name="changeReservation.php" hash="43d9486d29326a8c33a4fda466612149"/><file name="checkOrderStatus.php" hash="bef76f120b3e486790d78b50f4101701"/><file name="creditInvoice.php" hash="8edca171c9f7be2a3c15b23ff166048e"/><file name="creditPart.php" hash="5497b9307da7cccadbf4a6c0dc943876"/><file name="deleteInvoice.php" hash="6d2a6e53c64e7a1aacb79c775a46da5b"/><file name="emailInvoice.php" hash="764fbd5fab4f52dacd767a3f7ac17234"/><file name="fetchPClasses.php" hash="aac08dc4d9cfece6ac9e9a9c4e7b20cc"/><file name="getAddresses.php" hash="ebd79224ea702c92e99a407a53d42da0"/><file name="getPClasses.php" hash="8e444c98a7c63b82512af1f4ce35ac65"/><file name="invoiceAddress.php" hash="97475403b1db4264c0add60930380434"/><file name="invoiceAmount.php" hash="2f5dc326549b179cf99c27518b715e88"/><file name="invoicePartAmount.php" hash="87bf68e855bfdd4f6ba3547091104c97"/><file name="reserveAmount.php" hash="1a97ef5c39f5a2c6d97660504cbbfa10"/><file name="reserveOCR.php" hash="9349b5ea9807060cba4b5f3fcd14369f"/><file name="returnAmount.php" hash="02caca4d76b6d055d504023c770961a4"/><file name="sendInvoice.php" hash="9139eef562746840d09f9d9d5a465c21"/><file name="splitReservation.php" hash="0e09421de645d97c3b74485d51edacfd"/><file name="update.php" hash="3e3561165f4c6727731afe451b0f87d6"/><file name="updateChargeAmount.php" hash="34de26a7f6a089bdb18f67eae1f903c7"/><file name="updateGoodsQty.php" hash="e4f9ee36f56b47924ba35cda500cf13e"/><file name="updateOrderNo.php" hash="cdd594a386072f7bffbf05d2ecdcb9b7"/></dir><file name="klarnaaddr.php" hash="b090d4b0a819fdb7cc58815a8643de18"/><file name="klarnacalc.php" hash="3ab728bf3889240b881f282122fd25fd"/><file name="klarnaconfig.php" hash="a3a4011dccda60fcf3567f56254699ff"/><file name="klarnapclass.php" hash="26a8fd1df0806788f6719cb894787f76"/><dir name="pclasses"><file name="jsonstorage.class.php" hash="e59e526d9dcc17d1ca92ded188750672"/><file name="mysqlstorage.class.php" hash="896a5cd4edf461ef517e0bb2e328707b"/><file name="sqlstorage.class.php" hash="bb7ba4359e7e69424c9f0ecdafc0c9ae"/><file name="storage.intf.php" hash="26db57484b6db3d717c0150ffaa87b19"/><file name="xmlstorage.class.php" hash="4f13939bf8d73f2724f858dd17f219de"/></dir><dir name="transport"><dir name="xmlrpc-3.0.0.beta"><dir name="lib"><file name="xmlrpc.inc" hash="5a74ea2a831648febc9b2c8f809b252c"/><file name="xmlrpc_wrappers.inc" hash="5aa00141ead09fc5498d9a3c9fcab888"/><file name="xmlrpcs.inc" hash="158b97bda79333e9b40793d876b6e98f"/></dir></dir></dir></dir><dir name="KlarnaCheckout"><dir name="Checkout"><file name="BasicConnector.php" hash="e15b4e83aa79afa7c98dbbfb865d7a7a"/><file name="ConnectionErrorException.php" hash="e07a9ccb71869c98036b085b146171fa"/><file name="Connector.php" hash="5378924b60a858f14a41882a8c90c6bc"/><file name="ConnectorException.php" hash="b4304fc99da372305dc4ad40e849a4a9"/><file name="ConnectorInterface.php" hash="f7e0c91db42f54cc4a9858cc1ef47e1a"/><file name="Digest.php" hash="28bde4dc8443bbcc5ad7d04ea9d9c5eb"/><file name="Exception.php" hash="43b4516fe4fe5aa98e1f9b382f504ab7"/><dir name="HTTP"><file name="CURLFactory.php" hash="7fa2aecea60eaf467b1965d2335935d9"/><file name="CURLHandle.php" hash="0b7d459eec95a0f17f420d0493e828bc"/><file name="CURLHandleInterface.php" hash="ddcf0889e242f1f15e6df047386e8403"/><file name="CURLHeaders.php" hash="0807a7b2e579490e08576b4d30f1d1d8"/><file name="CURLTransport.php" hash="a50ed245e0246b6ecc27042bd457bb86"/><file name="Request.php" hash="d7718e7e503a8b4c355aff2b31d0c174"/><file name="Response.php" hash="6be76eb703d424b77e9ea1b37f4825f2"/><file name="Transport.php" hash="c8dd8f3560c310dc78b84bfa057419b5"/><file name="TransportInterface.php" hash="8395efa365907d216633370d79d5380b"/></dir><file name="Order.php" hash="29309d953e7b3b3ae411a6ee913410d9"/><file name="ResourceInterface.php" hash="93a56d28ccf5a29010fb33f15d53ae32"/><file name="UserAgent.php" hash="0db2436a6910824bc6d216cfb97887cc"/></dir><file name="Checkout.php" hash="e28fbfb7516e27bb792d7b3fba8c8853"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="KCO"><file name="dropdown.png" hash="a408e177ff3130bdb4bb491935700df4"/><file name="kco.css" hash="293485490a353852b62c2ede827da28b"/><file name="klarna_simplifying.png" hash="280abffdadbbd0d372a8505c4c83a9e8"/><file name="loader.gif" hash="5e51d58f5d9bd09ab814d9ca9347d3b9"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Avenla_KlarnaCheckout.xml" hash="22b47fd5cc2c12370457a51ffff752d6"/></dir></target><target name="magelocale"><dir name="fi_FI"><file name="Avenla_KlarnaCheckout.csv" hash="8b3ae036b3a3b31c211d10504b92e845"/></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.2.16</min><max>6.0.0</max></php></required></dependencies>
21
  </package>