Adding extra submit handler for checkout pane
I have a checkout pane for customer billing information and I'm trying to add an additional validate + submit handler for it to allow me to verify the address via a 3rd party service. At the moment, I can do something like:
$checkout_panes['customer_profile_billing']['callbacks']['checkout_form_submit'] = 'mymodule_customer_profile_billing_form_submit';
This triggers the function defined, but seems to replace the original submit handler which means I lose my data when I hit the payment page.
I've tried appending my callback as per usual form_alter code, eg: $form['#submit'] = 'myfunction'; but this doesn't work. I've also tried the same sort of thing to the continue button's submit array but then have issues dealing with the $order object.
What's the recommended approach here? The documentation in commerce_checkout.api.php is nice, but it only shows me how I can replace submit handlers... not build on them.
Any ideas greatly received.