When URL come back from payment gateway as response, my below function is not working .
class WC_Gateway_Pay extends WC_Payment_Gateway {
public function __construct(){
add_action('woocommerce_api_' . strtolower(get_class($this)),
array($this, 'check_pay_response'));
}
function check_pay_response(){
global $woocommerce;
echo "durgesh";
}
My payment gateway response url is http:/xxx.com/my-account/. I do not understand how to call this function when response from gateway.