Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › url of product like http://mon-site.com/pdf.php?id=12
- This topic has 5 replies, 2 voices, and was last updated 13 years, 7 months ago by
wzp.
-
AuthorPosts
-
January 27, 2011 at 1:47 pm #2587
benfreelance
MemberHello,
I use WP estore for pdf products and I use a script to build the pdf on the fly, so the url of my pdf is like : http://mon-site.com/pdf.php?id=12
I want to protect this url but the encrypting url dosn’t return the original url.
I understand is because my url send Get Parameter for generate the pdf and it seem to be not compatible with WP Estore.
I got some skills in php but as you can see not in English so if you know how this problem could be resolved i take it !
Thanks for help !
January 27, 2011 at 2:09 pm #28444wzp
ModeratorYou could maybe take the original URL, generate the “on the fly” PDF file and store it as a temporary file. You would then generate and serve up an encrypted link to the temporary file.
This would be similar to how PDF Stamper integrates into eStore. As part of the post payment processing, eStore checks to see if a PDF requires stamping. It then invokes the PDF Stamper, which stores the stamped file as a temporary file. What gets delivered to the buyer is an encrypted link to the temporary file. The code that does this is in the file: eStore_post_payment_processing_helper.php
January 28, 2011 at 9:54 am #28445benfreelance
MemberThanks for your response, I’am interesting to get Pdf Stamper but I have a question before buy it.
On my website, I sell pdf but I use eMember for Premium account. The premium account give the possibility to the member to get all pdf he wants for free (i use the fonction download_now_button) My question is : Does the Pdf will be stamped with the member informations ?
January 28, 2011 at 10:55 am #28446benfreelance
MemberI have another question concerning my url like http://mon-site.com/pdf.php?id=12.
My probleme is I can’t access to the original pdf due to security reason (http not possible).
But I can modify my script http://mon-site.com/pdf.php?id=12. Instead of displaying the pdf, I can created a temporary file like you said before and return in a echo the url of this temporary file like http://mon-site.com/pdf/12.pdf.
So I have to add some codes in Estore : If my url of product is like this : http://mon-site.com/pdf.php?id=12.First I execute it for generate the temporary file.Secondly with a filegetcontent I get my url: http://mon-site.com/pdf/12.pdf and return this url just before the process of Estore (fopen).
Where in your plugin you think i can add this lines of codes for working in every case?
Thanks for you response and your great support !
January 28, 2011 at 2:16 pm #28447wzp
Moderator********** DANGER WILL ROBINSON — RUNNING WITH SCISSORS AHEAD **********
With regards to the matter of using PDF Stamper with the “download now” button…
Currently, there is no information to be passed to the PDF Stamper, under the “download now” button. You would need to do something similar to how the “squeeze form” button works, which does pass user information to the PDF Stamper. To do this, you need to do some custom PHP programming. For a “hint” of how to do this, look in the files ajax_process_download.php, ewp_eStore1.php and eStore_includes2.php for references to the function: free_download_pseudo_payment_data()
You would then modify the wp_eStore1.php file in one or all of the following functions:
eStore_download_now_button()
eStore_download_now_button_fancy()
Your modification would include a call to free_download_pseudo_payment_data() with the appropriate user information.
January 28, 2011 at 2:32 pm #28448wzp
Moderator********** DANGER WILL ROBINSON — RUNNING WITH SCISSORS AHEAD **********
The best place to look for where to insert your custom code would be in the eStore_post_payment_processing_helper.php file. Look for where it calls the eStore_stamp_pdf_file() function. You would invoke your custom code, and then pass the URL or the temporary file on to the PDF Stamper.
-
AuthorPosts
- You must be logged in to reply to this topic.