Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Order paid hook for own licence server integration
- This topic has 4 replies, 2 voices, and was last updated 4 years ago by pocket.
-
AuthorPosts
-
November 5, 2020 at 3:31 pm #81830
Hi,
we are integrating our own licence server with eStore. We have based our integration on your SLM and have added code to slm-third-party-integration to perform the HTTP call to our API. This is working.
Once the order has been completed (paid), we need to unlock the licences in our licence server. Which hook should we use to do this?
For trial (free) licences we are using manual checkout. Will the same hook be called after a manual checkout is submitted? Is there a way to automatically ‘complete’ a manual order if it is an order for free products?
Thanks
IanNovember 5, 2020 at 7:04 pm #81844adminKeymasterYou can post the payment data to another script by using the following feature:
Go to the following settings area to enable the IPN forwarding:
WP eStore Settings -> 3rd Party Integration -> POST IPN to a 3rd party application
Alternatively, we have a WordPress action hook that you can use too (if you want to handle this via another custom plugin). Here is an example of how to use this hook:
add_action ('eStore_product_database_updated_after_payment', 'my_custom_tweak', 10, 2); function my_custom_tweak ($payment_data, $cart_items) { //Do your custom stuff here }
The $payment_data array will contain information that you can use to also query the customers database of eStore and get additional data for that transaction.
November 5, 2020 at 11:14 pm #81850Thanks for your response. The action looks the easiest method as it is very similar to the SLM methods.
– For trial (free) licences we are using manual checkout. Will the same hook (eStore_product_database_updated_after_payment) be called after a manual checkout is submitted?
– Is there a way to automatically ‘complete’ a manual order if it is for free products? In this case, will eStore_product_database_updated_after_payment be called?November 6, 2020 at 9:20 pm #81869adminKeymasterI am going to reply all your license manager related questions in this one post (The other post will be deleted).
If you have the following option enabled in the “Manual Checkout” settings, then yes it will trigger that hook also:
Automatically Update Customer & Products Database
The manual checkout also triggers the following action hook:
do_action('eStore_manual_checkout_form_data', $payment_data, $cart_items);
The above mentioned action hook will also pass the customer input (from the collect input addon). The following example code shows how you can read it from the custom field.
$custom_field = $payment_data['custom']; parse_str($custom_field); eStore_payment_debug("Collect input addon - field 1 value: " . $cci_val, true); eStore_payment_debug("Collect input addon - field 2 value: " . $cci_val2, true);
This custom license manager integration related question is actually beyond the scope of our standard support. Please review our terms (which you had to agree before purchasing anything from our site).
You need to use the following option for this kind of custom coding related stuff:
November 7, 2020 at 3:45 pm #81873Hi,
thanks a lot for your detailed response. We are in the process of setting up eStore and one of your colleagues suggested we firstly purchase eStore and complete a proof-of-concept for the licence server integration before purchasing the add-ons we need. With the information you have provided we can now complete our prototype – your help is greatly appreciated!
For our future reference, can you please provide a link to the documentation of the hooks and filters supported by eStore.
Thanks again
Ian -
AuthorPosts
- You must be logged in to reply to this topic.