<?php
require_once("../../app/config.php");
$trx=$_GET['id'];
$data = mysqli_fetch_array(mysqli_query($dbc, "SELECT * FROM deposits WHERE trx='$trx'"));
$gatewayData=mysqli_fetch_array(mysqli_query($dbc,"SELECT * FROM gateways WHERE id='".$data['gateway_id']."'"));
?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title><?php $set['site_name'];?></title>
</head>

<body>
<form action="https://secure.paypal.com/cgi-bin/webscr" method="post" id="payment_form">
    <input type="hidden" name="cmd" value="_xclick"/>
    <input type="hidden" name="business" value="<?php echo $gatewayData['val1'];?>"/>
    <input type="hidden" name="cbt" value="<?php echo $set['site_name'];?>"/>
    <input type="hidden" name="currency_code" value="<?php echo $scan2['currency'];?>"/>
    <input type="hidden" name="quantity" value="1"/>
    <input type="hidden" name="item_name" value="Add Money To <?php echo $set['site_name'];?> Account"/>
    <input type="hidden" name="custom" value="<?php echo $trx;?>"/>
    <input type="hidden" name="amount" value="<?php echo $data['amount'];?>"/>
    <input type="hidden" name="return" value="<?php echo $url.'/user/fund/1';?>"/>
    <input type="hidden" name="cancel_return" value="<?php echo $url.'/user/fund/1';?>"/>
    <input type="hidden" name="notify_url" value="<?php echo $url.'/app/payment?id=ipnpaypal';?>"/>
</form>

<script>
    document.getElementById("payment_form").submit();
</script>
</body>

</html>

