Skip to content

Commit

Permalink
Remove ability to pay for equipment usage online
Browse files Browse the repository at this point in the history
  • Loading branch information
rjackson committed Dec 29, 2024
1 parent c1b1044 commit bc1f7d4
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 22 deletions.
7 changes: 0 additions & 7 deletions app/Handlers/PaymentEventHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ public function onCreate($userId, $reason, $ref, $paymentId, $status)

$this->recordDoorKeyPaymentId($userId, $paymentId);

} elseif ($reason == 'storage-box') {


} elseif ($reason == 'equipment-fee') {

$this->updateBalance($userId);

} elseif ($reason == 'costs') {

$this->updateBalance($userId);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/PaymentOverviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function index()


$laserCutterInvestment = $this->paymentRepository->getPaymentsByReference('laser-cutter')->sum('amount');
$laserCutterMoneySpent = $this->paymentRepository->getEquipmentFeePayments('laser')->sum('amount');
$laserCutterMoneySpent = 0;

return \View::make('payment_overview.index')->with(compact('balancePaidIn', 'balancePaidOut', 'balanceLiability', 'storageBoxLiability', 'doorKeyLiability', 'laserCutterInvestment', 'laserCutterMoneySpent'));
}
Expand Down
12 changes: 0 additions & 12 deletions app/Repo/PaymentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,18 +291,6 @@ public function getPaymentsByReference($reference)
return $this->model->where('reference', $reference)->get();
}

/**
* @param string $referencePrefix
* @return \Illuminate\Database\Eloquent\Collection
*/
public function getEquipmentFeePayments($referencePrefix)
{
return $this->model->where('reason', 'equipment-fee')->get()->filter(function ($payment) use ($referencePrefix) {
return strpos($payment->reference, ':' . $referencePrefix) !== false;
});
}


/**
* Return a paginated list of balance affecting payment for a user
* @param $userId
Expand Down
2 changes: 0 additions & 2 deletions resources/views/equipment/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@
<p>
Make a payment for your usage of this equipment below.
</p>

<div class="paymentModule" data-reason="equipment-fee" data-display-reason="Usage Fee" data-button-label="Pay Now" data-methods="access_fee" data-ref="{{ $equipment->slug }}"></div>
</div>
@endif
@else
Expand Down

0 comments on commit bc1f7d4

Please sign in to comment.