PHP code example of pythagus / lydia
1. Go to this page and download the library: Download pythagus/lydia 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/ */
pythagus / lydia example snippets
Lydia::setInstance(new MyLydiaFacade()) ;
$request = new PaymentRequest() ;
$request->setFinishCallback('my/route') ;
$data = $request->execute([
'amount' => 5,
'recipient' => '[email protected]'
]) ;
// Save your data.
return $request->redirect() ;
$request = new PaymentStateRequest("payment_request_uuid") ;
$state = $request->execute() ;
$request = new RefundRequest("payment_transaction_identifier") ;
$status = $request->execute([
'amount' => 10
]) ;
lydia.php
example/lydia.php