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.
You could dig available payment plugins, paypal plugin for ex.
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.
Dig peace of code for fee from already available plugins - http://dev.virtuemart.net/attachments/download/642/com_virtuemart.2.0.22d_extract_first.zip
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.
Did you found "cost_percent_total" in nearby php file?
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.
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.
Hi,
Was performing these on the live version installed on the site.
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.