Prev | Current Page 638 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

If credit card information exists for the customer, you decrypt it and prepare to display the
credit card type and the last four digits of its number:
// We allow placing orders only if we have complete customer details
if (empty ($this->mCustomerData['credit_card']))
{
$this->mOrderButtonVisible = 'disabled="disabled"';
$this->mNoCreditCard = 'yes';
}
else
{
$this->mPlainCreditCard = Customer::DecryptCreditCard(
$this->mCustomerData['credit_card']);
$this->mCreditCardNote = 'Credit card to use: ' .
$this->mPlainCreditCard['card_type'] .
'
Card number: ' .
$this->mPlainCreditCard['card_number_x'];
}
if (empty ($this->mCustomerData['address_1']))
{
$this->mOrderButtonVisible = 'disabled="disabled"';
$this->mNoShippingAddress = 'yes';
}
The rest of the code is straightforward.
CHAPTER 16 ?–  MANAGING CUSTOMER DETAILS 539
Enforcing SSL Connections
When building the catalog admin pages, you also learned that it??™s good to use SSL for securing
the data that passes between your server and the client??™s browser. Back then, SSL was semioptional
because the administrative pages could have been restricted for local access only.
However, now that you have customers sending you extremely sensitive data, using SSL isn??™t
optional anymore! Depending on the settings you implemented in Chapter 10, the customer
details pages should be protected already.


Pages:
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650
Katalog firm zabawkarskich - warmińsko-mazurskie mirc agencja detektywistyczna implanty łódź Pozycjonowanie