18 / 18
Sep 2012

Hi,



I have already looked at the different sites at e-junkie (Integrating E-junkie With 3rd-Party & Custom Services etc.), but I don't think they have the answers to my questions or maybe it's me. Anyway, please guide me through.



Short story: A person that buys one of my pdf-files needs to fill out a short form on my website before he/she can download the stamped pdf-file.



I would like it to go something like this:



1) Buyer finishes checkout and the payment processor confirms the buyer's payment was good and completed.



2) The buyer access e-junkies Thank-you Page that contains a link to the form on my website (this link must contain the order data shown in the example below).



Example of a normal link from e-junkie (please note that this download link isn't from a real purchase so I don't know if it is a "typical" e-junkie file download link):



1https://www.e-junkie.com/d/?t=jg-ly834a9e9989b30&d=bwxzr&c=49bv1



Example of how the modified link to the form on my website should look:



www.mywebsite/form/GetID?t=jg-ly834a9e9989b30GetRestOfID&d=bwxzr&c=49bv



3) My system extracts and saves the transaction ID (I use the transaction ID to identify the buyer). It also extracts the rest of the order data in the url (in this case: &d=bwxzr&c=49bv). In able to do so I need to insert a number in the URL, in front of each value I want to extract (for clarity's sake, I use "GetID" and "GetRestOfID" in the example above).



4) My system does a simple validation procedure (it just checks that the transaction ID starts with "jg-" and contains 18 characters). Clearly that won't work if the ID sometimes starts with other characters or contains more characters than 18...



5) Once the buyer has completed the form, my system creates a link that is similar to e-junkies original file download link by combining "https://www.e-junkie.com/d/?t=" and the extracted information "jg-ly834a9e9989b30" and "&d=bwxzr&c=49bv".



6) The buyer can now click the link and download the file.



