I am setting up a webshop using WordPress and WooCommerce. I want to use it to sell software which uses some copy protection. So when the customer buys the software he should receive an individual licence code by e-mail.
What actually works: I can create a PayPal "buy now" button, enter my product ID there and define the variable "notify_url" to the url of my licensing server. This works well but I don't want to use a "buy now" button.
Instead I would like to integrate it into the shop system WooCommerce. I managed to setup the PayPal Standard process there but what is missing is the interaction with the licensing server.
So my question is: How can I configure WooCommerce so that my licensing server is contacted by PayPal or WooCommerce with information of the purchase, the product ID and the customers e-mail address in order to generate the license key and send it to the customer?
thank you very much!
You can use
PayPal IPN
OR
Hook into WooCommerce hook
woocommerce_order_status_completed
orwoocommerce_payment_complete_order_status
Example: