Skip to content
Code-Schnipsel Gruppen Projekte
Commit 6faa577b erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

Merge branch 'dev'

Übergeordnete bde118f6 d88297d5
No related branches found
No related tags found
2 Merge Requests!6feat!: quiqqer v2,!5feat!: quiqqer v2
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
use QUI\ERP\Order\Handler; use QUI\ERP\Order\Handler;
use QUI\Utils\Security\Orthos; use QUI\Utils\Security\Orthos;
use QUI\ERP\Payments\Stripe\StripeException; use QUI\ERP\Payments\Stripe\StripeException;
use Stripe\Exception\CardException;
/** /**
* Confirm a Stripe PaymentIntent * Confirm a Stripe PaymentIntent
...@@ -23,7 +24,11 @@ function ($orderHash) { ...@@ -23,7 +24,11 @@ function ($orderHash) {
return $Payment->confirmPaymentIntent($Order, $StripePaymentIntent); return $Payment->confirmPaymentIntent($Order, $StripePaymentIntent);
} catch (\Exception $Exception) { } catch (\Exception $Exception) {
QUI\System\Log::writeException($Exception); if ($Exception instanceof CardException) {
QUI\System\Log::writeDebugException($Exception);
} else {
QUI\System\Log::writeException($Exception);
}
throw new StripeException([ throw new StripeException([
'quiqqer/payment-stripe', 'quiqqer/payment-stripe',
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
use QUI\ERP\Payments\Stripe\StripeException; use QUI\ERP\Payments\Stripe\StripeException;
use QUI\ERP\Payments\Stripe\PaymentMethods\Recurring\Subscriptions; use QUI\ERP\Payments\Stripe\PaymentMethods\Recurring\Subscriptions;
use QUI\ERP\Payments\Stripe\AbstractBasePayment; use QUI\ERP\Payments\Stripe\AbstractBasePayment;
use Stripe\Exception\CardException;
/** /**
* Confirm a Stripe Subscription * Confirm a Stripe Subscription
...@@ -23,7 +24,11 @@ function ($orderHash) { ...@@ -23,7 +24,11 @@ function ($orderHash) {
$Order->getPaymentDataEntry(AbstractBasePayment::ATTR_STRIPE_SUBSCRIPTION_ID) $Order->getPaymentDataEntry(AbstractBasePayment::ATTR_STRIPE_SUBSCRIPTION_ID)
); );
} catch (\Exception $Exception) { } catch (\Exception $Exception) {
QUI\System\Log::writeException($Exception); if ($Exception instanceof CardException) {
QUI\System\Log::writeDebugException($Exception);
} else {
QUI\System\Log::writeException($Exception);
}
throw new StripeException([ throw new StripeException([
'quiqqer/payment-stripe', 'quiqqer/payment-stripe',
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
use QUI\ERP\Order\Handler; use QUI\ERP\Order\Handler;
use QUI\Utils\Security\Orthos; use QUI\Utils\Security\Orthos;
use QUI\ERP\Payments\Stripe\StripeException; use QUI\ERP\Payments\Stripe\StripeException;
use Stripe\Exception\CardException;
/** /**
* Create a Stripe PaymentIntent * Create a Stripe PaymentIntent
...@@ -24,7 +25,11 @@ function ($orderHash, $paymentMethodId) { ...@@ -24,7 +25,11 @@ function ($orderHash, $paymentMethodId) {
return $Payment->confirmPaymentIntent($Order, $StripePaymentIntent); return $Payment->confirmPaymentIntent($Order, $StripePaymentIntent);
} catch (\Exception $Exception) { } catch (\Exception $Exception) {
QUI\System\Log::writeException($Exception); if ($Exception instanceof CardException) {
QUI\System\Log::writeDebugException($Exception);
} else {
QUI\System\Log::writeException($Exception);
}
throw new StripeException([ throw new StripeException([
'quiqqer/payment-stripe', 'quiqqer/payment-stripe',
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
use Stripe\Subscription as StripeSubscription; use Stripe\Subscription as StripeSubscription;
use Stripe\Invoice as StripeInvoice; use Stripe\Invoice as StripeInvoice;
use QUI\ERP\Payments\Stripe\Utils; use QUI\ERP\Payments\Stripe\Utils;
use Stripe\Exception\CardException;
/** /**
* Create a Stripe PaymentIntent * Create a Stripe PaymentIntent
...@@ -62,7 +63,11 @@ function ($orderHash, $paymentMethodId, $resetPaymentMethod = null) { ...@@ -62,7 +63,11 @@ function ($orderHash, $paymentMethodId, $resetPaymentMethod = null) {
return Subscriptions::confirmSubscription($subscriptionId); return Subscriptions::confirmSubscription($subscriptionId);
} catch (\Exception $Exception) { } catch (\Exception $Exception) {
QUI\System\Log::writeException($Exception); if ($Exception instanceof CardException) {
QUI\System\Log::writeDebugException($Exception);
} else {
QUI\System\Log::writeException($Exception);
}
throw new StripeException([ throw new StripeException([
'quiqqer/payment-stripe', 'quiqqer/payment-stripe',
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren