$redirect_to);
exit();
}
// Don't use HTTPS for nonsensitive pages
if (!$this->_IsSensitivePage() && $is_https == true)
{
$redirect_to =
Link::Build(str_replace(VIRTUAL_LOCATION, '', getenv('REQUEST_URI')));
header ('Location: '. $redirect_to);
exit();
}
$this->mSiteUrl = Link::Build('');
}
Right now, trying to load http://localhost/tshirtshop/credit-card-details/ will redirect
you to https://localhost/tshirtshop/credit-card-details/, provided you??™re logged in.
Summary
In this chapter, you implemented a system that lets customers store their own private payment
and shipping details at TShirtShop for use during order processing. You looked at many aspects
of the customer account system, including encrypting sensitive data and securing web connections
for obtaining it.
You started by creating a new customer table in your database, which holds the customer
information.
Next, you created the security classes in your business tier, which use encryption algorithms
to handle strings of sensitive data, and a secure credit card representation that makes
it easy to exchange credit card details between the encrypted and decrypted formats.
After this, you used these security classes to create the login, registration, and customer
detail web pages where customers enter their shipping and credit card information into the
tshirtshop database.
Pages:
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652