PHP code example of levizoesch / teller-sdk

1. Go to this page and download the library: Download levizoesch/teller-sdk 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/ */

    

levizoesch / teller-sdk example snippets


'KEY_PATH' => base_path('your/directory/path/teller_pk.pem'),
'CERT_PATH' => base_path('your/directory/path/teller_cert.pem'),

$accessToken = "test_token_xxxxxxxxxx";

$teller = new TellerClient($accessToken);
$listAccounts = $teller->listAccounts();

$teller = new TellerClient($accessToken);
$totalCount = $teller->accountsCount();

$teller = new TellerClient($accessToken);
$teller->destroyAccount($actId);

$teller = new TellerClient($accessToken);
$accountDetails = $teller->getAccountDetails($actId);

$teller = new TellerClient($accessToken);
$balances = $teller->getAccountBalances($actId);

$teller = new TellerClient($accessToken);
$transactions = $teller->listAccountTransactions($actId);

$teller = new TellerClient($accessToken);
$transactionDetails = $teller->getTransactionDetails($actId, $trxId);

$teller = new TellerClient($accessToken);
$identity = $teller->listIdentity($actId);

$teller = new TellerClient($accessToken);
$listPayees = $teller->listAccountPayees($actId, $scheme);

$teller = new TellerClient($accessToken);
$data = {
    "scheme": "zelle",
    "address": "[email protected]",
    "name": "Jackson Lewis",
    "type": "person"
}
$allAccountTransactions = $teller->createAccountPayee($actId, $data);

/**
 * @throws JsonException
 */
public function store(Request $request)
{
    $payload = json_decode($request->getContent(), true, 512, JSON_THROW_ON_ERROR);

    // Store Webhook
    TellerWebhooks::createWebhookRecord($payload);

    // Handle Webhook
    $found = TellerAccount::where('enrollmentId', $payload['payload']['enrollment_id'])
    ->first();

    if ($found) {

        $status = match ($payload['payload']['reason']) {
            'disconnected' => 'Disconnected',
            'disconnected.account_locked' => 'Account Locked',
            'disconnected.enrollment_inactive' => 'Inactive',
            'disconnected.credentials_invalid' => 'Invalid Credentials',
            'disconnected.user_action.captcha_

Route::resource('teller/webhook', TellerWebhookController::class, [
    'names' => [
        'store' => 'teller.webhook.store'
    ]
])->only('store');

php artisan make:controller TellerWebhookController

app/Http/Controllers/TellerWebhookController.php