diff --git a/src/Payment.php b/src/Payment.php index a03b1f14..c31eee92 100644 --- a/src/Payment.php +++ b/src/Payment.php @@ -76,6 +76,26 @@ public function requiresAction() return $this->paymentIntent->status === StripePaymentIntent::STATUS_REQUIRES_ACTION; } + /** + * Determine if the payment needs to be confirmed. + * + * @return bool + */ + public function requiresConfirmation() + { + return $this->paymentIntent->status === StripePaymentIntent::STATUS_REQUIRES_CONFIRMATION; + } + + /** + * Determine if the payment needs to be captured. + * + * @return bool + */ + public function requiresCapture() + { + return $this->paymentIntent->status === 'requires_capture'; + } + /** * Determine if the payment was cancelled. * @@ -96,6 +116,16 @@ public function isSucceeded() return $this->paymentIntent->status === StripePaymentIntent::STATUS_SUCCEEDED; } + /** + * Determine if the payment is processing. + * + * @return bool + */ + public function isProcessing() + { + return $this->paymentIntent->status === StripePaymentIntent::STATUS_PROCESSING; + } + /** * Validate if the payment intent was successful and throw an exception if not. *