The FedaPay PHP library provides a seamless integration with back-end applications developed in PHP, offering tools to manage transactions and interact with the FedaPay API. It is compatible with popular frameworks such as Laravel and Symfony.
/* Replace YOUR_SECRET_API_KEY with your secret API key */\FedaPay\FedaPay::setApiKey("YOUR_SECRET_API_KEY");/* Specify whether you want to run your query in test or live mode */\FedaPay\FedaPay::setEnvironment('sandbox'); // or setEnvironment('live');/* Create customer */\FedaPay\Customer::create([ "firstname" => "John", "lastname" => "Doe", "email" => "John.doe@gmail.com", "phone_number" => [ "number" => "+22966666600", "country" => 'bj' // 'bj' is the country code for Benin ]]);
To go further with PHP integration, check out the following resources:Official GitHub repository : fedapay-phpAPI Reference : api-referenceDemo app source code : php-sampleLive demo : phpsampleThese resources will guide you step by step to integrate FedaPay effectively into your PHP projects.