Author Topic: Payment Gateway plugin won't show saved configs  (Read 730 times)

jfreak53

  • Beginner
  • *
  • Posts: 26
Payment Gateway plugin won't show saved configs
« on: December 04, 2015, 14:29:10 pm »
I have a payment gateway created for VirtueMart 3.0.x and Joomla 3.4. It works fine except for the configuration screen, the config screen saves just fine to the DB whatever data I enter into the fields. But it won't get those config options when I edit it. When I use the plugin to checkout it "does" grab the saved config fields. But again, when I edit it won't show those values. Always defaults to empty.

Code: [Select]
<?xml version="1.0" encoding="UTF-8" ?>
<extension version="2.5" type="plugin" group="vmpayment" method="upgrade">
    <name>Credomatic</name>
    <creationDate>-</creationDate>
    <author>-</author>
    <authorUrl>-</authorUrl>
    <copyright>-</copyright>
    <license>-</license>
    <version>3.0</version>
    <description>-</description>
    <files>
        <filename plugin="credomatic">credomatic.php</filename>
        <filename>index.html</filename>
    </files>

    <vmconfig>
        <fields name="params">
            <fieldset name="basic" addfieldpath="/plugins/vmpayment/credomatic/fields">
                <field class="level1" type="vmtitle" default="Credentials"/>
                <field class="" name="demo" type="radio" default="1" label="Demo Mode" description="">
                    <option value="0">Off</option>
                    <option value="1">On</option>
                </field>

                <field class="required" name="key_id" type="text" size="50" default="" label="Key ID"/>
                <field class="required" name="key" type="text" size="50" default="" label="Key"/>
            </fieldset>
        </fields>
    </vmconfig>

</extension>

How the edit page comes back up when editing:



But yet whatever I enter in those fields is saved to the DB just fine:



This is what is displayed above the config screen when I save:


GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8828
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Payment Gateway plugin won't show saved configs
« Reply #1 on: December 04, 2015, 17:49:39 pm »
have you in your php file

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

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jfreak53

  • Beginner
  • *
  • Posts: 26
Re: Payment Gateway plugin won't show saved configs
« Reply #2 on: December 04, 2015, 19:24:28 pm »
Perfect! Thanks, that's what was missing. I had it without the "VM3" thing as it was upgraded from last VM version. Thanks!

dhan0315

  • Beginner
  • *
  • Posts: 6
Re: Payment Gateway plugin won't show saved configs
« Reply #3 on: December 14, 2018, 03:00:16 am »
thank you for this... works great!!!