0

I can't make my VM payment plugin to work at joomla v3.5.0 and virtuemart v3.0.12. I've install a custom payment plugin. Initially it worked, yet the same time other payment methods (when invoked) were wrong directed to my custom plugin payment gateway. enter image description here

Therefore I've slightly changed it. And now when the plugin is installed and turned on in admin panel, none of payment methods work. As I process with a cart (enter data, choose any payment method, etc.) and click on 'process' btn. the following error transpires: Error 500. Site can't process your request.

Also, the plugin's payment methods settings are not saved in admin (besides defaults): enter image description here

how to break thru, any hints? You may ask additionally questions to clarify the case.

Update

I've not done many edits of the plugin code. Mainly small edits were in manifest file latcard.xml to make parameters savable. But to no positive result.

Manifest file:

<?xml version="1.0" encoding="UTF-8" ?>
<extension version="1" type="plugin" group="vmpayment" method="upgrade">
<name>VM - Payment, Latcard</name>

<creationDate>November 28 2015</creationDate>
<author>SIA LatCard</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://www.latcard.eu</authorUrl>
<author>LatCard AS</author>
<creationDate>November 2015</creationDate>
<copyright>Copyright SIA LatCard</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<version>1.0.0</version>
<description>
    <![CDATA[<a href="http://www.latcard.eu" target="_blank">LatCard</a> ]]>
</description>

<files>
    <filename plugin="latcard">latcard.php</filename>
    <filename>latcard.xml</filename>
    <filename>index.html</filename>
    <folder>latcard</folder>
    <filename>controller.php</filename>     
    <folder>views</folder>
</files>

<vmconfig>
        <fields name="params">
                <fieldset name="basic" addfieldpath="/plugins/vmpayment/latcard/latcard/fields">
                    <fields addpath="/plugins/vmpayment/latcard/elements"/>
                    <fields addpath="/plugins/vmpayment/latcard/latcard/elements"/>
                    <fields addpath="/administrator/components/com_virtuemart/elements"/>


                    <field name="merchant" type="text" size="10" default="" label="Merchant ID" description="Merchant ID"/>
                    <field name="site_id" type="text" size="10" default="" label="Site ID" description="Site ID"/>
                    <field name="password" type="text" size="10" default="" label="SOAP password" description="SOAP password"/>

                    <field name="secure_3d" type="radio" default="1" label="3D Secure" description="3D Secure">
                            <option value="0" >No</option>
                            <option value="1" >Yes</option>
                    </field>
                </fieldset>
        </fields>
</vmconfig> 

2
  • Show your changes to the plugin. You may have a PHP error in your modified plugin, which leads to the 500 error
    – fruppel
    Commented Mar 30, 2016 at 10:27
  • @fruppel, please see my update. Commented Mar 30, 2016 at 11:03

1 Answer 1

0

500 error may come from your plugin's PHP code.

I got the same problem that my plugin's configuration was not saved. After debugging in Virtuemart code, I found out that I needed this function in my plugin's class:

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

Ensure that you already setup for parameters and pass them to Virtuemart in __contstruct function. For example:

public function __construct(&$subject, $config)
{
    parent::__construct($subject, $config);

    $this->_loggable = true;
    $this->tableFields = array_keys($this->getTableSQLFields());
    $this->_tablepkey = 'id';
    $this->_tableId = 'id';

    $varsToPush = [
        'my_param' => array('', 'char'),
    ];

    $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.