1. Go to this page and download the library: Download paysera/lib-checkout-client 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/ */
paysera / lib-checkout-client example snippets
use Paysera\Client\CheckoutClient\ClientFactory;
$clientFactory = new ClientFactory([
'base_url' => 'https://checkout-eu-a.paysera.com/checkout/rest/v1/', // optional, in case you need a custom one.
'basic' => [ // use this, it API en' => 'my-refresh-token',
],
],
// other configuration options, if needed
]);
$checkoutClient = $clientFactory->getCheckoutClient();
use Paysera\Client\CheckoutClient\Entity as Entities;
$email = new Entities\Email();
$email->setEmail($email);
$result = $checkoutClient->setPaymentRequestEmail($id, $email);
use Paysera\Client\CheckoutClient\Entity as Entities;
$filter = new \Paysera\Component\RestClientCommon\Entity\Filter();
$filter->setLimit($limit);
$filter->setOffset($offset);
$filter->setOrderBy($orderBy);
$filter->setOrderDirection($orderDirection);
$filter->setAfter($after);
$filter->setBefore($before);
$result = $checkoutClient->getPaymentRequestMethods($id, $filter);
use Paysera\Client\CheckoutClient\Entity as Entities;
$paymentMethod = new Entities\PaymentMethod();
$paymentMethod->setMethodKey($methodKey);
$result = $checkoutClient->startPaymentRequestPayment($id, $paymentMethod);
use Paysera\Client\CheckoutClient\Entity as Entities;
$authorizationParameters = new Entities\AuthorizationParameters();
$authorizationParameters->setToken($token);
$result = $checkoutClient->authorizePaymentRequest($id, $authorizationParameters);
use Paysera\Client\CheckoutClient\Entity as Entities;
$paymentRequestFilter = new Entities\PaymentRequestFilter();
$paymentRequestFilter->setBusinessId($businessId);
$paymentRequestFilter->setStatus($status);
$paymentRequestFilter->setMethodKey($methodKey);
$result = $checkoutClient->getPaymentRequests($paymentRequestFilter);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.