<?php
ob_start();

//-------------payment process---------------------//

include '../includes/session.php';
include '../includes/constants.php';
include '../includes/functions.php';
include '../includes/allstripslashes.php';

$partners = new partners;
$partners->connection($host, $user, $pass, $db);

$affiliateid = isset($_GET['affiliateid']) ? intval($_GET['affiliateid']) : 0;
$merchantid  = isset($_GET['merchantid']) ? intval($_GET['merchantid']) : 0;
$amount      = isset($_GET['amount']) ? floatval($_GET['amount']) : 0;
$transid     = isset($_GET['transid']) ? intval($_GET['transid']) : 0;

$payment_method = '';

// Get records from partners_bankinfo
$stmt = $partners->conn->prepare("SELECT bankinfo_modeofpay FROM partners_bankinfo WHERE bankinfo_affiliateid = ?");
if ($stmt) {
    $stmt->bind_param("i", $affiliateid);
    $stmt->execute();
    $stmt->bind_result($payment_method);
    $stmt->fetch();
    $stmt->close();
}

header("Location: adminpayment_success.php?amount={$amount}&transid={$transid}&merchantid={$merchantid}&affiliateid={$affiliateid}");
exit;
?>
