|
First, the user selects the PayPal "pay_type" on the shipping page.
This tells Quikstore to open the paypal.html order form. As the
form loads, the program substitutes variables into the JavaScript
function called: function makePaypalReturnLink(). This function
builds the post action to PayPal and also sets a temporary cookie
with all of the form variables from the order form in it that are
needed to process the order later.
If a cookie does not get set, it pops up a message telling the
user that cookies must be enabled for them to use this PayPal feature.
Next, the user is taken to PayPal where they complete that part
of the transaction. When they click the return URL to go to the
"process_paypal.html" page on your site, a JavaScript function called
processOrder() in this page reads the previously set PayPal cookie.
This function creates an HTML form based on the variables in the
PayPal cookie, and then automatically submits this form to process
the order. The user is then redirected to the Quikstore receipt
page as they would be normally.
If for some reason it cannot read the cookie, it simply displays
a Thank you message. You can edit this message in the process_paypal.html
page.
NOTE: This cookie is only valid during the time the user
has the browser open. Once they close the browser, the PayPal cookie
is gone. However, the user information cookie remains.
|