uc_credit.pages.inc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * @file
  4. * Credit menu items.
  5. */
  6. /**
  7. * Prints the contents of the CVV information popup window.
  8. */
  9. function uc_credit_cvv_info() {
  10. $output = "<!DOCTYPE html>\n";
  11. $output .= '<html><head><meta charset="utf-8" /></head><body>';
  12. $output .= '<b>' . t('What is the CVV?') . '</b><p>' . t('CVV stands for Card Verification Value. This number is used as a security feature to protect you from credit card fraud. Finding the number on your card is a very simple process. Just follow the directions below.') . '</p>';
  13. $cc_types = array(
  14. 'visa' => t('Visa'),
  15. 'mastercard' => t('MasterCard'),
  16. 'discover' => t('Discover')
  17. );
  18. foreach ($cc_types as $id => $type) {
  19. if (variable_get('uc_credit_' . $id, TRUE)) {
  20. $valid_types[] = $type;
  21. }
  22. }
  23. if (count($valid_types) > 0) {
  24. $output .= '<br /><b>' . implode(', ', $valid_types) . ':</b><p>';
  25. $output .= theme('image', array(
  26. 'path' => drupal_get_path('module', 'uc_credit') . '/images/visa_cvv.jpg',
  27. 'attributes' => array('align' => 'left'),
  28. ));
  29. $output .= t('The CVV for these cards is found on the back side of the card. It is only the last three digits on the far right of the signature panel box.');
  30. $output .= '</p>';
  31. }
  32. if (variable_get('uc_credit_amex', TRUE)) {
  33. $output .= '<br /><p><b>' . t('American Express') . ':</b><p>';
  34. $output .= theme('image', array(
  35. 'path' => drupal_get_path('module', 'uc_credit') . '/images/amex_cvv.jpg',
  36. 'attributes' => array('align' => 'left'),
  37. ));
  38. $output .= t('The CVV on American Express cards is found on the front of the card. It is a four digit number printed in smaller text on the right side above the credit card number.');
  39. $output .= '</p>';
  40. }
  41. $output .= '<p align="right"><input type="button" onclick="self.close();" value="' . t('Close this window') . '" /></p>';
  42. $output .= '</body></html>';
  43. print $output;
  44. exit();
  45. }