Could someone please tell me how I can do this? (please don't just refer me to help pages).



Thank you very much.

  • created

    Aug '12
  • last reply

    Sep '12
  • 17

    replies

  • 1.7k

    views

  • 2

    users

  • 17

    links

What information would your form require the buyer to enter? If it's only a few fields/menus, our Variations and Variants features can be used to add up to 3 text fields and 3 menus to your Add to Cart button code:

http://www.e-junkie.com/ej/help.variants.htm



That would probably be far simpler and more reliable than redirecting buyers to a form after checkout; once payment is completed, the values from those fields/menus could be transmitted back to a script at your end, along with all the other order details (such as the buyer's name, email, Transaction ID, shipping address if relevant, etc.), via our custom/3rd-party Integration method, which we regard as the only reliable way of transmitting order details back to your end for custom processing needs after payment is completed:

http://www.e-junkie.com/ej/help.integration.htm



If you redirect buyers to a custom URL after checkout, we do append some order details to your redirection URL, but this is really only intended for your page to use those details in dynamic generation of page output; for various reasons it's not considered a reliable method of transmitting order details to your system:

http://www.e-junkie.com/ej/help.redirection.htm



The only way to have a product both redirect the buyer to a custom URL and also issue a download link would be to create a product that bundles two separate redirection and download products, but this would provide both the redirection and download links together at the same time on the same E-junkie-generated thank-you page, rather than sequentially as you require, and bundle products also cannot engage PDF Stamping, which only works with Single File Download products.



You could sell the PDF as a Single File Download product and also redirect all buyers to a custom thank-you page URL regardless of the item(s) purchased, but buyers would be able to access this page as soon as they finish checkout, regardless of their final payment status (payment processors sometimes take longer to complete a payment than it takes for the buyer to finish checkout). You could use custom scripting in your site's thank-you page to embed E-junkie-generated thank-you page content (including download links) in an iframe within that page, or just display a link to the download page, as explained here:

http://www.e-junkie.com/ej/tips.redirection.download-link.htm



Some checkout methods (PayPal and Google Checkout in particular) do not auto-redirect buyers to any thank-you page after they finish checkout, instead providing a Complete Purchase link which the buyer must click-through to reach the thank-you page. Once we receive confirmation that a payment is completed, we send the buyer a thank-you email message with a link to reach their thank-you/download page in case they did not proceed to that page after checkout.



The Transaction ID format (&t= value) varies according to checkout method. For PayPal checkouts, it's just identical to the seller's Transaction ID generated by PayPal for the payment; for other checkout methods, we add a prefix indicating which method, followed by the Transaction ID generated by the payment processor/gateway (gc- for Google Checkout, au- for Authorize.net, 2co- for 2checkout, cb- for ClickBank, tp- for TrialPay, jg- for E-junkie Free Checkout, j- for free download links). The &c= value is a hash of your E-junkie Client ID, and is thus the same for all your thank-you page URLs. The &d= value indicates which item in that transaction the thank-you page should be generated for, and is thus the same for all downloads of that item; omitting the &d= parameter would generate a consolidated thank-you page for all items in that transaction.

Wow, thanks - you know your stuff.



I think I used the wrong word, "form" is probably not the right term to use, it is more like a short questionnaire that calculates an assessment score at the end (and then they get their download link), so I can't use your first suggestion.



BUT your last suggestion: "Inserting a download link into a thank-you page on your own Web site" (http://www.e-junkie.com/ej/tips.redirection.download-link.htm) looks much more promising.



I tried to insert the JavaScript from that page into my system, and I think I can make it work (I'm not good at JavaScript), but why do I need to use IFRAME? IFRAME is just showing a website within a frame, so why can't I just link to that site without using IFRAME or JavaScript? My system is able to extract the transaction ID and add that value onto the end of the URL without using any of that stuff.



I took this part of the URL (http://www.e-junkie.com/ecom/rp.php?noredirect=true&clientid=CID&) from the JavaScript example. It is always the same for the same product, right? (of course I need to replace CID with my own E-junkie client ID). When your system appends the unique value for txn_id= to the URL to my website, and my system grabs that same value and adds it onto the end of the e-Junkie URL I just mentioned, then I would end up with an URL that works, right?



Please say yes... :o)

The IFRAME would be used to display our thank-you page content (including download links) within your site's thank-you page; if you wish, the scripting in your page could just write out the HTML for a regular link to the download page, instead of writing out the HTML code for the IFRAME. The general approach you described with the URL you picked out from the example should work. :^)

Great! Good to hear.



However, there seems to be a problem - I have inserted the URL to my website in the "Common Thank-You Page URL" field in "General Preferences". The problem is that when a buyer places an order, all this is added to my URL:



payer_email

first_name

last_name

payment_status

currency

client_id

gross

hash



How do I get rid of all that? I only want the txn_id in the URL, all the other data makes it impossible for my system to extract the transaction ID (it only makes it worse that it is placed in the middle of the URL).



Another thing: Why is the code for transaction ID sometimes named "t=" and other times "txn_id" - it only makes me more confuse...



Thanks for your help.

Whenever we redirect a buyer to a custom URL, those other parameters are always appended at the end of the URL in a GET query string, as documented on our Redirection help page:

http://www.e-junkie.com/ej/help.redirection.htm



The scripting in your page should be able to pluck any arbitrary GET value(s) from the page URL's query string, while ignoring any other parameters in that URL; you can examine the PHP and JavaScript examples on the IFRAME page I linked previously to see how those scripts accomplished that for the 'txn_id' value.



The Transaction ID value gets passed with either the &t= or &txn_id= variable, depending on which URL it's being passed to and for what purpose. The &txn_id= variable name is more self-apparent in its meaning, and is thus generally used when sellers may need to manipulate it somehow, e.g. with custom scripting. The URLs for the default thank-you pages we generate use the &t= variable; that value is really only used for internal reference when we generate the page, so we don't expect anyone else to need to decipher it, and that function was also one of the earliest aspects of our system ever built, so we don't try to fix what isn't broken just for the sake of clearer syntactical semantics.

I really love e-junkie, it's great in so many ways, but if that is the case then I'm not sure I can use e-junkie.



I see two problems:



1) In able to extract the transaction ID, and save it as a value in the database, I need to append a reference number just before the transaction ID (e.g. www.mysite.com/index.php?sid=93788&lang=en&93788X5X136= + the transaction ID). I'm not really a coder, so I don't know how else I can do it. It would have been possible if it wasn't for all those other parameters in the URL. There should be an option to remove those parameters since they aren't necessary for producing a download link (please correct me if I'm wrong). I use the transaction ID for both access control, and to identify the buyer (it won't work if I use JavaScript and JavaScript for some reason is disabled).



2) I really don't like that my customers private data is shown in the URL. I'm pretty sure my privacy policy doesn't include such situation. I promise not to share their name, email etc., the questionnaire is also anonymous (I use their transaction ID for identification), and then all of it is shown in that URL. I'm not sure about normal browser cookies, but I'm pretty sure any tracking cookie on the buyers computer will record that information - personally, I wouldn't accept such thing. I want to decide who I share my private information with, such as first name, last name, email etc.



I may be able to find a solution to problem no. 1, but I can't accept problem no. 2.



It would have been nice if there was a field where you could construct your own url with just the parameters you want, or a checkbox that if checked would remove all the other parameters.



I'm open for suggestions (and corrections) - thanks.

If you'd like to hire a developer to assist with the programming needed, we can recommend the competent, E-junkie-experienced developers for hire are listed in our directory here:

http://www.e-junkie.com/ej/developer-directory.htm



However, by using a "hosted" solution such as E-junkie, where we manage the software on our servers and you subscribe to use that software as a service (SaaS) in your pages, your buyers' information would necessarily be shared with us and stored in our database, and the details of every order are transmitted to the payment processor (e.g. PayPal) and back to us again in order to process their checkout payment. Of course, we and the payment processor only use this information to provide our services to you and your buyers, and we do not otherwise share or use your buyers' information for any other purpose.



If you require the utmost, absolute confidentiality of your buyers' data, then you would need to install software on your own server (whether it's fully-custom programming or an off-the-shelf solution like Magento), set up a database there to store that information, and install an SSL encryption certificate for your domain to ensure secure transmission of sensitive data between your server and the user's browser, so your own server would handle everything as a fully self-contained system. Even so, if you are accepting any online payment, at least the buyer's name, credit card account details, and billing address would need to be transmitted to a payment gateway service to authorize their payment.



I'm not sure I follow what you mean about cookies. A cookie is basically just a text file that stores a persistent name=value variable in a user's browser for a set period of time, so the server which sets a cookie can read or update that cookie later as the user moves from page to page, leaves the site and returns later, etc. Cookies must be set for a specific domain name and can only be read by pages/scripts hosted on that same domain. You may be interested in this help page covering how cookie-based tracking works:

http://www.e-junkie.com/ej/faq.tracking-how-why.htm

Thanks for the link, a developer could help with problem no. 1 (but not no.2).



English is not my first language, so maybe I'm not making myself clear? I have no problem sharing private information with E-junkie or PayPal - the data is encrypted when you use https. That is not the case with the custom URL. Private data is included in the URL, and would be recorded by a tracking cookie because it is shown in the browser's address bar.



If you visit a website that has bad intentions you might get a tracking cookie. Tracking cookies are only created to track the user’s movement on the Internet (not just one site) - you have no control over how that data is used. If you do a spyware scan, you will be warned if there are tracking cookies on your computer because they are a privacy concern. Tracking cookies are probably not the only way to track your browsing history. I care a lot about my customers privacy, and I also don't want to be sued (the data could be used for identity theft, spam etc.) - I know it probably won't happen, but sometimes "probably" isn't good enough.



E-junkie offers so many good options so why can't I control what data is included in the custom URL - is it very difficult to implement? Do you think it would be possible to do someday?



I really like E-junkie so I hope you say yes ;o)



