Hi,
Disregard the last post. I figured out how to do what I wanted to do.
This is a new question. I am trying to display a credit card transaction receipt on my checkout_success page so customers can print it out from there. I have used this before with another payment module I developed so I know it works, however, I am having some problems doing it with VM.
Since most of the info I want to have on the transaction receipt is found in the logs, I am assuming that the info does get posted back from VM. Is this correct?
This is what I have done. I have included the following code in the virtualmerchant.php file in the "function after process" section.
// Save some variables to be used to display transaction receipt on payment_success page.
global $_POST, $_SESSION, $db, $messageStack;
$_SESSION['ssl_invoice_number'] = $response['ssl_invoice_number'];
$_SESSION['total'] = $response['total'];
$_SESSION['ssl_merchant_id'] = $response['ssl_merchant_id'];
$_SESSION['ssl_transaction_type'] = $response['ssl_transaction_type'];
$_SESSION['date'] = $response['date'];
$_SESSION['ssl_approval_code'] = $response['ssl_approval_code'];
$_SESSION['ssl_txn_id'] = $response['ssl_txn_id'];
I used the variable names that were in the VM developer's guide. Are these the correct variable names to use? I noticed in the VM code that some of these variable names are changed to other ones so I am not sure I am using the correct ones. Am I?
I originally used $_POST instead of $response in these lines but that didn't work so I changed it to $response. Am I using the correct format? I have used $_POST on another mod I did and it worked for that one, but looking at the VM code, it seemed that the $response command was used to get the VM postbacks.
On the checkout_success page I am using the SESSION variables to print the values. For example, $SESSION['ssl_txn_id'] to print the transaction id.
I would appreciate any help anyone can offer.
Thanks