<?xml version="1.0" encoding="UTF-8" ?>
<extension version="2.5" type="plugin" group="vmpayment" method="upgrade">
    <name>Klarna</name>
    <creationDate>September 20 2016</creationDate>
    <author>The VirtueMart Development Team</author>
    <authorUrl>http://www.virtuemart.net</authorUrl>
    <copyright>Copyright (C) 2004 - 2016 Virtuemart Team. All rights reserved.</copyright>
    <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
    <version>3.0.18</version>
    <description>Klarna VirtueMart Payment Plugin</description>
    <languages>
        <language tag="en-GB">language/en-GB/en-GB.plg_vmpayment_klarna.ini</language>
    </languages>
    <files>
        <filename plugin="klarna">klarna.php</filename>
        <folder>klarna</folder>
        <folder>language</folder>
    </files>
    <vmconfig>
        <fields name="params">

            <fieldset name="basic" addfieldpath="/plugins/vmpayment/klarna/klarna/fields">

                <field type="spacer" default="VMPAYMENT_KLARNA_CONF_PAYMENT_TITLE" level="level1"/>
                <field type="klarnalogo" level="level1"/>
                <field type="vmcurl"/>
                <field type="vmtitle"  description="VMPAYMENT_KLARNA_PHP_WARNING"/>

                <field type="getklarna" level="level1"/>

                <field type="klarnacountrylogo" default="SV" level="level1"/>
                <field name="klarna_active_swe" type="radio" default="0" label="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY"
                       description="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY_DESC">
                    <option value="0">COM_VIRTUEMART_NO</option>
                    <option value="1">COM_VIRTUEMART_YES</option>
                </field>
                <field name="klarna_merchantid_swe" type="text" default="" label="VMPAYMENT_KLARNA_CONF_MERCHANT_ID"
                       description="VMPAYMENT_KLARNA_CONF_MERCHANT_ID_DESC"/>
                <field name="klarna_sharedsecret_swe" type="text" default="" label="VMPAYMENT_KLARNA_CONF_SHARED_SECRET"
                       description="VMPAYMENT_KLARNA_CONF_SHARED_SECRET_DESC"/>
                <field name="klarna_payments_swe" type="list" multiple="multiple" default=""
                       label="VMPAYMENT_KLARNA_CONF_PAYMENTS" description="VMPAYMENT_KLARNA_CONF_PAYMENTS_DESC">
                    <option value="invoice">VMPAYMENT_KLARNA_CONF_PAYMENTS_INVOICE</option>
                    <option value="part">VMPAYMENT_KLARNA_CONF_PAYMENTS_PART</option>
                </field>
                <field name="klarna_invoicefee_swe" type="text" label="VMPAYMENT_KLARNA_CONF_INVOICE_FEE"
                       description="VMPAYMENT_KLARNA_CONF_INVOICE_FEE_DESC"/>
                <field name="klarna_invoice_tax_id_swe" type="vmtaxes" scope="com_virtuemart"
                       label="VMPAYMENT_KLARNA_CONF_INVOICE_TAX" description="VMPAYMENT_KLARNA_CONF_INVOICE_TAX_DESC"/>
                <field name="klarna_min_amount_part_swe" type="text" label="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART"
                       description="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART_DESC"/>

                <field type="klarnacountrylogo" default="NO" level="level1"/>
                <field name="klarna_active_nor" type="radio" default="0" label="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY"
                       description="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY_DESC">
                    <option value="0">COM_VIRTUEMART_NO</option>
                    <option value="1">COM_VIRTUEMART_YES</option>
                </field>
                <field name="klarna_merchantid_nor" type="text" default="" label="VMPAYMENT_KLARNA_CONF_MERCHANT_ID"
                       description="VMPAYMENT_KLARNA_CONF_MERCHANT_ID_DESC"/>
                <field name="klarna_sharedsecret_nor" type="text" default="" label="VMPAYMENT_KLARNA_CONF_SHARED_SECRET"
                       description="VMPAYMENT_KLARNA_CONF_SHARED_SECRET_DESC"/>
                <field name="klarna_payments_nor" type="list" multiple="multiple" default=""
                       label="VMPAYMENT_KLARNA_CONF_PAYMENTS" description="VMPAYMENT_KLARNA_CONF_PAYMENTS_DESC">
                    <option value="invoice">VMPAYMENT_KLARNA_CONF_PAYMENTS_INVOICE</option>
                    <option value="part">VMPAYMENT_KLARNA_CONF_PAYMENTS_PART</option>
                </field>
                <field name="klarna_invoicefee_nor" type="text" label="VMPAYMENT_KLARNA_CONF_INVOICE_FEE"
                       description="VMPAYMENT_KLARNA_CONF_INVOICE_FEE_DESC"/>
                <field name="klarna_invoice_tax_id_nor" type="vmtaxes" scope="com_virtuemart"
                       label="VMPAYMENT_KLARNA_CONF_INVOICE_TAX" description="VMPAYMENT_KLARNA_CONF_INVOICE_TAX_DESC"/>
                <field name="klarna_min_amount_part_nor" type="text" label="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART"
                       description="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART_DESC"/>

                <field type="klarnacountrylogo" default="DA" level="level1"/>
                <field name="klarna_active_dnk" type="radio" default="0" label="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY"
                       description="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY_DESC">
                    <option value="0">COM_VIRTUEMART_NO</option>
                    <option value="1">COM_VIRTUEMART_YES</option>
                </field>
                <field name="klarna_merchantid_dnk" type="text" default="" label="VMPAYMENT_KLARNA_CONF_MERCHANT_ID"
                       description="VMPAYMENT_KLARNA_CONF_MERCHANT_ID_DESC"/>
                <field name="klarna_sharedsecret_dnk" type="text" default="" label="VMPAYMENT_KLARNA_CONF_SHARED_SECRET"
                       description="VMPAYMENT_KLARNA_CONF_SHARED_SECRET_DESC"/>
                <field name="klarna_payments_dnk" type="list" multiple="multiple" default=""
                       label="VMPAYMENT_KLARNA_CONF_PAYMENTS" description="VMPAYMENT_KLARNA_CONF_PAYMENTS_DESC">
                    <option value="invoice">VMPAYMENT_KLARNA_CONF_PAYMENTS_INVOICE</option>
                    <option value="part">VMPAYMENT_KLARNA_CONF_PAYMENTS_PART</option>
                </field>
                <field name="klarna_invoicefee_dnk" type="text" label="VMPAYMENT_KLARNA_CONF_INVOICE_FEE"
                       description="VMPAYMENT_KLARNA_CONF_INVOICE_FEE_DESC"/>
                <field name="klarna_invoice_tax_id_dnk" type="vmtaxes" scope="com_virtuemart"
                       label="VMPAYMENT_KLARNA_CONF_INVOICE_TAX" description="VMPAYMENT_KLARNA_CONF_INVOICE_TAX_DESC"/>
                <field name="klarna_min_amount_part_dnk" type="text" label="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART"
                       description="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART_DESC"/>

                <field type="klarnacountrylogo" default="FI" level="level1"/>
                <field name="klarna_active_fin" type="radio" default="0" label="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY"
                       description="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY_DESC">
                    <option value="0">COM_VIRTUEMART_NO</option>
                    <option value="1">COM_VIRTUEMART_YES</option>
                </field>
                <field name="klarna_merchantid_fin" type="text" default="" label="VMPAYMENT_KLARNA_CONF_MERCHANT_ID"
                       description="VMPAYMENT_KLARNA_CONF_MERCHANT_ID"/>
                <field name="klarna_sharedsecret_fin" type="text" default="" label="VMPAYMENT_KLARNA_CONF_SHARED_SECRET"
                       description="VMPAYMENT_KLARNA_CONF_SHARED_SECRET"/>
                <field name="klarna_payments_fin" type="list" multiple="multiple" default=""
                       label="VMPAYMENT_KLARNA_CONF_PAYMENTS" description="VMPAYMENT_KLARNA_CONF_PAYMENTS_DESC">
                    <option value="invoice">VMPAYMENT_KLARNA_CONF_PAYMENTS_INVOICE</option>
                    <option value="part">VMPAYMENT_KLARNA_CONF_PAYMENTS_PART</option>
                </field>
                <field name="klarna_invoicefee_fin" type="text" label="VMPAYMENT_KLARNA_CONF_INVOICE_FEE"
                       description="VMPAYMENT_KLARNA_CONF_INVOICE_FEE"/>
                <field name="klarna_invoice_tax_id_fin" type="vmtaxes" scope="com_virtuemart"
                       label="VMPAYMENT_KLARNA_CONF_INVOICE_TAX" description="VMPAYMENT_KLARNA_CONF_INVOICE_TAX_DESC"/>
                <field name="klarna_min_amount_part_fin" type="text" label="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART"
                       description="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART_DESC"/>

                <field type="klarnacountrylogo" default="DE" level="level1"/>
                <field name="klarna_active_deu" type="radio" default="0" label="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY"
                       description="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY_DESC">
                    <option value="0">COM_VIRTUEMART_NO</option>
                    <option value="1">COM_VIRTUEMART_YES</option>
                </field>
                <field name="klarna_merchantid_deu" type="text" default="" label="VMPAYMENT_KLARNA_CONF_MERCHANT_ID"
                       description="VMPAYMENT_KLARNA_CONF_MERCHANT_ID_DESC"/>
                <field name="klarna_sharedsecret_deu" type="text" default="" label="VMPAYMENT_KLARNA_CONF_SHARED_SECRET"
                       description="VMPAYMENT_KLARNA_CONF_SHARED_SECRET_DESC"/>
                <field name="klarna_payments_deu" type="list" multiple="multiple" default=""
                       label="VMPAYMENT_KLARNA_CONF_PAYMENTS" description="VMPAYMENT_KLARNA_CONF_PAYMENTS_DESC">
                    <option value="invoice">VMPAYMENT_KLARNA_CONF_PAYMENTS_INVOICE</option>
                    <option value="part">VMPAYMENT_KLARNA_CONF_PAYMENTS_PART</option>
                </field>
                <field name="klarna_invoicefee_deu" type="text" label="VMPAYMENT_KLARNA_CONF_INVOICE_FEE"
                       description="VMPAYMENT_KLARNA_CONF_INVOICE_FEE_DESC"/>
                <field name="klarna_invoice_tax_id_deu" type="vmtaxes" scope="com_virtuemart"
                       label="VMPAYMENT_KLARNA_CONF_INVOICE_TAX" description="VMPAYMENT_KLARNA_CONF_INVOICE_TAX_DESC"/>
                <field name="klarna_min_amount_part_deu" type="text" label="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART"
                       description="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART_DESC"/>

                <field type="klarnacountrylogo" default="NL" level="level1"/>
                <field name="klarna_active_nld" type="radio" default="0" label="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY"
                       description="VMPAYMENT_KLARNA_CONF_ACTIVE_COUNTRY_DESC">
                    <option value="0">COM_VIRTUEMART_NO</option>
                    <option value="1">COM_VIRTUEMART_YES</option>
                </field>
                <field name="klarna_merchantid_nld" type="text" default="" label="VMPAYMENT_KLARNA_CONF_MERCHANT_ID"
                       description="VMPAYMENT_KLARNA_CONF_MERCHANT_ID_DESC"/>
                <field name="klarna_sharedsecret_nld" type="text" default="" label="VMPAYMENT_KLARNA_CONF_SHARED_SECRET"
                       description="VMPAYMENT_KLARNA_CONF_SHARED_SECRET_DESC"/>
                <field name="klarna_payments_nld" type="list" multiple="multiple" default=""
                       label="VMPAYMENT_KLARNA_CONF_PAYMENTS" description="VMPAYMENT_KLARNA_CONF_PAYMENTS_DESC">
                    <option value="invoice">VMPAYMENT_KLARNA_CONF_PAYMENTS_INVOICE</option>
                    <option value="part">VMPAYMENT_KLARNA_CONF_PAYMENTS_PART</option>
                </field>
                <field name="klarna_invoicefee_nld" type="text" label="VMPAYMENT_KLARNA_CONF_INVOICE_FEE"
                       description="VMPAYMENT_KLARNA_CONF_INVOICE_FEE_DESC"/>
                <field name="klarna_invoice_tax_id_nld" type="vmtaxes" scope="com_virtuemart"
                       label="VMPAYMENT_KLARNA_CONF_INVOICE_TAX" description="VMPAYMENT_KLARNA_CONF_INVOICE_TAX_DESC"/>
                <field name="klarna_min_amount_part_nld" type="text" label="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART"
                       description="VMPAYMENT_KLARNA_CONF_MINIMUM_AMOUNT_PART_DESC"/>

                <field type="spacer" default="" level="level1"/>
                <field type="spacer" default="" level="level1"/>
                <field type="spacer" default="VMPAYMENT_KLARNA_CONF_PAYMENT_PAGE" level="level1"/>

                <field name="status_pending" type="vmorderstate" scope="com_virtuemart" default="U"
                       label="VMPAYMENT_KLARNA_CONF_STATUS_PENDING"
                       description="VMPAYMENT_KLARNA_CONF_STATUS_PENDING_DESC"/>
                <field name="status_success" type="vmorderstate" scope="com_virtuemart" default="C"
                       label="VMPAYMENT_KLARNA_CONF_STATUS_SUCCESS"
                       description="VMPAYMENT_KLARNA_CONF_STATUS_SUCCESS_DESC"/>


                <field name="status_shipped" type="vmorderstate" scope="com_virtuemart" default="S"
                       label="VMPAYMENT_KLARNA_CONF_STATUS_SHIPPED"
                       description="VMPAYMENT_KLARNA_CONF_STATUS_SHIPPED_DESC"/>
                <field name="delete_order" type="radio" default="1" label="VMPAYMENT_KLARNA_CONF_DELETE_ORDER_DENIED"
                       description="VMPAYMENT_KLARNA_CONF_DELETE_ORDER_DENIED_DESC">
                    <option value="0">COM_VIRTUEMART_NO</option>
                    <option value="1">COM_VIRTUEMART_YES</option>
                </field>
                <field name="status_denied" type="vmorderstate" scope="com_virtuemart" default="X"
                       label="VMPAYMENT_KLARNA_CONF_STATUS_DENIED"
                       description="VMPAYMENT_KLARNA_CONF_STATUS_DENIED_DESC"/>

                <field name="send_invoice" type="radio" default="1" label="VMPAYMENT_KLARNA_CONF_EMAIL_INVOICE"
                       description
                               ="VMPAYMENT_KLARNA_CONF_EMAIL_INVOICE_DESC">
                    <option value="0">COM_VIRTUEMART_NO</option>
                    <option value="1">COM_VIRTUEMART_YES</option>
                </field>
                <!--param name="delay_invoice" type="delay_invoice" scope="com_virtuemart" default="S" label="VMPAYMENT_KLARNA_CONF_DELAY_INVOICE" description="VMPAYMENT_KLARNA_CONF_DELAY_INVOICE_DESC" /-->
                <!--param name="module version" type="klarnamoduleversion"  /-->


                <!-- param name="klarna_pc_type" type="text" default="json" label="VMPAYMENT_KLARNA_CONF_PC_TYPE" description="VMPAYMENT_KLARNA_CONF_PC_TYPE_DESC" />
                    <field name="KlarnaHandler::getKlarna_pc_type()" type="text"   size="80"  default="" label="VMPAYMENT_KLARNA_CONF_PC_URI" description="VMPAYMENT_KLARNA_CONF_PC_URI_DESC" / -->
                <!--param name="klarna_pclasses" type="klarnapclasses"   default="" label="VMPAYMENT_KLARNA_CONF_PCLASSES"
                description="VMPAYMENT_KLARNA_CONF_PCLASSES_DESC" / -->

                <!-- param name="debug" type="radio" default="0" label="VMPAYMENT_KLARNA_CONF_DEBUG" description="VMPAYMENT_KLARNA_CONF_DEBUG_DESC" >
                        <option value="0">COM_VIRTUEMART_NO</option>
                        <option value="1">COM_VIRTUEMART_YES</option>
                    </field -->
            </fieldset>
        </fields>
    </vmconfig>

    <updateservers>
        <!-- Note: No spaces or linebreaks allowed between the server tags -->
        <server type="extension" name="VirtueMart plg_vmpayment_klarna Update Site"><![CDATA[http://virtuemart.net/releases/vm3/plg_vmpayment_klarna_update.xml]]></server>
    </updateservers>

</extension>