----------------------------------------------------------------------------------------------------



Update:



I thought I had found a solution, and that is, insert my custom link + [%txn_id%] in the Common Thank-You Page HTML field, and also in the Common Thank-You E-mail. That would have worked if it wasn't for "Bullet-pointed lines cannot be customized", because the bullet-pointed line contains the link that I don't want! :(



Any chance that I can insert some code in the HTML field, so that it replaces the link value (I believe the attribute name is "ej_frm_0") with my link? Or can I hide it, or delete it using code? I can see the code in Firebug, but I'm not a coder, and I don't know if that would somehow violate E-junkies TOS.



Maybe there is a chance that I can use E-junkie after all?

Since ours is a centrally-managed system shared in common among all merchants who use us, it's not generally possible to alter how our system works for any one merchant without also applying the same alteration system-wide to everyone, unless there's a setting to manage that as a custom preference in Seller Admin.



Tracking cookies do not work the way you seem to think they do. A cookie is not software nor any sort of script that can do anything by itself, and they certainly cannot be used to monitor the URLs a user visits which are entirely unrelated to the site which originally set the cookie.



A cookie is just a plain text file that stores a name=value pair in the user's browser for a set period of time. A cookie must be set by and for a specific domain name and can only be read by pages on the same domain. The way Internet tracking basically works, a script in a page sets a cookie in the user's browser, and other pages on the same site may have a script that can look for that cookie in the user's browser, as the user moves from page to page on that site.



It's a bit unfortunate the inventor chose the term "cookie" for this, when he might have picked a term from a more familiar and suitable analogy. Setting and tracking a cookie is really rather like getting a ticket stub at some event, where your stub and the other half of the ticket each have a set of matching numbers. While attending that event, you might be asked show your stub on demand to claim a doorprize or complimentary drink, or to otherwise prove you're the same person who gained admittance at the door.



Extending the metaphor, now imagine that you are asked for the stub every time you enter a new room at the venue, and the doorman in each room logs which ticket numbers entered which rooms when; in that way, the hosts could anonymously track the movement of each specific ticket number through their venue and figure out generally where people generally went, and when, and in what sequence, even without knowing exactly who has each number. However, if you provided some personal information to the event hosts by writing it on their half of the ticket (e.g., to enter a doorprize drawing), the stub you keep and show to the doormen only has the ticket number, which cannot be tracked back to you personally without matching its number to the host's half of the ticket which has the personal info you wrote on it.



The tracking script (doorman) on each page (room) just requests the tracking cookie ID (ticket stub number) from the user, or sets a cookie (issues a stub) if they don't have one, and tells the tracking service such as Google Analytics (the event organizers) to log that ID as having visited that page URL (room). Tracking just "follows the bouncing cookie" as the buyer goes from page to page on that site.



This gets a bit more complicated when the site's pages embed third-party advertising and tracking scripts in their pages. E.g., suppose you're visiting Site A, and the pages on that site are displaying advertising served from Site B. Those ads from Site B may have scripts that can set and read their their own cookies for Site B's domain, but the pages on Site A cannot read those cookies. However, if another Site C also displays advertising served from Site B, the scripts in those ads can read the cookies that Site B had set on Site A, allowing Site B to know that the same user viewed their ads on both Site A and Site C. While you're viewing Site A or Site C, the cookies that Site B sets or reads would be considered "third-party" cookies (since they're not set by you personally nor the site you're on); most browsers now have a setting to block these, and these would also be the type of cookies that your anti-malware software finds and offers to delete for you.

I'm so close to finding a solution to the problem I have been struggling with for several days, so that I can use E-junkie, and then you don't answer my last question in the "update" part! ;o) haha, don't worry, I'm not mad, I really appreciate your help, but this problem is frustrating.



