Enabled off-site payment with PayPal Express

This commit is contained in:
Hillel Coren 2014-03-19 01:33:13 +02:00
parent b523d6f44d
commit 0daa3161e3

View File

@ -176,7 +176,9 @@ class PaymentController extends \BaseController
public function show_payment($invitationKey) public function show_payment($invitationKey)
{ {
// For PayPal Express we redirect straight to their site // 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); return self::do_payment($invitationKey, false);
} }