PHP code example of treestoneit / laravel-converge-api

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

    

treestoneit / laravel-converge-api example snippets


return [
    /*
     * Merchant ID: Elavon-assigned Converge account ID.
     */
    'merchant_id' => env('CONVERGE_MERCHANT_ID', ''),

    /*
     * Converge User ID: The user ID with Hosted Payment API User status that
     * can send transaction requests through the terminal.
     */
    'user_id'     => env('CONVERGE_USER_ID', ''),

    /*
     * Terminal ID: Unique identifier of the terminal that will process the 
     * transaction request and submit to the Converge gateway.
     * 
     * Important: The ssl_user_id sending the transaction request must be 
     * associated with the terminal that will process the request.
     */
    'pin'         => env('CONVERGE_PIN', ''),

    /*
     * Demo / Live Site
     */
    'demo'        => env('CONVERGE_DEMO', true),
];

    $converge = app(\Treestoneit\LaravelConvergeApi\Converge::class);

    $createSale = $converge->authOnly([
        'ssl_card_number' => '5121212121212124',
        'ssl_exp_date' => '0325',
        'ssl_cvv2cvc2' => '321',
        'ssl_amount' => '250.00',
        'ssl_add_token' => 'Y',
    ]);
bash
php artisan vendor:publish --provider="Treestoneit\LaravelConvergeApi\LaravelConvergeApiServiceProvider" --tag="config"