PHP code example of medyat / parapos

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

    

medyat / parapos example snippets


// config/parapos.php
'model' => \App\Models\Payment::class,

// Set to false when your app owns the payments schema
// (e.g. uuid primary key) and ships its own migration.
'load_migrations' => false,

$parapos = new Parapos([
    'apiKey' => '...',
    'secretKey' => '...',
    'model' => \App\Models\Landlord\LandlordCardPayment::class,
    'response_url' => 'landlord/parapos/response/{hash}',
    'appUrl' => 'https://admin.example.com',
]);

class LandlordParaposResponseController extends \MedyaT\Parapos\Http\HandleResponseAction
{
    protected function model(): string
    {
        return \App\Models\Landlord\LandlordCardPayment::class;
    }
}

Route::post('landlord/parapos/response/{hash}', LandlordParaposResponseController::class);
bash
php artisan vendor:publish --tag=parapos-migrations