<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
paysera / lib-wallet-transfer-rest-client example snippets
use Paysera\Client\TransfersClient\ClientFactory;
$clientFactory = new ClientFactory([
'base_url' => 'https://wallet.paysera.com/transfer/rest/v1/', // optional, in case you need a custom one.
'basic' => [ // use this, it API sh_token' => 'my-refresh-token',
],
],
// other configuration options, if needed
]);
$transfersClient = $clientFactory->getTransfersClient();
use Paysera\Client\TransfersClient\Entity as Entities;
$transferRegistrationParameters = new Entities\TransferRegistrationParameters();
$transferRegistrationParameters->setConvertCurrency($convertCurrency);
$transferRegistrationParameters->setUserIp($userIp);
$result = $transfersClient->reserveTransfer($id, $transferRegistrationParameters);
use Paysera\Client\TransfersClient\Entity as Entities;
$transferPassword = new Entities\TransferPassword();
$transferPassword->setValue($value);
$result = $transfersClient->provideTransferPassword($id, $transferPassword);
use Paysera\Client\TransfersClient\Entity as Entities;
$transferRegistrationParameters = new Entities\TransferRegistrationParameters();
$transferRegistrationParameters->setConvertCurrency($convertCurrency);
$transferRegistrationParameters->setUserIp($userIp);
$result = $transfersClient->registerTransfer($id, $transferRegistrationParameters);
use Paysera\Client\TransfersClient\Entity as Entities;
$transferRegistrationParameters = new Entities\TransferRegistrationParameters();
$transferRegistrationParameters->setConvertCurrency($convertCurrency);
$transferRegistrationParameters->setUserIp($userIp);
$result = $transfersClient->signTransfer($id, $transferRegistrationParameters);
$result = $transfersClient->getTransfer($id);
$result = $transfersClient->deleteTransfer($id);
use Paysera\Client\TransfersClient\Entity as Entities;
$transferInput = new Entities\TransferInput();
$transferInput->setAmount($amount);
$transferInput->setBeneficiary($beneficiary);
$transferInput->setPayer($payer);
$transferInput->setFinalBeneficiary($finalBeneficiary);
$transferInput->setPerformAt($performAt);
$transferInput->setChargeType($chargeType);
$transferInput->setUrgency($urgency);
$transferInput->setNotifications($notifications);
$transferInput->setPurpose($purpose);
$transferInput->setPassword($password);
$transferInput->setCancelable($cancelable);
$transferInput->setAutoCurrencyConvert($autoCurrencyConvert);
$transferInput->setAutoChargeRelatedCard($autoChargeRelatedCard);
$transferInput->setAutoProcessToDone($autoProcessToDone);
$transferInput->setReserveUntil($reserveUntil);
$transferInput->setCallback($callback);
$result = $transfersClient->createTransfer($transferInput);
use Paysera\Client\TransfersClient\Entity as Entities;
$transfersFilter = new Entities\TransfersFilter();
$transfersFilter->setCreatedDateFrom($createdDateFrom);
$transfersFilter->setCreatedDateTo($createdDateTo);
$transfersFilter->setCreditAccountNumber($creditAccountNumber);
$transfersFilter->setDebitAccountNumber($debitAccountNumber);
$transfersFilter->setStatuses($statuses);
$result = $transfersClient->getTransfers($transfersFilter);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.