Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 634 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 634 Bytes

Nexi Checkout PHP SDK

Examples

  • Setup using configuration provider & api factory
use NexiCheckout\Factory\HttpClientFactory;
use NexiCheckout\Factory\PaymentApiFactory;
use NexiCheckout\Model\Request\Payment;
use NexiCheckout\Factory\Provider\HttpClientConfigurationProvider

$httpClientFactory = new HttpClientFactory($psrClient, $psrFactory, $psrStreamFactory); 
$httpClientConfigurationProvider = new HttpClientConfigurationProvider();

$api = (new PaymentApiFactory($httpClientFactory, $httpClientConfigurationProvider))
    ->create($secretKey, $isLiveMode);

$result = $api->createPayment(new Payment(...));