I have several domains hosted on an Apache 2.0.55, PHP 4.3.11, MySQL 3.23.58 VPS. All sites use the same IP. Much of the code for the sites is shared in a common directory using the Apache Alias directive.
Among the common code is a shopping cart and checkout that I wrote that all the sites use. Currently the sites are not secure. Payment is made after checkout via paypal or calling in a credit card. I want to add online processing of credit cards to my checkout and make it secure.
My problem is that I only want to buy one SSL certificate, rather than one for each site.
Currently when when something is added to the cart or goes to checkout, the URLS the customer goes to is something like:
http://www.thePaperFramer.Com/AddToCart.php
http://www.ComicFrames.Com/AddToCart.php
http://www.thePaperFramer.Com/Checkout.php
http://www.ComicFrames.Com/Checkout.php
etc
The AddToCart.php and Checkout.php scripts are shared across all domains. I want all checkout to now go through https://www.thePaperFramer.Com/Checkout.php using a single SSL certificate for thePaperFramer.Com. The cart itself will continue to be shared as is presently.
Most of this is straightforward but I have one issue that I can't decide on how to implement. That is moving the cart data from any of the domains to the checkout URL.
The cart data is stored in a session array. I can't decide what is the best way to move the cart data from the originating domain to the checkout domain. There appears to be several ways that this might be done.
I could POST all the cart data when I call the checkout URL. I don't know what the maximum size might be. Places like Yahoo stores seem to use this method for their shared carts and checkout. This method doesn't really appeal to me.
I could write the session cart array to a cookie but I haven't found a way yet of accessing a cookie from another domain.
If I could share the session data accross domains, this might work but I haven't found a way to do this yet.
I could write the cart to a database table. This is complicated slightly because the some of the domains use a different database.
I have googled this around and searcha number of furoms, but haven't seen a good solution for this. Any suggestions on the best way to proceed?