PHP code example of susutawar / laravel-duitku

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

    

susutawar / laravel-duitku example snippets


use SusuTawar\Facade\Duitku;

// ...

// the result is a Laravel Collection
$paymentMethods = Duitku::getPayments($paymentAmount);

use SusuTawar\Facade\Duitku;

// ...

$paymentMethods = Duitku::makeTransaction(/* params */);

use SusuTawar\Facade\Duitku;

// ...

$checkResult = Duitku::check($yourTransactionId);

"routing" => [
  // ...
  "callback_handler" => MyCallbackHandler::class,
]

"routing" => [
  "enabled" => false,
  // ...
]
bash
composer install susutawar/duitku-laravel

php artisan vendor:publish --tag="duitku"