• Hi,

    Firstly I want to thank you for the great and really helpful work you have created. So far I love everything about the functionality and API of this plugin.

    So I would like to know if there is a function that can check if a license containing a given Transaction ID (txn_id) is already created and if it has been created then don’t create a new license.

    I am using this in order to create a license:

    //Licence Generation process starts
    $api_params = array(
    	'slm_action' => 'slm_create_new',
    	'secret_key' => '363h_ey91ndhy473g2vbd.hh2bv4h',
    	'first_name' => $order_billing_first_name,
    	'last_name' => $order_billing_last_name,
    	'email' => $order_billing_email,
    	'txn_id' => $order_id,
    	'product_ref' => $product_name,
    	'max_allowed_domains' => $max_allowed_domains,
    	'date_created' =>date("Y-m-d"),
    	'date_expiry' =>date('Y-m-d', strtotime('+1 year')),
    );
    
    // Send query to the license manager server
    $response = wp_remote_get(add_query_arg($api_params, WCLCFC_LICENSE_SERVER_URL), array('timeout' => 20, 'sslverify' => false));

    So is there a way how I could prior creating a license check if it already has been created by a given ‘txn_id’?

    Kind regards

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Check if license already created and if so then don’ t create new one’ is closed to new replies.