Home Forums Plugins Offline Credit Card Processing Support [Resolved] No user error messaage for missing card info

This topic contains 2 replies, has 1 voice, and was last updated by  swcp 3 years, 10 months ago.

Welcome to our community support forums! We're here to help - but if you have an urgent request for a Pro Plugin, you will get a prioritised response through our Premium Support page.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29719

    swcp
    Participant

    Running WP 3.5.1, WPEC 3.8.9.5, OCCP 1.9

    If I enter all the data (card type, number, exp, CVV) transaction
    works fine.

    If I leave off the CC type and number, when I click Purchase it
    just redisplays the page. There is no error message telling
    the user that they need to enter CC info.

    If I enter CC type and number, with a bogus number, the page redisplays
    and there is an error message stating the CC number was invalid.

    If I put a valid CC type and number, but leave off the CVV, there is
    no error message.

    After doing some debug, it looks like OCCP’s submit() doesn’t get called
    when the card details are left out. Is that true? Any hints on where in
    WPEC to make it print a useful message for the user?

    Thanks,

    Mark

    #29747

    swcp
    Participant

    While troubleshooting this, I noticed that the OCCP plugin uses different form
    field names than WPEC does for the credit card data. E.g. card_number_[1-4]
    instead of card_number[1-4],card_type instead of cctype.

    Is this intentional? Knowing that would help me further understand how they
    are interracting.

    Thank you,

    Mark

    #29748

    swcp
    Participant

    Also, I made a change to merchant.php to keep the CVV code from getting lost between page refreshes:

    Here’s a diff

    
    
    *** merchant.php.original       2013-09-21 13:06:35.549600000 -0600
    --- merchant.php        2013-09-21 13:07:04.895600000 -0600
    ***************
    *** 131,136 ****
    --- 131,138 ----
                            $card_type = $_POST['card_type'];
                    if( isset( $_POST['card_name'] ) )
                            $card_name = $_POST['card_name'];
    +               if( isset( $_POST['card_code'] ) )
    +                       $card_cvv = $_POST['card_code'];
                    switch( $number_format ) {
      
                            case '0':
    ***************
    *** 330,336 ****
                                    <label for="wpsc_oc_card_code">' . $label_cvv . ' <span class="asterix">*</span></label>
                            </td>
                            <td class="wpsc_pppro_cc_code2">
    !                               <input type="text" id="wpsc_oc_card_code" name="card_code" value="" size="4" maxlength="4" class="required" />
                            </td>
                    </tr>';
                    } else {
    --- 332,338 ----
                                    <label for="wpsc_oc_card_code">' . $label_cvv . ' <span class="asterix">*</span></label>
                            </td>
                            <td class="wpsc_pppro_cc_code2">
    !                               <input type="text" id="wpsc_oc_card_code" name="card_code" value="' . $card_cvv . '" size="4" maxlength="4" class="required" />
                            </td>
                    </tr>';
                    } else {
    
Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘[Resolved] No user error messaage for missing card info’ is closed to new replies.