Thanks for your explanation about cookies - I like your metaphor. I already block "third-party" cookies, but my anti-malware software still finds "tracking cookies". Besides malware, there are probably other ways to track your moves on the internet. I'm pretty sure Facebook and Google knows more about that stuff.



But I still don't think GET is a safe way to transmit personal information:



1) Website's can collect information such as the URL you came from - that would make it possible to log the private information, should a buyer type in another URL, while the buyer is on the page that shows the URL with the private information.



2) The URL is also stored in server logs. This is plain text - normally you use https/encryption when you transmit personal information.



3) If my buyer use a public computer (internet café, libraries, schools, at work etc.) then the private information (first name, last name, email.....) remain in the browser history in plaintext and can be viewed by anyone with access to the computer. Theft of personal information from public computers, and identity theft are well-known issues.



I'm pretty sure all this would contravene my website's privacy policy, and I can't honest say that I do whatever I can to protect my customers private information.



E-junkie is secure (you don't have to use the custom URL), but perhaps you should consider a change of the use of GET (my recommendations from one of my previous posts would also solve that problem).



So here I repeat my question from last post, do you think I could add some html/css in the Common Thank-You Page HTML field that replaces (or alternative removes) the link in the bullet-pointed line? Code suggestions are welcome... :)



I really don't want to search for alternatives to E-junkie so I hope I find a solution before the weekend begins.



Thanks for your help.

