VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Coding Central => Topic started by: Swiftblade19 on January 16, 2015, 14:30:06 PM

Title: VMconfig field values for payment configuration empty
Post by: Swiftblade19 on January 16, 2015, 14:30:06 PM
Greetings,

i have a specefic problem with my payment plugin on VM3. What i want to achieve is getting my configuration of plugin to show current values which are written in database. Previous version of VM up to 2.6 showed these values from db but on VM3 its not really working. Under i will specify my code from xml manifest file.

<?xml version="1.0" encoding="UTF-8" ?>
<extension method="upgrade" version="3.0" type="plugin" group="vmpayment">
    <name>vmPaymentSporoPay</name>
    <creationDate>September 2013</creationDate>
     <copyright>Copyright (C) 2005-2013 holdysoftware. All rights reserved.</copyright>
<author>Team holdysoftware</author>
    <license>http://ec.europa.eu/idabc/eupl.html</license>
    <authorUrl>http://www.holdysoftware.sk</authorUrl>
    <version>1.0.4</version>
     <description>
<![CDATA[
<span style="color: #008000;"><strong>Sporopay platobný plugin pre VirtueMart 3.0.x, Joomla! 3.0.x</strong></span>
<div style="font-weight: normal">
<p><span style="color: #ff6600;"><strong>Základné informácie</strong></span></p>
<ol  style='clear:both'>
<li>SporoPay je produktom Slovenskej Sporiteľne, vďaka ktorému môžu klienti, ktorí majú svoj bankový účet v Slovenskej Sporiteľni uhradiť cenu nákupu v E-SHOPe bankovým prevodom na účet obchodníka, ktorý má rovnako, ako jeho klient účet v Slovenskej Sporiteľni.</li>
<li>Platobný plugin zabezpečuje prenos platobných informácií objednávky z VirtueMartu na platobnú bránu Slovenskej Sporiteľne.</li>
<li>Plugin je potrebné po nainštalovaní aktivovať v časti Rozšírenia - Správca zásuvných modulov - VM Payment Sporopay.</li>
<li>V administrácii VirtueMart otvorte kartu so spôsobmi platby a vytvorte nový spôsob platby (pre Slovenskú Sporiteľňu).</li>
<li>Vyplňte všetky údaje potrebné pre správne fungovanie platobného pluginu.</li>
<li>Plugin je následne pripravený na produktívnu prevádzku.</li>
<li>Verzia Sporopay: 1.0.4</li>
<li>Verzia VirtueMart: 2.0.x</li>
</ol>
<p><strong><span style="color: #ff0000;">Aktualizácie Sporopay</span><br /></strong></p>
<ol>
<li>Môžete si nainštalovať novú verziu priamo cez toto rozhranie. Odinštalácia pôvodného pluginu nie je potrebná. Odporúčame však pre aktualizáciou na novšiu verziu tú povodnú zálohovať.</li>
</ol>
<p><span style="color: #008000;"><strong>Podpora</strong></span></p>
<ul><li><a target="_blank" href="http://www.holdysoftware.sk/documentation_support/sporopay.pdf">Nápoveda</a></li>
<li><a target='_blank' href='http://www.holdysoftware.sk/documentation_support/plg_virtuemart_sporopay.xml'>Aktualizácie &amp; Sporopay</a></li></ul>
<p>Copyright 2005 - 2013 <a href="http://www.holdysoftware.sk/" title="Navštívte holdysoftware.sk!">holdysoftware.sk</a>.</p>
</div>
]]>
</description>
<files>
<filename plugin="sporopay">sporopay.php</filename>
<filename plugin="sporopay">EPayment.interfaces.php</filename>
<filename plugin="sporopay">EPayment3DesSignedMessage.class.php</filename>
<filename plugin="sporopay">EPaymentDesSignedMessage.class.php</filename>
<filename plugin="sporopay">EPaymentHmacSignedMessage.class.php</filename>
<filename plugin="sporopay">EPaymentMessage.class.php</filename>
<filename plugin="sporopay">ISO4217Currency.class.php</filename>
<filename plugin="sporopay">SporoPayPaymentHttpResponse.class.php</filename>
<filename plugin="sporopay">SporoPayPaymentRequest.class.php</filename>
<filename plugin="sporopay">sporo_pay.php</filename>
<folder>logo</folder>
</files>
<languages>
<language tag="sk-SK">sk-SK.plg_vmpayment_sporopay.ini</language>
<language tag="en-GB">en-GB.plg_vmpayment_sporopay.ini</language>
    </languages>
<scriptfile>script.php</scriptfile>
<config>
<fields name="params">
  <fieldset name="sporopay" addpath="/administrator/components/com_virtuemart/elements">
