PHP code example of sepalevy / service-payments-api

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

    

sepalevy / service-payments-api example snippets


use  Sepalevy\ServicePaymentsApi\ServiceAPI;

$service_adapter = new \Your\Custom\Service\StripeExampleService([
	'secret' => 'xxxx',
	'public' => 'xxxx',
]);

// All methods available on 'ServiceAPI' class
$service = new ServiceAPI($service_adapter);

// Example:
$service->checkAuthentification(); // true or false
$service->getKeys(); // [ 'secret' => 'xxxx', 'public' => 'xxxx' ]