TRANSACTION VOID FORM
$auth_net_login_id, "x_version" => "3.1", "x_delim_char" => "|", "x_delim_data" => "TRUE", "x_url" => "FALSE", "x_type" => "VOID", "x_method" => "CC", "x_tran_key" => $auth_net_tran_key, "x_relay_response" => "FALSE", "x_description" => "Easy Pay-Customer Service Portal VOID", # information collected through the form: "x_trans_id" => $voidid, ); // form submission successfully validated, submit request to authorize.net and exit $fields = ""; foreach( $authnet_values as $key => $value ) $fields .= "$key=" . urlencode( $value ) . "&"; // * * * * * #$auth_net_url = "https://certification.authorize.net/gateway/transact.dll"; # Uncomment the line ABOVE for test accounts or BELOW for live merchant accounts #$auth_net_url = "https://secure.authorize.net/gateway/transact.dll"; # October 1, 2007 # Current API Login ID: # Current Transaction Key: $auth_net_login_id = "3N94kfD7"; $auth_net_tran_key = "2QTJH4nk7b3v52fc"; $ch = curl_init("https://secure.authorize.net/gateway/transact.dll"); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1) curl_setopt($ch, CURLOPT_POSTFIELDS, rtrim( $fields, "& " )); // use HTTP POST to send form data curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response. ### $resp = curl_exec($ch); //execute post and get results curl_close ($ch); // * * * * * $text = $resp; $answer = explode("|", $resp); if ( $answer[0] == "1" ) { ?>
Transaction has been updated
The transaction has been voided from the users Credit Card. Your lock box file will
show a postive and a resulting negative transaction.
THANK YOU!
Return to Menu