After a lot of effort I finally reached to those pages what contains all the transaction details.
while using Authorize.net, Transaction request is sent in Json/XML format to the authorize.net server and after processing a response is returned back in same XML/Json format. Following page works for this regards
joomlasite/administrator/components/com_virtuemart/classes/payment/ps_authorize.php
Now in this file search process_payment function,
process_payment
This is the main function for all payment modules that use direct connections to a payment gateway (like authorize.net or eWay XML). This is the place, where the payment details are validated and captured on success. Returns true on success, false on failure.
And this the what I customized according to the response from the payment gateway.
I echoed all the response and then according to status 1,3,4 or any I created a php email script to send an email to specified email address
temporarily echo the response from the server
$vmLogger->err('result: '. $result);
It will show all the responses as error on after transaction.
$Message =
'**Notification:**A Transaction was attempt. Authorize.net responded
**'.$response[3].'**.
Details are as under:
========= ORDER INFORMATION =========
Invoice : '.$response[36].'
Amount : '.$order_total.'
============== RESULTS ==============
Response : '.$response[3].'
Authorization Code : '.$response[4].'
Transaction ID : '.$response[6].'
==== CUSTOMER BILLING INFORMATION ===
First Name : '. substr($dbst->f("first_name"), 0, 50).'
Last Name : '. substr($dbst->f("last_name"), 0, 50).'
E-Mail : '.$dbbt->f("user_email");
$cc_headers = "MIME-Version: 1.0" . "\r\n";
$cc_headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
//this address will show as "from" in email box
$cc_headers = 'From:<[email protected]>'. "\r\n";
//$vendor_mail fetches virtuemart's vendor's email.
$to_email = $vendor_mail;
$cc_subject = "Transaction attempt - ".$response[3];
$cc_message = $Message;
now I customized the responses according to their status.
...
elseif ($response[0] == '2') {
....//some codes
mail($to_email,$cc_subject,$cc_message,$cc_headers);
.....
elseif ($response[0] == '3') {
....//some codes
mail($to_email,$cc_subject,$cc_message,$cc_headers);
.....
elseif ($response[0] == '4') {
....//some codes
mail($to_email,$cc_subject,$cc_message,$cc_headers);
.....
This will send email to the vendor if response is failed, declined or any other issued but not successful.
you can customize response for successful payment too under
if ($response[0] == '1') {
............. email is successful
I hope other developers may find this helpful.
Regards