News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

help setting up OSDS Payment plugin with a fee

Started by techwarehouse, September 16, 2013, 04:46:48 AM

Previous topic - Next topic

techwarehouse

Hi,

I'm currently running the payment plugin listed here http://www.joomla-payment-gateways.osdcs.com/index.php?option=com_digistore&controller=digistoreProducts&task=view&pid=164&cid=9&Itemid=5

The problem im facing is i cant add a 3 percent fee to this form of payment as it doesnt have a setting for it.

What i would like to know is, is there a way to add this fee in mysql? It seems to have all the fields like cost per transaction i have tried adding a value in but doesn't seem to work. I don't know php but know enough to navigate around and change things.

Any ideas or help would be awesome. I have emailed the people who made it but am yet to hear back after a few days and this is getting urgent as people are placing orders.

Thanks.

Maxim Pishnyak

You could dig available payment plugins, paypal plugin for ex.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

techwarehouse

Hi,

Sorry I dont understand what you mean by dig available plugins? I need to use this plugin as its the only one that supports DPS payment gateway.

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

techwarehouse

Oh okay sorry new to all this stuff.

Okay i have found in the .xml file for the payment gateway the line i have to add which is

<param name="cost_percent_total" type="text"  label="VMPAYMENT_PXPAY_COST_PERCENT_TOTAL" description="VMPAYMENT_PXPAY_COST_PERCENT_TOTAL_EXPLAIN" />

and this exists as a field in the pxpay table in mysql. It shows up as a field now in virtuemart payment for this plugin but when i enter a value and hit save it disappears.

Everything seems to be the same as the paypal plugin is so any ideas what to try?

Thanks.

Maxim Pishnyak

Did you found "cost_percent_total" in nearby php file?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

techwarehouse

Okay im in teh php file now.

The first line under $SQLfields = array says

'cost_percent_total' => ' decimal(10,2) DEFAULT NULL ',


Then further down is this


    function getCosts(VirtueMartCart $cart, $method, $cart_prices) {
   if (preg_match('/%$/', $method->cost_percent_total)) {
       $cost_percent_total = substr($method->cost_percent_total, 0, -1);
   } else {
       $cost_percent_total = $method->cost_percent_total;
   }
   return ($method->cost_per_transaction + ($cart_prices['salesPrice'] * $cost_percent_total * 0.01));
    }


These seem to be teh same settings as in the paypal one.

Maxim Pishnyak

You need to remember that if you'd changed files, you need apply these changes in the archived version of your plugin. And then install your modified plugin again.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

techwarehouse

Hi,

Was performing these on the live version installed on the site.

Maxim Pishnyak

Quote from: Maxim Pishnyak on September 16, 2013, 16:57:30 PM
You need to remember that if you'd changed files, you need apply these changes in the archived version of your plugin. And then install your modified plugin again.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart