A valid amount is required. (3) (authorize.net problem)

Please post your issues and questions about One Page Checkout for Virtuemart 2 to this forum.

A valid amount is required. (3) (authorize.net problem)

Postby admin » Tue May 13, 2014 2:47 pm

Hello, if you are using "virtuemartmailorder manager" (com_virtuemartmailordermanager) component together with the core VM's authorize.net plugin you may come into this issue:

There was an error while processing your transaction: A valid amount is required. (3) 
Order not completed, data is not valid


This issue has nothing to do with our extensions, and is caused by a core hack of the mail order manager which inserts inproper code into your authorize.net plugin:

Locate the original code:
Code: Select all
      if(!empty($_REQUEST['mailorder'])){
      $formdata = array_merge ($this->_setTransactionDataAdd ($order['details']['BT'], $method), $formdata);
      }
      else{$formdata = array_merge ($this->_setTransactionData ($order['details']['BT'], $method), $formdata);
      }



and update it to :
Code: Select all
if(!empty($_REQUEST['mailorder'])){
      $formdata = array_merge ($this->_setTransactionDataAdd ($order['details']['BT'], $method), $formdata);
      }
      else{$formdata = array_merge ($this->_setTransactionData ($order['details']['BT'], $totalInPaymentCurrency['value']), $formdata);
      }



within your authorize.net plugin:
\plugins\vmpayment\authorizenet\authorizenet.php

Best Regards,
Stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm

Return to One Page Checkout for Virtuemart 2

cron