Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,165,305 members, 7,860,757 topics. Date: Friday, 14 June 2024 at 03:38 PM |
Nairaland Forum / Science/Technology / Webmasters / Building A Payment Plugin For Woocommerce - Error (1141 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)
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 |
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: 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: 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)
Active Facebook Page For Sale / How Your Post Can Hit Front Page On Nairaland / A Good Website Designer Wanted
(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. 11 |