Jump to content

Question about hook ActionPaymentConfirmation

Recommended Posts

Hi all,

I just created a module for dropshipping and I use the hook ActionPaymentConfirmation but I need to be sure the payment is really ok and validated. 

So I'm trying to get the current_state of the order to verify it's paid with the configuration table. But the variable current_state is at 0 because it seems it's updated later on the ps_orders table.

Could you help me about the hook I could use ? 

Important: this hook must be called after the payment is verified, from the front-office orders AND from back-office orders.

Thanks a lot in advance.


Share this post

Link to post
Share on other sites

The hook is called in this logical condition

        // executes hook
        if (in_array($new_os->id, array(Configuration::get('PS_OS_PAYMENT'), Configuration::get('PS_OS_WS_PAYMENT')))) {
            Hook::exec('actionPaymentConfirmation', array('id_order' => (int)$order->id), null, false, true, false, $order->id_shop);

So it really depends on where the order originated from and what payment module was used, and if that payment module sets the proper order state when the payment is received.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More