PHP code example of solutionplus / payable

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

    

solutionplus / payable example snippets


    # create payment request object from payment microservice:
    # `$payableData` should be ['key' => 'value'] pair array which represent inputs in request
    $payable = new Payable($companyReferenceNumber);
    $response = $payable->withHeaders(['X-example' => 'header-value'])->createPaymentRequest($payableData);

    [
        'gateway' => 'ired|string|exists:currencies,iso_code',
        'amount' => '_reference_number' => 'sometimes|string|min:10|max:25',

        'name' => 'treet' => 'ired|numeric|digits:5',        
    ];