Building A Payment Plugin For Woocommerce - Error - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › Building A Payment Plugin For Woocommerce - Error (1248 Views)
| Building A Payment Plugin For Woocommerce - Error by bakenda(op): 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(op): 8:24am On Jun 21, 2015 |
mj: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(op): 9:08am On Jun 21, 2015 |
Sanuzi:Let's do the talking here. Thanks. |
| 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(op): 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. |
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
Post Threads That Will Be Visible On Google And Rank Among The Top 10 • How Does Free Web Services Make Income?? E.g Olx • Top Ten Most Visited Website In The World