Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,962 members, 7,806,784 topics. Date: Tuesday, 23 April 2024 at 11:56 PM

Building A Payment Plugin For Woocommerce - Error - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Building A Payment Plugin For Woocommerce - Error (1119 Views)

Recmmended Hosting For Woocommerce / Anyalekwa Of Igbere TV Building A House After DSS Arrest (Pics) / Panama Paper: Wordpress Plugin, Possible Cause Of Hack - Wordfence (2) (3) (4)

(1) (Reply) (Go Down)

Building A Payment Plugin For Woocommerce - Error by bakenda(m): 7:52am On Jun 21, 2015
Hello, I'm working on a payment gateway plugin for woocommerce,
the problem is the return url page always shows '1' and doesn't execute
the callback function, has anyone experience with developing a payment
plugin for woocommerce?
Re: Building A Payment Plugin For Woocommerce - Error by mj(m): 8:22am On Jun 21, 2015
How Are u getting the returned url?
Re: Building A Payment Plugin For Woocommerce - Error by bakenda(m): 8:24am On Jun 21, 2015
mj:
How Are u getting the returned url?


WC()->api_request_url( 'my_payment_gateway' );
Re: Building A Payment Plugin For Woocommerce - Error by Sanuzi(m): 9:01am On Jun 21, 2015
Lets Talk:

Mobile/Whatsapp: 07038641600

BBM: 7B663F3A

www.africanwebservice.com

An expert in Blog Design,content management systems (CMS) such as
Webpagemaker,Frontpage, wordpress, joomla, drupal,
ecommerce platforms such as opencart, magento, Abante cart,WHMCS, prestashop.
Blogs:Ghost,serendipity,eggblog
Forums:SMF,Vanilla,phpBB,
Polls and Survey Sites:Limesurvey,littlepoll,piwik

Re: Building A Payment Plugin For Woocommerce - Error by bakenda(m): 9:08am On Jun 21, 2015
Sanuzi:
Lets Talk:

Mobile/Whatsapp: 07038641600

BBM: 7B663F3A


Let's do the talking here. Thanks.

1 Like

Re: Building A Payment Plugin For Woocommerce - Error by mj(m): 8:25pm On Jun 21, 2015
You need to add a Listener.

class is class WC_Gateway_PayNow extends WC_Payment_Gateway {}

// Payment listener/API hook
add_action does this add_action( 'woocommerce_api_wc_gateway_paynow', array( $this, 'check_ipn_response' ) );

function check_ipn_response() {
//handle the responses here returned.
}
Re: Building A Payment Plugin For Woocommerce - Error by bakenda(m): 7:24am On Jun 22, 2015
mj:
You need to add a Listener.
class is class WC_Gateway_PayNow extends WC_Payment_Gateway {}
// Payment listener/API hook
add_action does this add_action( 'woocommerce_api_wc_gateway_paynow', array( $this, 'check_ipn_response' ) );
function check_ipn_response() {
//handle the responses here returned.
}

Thanks, that was in place but still got the error.
Re: Building A Payment Plugin For Woocommerce - Error by mj(m): 9:03am On Jun 22, 2015
Have this in the check_ipn_response() function. supply the order Id.
$orderId = $posted['orderID'];
$order = new WC_Order( (int) $order_id );
$redirect_url = $this->get_return_url( $order );
wp_redirect( $redirect_url );

Try this or paste your code for us to debug.

Thanks.

(1) (Reply)

How Does Free Web Services Make Income?? E.g Olx / Please Help, I Need A USA Adsense Account / Special Training On Wodpress,magento And Open Cart Begins 1st Oct.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.