cancel
Showing results for 
Search instead for 
Did you mean: 

Offline payment empty observer

Offline payment empty observer

Hey,

 

Im trying to do an offline payment where my customer wants to "payonbill". All works fine and i added this snippet:

 

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <payment>
            <checkmo>
                <active>1</active>
                <model>Magento\OfflinePayments\Model\Checkmo</model>
                <order_status>processing</order_status>
                <title>Check / Money order</title>
                <allowspecific>0</allowspecific>
                <group>offline</group>
                <payment_action>authorize_capture</payment_action>
            </checkmo>
        </payment>
    </default>
</config>

The problem however exists where i have to connect some stuff once a payment is receive for certain products. I do this with an observer on 

sales_order_invoice_pay

 

Thing is that the event is thrown for the offline payment however the event is empty. What can i do to resolve that? Or is there a better way to approach this scenario? At this moment i am receiving the orderId in the observer and continue from there.

 

Best,

Pim