Skip to content

Commit

Permalink
Update invoice status
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Nov 16, 2024
1 parent 26ff0f2 commit 064ba2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/BtcPaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function btcPayCallback(Request $request): Response
preg_match('/(?P<role>\w+(\s\+\+)?)[\s](?P<addYears>\d+)/i', $checkOrder->item_description, $matches);
User::updateUserRole($user->id, $matches['role']);
User::updateUserRoleChangeDate($user->id, null, $matches['addYears']);
$checkOrder->update(['invoice_status' => 'Settled']);
Log::info('User: '.$user->username.' upgraded to '.$matches['role'].' for BTCPay webhook: '.$checkOrder->webhook_id);

return response('OK', 200);
Expand Down

0 comments on commit 064ba2e

Please sign in to comment.