PHP code example of multisafepay / laravel-api

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

    

multisafepay / laravel-api example snippets

  
$app->register(\MultiSafepay\Laravel\MultiSafepayServiceProvider::class);  
  
$app->withFacades(true,  [
"MultiSafepay\\Laravel\\Facades\\MultiSafepay" => "MultiSafepay",
"MultiSafepay\\Laravel\\Facades\\MultiSafepayOrders" => "MultiSafepayOrders",
"MultiSafepay\\Laravel\\Facades\\MultiSafepayGateways" => "MultiSafepayGateways",
"MultiSafepay\\Laravel\\Facades\\MultiSafepayIssuers" => "MultiSafepayIssuers", 
]);  

//Using helper function
$transaction = multisafepayTransactionManager('apikey', 'environment')->get('id');
//Using service container
$transactionManager = $app->makeWith(TransactionManager::class, ['apikey' => 'xxxx', 'environment' => 'live']);
$transaction = $transactionManager->get('id');
//Using facade accessor
$transaction = MultiSafepayTransactionManager::get('id');