// Optional - Language selection list for payment box (html code)
	$languages_list = display_language_box($def_language);
	
	
	
	// Successful Cryptocoin Payment received
	// Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc
	if ($box->is_paid())
	{
		// one time action
		if (!$box->is_processed())
		{
			// One time action after payment has been made
					
			$message = "Thank you (order #".$orderID.", payment #".$box->payment_id()."). We upgraded your membership to Premium";
	
			// Set Payment Status to Processed
			$box->set_status_processed();
		}
		else $message = "You have a Premium Membership";
	}
	else
	{	
		// Optional - Coin selection list (html code)
		$coins_list = display_currency_box($available_payments, $def_payment, $def_language, 60, "margin: 80px 0 0 0");
	}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
// Current selected coin by user
$coinName = cryptobox_selcoin($available_payments, $def_payment);
// Current Coin public/private keys
$public_key = $all_keys[$coinName]["public_key"];
$private_key = $all_keys[$coinName]["private_key"];
/** PAYMENT BOX **/
$options = array("public_key" => $public_key, "private_key" => $private_key, "webdev_key" => "", "orderID" => $orderID, "userID" => $userID, "userFormat" => $userFormat, "amount" => 0, "amountUSD" => $amountUSD, "period" => $period, "language" => $def_language);
// Initialise Payment Class
$box = new Cryptobox($options);
// coin name
$coinName = $box->coin_name();
// Successful Cryptocoin Payment received
// Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc
if ($box->is_paid()) {
    if (!$box->is_confirmed()) {
        $message = "Thank you for payment (payment #" . $box->payment_id() . "). Awaiting transaction/payment confirmation";
    } else {
        // payment confirmed (6+ confirmations)
        // one time action
        if (!$box->is_processed()) {
            // One time action after payment has been made/confirmed
            $message = "Thank you for order (order #" . $orderID . ", payment #" . $box->payment_id() . "). We will send soon";
            // Set Payment Status to Processed
            $box->set_status_processed();
        } else {
            $message = "Thank you. Your order is in process";
        }
        // General message
    }
} else {
    $message = "This invoice has not been paid yet";