Fix Stripe checkout: wrong column name stripe_checkout_session → stripe_session_id

DB column is stripe_session_id but code was writing to stripe_checkout_session,
causing a 500 on checkout and breaking payment status checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 20:35:35 +00:00
parent ecf5a7ab67
commit 714ef13897
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ try {
// Store checkout session ID
db()->update('orders',
['stripe_checkout_session' => $session['id']],
['stripe_session_id' => $session['id']],
'order_id = :id',
['id' => $orderId]
);
+3 -3
View File
@@ -29,7 +29,7 @@ if (!empty($orderId)) {
);
} else {
$order = db()->fetch(
"SELECT * FROM orders WHERE stripe_checkout_session = :session OR stripe_payment_intent = :session",
"SELECT * FROM orders WHERE stripe_session_id = :session OR stripe_payment_intent = :session",
['session' => $sessionId]
);
}
@@ -60,9 +60,9 @@ if (!isStripeConfigured()) {
try {
// Check with Stripe
if (!empty($order['stripe_checkout_session'])) {
if (!empty($order['stripe_session_id'])) {
// Check checkout session status
$session = stripe()->getCheckoutSession($order['stripe_checkout_session']);
$session = stripe()->getCheckoutSession($order['stripe_session_id']);
if ($session['payment_status'] === 'paid') {
// Update order