PHP code example of culturekings / laravel5-afterpay

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

    

culturekings / laravel5-afterpay example snippets


'providers' => array(
    // ...
    CultureKings\LaravelAfterpay\Provider\AfterpayProvider::class,
)

$api = \App::make('afterpay_merchant_configuration');
$api::get();

$api = \App::make('afterpay_merchant_payments');
$payments = $api::listPayments();

$api = \App::make('afterpay_merchant_orders');
$order = $api::get(ORDER_TOKEN);

$api = \App::make('afterpay_instore_customer');
$api::invite();

$api = \App::make('afterpay_instore_device');
$api::activate();

$api = \App::make('afterpay_instore_order');
$order = $api::create();

$api = \App::make('afterpay_instore_preapproval');
$order = $api::enquiry();

$api = \App::make('afterpay_instore_refund');
$order = $api::create();

$auth = \App::make(CultureKings\Afterpay\Model\Merchant\Authorization::class);