Skip to content

Commit

Permalink
Add support for Payment cancelation (#1596)
Browse files Browse the repository at this point in the history
* add passthrough method to cancel PaymentIntent

* Update Payment.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
jonathanroy and taylorotwell authored Nov 5, 2023
1 parent 1f211a3 commit f8dff8a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ public function requiresCapture()
return $this->paymentIntent->status === StripePaymentIntent::STATUS_REQUIRES_CAPTURE;
}

/**
* Cancel the payment.
*
* @param array $options
* @return \Stripe\PaymentIntent
*/
public function cancel(array $options = [])
{
return $this->paymentIntent->cancel($options);
}

/**
* Determine if the payment was canceled.
*
Expand Down

0 comments on commit f8dff8a

Please sign in to comment.