Results 1 to 7 of 7
  1. #1
    Join Date
    May 2007
    Posts
    36
    Plugin Contributions
    0

    Default Splitting Middle CC Digits.

    Can anyone just point me into the right direction....

    I need to know if it's possible to split the middle CC number sent by email into 2 parts... so instead of looking like this:

    xxxxxxxx

    it looks like this:

    xxxx xxxx

    Thanks
    Ross.

  2. #2
    Join Date
    Feb 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: Splitting Middle CC Digits.

    Hi,

    I commented on another thread on this topic.

    http://www.zen-cart.com/forum/showthread.php?t=89846

  3. #3
    Join Date
    May 2007
    Posts
    36
    Plugin Contributions
    0

    Default Re: Splitting Middle CC Digits.

    Im not sure if I misunderstood your answer or you misunderstood what I was asking.

    I don't want the email to be sent to 2 different addresses, nor do i want the ENTIRE CC number split.

    What I am asking, is that when you receive the email msg with the middle digits, the middle digits look like this:

    56781234

    What I was wondering, if the email msg can be formatted so that the middle CC digits appear like this:

    5678 1234 (a gap between the block of 4 numbers!).

    This is just cosmetic change, so there shouldnt be any security risk, this is why I am asking.

    Thanks
    Ross.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Splitting Middle CC Digits.

    It is customary - on practically all webshop systems - for card numbers to be entered by customers WITHOUT gaps - so this is the data that is captured. You may be able to cobble some javascript that splits this after 4 digits, but I'm no expert in that field. Connor Kerr (CEON) may have some advice here as he has built a good offline c-card module.
    20 years a Zencart User

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Splitting Middle CC Digits.

    You could do some custom coding and edit your /includes/modules/payment/cc.php file to add a space before the email is sent.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    May 2007
    Posts
    36
    Plugin Contributions
    0

    Default Re: Splitting Middle CC Digits.

    Hi,
    Thanks for pointing me in the right direction.
    I found this bit of code in the cc.php file...

    $this->cc_middle = substr($_POST['cc_number'], 4, ($len-8));

    I presume this is what gets the middle 8 digits.
    I don't know much about javascript (i'm a vb person! lol)...but im thinking something like this should do the trick...

    $this->cc_middle = substr($_POST['cc_number'], 4, ($len-4)) + " " + substr($_POST['cc_number'], 8, ($len-4));

    Am I close? Can anyone help me out with the syntax if I don't have it right?

    Thanks
    Rossco.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Splitting Middle CC Digits.

    No, don't touch that part of the code or you'll have security issues.

    A few lines later, you'll see this:
    Code:
        $message = sprintf(MODULE_PAYMENT_CC_TEXT_MIDDLE_DIGITS_MESSAGE, $insert_id, $this->cc_middle);
    change it to this:
    Code:
        $message = sprintf(MODULE_PAYMENT_CC_TEXT_MIDDLE_DIGITS_MESSAGE, $insert_id, substr($this->cc_middle, 0, 4) . ' ' . substr($this->cc_middle, -4));
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Missing middle credit card digits email.
    By Muzz in forum Managing Customers and Orders
    Replies: 2
    Last Post: 30 Nov 2009, 10:35 AM
  2. Include the middle digits on invoice
    By roblaw in forum Managing Customers and Orders
    Replies: 3
    Last Post: 25 May 2007, 03:23 PM
  3. Lost middle 8 digits
    By slampepsi in forum Managing Customers and Orders
    Replies: 1
    Last Post: 26 Nov 2006, 05:59 PM
  4. Having Linkpoint e-mail middle 8 digits
    By samad64 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 16 Nov 2006, 01:38 AM
  5. Intermittent missing middle digits email
    By spinnywoman in forum General Questions
    Replies: 0
    Last Post: 21 Aug 2006, 06:58 PM

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