Clone the project
git clone https://github.com/federicoalbanese/paystar-task
Go to the project directory
cd paystar-task
Install dependencies
composer install
npm install
Start 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);