Add Paystack, Flutterwave, and Hubtel for encounter billing.
Deploy Ladill Care / deploy (push) Successful in 1m0s
Deploy Ladill Care / deploy (push) Successful in 1m0s
Clinics on Pro/Enterprise can connect their own gateway in Integrations and collect card or MoMo on bills with 0% Ladill fee, while cash payments and balance totals stay correct for pending checkouts.
This commit is contained in:
@@ -58,12 +58,14 @@ class BillController extends Controller
|
||||
$this->authorizeAbility($request, 'payments.manage');
|
||||
$this->authorizeBill($request, $bill);
|
||||
|
||||
$manualMethods = array_keys(collect(config('care.payment_methods', []))->except(['gateway'])->all());
|
||||
|
||||
$payment = $this->bills->recordPayment(
|
||||
$bill,
|
||||
$this->ownerRef($request),
|
||||
$request->validate([
|
||||
'amount_minor' => ['required', 'integer', 'min:1'],
|
||||
'method' => ['required', 'string', 'in:'.implode(',', array_keys(config('care.payment_methods')))],
|
||||
'method' => ['required', 'string', 'in:'.implode(',', $manualMethods)],
|
||||
'reference' => ['nullable', 'string', 'max:100'],
|
||||
]),
|
||||
$this->ownerRef($request),
|
||||
|
||||
Reference in New Issue
Block a user