// coin name
	$coinName = $box->coin_name(); 
	

	
	// 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");
	}
Пример #2
0
$paymentbox = $box1->display_cryptobox();
// Log
$message = "";
// A. Process Received Payment
if ($box1->is_paid()) {
    $message .= "A. User will see this message during 24 hours after payment has been made!";
    $message .= "<br>" . $box1->amount_paid() . " " . $box1->coin_label() . "  received<br>";
    // Your code here to handle a successful cryptocoin payment/captcha verification
    // For example, give user 24 hour access to your member pages
    // Please use also IPN function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "") for update db records, etc
    // ...
} else {
    $message .= "The payment has not been made yet";
}
// B. One-time Process Received Payment
if ($box1->is_paid() && !$box1->is_processed()) {
    $message .= "B. User will see this message one time after payment has been made!";
    // Your code here - for example, publish order number for user
    // ...
    // Also you can use $box1->is_confirmed() - return true if payment confirmed
    // Average transaction confirmation time - 10-20min for 6 confirmations
    // Set Payment Status to Processed
    $box1->set_status_processed();
    // Optional, cryptobox_reset() will delete cookies/sessions with userID and
    // new cryptobox with new payment amount will be show after page reload.
    // Cryptobox will recognize user as a new one with new generated userID
    // $box1->cryptobox_reset();
}
/*
 *  IPN - User Instant Payment Notification Function 
 *  function cryptobox_new_payment($paymentID = 0, $payment_details = array(), $box_status = "")