Jump to content
Sign in to follow this  
pchem

Lack of PAYPAL_DIRECT_ERROR_ALL_FIELDS_REQUIRED

Recommended Posts

I am using PayPal direct (US) and it processes credit cards fine, but it lacks the error message when any fields are incomplete. The standard pink box shows up, but no text is present nor the error.gif. I want customers to know why they might not be proceeding to the confirmation page.

 

Feel free to check it out at mysite. The test account is "test@test.com" and the PW is "2test".

 

I'll be very grateful if someone can help.

 

This code is present in catalog/includes/languages/english/modules/payment/paypal_direct.php and appears fine:

 

define('MODULE_PAYMENT_PAYPAL_DIRECT_ERROR_ALL_FIELDS_REQUIRED', 'Error: All payment information fields are required.');

 

The code surrounding MODULE_PAYMENT_PAYPAL_DIRECT_ERROR_ALL_FIELDS_REQUIRED in catalog/includes/modules/payment/paypal_direct.php is as follows:

starting at line 119:

    function pre_confirmation_check() {
     if (MODULE_PAYMENT_PAYPAL_DIRECT_CARD_INPUT_PAGE == 'Payment') {
       global $HTTP_POST_VARS;

       if (!isset($HTTP_POST_VARS['cc_owner']) || empty($HTTP_POST_VARS['cc_owner']) || (strlen($HTTP_POST_VARS['cc_owner']) < CC_OWNER_MIN_LENGTH) || !isset($HTTP_POST_VARS['cc_type']) || !isset($this->cc_types[$HTTP_POST_VARS['cc_type']]) || !isset($HTTP_POST_VARS['cc_number_nh-dns']) || empty($HTTP_POST_VARS['cc_number_nh-dns']) || (strlen($HTTP_POST_VARS['cc_number_nh-dns']) < CC_NUMBER_MIN_LENGTH)) {
         $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode(MODULE_PAYMENT_PAYPAL_DIRECT_ERROR_ALL_FIELDS_REQUIRED) . '&cc_owner=' . urlencode($HTTP_POST_VARS['cc_owner']) . '&cc_starts_month=' . $HTTP_POST_VARS['cc_starts_month'] . '&cc_starts_year=' . $HTTP_POST_VARS['cc_starts_year'] . '&cc_expires_month=' . $HTTP_POST_VARS['cc_expires_month'] . '&cc_expires_year=' . $HTTP_POST_VARS['cc_expires_year'];

         tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));
       }
     }

     return false;
   }

   function confirmation() {
     $confirmation = array();

 

starting at line 281:

        if (($response_array['ACK'] != 'Success') && ($response_array['ACK'] != 'SuccessWithWarning')) {
         tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL'));
       }
     } else {
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'error_message=' . MODULE_PAYMENT_PAYPAL_DIRECT_ERROR_ALL_FIELDS_REQUIRED, 'SSL'));
     }
   }

   function after_process() {
     return false;
   }

   function get_error() {
     if (MODULE_PAYMENT_PAYPAL_DIRECT_CARD_INPUT_PAGE == 'Payment') {
       global $HTTP_GET_VARS;

       $error = array('error' => stripslashes(urldecode($HTTP_GET_VARS['error'])));

       return $error;
     }

     return false;
   }

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×