Woocommerce receipt hook don’t work correct

I’m developing payment gateway for Woo and try to use woocommerce_receipt_ hook for submit custom form and redirect customer to third part web payment service. Any one with idea why hook doesn’t work. Thanks for helping!! Cheers!

This is my payment class code:

class my_vpos extends WC_Payment_Gateway {
  function __construct() {

      // The global ID for this Payment method
      $this->id = "my_vpos";

      $this->method_title = __( "my_vpos", 'my_vpos' );

      $ this->method_description = __( "Payment Gateway Plug-in for 
        WooCommerce", 'my_vpos' );
      $this->title = __( "my_vpos", 'my_vpos' );

      $this->has_fields = false;

      // This basically defines your settings which are then loaded with 

     $this->title = $this->get_option( 'title' );

     $this->testurl = 'https://www.exaple-payment.com/pay-gw-t/vpos';
     $this->liveurl = 'https://www.exaple-payment.com/pay-gw-t/vpos';

     // Actions

     add_action( 'woocommerce_receipt_' . $this->id, array( $this, 
 } // End __construct()

    function receipt_page( $order ){
      echo '<form action="' . $this->testurl . '" method="post" 
            <input type="hidden" name="type" value="PAYLOGIN"/>

Read more here: Woocommerce receipt hook don’t work correct

Leave a Reply

Your email address will not be published. Required fields are marked *