PHP code example of mit2 / paysafecard

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

    

mit2 / paysafecard example snippets


composer isan vendor:publish --provider "Mit2\PaysafecardProviders\PaysafecardProvider"


use Mit2\Paysafecard\Payments\Payment;

$payment = new Payment;
       $payment->create([
            'amount' => '10',
            'currency' => 'PLN',
            'success_url' => route('payment.success'),
            'failed_url' => route('payment.failed'),
            'notification_url' => route('payment.notificationurl'),
            'customer_mail' => Auth::user()->email,
           ]);
return redirect($cos->request['request_url']);