0

I am trying to create a plugin for Craft Commerce that manipulates order data after a payment has been captured. I'm trying to hook into the "After Capture Transaction" event like this:

Event::on(
            Payments::class,
            Payments::EVENT_AFTER_CAPTURE_TRANSACTION,
            function(TransactionEvent $e) {
              $data = $e->data;
            }
        );

But I'm not sure what kind of data structure "$data" is and what to do next.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.