dimanche 30 novembre 2014

Call function on success url woocomerce payment integration


I have integrated a new payment gateway in one of my WordPress woocommerce site using direct pay method. It is redirecting on the payment gateway page successfully from the checkout page but once payment is done succesfully or failed How can I check same? How to call my function on redirection onto my success page?


return url is like: http://www.mysite.com/success or http://www.mysite.com/failed


I want to call success_payment function once it redirect back to my site:



/**
* Successful Payment!
*
* @access public
* @param array $posted
* @return void
*/
function successful_request( $posted ) {
..code goes here
}


Is there any hook available for same? I already read http://docs.woothemes.com/document/payment-gateway-api/ article but no luck.





Aucun commentaire:

Enregistrer un commentaire