status()) { case 'requires_action': $donation->gatewayTransactionId = $paymentIntent->id(); $donation->save(); return new RedirectOffsite($paymentIntent->nextActionRedirectUrl()); case 'succeeded': return new PaymentComplete($paymentIntent->id()); case 'processing': return new PaymentProcessing($paymentIntent->id()); default: throw new PaymentIntentException( sprintf(__('Unhandled payment intent status: %s', 'give'), $paymentIntent->status())); } } }