public function DecoratedOrderPaymentIntentSubscriber::destruct in Commerce Stripe 8
Performs destruct operations.
Overrides OrderPaymentIntentSubscriber::destruct
File
- tests/
modules/ commerce_stripe_test/ src/ EventSubscriber/ DecoratedOrderPaymentIntentSubscriber.php, line 14
Class
Namespace
Drupal\commerce_stripe_test\EventSubscriberCode
public function destruct() {
foreach ($this->updateList as $intent_id => $amount) {
try {
PaymentIntent::update($intent_id, [
'amount' => $amount,
]);
} catch (StripeError $e) {
// Ensure all API exceptions throw during testing.
throw $e;
}
}
}