<?php
/**
 * @brief		Invoice Listener
 * @author		<a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
 * @copyright	(c) Invision Power Services, Inc.
 * @license		https://www.invisioncommunity.com/legal/standards/
 * @package		Invision Community
{subpackage}
 * @since		{date}
 */

namespace IPS\{app}\listeners;

/* To prevent PHP errors (extending class does not exist) revealing path */

use IPS\Events\ListenerType\InvoiceListenerType;
use IPS\Member as MemberClass;
use IPS\nexus\Invoice as InvoiceClass;
use function defined;

if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
	header(($_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0') . ' 403 Forbidden');
	exit;
}

/**
 * Invoice Listener
 */
class {filename} extends InvoiceListenerType
{
	/**
	 * Fired when the invoice status is changed (e.g. unpaid to paid)
	 *
	 * @param InvoiceClass $invoice
	 * @param string $status	The new status
	 * @return void
	 */
	public function onStatusChange( InvoiceClass $invoice, string $status ) : void
	{

	}

	/**
	 * Fired when a member is created by an invoice.
	 *
	 * @param InvoiceClass $invoice
	 * @param MemberClass $member    The new member
	 * @param array $guestData  The original values of InvoiceClass::$guest_data
	 * @return void
	 */
	public function onCreateAccountForGuest( InvoiceClass $invoice, MemberClass $member, array $guestData ) : void
	{

	}

	/**
	* Fired at each checkout step (before submission)
	*
	* @param InvoiceClass $invoice
	* @param string $step   The checkout step (customer|pay)
	* @return void
	*/
	public function onCheckout( InvoiceClass $invoice, string $step ) : void
	{

	}
}