function generateLicenseCF() { $app = new Application($this->app_id); $priv = openssl_pkey_get_private($app->ap_pkey); $signedData = ''; $product_code = $app->cf_product_code; $name = $this->first_name . ' ' . $this->last_name; $compositeLicenseCode = make_license_source($product_code, $name); error_log("[{$product_code}] - [{$name}] -- [{$compositeLicenseCode}]"); $license = make_phpFob_license($compositeLicenseCode, $priv); $this->license = $license; $this->update(); }
* it to the order * * Note: There are multiple security keys in FastSpring - the license request has a distinct key from the order * notification request */ require 'includes/master.inc.php'; $app = new Application(); $app->select($_POST['item_number']); // custom if (!$app->ok()) { error_log("Application {$_POST['item_name']} {$_POST['item_number']} not found!"); exit; } // FastSpring security check... if (md5($_REQUEST['security_data'] . $app->fs_license_key) != $_REQUEST['security_hash']) { die('Security check failed.'); } $name = $_POST['name']; $quantity = $_POST['quantity']; $product_code = $app->cf_product_code; $compositeLicenseCode = make_license_source($product_code, $name); error_log("[{$product_code}] - [{$name}] -- [{$compositeLicenseCode}]"); $priv = openssl_pkey_get_private($app->ap_pkey); $license = make_phpFob_license($compositeLicenseCode, $priv); echo $license; // These are the fields and values you'll need to setup in FastSpring's // license generation system. // by default, 'name' comes through as a composite name // quantity is also set. // The following is a custom parameter setup on the parameter overrides page // item_number 3 <-- this is the Shine ID number of your product -