PHP code example of teamgantt / dues

1. Go to this page and download the library: Download teamgantt/dues library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

teamgantt / dues example snippets


use TeamGantt\Dues\Dues;
use TeamGantt\Dues\Processor\Braintree;

$gateway = new Braintree([
    'environment' => $_ENV['BRAINTREE_ENVIRONMENT'],
    'merchantId' => $_ENV['BRAINTREE_MERCHANT_ID'],
    'publicKey' => $_ENV['BRAINTREE_PUBLIC_KEY'],
    'privateKey' => $_ENV['BRAINTREE_PRIVATE_KEY'],
]);

$dues = new Dues($gateway);

interface EventListener
{
    public function onAfterCreateCustomer(Customer $customer): void;

    public function onAfterUpdateCustomer(Customer $customer): void;

    public function onBeforeCreateCustomer(Customer $customer): void;

    public function onBeforeUpdateCustomer(Customer $customer): void;

    public function onAfterCreateSubscription(Subscription $subscription): void;

    public function onAfterUpdateSubscription(Subscription $subscription): void;

    public function onBeforeCreateSubscription(Subscription $subscription): void;

    public function onBeforeUpdateSubscription(Subscription $subscription): void;
}

$dues->removeListener($listener);

/**
 * @group integration
 */
public function testAProcesserRequest()
{

}