Share via E-Mail
Share on Twitter
Share on Facebook
E-junkie Blog
E-junkie FaceBook Page
E-junkie @ Twitter

E-junkie Ecommerce Forums » E-junkie Discussions

Tag Cloud for this topic:

How to send a generated key to e-junkie via HTTP



koodi
member
Posts: 2


I am testing my key generator (hosted in my site), coding with PHP.

Once my key generator is executed, I must allow e-junkie to capture this key license so it's going to be embedded into the receipt email the customer receives.

So does anyone know what's the PHP function I must use to send the result (the generated key) back to the e-junkie's server? I'm not sure if it's a simple "echo" or I must use something like "curl".

Any hint will be very appreciated.


#
POSTED ON: September 2, 2010 @ 11:19 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 4354


First, I'll refer you to our help page for sending generated codes:
http://www.e-junkie.com/ej/help.keygen.htm

In a nutshell, you'd configure your product in Seller Admin with the Send Generated Codes setting enabled. That will allow you to enter a keygen URL for the product. When a buyer orders that product, once their payment is completed, our service will tap your keygen URL to obtain a code. Whatever raw text output your URL returns will be forwarded as-is in the thank-you email we send to the buyer.


#
POSTED ON: September 2, 2010 @ 15:12 GMT -7




koodi
member
Posts: 2


Hi thanks for the comment!
I'm following what is in the HELP page you mentioned, but what I'm not sure is what's the correct way to output the keycodes using PHP. If I just use "print", all the keycodes are publicly available using a browser.


#
POSTED ON: September 2, 2010 @ 15:49 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 4354


We can't advise you on general programming techniques, but we can clarify aspects of how our system works.

Yes, since we would be hitting the URL of your keygen script via HTTP, that means if someone already knew the exact URL of your keygen script somehow, then browsing to that URL directly would display a generated code unless you take precautions to prevent that.

You may want to program your keygen to require some of the parameters we POST to its URL, as documented on the help page I linked previously -- in particular, note the 'handshake' parameter, which you may find useful to validate when our server is contacting yours.

Assuming you're hosted on a Linux-based server running the typical Apache web server software, you may want to place the keygen in its own subdirectory, then in that same folder place the following directives in a plaintext file named ".htaccess", which tells Apache to only allow connections from e-junkie.com:

<limit GET>
satisfy any
order allow,deny
Allow from e-junkie.com
</limit>

<limit POST>
satisfy any
order allow,deny
Allow from e-junkie.com
</limit>


#
POSTED ON: September 2, 2010 @ 16:49 GMT -7


You must be logged in to make a post. Please click here to login.

30 Day Money Back Guarantee
PayPal Certified Integration
Google Checkout Certified Integration
Slam the Online Scam