Clone the project
git clone https://github.com/federicoalbanese/paystar-taskGo to the project directory
cd paystar-taskInstall dependencies
composer install
npm installStart the server
php artisan serv
npm run dev$invoice = new App\Services\IPG\DTOs\Invoice();
$invoice->setAmount($amount);
$payStar = new \App\Services\PaystarIpgService();
$payStar
->invoice($invoice)
->purchase(function($refId){
// use $refId to save in database.
})
->pay();$gatewayResponse = new \App\Services\IPG\DTOs\GatewayResponse($request->all());
$invoiceDto = new InvoiceDto();
$invoiceDto->setAmount($amount);
$payStar = new \App\Services\PaystarIpgService();
$payStar
->invoice($invoice)
->verify($gatewayResponse);