class DecoratedOrderPaymentIntentSubscriber in Commerce Stripe 8
Hierarchy
- class \Drupal\commerce_stripe\EventSubscriber\OrderPaymentIntentSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface, DestructableInterface
- class \Drupal\commerce_stripe_test\EventSubscriber\DecoratedOrderPaymentIntentSubscriber
Expanded class hierarchy of DecoratedOrderPaymentIntentSubscriber
1 string reference to 'DecoratedOrderPaymentIntentSubscriber'
- commerce_stripe_test.services.yml in tests/
modules/ commerce_stripe_test/ commerce_stripe_test.services.yml - tests/modules/commerce_stripe_test/commerce_stripe_test.services.yml
1 service uses DecoratedOrderPaymentIntentSubscriber
File
- tests/
modules/ commerce_stripe_test/ src/ EventSubscriber/ DecoratedOrderPaymentIntentSubscriber.php, line 9
Namespace
Drupal\commerce_stripe_test\EventSubscriberView source
class DecoratedOrderPaymentIntentSubscriber extends OrderPaymentIntentSubscriber {
/**
* {@inheritdoc}
*/
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;
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DecoratedOrderPaymentIntentSubscriber:: |
public | function |
Performs destruct operations. Overrides OrderPaymentIntentSubscriber:: |
|
OrderPaymentIntentSubscriber:: |
protected | property | The entity type manager. | |
OrderPaymentIntentSubscriber:: |
protected | property | The intent IDs that need updating. | |
OrderPaymentIntentSubscriber:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | |
OrderPaymentIntentSubscriber:: |
public | function | Ensures the Stripe payment intent is up to date. | |
OrderPaymentIntentSubscriber:: |
protected | function | Converts the given amount to its minor units. | |
OrderPaymentIntentSubscriber:: |
public | function | Constructs a new OrderEventsSubscriber object. |