Thanks for the info, it seems to be exactly what i need, however i still get this error msg:
The following errors have occurred.
(13) The merchant login ID or password is invalid or the account is inactive.
Here is my code that I reworked for people who want cut and paste functionality for this feature:
// the parameters for the payment can be configured here
// the API Login ID and Transaction Key must be replaced with valid values
$x_login = "[INSERTLOGINIDHERE]"; //API Login ID
$transactionKey = "[INSERTTRANSACTIONKEYHERE]";
$description = "Sample Transaction";
$x_version = "3.1";
$x_show_form = "PAYMENT_FORM";
$x_method = "CC";
$x_type = "AUTH_CAPTURE";
$x_amount = "1.99";
$x_delim_data = "FALSE";
$x_fp_sequence = rand(1, 1000); // a sequence number is randomly generated
$x_fp_timestamp = time();
$x_fp_hash = ""; // this will be determined below
$x_relay_response = "TRUE";
$x_relay_URL = "https://developer.authorize.net/tools/paramdump/index.php";
// an invoice is generated using the date and time
$invoice = date(YmdHis);
// The following lines generate the SIM fingerprint. PHP versions 5.1.2 and
// newer have the necessary hmac function built in. For older versions, it
// will try to use the mhash library.
if( phpversion() >= '5.1.2' ) {
$x_fp_hash = hash_hmac("md5", $x_login . "^" . $x_fp_sequence . "^" . $x_fp_timestamp . "^" . $x_amount . "^", $transactionKey);
} else {
$x_fp_hash = bin2hex(mhash(MHASH_MD5, $x_login . "^" . $x_fp_sequence . "^" . $x_fp_timestamp . "^" . $x_amount . "^", $transactionKey));
}
// By default, this sample code is designed to post to our test server for
// developer accounts: https://test.authorize.net/gateway/transact.dll
// for real accounts (even in test mode), please make sure that you are
// posting to: https://secure.authorize.net/gateway/transact.dll
$url = "https://test.authorize.net/gateway/transact.dll";
echo "$url?x_version=$x_version&x_show_form=$x_show_form&x_method=$x_method&x_login=$x_login&x_type=$x_type&x_amount=$x_amount&x_delim_data=$x_delim_data&x_fp_sequence=$x_fp_sequence&x_fp_timestamp=$x_fp_timestamp&x_fp_hash=$x_fp_hash&x_relay_response=$x_relay_response&x_relay_URL=$x_relay_URL";
This ends up with the following URL
https://test.authorize.net/gateway/transact.dll?x_version=3.1&x_show_form=PAYMENT_FORM&x_method=CC&x...
And of course redirecting to that url or copy pasting gives me:
The following errors have occurred.
(13) The merchant login ID or password is invalid or the account is inactive.
I feel like I'm missing something simple because i know the login and transaction key are correct as i copied them straight from Virtuemart settings.
Thanks,
David