NOTE: This bug may have been fixed in subsequent releases that I'm not qualified to receive... but if not, here's my quick-fix for it.
The Problem: MyVirtualMerchant requires that the transaction amount (ssl_amount) be in the following format: XXX.xx ... with only TWO digits beyond the decimal point. ~ It appears that this module sends the transaction amount as XXX.xxxx ... with FOUR digits beyond the decimal.
I can't tell if the value contains four decimal places because of something in the ISC code, or if it's a server configuration that's causing it. But even if it's due to a non-standard server configuration, the ISC script needs to handle it.
If the payment processor receives a number with four decimal places, the transaction is rejected. So we need to trim off any excess before submitting the data. Just below are the two minor changes that I made to the module.
INSTRUCTIONS: Open the file \modules\checkout\myvirtualmerchant\module.myvirtualmerchant.php
Find (near line 91):
Code: Select all
$amount = ($this->GetGatewayAmount());
Code: Select all
$amount = substr($amount,0,-(strlen(strrchr($amount,'.'))-3));
Code: Select all
$myvPostData['ssl_amount'] = $this->GetGatewayAmount();
Code: Select all
// $myvPostData['ssl_amount'] = $this->GetGatewayAmount();
$myvPostData['ssl_amount'] = $amount;
Good luck!
Charlie
PS: When spell-checking this post, my browser didn't recognize "MyVirtualMerchant"... so it suggested "Befuddlement".

edit: I found a more elegant way to do this that will not round-up or round-down the numbers.