georgringer / cart_stripe

Stripe for TYPO3 extension cart
1 stars 1 forks source link

Trigger FinishEvent of EXT:cart #1

Open rintisch opened 2 weeks ago

rintisch commented 2 weeks ago

Hi!

I am wondering why you are not triggering the FinishEvent of EXT:cart. It would care for sending mails and for cleaning the cart by using those two EventListeners: https://github.com/extcode/cart/tree/560a455b1f926be44092dff39350611e2e083d9d/Classes/EventListener/Order/Finish

In this case you do not have to implement it on your own. Or was there some showstopper?

georgringer commented 2 weeks ago

no real reason, maybe it was that because in previous version code was bit different? wanna give it a try and provide a PR?

rintisch commented 3 days ago

Done :)

I have a few other questions:

  1. Why is the persisting of the updated payment on success out commented? https://github.com/georgringer/cart_stripe/blob/1bcc0f29840f1acb9cd2fe27690002b83365c366/Classes/Controller/Order/PaymentController.php#L104
  2. Can we remove line 3? https://github.com/georgringer/cart_stripe/blob/1bcc0f29840f1acb9cd2fe27690002b83365c366/Configuration/TypoScript/setup.typoscript#L1-L3
  3. Can we remove this: https://github.com/georgringer/cart_stripe/blob/1bcc0f29840f1acb9cd2fe27690002b83365c366/Classes/Controller/Order/PaymentController.php#L264-L277
  4. ... and this: https://github.com/georgringer/cart_stripe/blob/main/Classes/EventListener/Order/Payment/ClearCart.php#L18