PHP code example of oussamamadjmaa / sofizpay-laravel

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

    

oussamamadjmaa / sofizpay-laravel example snippets


use OussamaMadjmaa\SofizPay\DTOs\MakeCIBTransactionDTO;
use OussamaMadjmaa\SofizPay\SofizPay;

$payment = app(SofizPay::class)->cibTransaction()->make(
    new MakeCIBTransactionDTO(
        amount: 2500,
        fullName: 'Oussama Madjmaa',
        phone: '0555123456',
        email: '[email protected]',
        returnUrl: 'https://example.com/payments/return',
    ),
);

return redirect()->away($payment->paymentUrl);
bash
php artisan vendor:publish --provider="OussamaMadjmaa\SofizPay\SofizPayServiceProvider" --tag=config