-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Send order email for Braintree Paypal orders #13898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send order email for Braintree Paypal orders #13898
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid copy past of observer Magento/Quote/Observer/Webapi/SubmitObserver.php
Just move it from Webapi namespace and define configuration in Magento/Quote/etc/frontend/events.xml
cdc2bbe
to
c751c86
Compare
@sidolov Moved the observer out of the Webapi namespace and updated the event configs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide correct namespace for unit test (Magento\Quote\Test\Unit\Observer\Webapi -> Magento\Quote\Test\Unit\Observer)
Order emails are sent using observers on the `sales_model_service_quote_submit_success` event, but only in the `webapi_rest` and `webapi_soap` areas. When customers checkout with Braintree Paypal the order placement occurs in the `frontend` area with a request to `Magento\Braintree\Controller\Paypal\PlaceOrder`, so these orders were not sent a new order email. Fixes magento#13778 Fixes magento#12792
c751c86
to
975137b
Compare
@sidolov Wow that was sloppy. I've punished myself accordingly 😄 |
Hi @sidolov, thank you for the review. |
<iframe src="https://www.facebook.com/plugins/follow?href=https%3A%2F%2Fwww.facebook.com%2Fprofile.php%3Fid%3D100023737004476&layout=standard&show_faces=true&colorscheme=light&width=450&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe> |
Description
This commits adds a frontend observer for sending new order emails.
Order emails are sent using observers on the
sales_model_service_quote_submit_success
event, but only in thewebapi_rest
andwebapi_soap
areas. When customers checkout withBraintree Paypal the order placement occurs in the
frontend
area witha request to
Magento\Braintree\Controller\Paypal\PlaceOrder
, so theseorders were not sent a new order email.
Fixed Issues (if relevant)
Manual testing scenarios
braintree/paypal/review
braintree/paypal/placeorder
Contribution checklist