We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1415f4 commit f89994eCopy full SHA for f89994e
lib/algora_web/live/org/job_live.ex
@@ -674,8 +674,15 @@ defmodule AlgoraWeb.Org.JobLive do
674
675
@impl true
676
def handle_event("process_payment", %{"payment" => %{"payment_type" => "stripe"}}, socket) do
677
+ on_behalf_of =
678
+ if socket.assigns.current_user_role in [:admin, :mod] do
679
+ socket.assigns.current_org
680
+ else
681
+ socket.assigns.current_user
682
+ end
683
+
684
case Jobs.create_payment_session(
- socket.assigns.current_user,
685
+ on_behalf_of,
686
socket.assigns.job,
687
socket.assigns.current_org.subscription_price
688
) do
0 commit comments