0

I am developing module which connects Drupal Commerce with 3rd party invoicing system. For this purpose I need to send payment information (has it been paid? how much? in what way?) after the order is complete. I guess the hook_commerce_checkout_complete() hook is the best place to do that but I can't figure out how to obtain this payment information from an $order object/entity.

1

You can see the payment method the customer selected in the $order->data array, and to determine if the order was paid in full you'd use commerce_payment_order_balance(). Any additional information would have to come from payment transaction entities whose order_id match $order->order_id.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.