PHP code example of homeful / kwyc-check

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

    

homeful / kwyc-check example snippets


return [
    'campaign_url' => env('CAMPAIGN_URL', 'https://kwyc-check.net/campaign-checkin/9ccef822-4209-4e0a-bb40-232da5cafdf1')
];

Route::post('process-lead', ProcessLeadController::class)
    ->prefix('api')
    ->middleware('api')
    ->name('process-lead');

Route::post('attach-media/{lead}', AttachLeadMediaController::class)
    ->prefix('api')
    ->middleware('api')
    ->name('attach-media');
Route::post('generate-qr', GenerateQRCodeController::class)
    ->prefix('api')
    ->middleware('api')
    ->name('generate-qr');
Route::post('validate/id',  [HypervergeController::class, 'validate_id'])
    ->prefix('api')
    ->middleware('api')
    ->name('id validation');
Route::post('validate/id/base64',  [HypervergeController::class, 'validate_id'])
    ->prefix('api')
    ->middleware('api')
    ->name('id validation');
Route::post('check/liveliness',  [HypervergeController::class, 'validate_live_url'])
    ->prefix('api')
    ->middleware('api')
    ->name('liveliness validation');
Route::post('check/liveliness/base64',  [HypervergeController::class, 'validate_live_base64'])
    ->prefix('api')
    ->middleware('api')
    ->name('liveliness validation');
Route::post('check/faceverify',  [HypervergeController::class, 'face_verify'])
    ->prefix('api')
    ->middleware('api')
    ->name('face match verification');
Route::post('check/faceverify/base64',  [HypervergeController::class, 'face_verify_base64'])
    ->prefix('api')
    ->middleware('api')
    ->name('face match verification');    
Route::post('create/contact',  [EngageSparkController::class, 'formatContactBody'])
    ->prefix('api')
    ->middleware('api')
    ->name('face verification');    


use Homeful\KwYCCheck\Data\LeadData;
use Homeful\KwYCCheck\Models\Lead;

$lead = Lead::factory()->forContact()->create();
$data = LeadData::fromModel($lead);

use Homeful\KwYCCheck\Facades\KYC;


$svg = KYC::generateCampaignQRCOde(query_params: ['code' => 'ABC-123','identifier'=>'DEF-456','choice'=>'GHI-789']);

echo $svg; 
//qr code points to https://kwyc-check.net/campaign-checkin/9ccef822-4209-4e0a-bb40-232da5cafdf1?code=ABC-111&identifier=DEF-222&choice=GHI-333

bash
php artisan vendor:publish --tag="kwyc-check-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="kwyc-check-config"
bash
php artisan vendor:publish --tag="kwyc-check-views"