Copy link to clipboard
Copied
I'd like to be able to recall to a webpage of my development to verify a purchase that would've been made on my site.
E.g.
Purchase on website > install plugin/extension/script > met with dialog for license validation > input license validation > give access to plugin/extension/script
Otherwise have the plugin code inaccessible or just have the code locked or uninstalled or something of the like. While developing, I would like to be able to minimize/eliminate the "copy to a friend" scenario.
Thank you in advance.
I ended up successfully piecing together scattered documentation for what I was looking to do regarding this topic. Anybody else wanting this can use what I've brought together. This is intended be used in photoshop .js (javascript) standalone scripts. File > Scripts > Browse...
While developing a script, I would variable hash and compound the script itself so it is less likely to be tampered with.
// START WEB GET CALL
reply = "";
conn = new Socket();
var hosturl = "www.yourdomain.com",
...
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I ended up successfully piecing together scattered documentation for what I was looking to do regarding this topic. Anybody else wanting this can use what I've brought together. This is intended be used in photoshop .js (javascript) standalone scripts. File > Scripts > Browse...
While developing a script, I would variable hash and compound the script itself so it is less likely to be tampered with.
// START WEB GET CALL
reply = "";
conn = new Socket();
var hosturl = "www.yourdomain.com",
fullCallUrl = "http://www.yourdomain.com/api/index.php?var=value"
if (conn.open (hosturl + ":80", "binary")) {
$.writeln("Connected!");
conn.write ("GET " + fullCallUrl + " HTTP/1.0\r\nHost:" + hosturl + "\r\nConnection: close\r\n\r\n");
reply = conn.read(999999);
$.writeln(reply); // FULL REPLY
conn.close();
}
reply = reply.toString().match(/\{.+\}/g);
reply = eval("[" + reply + "]");
alert(reply[0].info); // alert out the json object associated with a message
// END WEB GET CALL
// ------------------------------------------------------------------------------------
// START ADDING "COOKIE"/SETTING *AFTER SUCCESSFULL VERIFICATION
var settingPref = true; // master variable for boolean setting
var desc = new ActionDescriptor();// create a descriptor to hold value
desc.putBoolean ( 0 , settingPref );// store the data by type
app.putCustomOptions( 'customVariableName', desc, true );// store the descritor by unique name
var desc = app.getCustomOptions ( 'customVariableName' );// retrive by name
var settingPref = desc.getBoolean(0);// retrive the data by type
// app.eraseCustomOptions( 'testingScript' ); // delete when no longer needed, may not be needed
// END ADDING "COOKIE"/SETTING
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more