From 0daa3161e32b73e26580819455e56434a5751172 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 19 Mar 2014 01:33:13 +0200 Subject: [PATCH] Enabled off-site payment with PayPal Express --- app/controllers/PaymentController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/PaymentController.php b/app/controllers/PaymentController.php index e614a36aa54f..9d73671cbaf3 100755 --- a/app/controllers/PaymentController.php +++ b/app/controllers/PaymentController.php @@ -176,7 +176,9 @@ class PaymentController extends \BaseController public function show_payment($invitationKey) { // For PayPal Express we redirect straight to their site - if (Auth::user()->account->isGatewayConfigured(GATEWAY_PAYPAL_EXPRESS)) + $invitation = Invitation::with('invoice.client.account')->where('invitation_key', '=', $invitationKey)->firstOrFail(); + $account = $invitation->invoice->client->account; + if ($account->isGatewayConfigured(GATEWAY_PAYPAL_EXPRESS)) { return self::do_payment($invitationKey, false); }