Skip to content

Commit

Permalink
Stripe: Check the correct status for completed checkout sessions.
Browse files Browse the repository at this point in the history
In #1256 the code 'succeeded' was used, instead of the documented 'complete'.

https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-status

This appears to have resulted in this code branch never having worked.
  • Loading branch information
dd32 authored Nov 8, 2024
1 parent 5cf081c commit 0ac1e68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ public function pre_attendee_timeout( $attendee_id ) {
}

// Uh oh, we've hit timeout on a ticket, but the linked checkout session succeeded.
if ( 'succeeded' === $session['status'] && 'paid' === $session['payment_status'] ) {
if ( 'complete' === $session['status'] && 'paid' === $session['payment_status'] ) {
$camptix->log( 'Stripe checkout timed out, but order succeeded.', $attendee_id, $session );

$transaction_id = $session['payment_intent']['latest_charge'] ?? '';
Expand Down

0 comments on commit 0ac1e68

Please sign in to comment.