diff --git a/backend/app/Services/Domain/Payment/Stripe/EventHandlers/PaymentIntentSucceededHandler.php b/backend/app/Services/Domain/Payment/Stripe/EventHandlers/PaymentIntentSucceededHandler.php index acc2593918..5a134f2a90 100644 --- a/backend/app/Services/Domain/Payment/Stripe/EventHandlers/PaymentIntentSucceededHandler.php +++ b/backend/app/Services/Domain/Payment/Stripe/EventHandlers/PaymentIntentSucceededHandler.php @@ -120,7 +120,7 @@ private function updateStripePaymentInfo(PaymentIntent $paymentIntent, StripePay attributes: [ StripePaymentDomainObjectAbstract::LAST_ERROR => $paymentIntent->last_payment_error?->toArray(), StripePaymentDomainObjectAbstract::AMOUNT_RECEIVED => $paymentIntent->amount_received, - StripePaymentDomainObjectAbstract::APPLICATION_FEE => $paymentIntent->application_fee_amount, + StripePaymentDomainObjectAbstract::APPLICATION_FEE => $paymentIntent->application_fee_amount ?? 0, StripePaymentDomainObjectAbstract::PAYMENT_METHOD_ID => is_string($paymentIntent->payment_method) ? $paymentIntent->payment_method : $paymentIntent->payment_method?->id, @@ -214,7 +214,7 @@ private function markPaymentIntentAsHandled(PaymentIntent $paymentIntent, OrderD $this->logger->info('Stripe payment intent succeeded event handled', [ 'payment_intent' => $paymentIntent->id, 'order_id' => $updatedOrder->getId(), - 'amount_received' => $paymentIntent->amount_received, + 'amount_received' => $paymentIntent->amount_captured, 'currency' => $paymentIntent->currency, ]);