solutionplus/payable is a Laravel package for dealing with specific case of payments, it doesn't suit all needs.
You can install the package using composer
# cli commands
composer require solutionplus/payable
There is some predefined methods to perform the needed actions:
# create payment request object from payment microservice:
# `$payableData` should be ['key' => 'value'] pair array which represent inputs in request
$payable = new Payable($companyReferenceNumber);
$response = $payable->withHeaders(['X-example' => 'header-value'])->createPaymentRequest($payableData);
// $payableData
validation rules are as the following:
[
'gateway' => 'required|string|exists:gateways,name',
'currency' => 'required|string|exists:currencies,iso_code',
'amount' => 'required|numeric|min:1|max:9999999999',
'due_date' => 'required|date_format:Y-m-d H:i:s|after:' . now(),
'payable_reference_number' => 'sometimes|string|min:10|max:25',
'name' => 'required|string|min:3|max:225',
'email' => 'required|email',
'phone' => 'required|min:1|digits_between:9,15',
'country_code' => 'required_with:phone|min:3|max:5',
'street' => 'required|string|min:3|max:20',
'city' => 'required|string|min:3|max:20',
'state' => 'required|string|min:3|max:20',
'country' => 'required|string|min:3|max:20',
'zip' => 'required|numeric|digits:5',
];
UNDER CONSTRUCTION.
Solutionplus/payable package is limited and proprietary software belongs to Solutionplus.net company.