<field type="vmjpluginwarning" />
<field name="payment_logos" type="vmfiles" label="VMPAYMENT_SPOROPAY_LOGOS"
description="VMPAYMENT_SPOROPAY_LOGOS_DESC"
directory="/images/stories/virtuemart/payment"
default="default" hide_default="1" hide_none="1"
stripext="0"   exclude="^_" />
<field name="predcislie_sporopay" type="text" default="000000" label="VMPAYMENT_SPOROPAY_PREDCISLIE" description="VMPAYMENT_SPOROPAY_PREDCISLIE_DESC" />
<field name="ucet_sporopay" type="text" default="000000" label="VMPAYMENT_SPOROPAY_UCET" description="VMPAYMENT_SPOROPAY_UCET_DESC" />
<field name="key_sporopay" type="text" default="" label="VMPAYMENT_SPOROPAY_KEY" description="VMPAYMENT_SPOROPAY_KEY_DESC" />
<field name="countries" type="vmcountries"  scope="com_virtuemart" default="" label="VMPAYMENT_SPOROPAY_COUNTRIES" description="VMPAYMENT_SPOROPAY_COUNTRIES_DESC"/>
<field name="min_amount" type="text"  label="VMPAYMENT_SPOROPAY_MIN_AMOUNT" description="VMPAYMENT_SPOROPAY_MIN_AMOUNT_EXPLAIN" />
<field name="max_amount" type="text"  label="VMPAYMENT_SPOROPAY_MAX_AMOUNT" description="VMPAYMENT_SPOROPAY_MAX_AMOUNT_EXPLAIN" />
<field name="cost_per_transaction" type="text"  label="VMPAYMENT_SPOROPAY_COST_PER_TRANSACTION" description="VMPAYMENT_SPOROPAY_COST_PER_TRANSACTION_EXPLAIN" />
<field name="cost_percent_total" type="text"  label="VMPAYMENT_SPOROPAY_COST_PERCENT_TOTAL" description="VMPAYMENT_SPOROPAY_COST_PERCENT_TOTAL_EXPLAIN" />
<field name="tax_id" type="vmtaxes" scope="com_virtuemart"  label="VMPAYMENT_SPOROPAY_TAX" description="VMPAYMENT_SPOROPAY_TAX_DESC" />
<field name="payment_info" type="textarea" cols="10" rows="10" default="Ďakujeme za realizáciu platby. Vašu objednávku vyexpedujeme čo možno v najkratšom čase." label="VMPAYMENT_SPOROPAY_PAYMENTINFO" description="VMPAYMENT_SPOROPAY_PAYMENTINFO_EXPLAIN" />
  <field name="developed_by" type="spacer" label="VMPAYMENT_SPOROPAY_DEVELOPED_BY" default="VM Payment plugin SporoPay created by: &lt;a href=&quot;http://holdysoftware.sk/&quot; target=&quot;_blank&quot;&gt;holdysoftware.sk&lt;/a&gt; "/>
<field name="contact_email"  type="spacer" label="VMPAYMENT_SPOROPAY_CONTACT_EMAIL" default="Devoleper e-mail: &lt;a href=&quot;mailto:support@holdysoftware.sk&quot;&gt;support@holdysoftware.sk&lt;/a&gt;"/>
<field name="contrib_version" type="spacer"  label="VMPAYMENT_SPOROPAY_CONTRIB_VERSION" default="Version SporoPay 1.0.4, for VirtueMart 2.0.x"/>
<field name="documentation" type="spacer" label="VMPAYMENT_SPOROPAY_DOC" default="&lt;a href=&quot;http://www.holdysoftware.sk/documentation_support/sporopay.pdf&quot; target=&quot;_blank&quot;&gt;Documentation&lt;/a&gt;"/>
  </fieldset>
  </fields>
  </config>
<updateservers>               
     <server type="extension" priority="1" name="VM Payment SporoPay Updates"><![CDATA[http://www.holdysoftware.sk/documentation_support/plg_virtuemart_sporopay.xml]]></server>
        </updateservers>
</extension>


Thanks in advance

Swift
Title: Re: VMconfig field values for payment configuration empty
Post by: GJC Web Design on January 16, 2015, 15:03:41 PM
have u added

function plgVmDeclarePluginParamsShipmentVM3 (&$data) {
      return $this->declarePluginParams ('shipment', $data);
   }

in the php file


<field type="vmjpluginwarning" /> not needed on VM3
Title: Re: VMconfig field values for payment configuration empty
Post by: Swiftblade19 on January 16, 2015, 15:13:24 PM
Am i supposed to add it in _constructor of plugin? Btw its not shipment plugin its payment.
Title: Re: VMconfig field values for payment configuration empty
Post by: Swiftblade19 on January 16, 2015, 15:17:22 PM
Sorry for dualpost

Case closed it fixed my problem.
Thanks a lot GJC Web Design
Title: Re: VMconfig field values for payment configuration empty
Post by: GJC Web Design on January 16, 2015, 16:36:44 PM
oops - yes

should be

function plgVmDeclarePluginParamsPaymentVM3( &$data) {
      return $this->declarePluginParams('payment', $data);
   }

just inside the class