PHP code example of codedge / laravel-sofortlib

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

    

codedge / laravel-sofortlib example snippets


// app/Http/routes.php

Route::get('/', function () {

    Sofortueberweisung::setAmount(5);
    Sofortueberweisung::setCurrencyCode('EUR');
    Sofortueberweisung::sendRequest();

    if(Sofortueberweisung::isError()) {
        // do something...
    }

});

// app/Http/routes.php

Route::get('/', function () {

    Billcode::setAmount(47.11);
    Billcode::setCurrencyCode('USD');
    Billcode::createBillcode();

    if(Billcode::isError()) {
        // do something...
    }

});