While it may be possible to use CSS to hide the download link in our thank-you pages, that would always hide the download link; there's no way to only hide it when the buyer arrives there after checkout but then have it displayed again when you provide them a link to that page later. The only way to prevent buyers from accessing the download immediately following checkout would be to redirect them to a custom thank-you page URL, which would have all the GET parameters we've discussed.



That said, a privacy policy really only covers what you promise to do with data that the user has provided to you -- e.g., what purpose(s) you will use it for, who else you will share it with, how you will store it and for how long, etc. You can't be held nor hold yourself responsible for factors outside your reasonable control, such as malicious software installed on the buyer's computer or any computer they may be borrowing, upstream network resources they may be connecting through, etc.

Well, almost every site about GET that I have visited say that you shouldn't use GET for sending private information... we don't have to agree, but it makes sense to me. I care about protecting my customers private information the same way I care about protecting my own - and I wouldn't be happy to see my first name, last name and email in the URL. Well, enough about that, now you know my opinion.



I see the problem with the link. Hmm... would it be possible to hide the link, and then unhide it whenever the page is accessed from my URL (the code could validate the URL, or I could add a GET parameter to the URL to the download link)?

Any coder viewing this thread?



I would be grateful if someone could answer my last question. I believe it is only a few lines of code (I could be wrong... I'm not a coder).



So what code do I need to hide the file download link in the "thank-you page", but make it visible whenever the page is accessed from my URL (maybe the code could validate the previous site URL, or maybe the code could look for some GET parameter that I insert into the URL to the download page)?



I want to use e-Junkie's great product so I hope someone can help. Thanks.

You can use the div.item_info_by_ej CSS selector to pick the line(s) on our thank-you page with the "Click Here" download link and do what you wish with it in CSS or jQuery -- e.g., this CSS would completely hide that line:



div.item_info_by_ej {display:none;}



However, I'm not really sure if it's even possible to hide that line when the buyer arrives there after checkout and yet still display it when the buyer views it through an IFRAME in your page.



If you'd like some help setting things up, we can recommend the competent, E-junkie-experienced developers for hire listed in our directory here:

http://www.e-junkie.com/ej/developer-directory.htm

Thanks very much - I didn't expect to see you here on a Sunday. Great service!



Your piece of code can replace some of the javascript I'm testing now, so thanks for that.



I think I have found a solution - professional coders will probably shake their heads if they read this... (I'm on a low budget so I try to do as much as possible myself).



So, I have two links on my "Thank-You page". One link is at the top of the page while the other link is way down on the bottom (you won't see it unless you scroll a great deal). The link at the top of the page is a link to my site and contains the transaction ID (I use that to identify and validate the user), once they have provided the information they need to provide, they get a link to the same "Thank-you page" they came from (so they can download the file), but this time I add a div id to the URL so that they only see the link at the bottom of the page (I think I will serve it in an iframe on my site with overflow:hidden so that they can't scroll to the top - I wonder if that works in all browsers...)



Would it be okay to send my customers, from my site to "https://www.fatfreecartpro.com/ecom/rp.php?rdffc=true&noredirect=true&clientid=" instead of "http://www.e-junkie.com/ecom/rp.php?noredirect=true&clientid=" ? (of course with the client_id and txn_id, and &gajs=&auser=&abeacon=&/#divID added to the end of the URL). As far as I can see it is redirected to that site anyway.



It took me a long time to come up with this solution, but I'm open for suggestions (perhaps some javascript and a cookie could show/hide the right link?)



Thanks again for your help - I really appreciate it.

Thanks. Don't know much about jQuery (not that I know that much about javascript....) It must be possible to send some GET command from my site to e-junkie's Thank-You page so that it unhides a hidden download link, and hides the link to my site. Perhaps that is what you meant? If only I knew how to do that... I will continue my search.



I spend all day and night on my javascript and it works in IE and Firefox but not in Chrome. There is something wrong in this part - Chrome just ignores it completely:

<script language='JavaScript'>

document.forms[0].style.display = "none";

document.getElementById("myinfo").style.display = "block";

</script>



I get this from Chrome's console for errors: "Uncaught TypeError: Cannot read property 'style' of undefined". When I click "rp.php:76" it jumps to "document.forms[0].style.display = "none";".



I don't expect you to give me an answer, because it is not E-junkie's problem, but perhaps there is a coder who reads this who can help me.