craigchristenson / woocommerce-2checkout-api

2Checkout Payment API WooCommerce Payment Module
MIT License
57 stars 43 forks source link

PHP Notice: Undefined property: WC_Gateway_Twocheckout::$notify_url in /wp-content/plugins/twocheckout/wc-twocheckout.php on line 365 #42

Open Jon007 opened 6 years ago

Jon007 commented 6 years ago

noticing in the error logs: PHP Notice: Undefined property: WC_Gateway_Twocheckout::$notify_url in /wp-content/plugins/twocheckout/wc-twocheckout.php on line 365

It looks like the notify url is not implemented, and only referenced in the logging statement: $this->log( 'Generating payment form for order ' . $order->get_order_number() . '. Notify URL: ' . $this->notify_url );

I was going to ask, when using the 2Checkout API Gateway, what is the correct setting to set in 2Checkout for Instant Notification Settings... For example this is equivalent to the IPN notification url in paypal which would be set to eg: http://example.com/?wc-api=WC_Gateway_Paypal

In the standard paypal gateway this is implemented by:

// Handle wc-api endpoint requests. 
add_action( 'parse_request', array( $this, 'handle_api_requests' ), 0 ); 
...
public function handle_api_requests() { 
global $wp; 
if ( ! empty( $_GET['wc-api'] ) ) { 

... etc

I checked through the code and I can't see any code like this in the implementation at the moment.