<?

$egold_payment_units = array();
$egold_payment_units['USD'] = 1;
$egold_payment_units['CAD'] = 1;
$egold_payment_units['GBP'] = 44;
$egold_payment_units['AUD'] = 61;
$egold_payment_units['JPY'] = 81;
$egold_payment_units['EUR'] = 81;

?>
<body onload="document.payment.submit()">
<form name="payment" action="https://www.e-gold.com/sci_asp/payments.asp" method="post">
<input type="hidden" name="PAYEE_ACCOUNT" value="<?= $egold_payee_account ?>">
<input type="hidden" name="PAYEE_NAME" value="<?= $egold_payee_name ?>">
<input type="hidden" name="PAYMENT_UNITS" value="1">
<input type="hidden" name="PAYMENT_METAL_ID" value="<?= $egold_payment_units[$currency_code] ?>">
<input type="hidden" name="STATUS_URL" value="<?= $notify_url ?>">
<input type="hidden" name="NOPAYMENT_URL" value="<?= $cancel_url ?>">
<input type="hidden" name="NOPAYMENT_URL_METHOD" value="POST">
<input type="hidden" name="PAYMENT_URL" value="<?= $return_url ?>">
<input type="hidden" name="PAYMENT_URL_METHOD" value="POST">
<input type="hidden" name="BAGGAGE_FIELDS" value="CUSTOM">
<input type="hidden" name="PAYMENT_AMOUNT" value = "<?= $total ?>" >
<input type="hidden" name="CUSTOM" value="<?= urlencode($custom) ?>">
<input type="hidden" name="SUGGESTED_MEMO" value="<?= $item_name ?>">
</form>

