PHP code example of pickupman / linx-pay

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

    

pickupman / linx-pay example snippets


    $options = [
        'username' => 'Your Username',
        'password' => 'Your Password',
        'client_id' => 'Your API Client ID',
        'client_secret' => 'Your API Client Secret'
    ];

    $linx = new Pickupman\LinxPay($options);

    $poll = $linx->poll();
    var_dump($poll); // JSON response object {'success' : true }

    $redemption = $linx->redemption([
        'linx_card_number' => '1234567890123456',
        'customer' => [
            'type'      => 'drivers_license',
            'name'      => 'John Smith',
            'id_number' => '1234', // drivers license number
            'state'     => 'Colorado' // drivers license State
        ],
        'product_type' => 'medicinal', // or recreational
        'store_location' => [
            'name' => 'Dispensary Name'
        ],
        'budtender' => [
            'name' => 'David Smith'
        ],
        'amount' => '200.00'
    ]);

    var_dump($redemption); // JSON response object