PHP code example of ybreaka98 / ebtekardcb

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

    

ybreaka98 / ebtekardcb example snippets


return [
    'base_url' => env('EBTEKAR_BASE_URL', 'https://connexlive.ebtekarcloud.com/external-api/'),
    'email' => env('EBTEKAR_DCB_EMAIL', ''),
    'password' => env('EBTEKAR_DCB_PASSWORD', ''),
]

use Ybreaka98\EbtekarDCB\Facades\EbtekarDCB;

// Initialize subscription login
$response = EbtekarDCB::login('218912345678', 'unique_transaction_id');

if ($response->isSuccessful()) {
    // Handle successful login request
    $data = $response->getJson();
}

// Confirm login with OTP
$confirmResponse = EbtekarDCB::confirmLogin('218912345678', '1234');

// Get subscription details
$details = EbtekarDCB::subscriptionDetails('218912345678');

// Request protected script
$script = EbtekarDCB::requestProtectedScript('#payment-button');
bash
php artisan vendor:publish --tag="ebtekardcb-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="ebtekardcb-config"
bash
php artisan vendor:publish --tag="ebtekardcb-views"