₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,328,387 members, 8,435,483 topics. Date: Sunday, 28 June 2026 at 06:58 PM

Toggle theme

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

Nairaland ForumScience/TechnologyWebmastersBuilding A Payment Plugin For Woocommerce - Error (1249 Views)

1 Reply (Go Down)

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:
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(op): 9:08am On Jun 21, 2015
Sanuzi:
Lets Talk:

Mobile/Whatsapp: 07038641600

BBM: 7B663F3A
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:
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

Recmmended Hosting For WoocommerceAnyalekwa Of Igbere TV Building A House After DSS Arrest (Pics)Panama Paper: Wordpress Plugin, Possible Cause Of Hack - Wordfence234

Video : How To Create Custom Email Address For Blogger BlogAdsense Earners, Is This Rpm Real? (Resolved)Oracle Database Administration Or Web Application Developer