public function confirm_payment() { $post_id = $_POST['post_id']; $confirm = $_POST['confirm']; $payment_post_id = $_POST['remote_id']; confirm_payment($post_id, $payment_post_id, $confirm); }
//amount if (isset($_POST["amount"]) && $_POST["amount"] != "") { $amount = trim($_POST["amount"]); } elseif (!is_numeric($amount)) { $valid = false; } else { $valid = false; } //bankaccname if (isset($_POST["bankaccname"]) && $_POST["bankaccname"] != "") { $bankaccname = trim($_POST["bankaccname"]); } else { $valid = false; } if ($valid == true) { $st = confirm_payment($orderid, $dop, $bankaccname, $amount); if ($st) { if (isset($email)) { $_SESSION["confirmmsg"]["success"] = "Your order has been confirmed, please check your summary <a href=\"/member/userprofile/order_history/#maincontent\">here</a>!"; } else { $_SESSION["confirmmsg"]["success"] = "Your order has been confirmed, please check your summary by <strong>LOGIN</strong> to your account!"; } header("location:.#maincontent"); exit; } else { $_SESSION["confirmmsg"]["failupdate"] = "Oops, something wrong. Please check your data"; header("location:.#maincontent"); exit; } } else { $_SESSION["confirmmsg"]["failupdate"] = "Oops, something wrong. Please check your data";
success('/tack-foer-ditt-koep.html', 'giftcard', 'now'); } else { success('/tack-foer-din-bokning.html', 'jump', 'now'); } // Purchase done! // This is the callback from the payment provider, we're guaranteed // that this will be attempted so we do the booking here. // If we were to do it in the "is_payment_done" callback, the user could // have closed their browser and thus ended up paying but not getting // a booking. } else { if ($ipn_callback) { // Remember: This is all executed "backstage", so no reason to redirect // to a nice error page or anything. // This will read the payment processor information from POST/GET. $payment_info = confirm_payment(); if ($payment_info === false) { // IPN is not verified exit; } $booking_id = $payment_info['custom']; if ($booking_id === false) { send_error_report('$booking_id === false', 'No custom booking field found'); exit; } $data = resume_booking($booking_id, $payment_info); if ($data === false) { send_error_report('$data === false', 'No saved booking found to resume'); exit; } if ($payment_info['is_complete'] !== true) {