Not processing payment on woocommerce after paying on g (1 post)

  1. Federico Giust
    Posted 2 years ago #

    Hi Guys,

    I'm working on a custom payment gateway integration.
    So far it goes to the payment gateway, the user can pay with Visa it gets authorized and then redirects back to the endpoin /checkout/order-received/.

    My problem is that my plugin so far is not able to process the payment result. So the function to update the order and stuff is never executed.

    How do I make it process the payment result?

    I've got the action for this on my plugin but is never executed

    add_action(	'woocommerce_check_response_' . $this->id 					, array( $this, 'check_response' ));
    add_action( 'woocommerce_receipt_' . $this->id 							, array( $this, 'receipt_page'   ));
    add_action( 'woocommerce_update_options_payment_gateways_' . $this->id 	, array( $this, 'process_admin_options' ));
    add_action( 'woocommerce_thankyou_' . $this->id 						, array( $this, 'check_response'  ));

    I also have the corresponding functions check_response, receipt_page and process_admin_options.

    I'm using the WC_Logger to log into a txt file and I've set up the plugin to log each time each one of the functions is getting executed and the log corresponding to check_response is not there so that means it nevers runs that function.

    Is that something to do with the endpoint? How do I make it run my function to process the payment result? Do I need to redirect back to a different end point so it runs my function?

    Thanks in advance.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Federico Giust
  • This topic is not resolved
  • WordPress version: 3.9.1