Announcement

Collapse
No announcement yet.

Credit/Switch Card Start Date

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Credit/Switch Card Start Date

    I know what you are all thinking, "How many times have we covered this", but stick with me.

    I have created a new payment method to deal with Switch cards that have no issue number and have therefore made the start date a required field. However, I did notice something when testing this.

    Here's my question and it applies to all payment methods that require a start date:

    The field for the start date automatically displays the current month and year, therefore does not require the customer to enter a start date, as one has been entered for them. The only requirement placed on them is to change the expiry date (which also automatically displays the current month and year) to something beyond the start date e.g. by 1 month, which seems an unlikely start and end date.

    Is there a way to ensure that they must make a conscious selection, e.g. by having the default start month as "month" and the start date year as "month".

    If I'm missing something here, please let me know (it is Friday after all), but this situation seems to make setting the start date as a required field pointless.

    Reagrds

    Andrew
    -----------------------------
    <a href=http://www.pramcentre.co.uk>http://www.pramcentre.co.uk</a>
    -----------------------------

    #2
    I'm afraid I do not have any great suggestions for this one. I'll report it to the development team.

    Comment


      #3
      Hi Andrew

      I've had the following response from the development team:
      This can be done by editing OrderScript.pl.

      The change will not apply to CC details taken via a PSP, Shared SSL or
      Actinic Encryption.

      Search for 'sub ValidatePayment'
      search for '_STARTDATEFLAG'
      You will see...

      if ($::g_PaymentInfo{'STARTMONTH'} eq "" ||
      $::g_PaymentInfo{'STARTYEAR'} eq "")
      {
      $sError .= ACTINIC::GetRequiredMessage(5, 3);
      }

      Immediateley after this insert...

      if ($::g_PaymentInfo{'STARTMONTH'} eq "MM" ||
      $::g_PaymentInfo{'STARTYEAR'} eq "YYYY")
      {
      $sError .= ACTINIC::GetRequiredMessage(5, 3);
      }

      Search for 'sub DisplayPaymentPhase'
      Search for 'my ($nYear, $nMonth);'
      Insert after this line...

      $::s_VariableTable{$::VARPREFIX.'PAYMENTSTARTMONTHS'} .= '<OPTION
      SELECTED>' . "MM\n";
      $::s_VariableTable{$::VARPREFIX.'PAYMENTSTARTYEARS'} .= '<OPTION
      SELECTED>' . "YYYY\n";

      Scroll down about 6 lines and you will see...

      if ($::g_PaymentInfo{'STARTMONTH'} eq '' &&
      $nMonth == $mon)
      {
      $::s_VariableTable{$::VARPREFIX.'PAYMENTSTARTMONTHS'} .=
      '<OPTION SELECTED>' . sprintf('%2.2d', $nMonth) . "\n";

      Remove the word 'SELECTED' so it now reads...

      if ($::g_PaymentInfo{'STARTMONTH'} eq '' &&
      $nMonth == $mon)
      {
      $::s_VariableTable{$::VARPREFIX.'PAYMENTSTARTMONTHS'} .=
      '<OPTION>' . sprintf('%2.2d', $nMonth) . "\n";

      Search for 'StartYear", you will see...

      if ($::g_PaymentInfo{'STARTYEAR'} eq '' &&
      $nStartYear == $year)
      {
      $::s_VariableTable{$::VARPREFIX.'PAYMENTSTARTYEARS'} .=
      '<OPTION SELECTED>' . $nStartYear . "\n";

      Remove the word 'SELECTED' so it now reads...

      if ($::g_PaymentInfo{'STARTYEAR'} eq '' &&
      $nStartYear == $year)
      {
      $::s_VariableTable{$::VARPREFIX.'PAYMENTSTARTYEARS'} .=
      '<OPTION>' . $nStartYear . "\n";

      Save and exit
      Update the site

      The Start date will initially appear as MM/YYYY. Once the buyer has
      specified a date the entered date will appear as the default in the event
      of any validation errors on the page.
      This has also been flagged as a bug to be fixed in v7.

      Ben
      Ben Popplestone
      Ecommerce website software

      Comment


        #4
        Thanks Ben & Chris for the reply.

        After looking at the HTML, I had assumed that dates must be created by the Perl script, unfortunately (well it is not exactly terrible), we have a free shared SSL as part of our existing web hosting package, so plan to use it.

        However, your efforts are appreciated.

        Cheers

        Andrew
        -----------------------------
        <a href=http://www.pramcentre.co.uk>http://www.pramcentre.co.uk</a>
        -----------------------------

        Comment

        Working...
        X