From cb871649c794fe6373ed7e0ba6ed8120842e59b1 Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Fri, 21 Apr 2017 16:26:59 +0300 Subject: [PATCH] 0.3.4 --- Button.php | 21 +++++++++++++++++---- composer.json | 4 ++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Button.php b/Button.php index 09f0cca..4c69fe6 100644 --- a/Button.php +++ b/Button.php @@ -37,8 +37,21 @@ function getAlias() {return __CLASS__;} * @used-by \Magento\Framework\View\Element\AbstractBlock::toHtml() * @return string */ - final protected function _toHtml() {return df_tag('a', - ['class' => 'dfe-klarna-button'] + df_widget($this, 'button', []) - ,'Check out with Klarna' - ) . df_link_inline(df_asset_name('button', $this, 'css'));} + final protected function _toHtml() {return df_cc_n( + /*df_tag('a', + ['class' => 'dfe-klarna-button'] + df_widget($this, 'button', []) + ,'Check out with Klarna' + ) */ + df_div([ + 'class' => 'klarna-widget klarna-part-payment' + ,'data-eid' => dfps($this)->merchantID() + ,'data-locale' => 'sv_se' + ,'data-price' => '1201.34' + ,'data-layout' => 'pale-v2' + ,'data-invoice-fee' => '0.95' + ,'style' => 'width:210px; height:80px' + ]) + ,df_link_inline(df_asset_name('button', $this, 'css')) + ,df_js_inline_r('https://cdn.klarna.com/1.0/code/client/all.js') + );} } \ No newline at end of file diff --git a/composer.json b/composer.json index 13b8bf8..580019f 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/klarna" - ,"version": "0.3.3" + ,"version": "0.3.4" ,"description": "The «Klarna» payment extension for Magento 2." ,"type": "magento2-module" ,"homepage": "https://mage2.pro/c/extensions/klarna" @@ -11,7 +11,7 @@ "homepage": "https://mage2.pro/users/dmitry_fedyuk", "role": "Developer" }] - ,"require": {"klarna/checkout": "*", "mage2pro/core": ">=2.5.14", "mage2pro/klarna-sdk-v3": "^2.2.3"} + ,"require": {"klarna/checkout": "*", "mage2pro/core": ">=2.5.15", "mage2pro/klarna-sdk-v3": "^2.2.3"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Klarna\\": ""}} ,"keywords": [ "API"