Lately, we've been getting a few requests for something really tricky -- some merchants want to redirect buyers to a thank-you page hosted on their own Web site, and yet still display E-junkie download links in their site's thank-you page. This can be done when you redirect to a Common Thank-you Page URL (set in Seller Admin > Account Preferences). The thank-you page on your site will need to have an IFRAME with its
src= URL set to:
CID is your E-junkie client ID number (which you can find in Seller Admin > Account Summary) and
TXNID is the unique value for
txn_id= that we append to your thank-you page URL during each redirection. Since the value for
txn_id= is unique for each transaction, you would need to add some custom scripting in your thank-you page, which would grab the
txn_id= value from the page's own URL for each visit and rewrite that value onto the end of that IFRAME
src= URL (see examples below).
If you want to customize what gets displayed inside that IFRAME, you would need to customize your E-junkie thank you page. For instance, you may want to add some custom CSS to your E-junkie-generated thank-you page (a good place for this would be Seller Admin > Account Preferences > Common Thank-you Page HTML), so the IFRAME content would better resemble the styling of your own site's thank-you page where the IFRAME is embedded.
Disabling product-specific emails/links
Any product-specific thank-you emails sent for download products would by default carry a link to the E-junkie-generated thank-you page for that product, rather than redirecting to your site's Common Thank-you Page URL. If you want to make sure your buyers would only ever see your site's custom thank-you page with IFRAME-embedded download links, Enable Templated Email for each product and then either:
- Include the code
[%thankyou_link%] in your product's Email Message template, which would insert a link that activates your Common Thank-you Page URL redirection;
- Leave the product's Email Message field blank to disable the product-based email entirely, so buyers would receive only your Common Thank-you Email, which should include the
[%thankyou_link%] code to insert a link that activates your Common Thank-you Page URL redirection.
Some PHP like this should insert the IFRAME into your page before it gets served to the buyer's browser:
echo '<iframe src="https://www.e-junkie.com/ecom/rp.php?noredirect=true&client_id=CID&txn_id=' . htmlspecialchars($_GET["txn_id"]) . '"
CID with your own E-junkie client ID) into your site's thank-you page wherever you want the buyer's browser to add the IFRAME after it gets served to the browser:
function gup( name )
name = name.replace(/[\/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )