|
macy22 From an experienced developer who has advised on this many many times, what you need for clarification is primarily a clear understanding of BOTH the post payment processes. Sale of intangible goods requires extensive cautions to avoid theft (unauthorized access; colleges are a great place for that!). Because some have difficulty "programming" the IPN processor they tend to try and avoid it or advise others to avoid it (indicating it to the unwary as unnecessary). One cannot simply use both without explicit programming to avoid crossovers... you as others in the past have discovered will run into problems. Proper extensive programming may use the PDT process not just for its INTENDED purpose of DISPLAYING a "thank-you" page but to backup the IPN processor should for any reason it is slow or failed (ie a rare glitche in the PayPal IPN sending servers). Because the IPN is harder to program for the inexperienced it should NOT be ignored or dismissed and should be expected as THE primary source of post payment record data acquisition and custom email sending. So be advised it would be wrong to think of either PDT or IPN as a "frontend" or a "backend"... they have two distinct different purposes (true IPN is discreet, instant, not seen in any browser). NOTE both the IPN and PDT processors (as per advised base sample codes) involve a seemingly complex frontend bi-directional handshake exchange of data between servers. This is an IMPERATIVE SECURITY feature for confirmation the data stream received is genuine and not interferred with in transit; do not ignore it. Yes, use PayPals "custom" hidden tag in your dynamically generated pay button form page. This sort of thing is what it is for. PDT For you to capture some transaction details from which you can decide if it was successful or a failure for DISPLAY purposes you can include a form specific PDT processing dynamic script page URL to which your customer MAY or MAY NOT return to... name="return" value="theFULLurlto/your/afterpaymentpreferencepage". IPN For ou to RELIABLY capture the transaction details for form specific db aving, customized emailing, UNIQUE download link generation and etc, ou include the hidden field tag... name="notify_url" value="theFULLurlto/your/recordloggingunseenscript" Digital Downloads. Be also aware the greater problem with digital downloads is the need for creation of UNIQUE identifiers when pre payment saving of gathered data s concerned AND then at all costs protection of that uniqueness when the customer is shown their personal download link so that a buy-once scenario cannot be passed on to others (or illicitly detected!) for bulk "freebies". The steps upon submitting form are... *Capture and check all input. *If not acceptable redisplay page with messages. *If ok, save captured input to a simple temp file (db not recommended; dbs are more prone to DOS attacks for one thing!). *The name of that file to include (in part) a UNIQUE generated identifier. *Display the pay now button form including that unique identifier in the generated form's "custom" hidden tag. [After payment]: *Using PayPal's IPN activation, capture IPN post payment result and gather the "custom" value. *Use the "custom" value to identify the associated temp file. *Retrieve the pre pay captured info from the file and delete the temp file upon success. *Do whatever with the retrieved data (like save to db, generate unique download link, and send supporting emails blah). *Perform regular garbage collection of temp data from incomplete payments. IF the customer does return to the "thank-you" page correctly, THEN the PDT process is used to get transaction identity from PayPal, grab some data from the IPN saved db record, and generate a DISPLAY version of their (limited use) UNIQUE download link. If not they will have received your backup emailed instructions sent by the IPN process. Scenario_2 of this earlier post also explains this relative to pre payment saving and post payment getting of unique data. PayPal Partners: Note for all. The importance of hiding unique limited-use "digital" download links is such that PayPal have quite a list of EXTERNAL Partner businesses for the non-programmer where they (the 3rd party sites) can handle all the complexity, hold your products, and organise your payments, on their site at reasonable cost. Regards. Message Edited by Wombat on 09-18-2009 05:33 AM
'imself. [ PHParagon.com ] ...bug free, my programs do occasionally include undisclosed FREE random features.
|