Page 95 of 279 FirstFirst ... 45859394959697105145195 ... LastLast
Results 941 to 950 of 2784
  1. #941
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Thanks for the snappy reply, I know your swamped!
    I use Square

  2. #942
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: One-Page Checkout [Support Thread]

    You might try looking at /includes/classes/cc_validation.php.

  3. #943
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Thank you and I’ll report back on my findings.

  4. #944
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    I don't see the immediate fix.
    Code:
    <?php
    /**
     * cc_validation Class.
     *
     * @package classes
     * @copyright Copyright 2003-2016 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: Author: DrByte  Mon Jul 27 18:24:22 2015 -0400 Modified in v1.5.5 $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    /**
     * cc_validation Class.
     * Class to validate credit card numbers etc
     *
     * @package classes
     */
    class cc_validation extends base {
      var $cc_type, $cc_number, $cc_expiry_month, $cc_expiry_year;
    
      function validate($number, $expiry_m, $expiry_y, $start_m = null, $start_y = null) {
        $this->cc_number = preg_replace('/[^0-9]/', '', $number);
        // NOTE: We check Solo before Maestro, and Maestro/Switch *before* we check Visa/Mastercard, so we don't have to rule-out numerous types from V/MC matching rules.
        if (preg_match('/^(6334[5-9][0-9]|6767[0-9]{2})[0-9]{10}([0-9]{2,3}?)?$/', $this->cc_number) && CC_ENABLED_SOLO=='1') {
          $this->cc_type = "Solo"; // is also a Maestro product
        } else if (preg_match('/^(49369[8-9]|490303|6333[0-4][0-9]|6759[0-9]{2}|5[0678][0-9]{4}|6[0-9][02-9][02-9][0-9]{2})[0-9]{6,13}?$/', $this->cc_number) && CC_ENABLED_MAESTRO=='1') {
          $this->cc_type = "Maestro";
        } else if (preg_match('/^(49030[2-9]|49033[5-9]|4905[0-9]{2}|49110[1-2]|49117[4-9]|49918[0-2]|4936[0-9]{2}|564182|6333[0-4][0-9])[0-9]{10}([0-9]{2,3}?)?$/', $this->cc_number) && CC_ENABLED_MAESTRO=='1') {
          $this->cc_type = "Maestro"; // SWITCH is now Maestro
        } elseif (preg_match('/^4[0-9]{12}([0-9]{3})?$/', $this->cc_number) && CC_ENABLED_VISA=='1') {
          $this->cc_type = 'Visa';
        } elseif (preg_match('/^5[1-5][0-9]{14}$/', $this->cc_number) && CC_ENABLED_MC=='1') {
          $this->cc_type = 'MasterCard';
        } elseif (preg_match('/^3[47][0-9]{13}$/', $this->cc_number) && CC_ENABLED_AMEX=='1') {
          $this->cc_type = 'American Express';
        } elseif (preg_match('/^3(0[0-5]|[68][0-9])[0-9]{11}$/', $this->cc_number) && CC_ENABLED_DINERS_CLUB=='1') {
          $this->cc_type = 'Diners Club';
        } elseif (preg_match('/^(6011[0-9]{12}|622[1-9][0-9]{12}|64[4-9][0-9]{13}|65[0-9]{14})$/', $this->cc_number) && CC_ENABLED_DISCOVER=='1') {
          $this->cc_type = 'Discover';
        } elseif (preg_match('/^(35(28|29|[3-8][0-9])[0-9]{12}|2131[0-9]{11}|1800[0-9]{11})$/', $this->cc_number) && CC_ENABLED_JCB=='1') {
          $this->cc_type = "JCB";
        } elseif (preg_match('/^5610[0-9]{12}$/', $this->cc_number) && CC_ENABLED_AUSTRALIAN_BANKCARD=='1') {
          $this->cc_type = 'Australian BankCard'; // NOTE: is now obsolete
        } else {
          return -1;
        }
    
        if (is_numeric($expiry_m) && ($expiry_m > 0) && ($expiry_m < 13)) {
          $this->cc_expiry_month = $expiry_m;
        } else {
          return -2;
        }
    
        $current_year = date('Y');
        if (strlen($expiry_y) == 2) $expiry_y = intval(substr($current_year, 0, 2) . $expiry_y);
        if (is_numeric($expiry_y) && ($expiry_y >= $current_year) && ($expiry_y <= ($current_year + 10))) {
          $this->cc_expiry_year = $expiry_y;
        } else {
          return -3;
        }
    
        if ($expiry_y == $current_year) {
          if ($expiry_m < date('n')) {
            return -4;
          }
        }
    
        // check the issue month & year but only for Switch/Solo cards
        if (($start_m || $start_y) && in_array($this->cc_type, array('Switch', 'Solo'))) {
          if (!(is_numeric($start_m) && ($start_m > 0) && ($start_m < 13))) {
            return -2;
          }
    
          if (strlen($start_y) == 2) {
            if ($start_y > 80) {
              $start_y = intval('19' . $start_y);
            } else {
              $start_y = intval('20' . $start_y);
            }
          }
    
          if (!is_numeric($start_y) || ($start_y > $current_year)) {
            return -3;
          }
          if (!($start_y >= ($current_year - 10))) {
            return -3;
          }
        }
        return $this->is_valid();
      }
    
      function is_valid() {
        $cardNumber = strrev($this->cc_number);
        $numSum = 0;
    
        for ($i=0; $i<strlen($cardNumber); $i++) {
          $currentNum = substr($cardNumber, $i, 1);
    
          // Double every second digit
          if ($i % 2 == 1) {
            $currentNum *= 2;
          }
    
          // Add digits of 2-digit numbers together
          if ($currentNum > 9) {
            $firstNum = $currentNum % 10;
            $secondNum = ($currentNum - $firstNum) / 10;
            $currentNum = $firstNum + $secondNum;
          }
    
          $numSum += $currentNum;
        }
    
        // If the total has no remainder it's OK
        return ($numSum % 10 == 0);
      }
    }
    Mark
    Hare Do

  5. #945
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: One-Page Checkout [Support Thread]

    On further inspection (aren't demo sites wonderful?), it appears that the text is being added by the Square payment method's jQuery (see /includes/modules/pages/checkout_one/jscript_square.php). The values displayed appear to be coming back from an AJAX call to Square.

    You might try posting in that payment-method's support-thread for more details.

  6. #946
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    Thank you for your time Cindy,
    Yes, when I inspected with firefox I found the following 3 files that make a call for this text.
    Ex: sq-card-brand which when you type in two number is appears with the text visa.

    I will submit a thread in the square module.

    Mark
    Mark
    Hare Do

  7. #947
    Join Date
    Jan 2011
    Location
    Adelaide, Australia
    Posts
    1,668
    Plugin Contributions
    1

    Default Re: One-Page Checkout [Support Thread]

    v1.5.5f ... NOT URGENT

    Hi Cindy, I hope you are well. I've searched the thread and cannot find a reference to this - guests using credit card are not showing up in admin/customers/customers whereas those who use PayPal are showing. In configuration/one page checkout I have 'enable account registration' set to true .... and in admin/modules/payment/PayPal Express have Express Checkout: Automatic Account Creation set to Yes (which explains why PayPal users are being registered).

    I noticed this when using admin/tools/send email when I was sending 'select' emails and many 'orders' entries did not show up in 'customers'. So many guests will not be included for email marketing.

    I'm not sure if I have missed something somewhere?

    cheers,
    Mike
    Last edited by shags38; 20 Sep 2018 at 12:45 AM.

  8. #948
    Join Date
    Jan 2007
    Posts
    1,484
    Plugin Contributions
    10

    Default Re: One-Page Checkout [Support Thread]

    That's the way this module currently functions. If you need to see the guests as customers you might need to use a different one. And OPC doesn't have a checkbox to opt in to email marketing or a newsletter for guests. It might seem spammy to send marketing emails to customers that didn't ask to be emailed and if they report the spam it can have negative consequences for your domain.

    Zen Cart and it's community are the best!!

  9. #949
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by shags38 View Post
    v1.5.5f ... NOT URGENT

    Hi Cindy, I hope you are well. I've searched the thread and cannot find a reference to this - guests using credit card are not showing up in admin/customers/customers whereas those who use PayPal are showing. In configuration/one page checkout I have 'enable account registration' set to true .... and in admin/modules/payment/PayPal Express have Express Checkout: Automatic Account Creation set to Yes (which explains why PayPal users are being registered).

    I noticed this when using admin/tools/send email when I was sending 'select' emails and many 'orders' entries did not show up in 'customers'. So many guests will not be included for email marketing.

    I'm not sure if I have missed something somewhere?

    cheers,
    Mike
    Quote Originally Posted by lankeeyankee View Post
    That's the way this module currently functions. If you need to see the guests as customers you might need to use a different one. And OPC doesn't have a checkbox to opt in to email marketing or a newsletter for guests. It might seem spammy to send marketing emails to customers that didn't ask to be emailed and if they report the spam it can have negative consequences for your domain.
    Mike, as @lankeeyankee indicated, that's OPC working-as-designed. If a customer placed an order as a guest, they've implicitly opted-out of any email marketing from the site.

    Upon order completion, a guest is given the opportunity to create an account, but if they didn't ...

  10. #950
    Join Date
    Jan 2011
    Location
    Adelaide, Australia
    Posts
    1,668
    Plugin Contributions
    1

    Default Re: One-Page Checkout [Support Thread]

    @lankeeyankee and Cindy - thank you both for your responses .... all is good. Just as a matter of clarification, in configuration settings what does enabling 'enable account registration' actually do? ... or is that answered in your last line Cindy? ... 'Upon order completion, a guest is given the opportunity to create an account'

    cheers,
    Mike
    Last edited by shags38; 20 Sep 2018 at 11:13 PM.

 

 

Similar Threads

  1. Set number of products displayed per page (support thread)
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 146
    Last Post: 2 Nov 2023, 12:50 AM
  2. v151 Banners In Main Page - Support Thread
    By stevesh in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Sep 2021, 03:36 PM
  3. v151 Site Map/Page Not Found: Combined [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 4 Jan 2016, 02:19 PM
  4. v151 PayPal Express Checkout Using NVP 84.0 [Support Thread]
    By lat9 in forum Addon Payment Modules
    Replies: 32
    Last Post: 28 Dec 2015, 04:54 PM
  5. Checkout Amazon Style -- Support Thread
    By CJPinder in forum All Other Contributions/Addons
    Replies: 72
    Last Post: 13 Apr 2011, 08:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR