First off, hey everyone just want to let you know I am still very novice when it comes to PHP. Ok so first I will tell you what I am using:
I have created a donation form in php that is integrated with authorize.net. I have a processpayment.php that will either send a user to a approved.php or denied.php page.
So in my processpayment.php file I have the following "if statement that will either send a user to approved.php/denied.php page:
if($response->IsApproved())
{
header("Location: " . $GatewaySettings['PaymentApprovedPage']);
}
else
header("Location: " . $GatewaySettings['PaymentDeniedPage'] . "?gateway_error=" . rawurlencode($response->GetField("ResponseReasonText")));
}
else
header("Location: " . $GatewaySettings['PaymentDeniedPage'] . "?gateway_error=" . rawurlencode($transaction->GetErrorString($errorCode)));
?>
Ok so you instead of just going to the 'PaymentApprovedPage' upon approval I would like it to send an email to my client from the form and then go to 'PaymentApprovedPage'. So how would I have two php files upon approval like: someone presses submit and then the action is processpayment.php then it goes to sendmail.php and then go to approved.php (which is 'PaymentApprovedPage')