I did try to add Extension attributes to Magento\Checkout\Api\Data\PaymentDetailsInterface for my custom payment module.
After setup:di:compile (it took more than two hours, is this normal??) my payment method and none of the existing OfflinePayment methods did work anymore. When placing an order in checkout I got this error message:
{"messages":{"error":[{"code":500,"message":"Fatal Error: 'Call to a member function getMethod() on null' in '...myModule\\Observer\\BeforePlaceOrderObserver.php' on line 46","trace":"Trace is not available."}]}}
It shows that my Observer class was not able to get a payment object anymore. The code below is from Magento\OfflinePayments\Observer\
public function execute(\Magento\Framework\Event\Observer $observer)
{
$payment = $observer->getEvent()->getPayment();
$instructionMethods = [
Banktransfer::PAYMENT_METHOD_BANKTRANSFER_CODE,
Cashondelivery::PAYMENT_METHOD_CASHONDELIVERY_CODE
];
if (in_array($payment->getMethod(), $instructionMethods)) {...
Even after rolling back my code (and compiling again) the system's behaviour is still the same. Additional information: Because I am working on a bitnami stack I do not work on the latest m2 version. Before compiling I did the trick found in that ticket to prevent from the related compiling error. As the author said there are several more errors but the compiling did finish.
Any ideas?
Update: The raising event is "sales_order_place_after" As far as I can see the getPayment()-method returns a null value. But I have no idea why.