mirror of
https://github.com/myronblair/tomsjavajive
synced 2026-06-30 17:50:32 -05:00
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:
@@ -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]
|
||||
);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user