4 / 4
Nov 2012

I have a few questions about sending generated codes because I have never scripted a non-form POST.

So first, how is the response created and / or is there a sample document from e-junkie?

Second, can you later POST data with identifying information to update e-junkie or does it have to be a direct response? One reason I ask this is I would like to also integrate a feature like maxmind, which leads to my third question.

How should the response be handled should I choose to reject the order? I highly doubt e-junkie will initiate the refund for me, but what should I tell e-junkie to explain the order will not be processed?

  • created

    Nov '12
  • last reply

    Nov '12
  • 3

    replies

  • 1.3k

    views

  • 2

    users

  • 2

    links

It works exactly like a regular form-style POST, just as if the name=value pairs were submitted in an HTML form. Your keygen script should return whatever raw plaintext output you want us to provide to the buyer as their key/serial/license/PIN code, which will also be saved to your E-junkie Transaction Log for each order. Whatever output your script returns will be inserted as-is in the thank-you email message we send the buyer for that product. This can only be a one-shot, submission-and-response routine; there would be no subsequent interaction between your keygen script and our system.



Typically, your keygen script's output should be only the actual code itself, but you can format it, insert newlines, etc. if needed for clarity -- e.g., if you need to output multiple codes to each buyer, you could separate them by newlines and/or add brief text labels to indicate what each code is for. Preferably, any boilerplate explanatory/instructional text should NOT be included in your keygen script's code output, as that would just clutter up your Transaction Log, and you can customize your thank-you email and/or thank-you page to provide that sort of text:

http://www.e-junkie.com/ej/help.custom.thankyou-email.htm

1http://www.e-junkie.com/ej/help.custom.thankyou-page.htm1



If your script does not return any output (e.g. if your script accepts the submission but rejects fulfilling the order by returning any output), then in place of inserting the code in the buyer's thank-you email we would instead just insert an instruction to contact the seller. You would issue any refunds yourself from your payment processor account (e.g. PayPal) which handled the buyer's checkout payment. When the payment processor informs us of such a refund, we would amend your Transaction Log accordingly.

So you answered most of my questions, but what I was looking for with the response question is how do I return information? Once it is sent to me I will do what I need with it, but then how do I send a response back? Is it using cURL or something?