Jump to content

perfectpassion

Members
  • Content count

    1,317
  • Joined

  • Last visited

Posts posted by perfectpassion


  1. That's odd - the size is set well above the size recommended by Visa / Mastercard.

     

    The line to change is in includes/modules/payment/protx_Direct.php:

    $string = '<script type="text/javascript">
    	document.write("<a href=\"'.str_replace('"', '\\"', tep_href_link(FILENAME_PROTX_PROCESS_WIN, 'height=500&width=500&modal=true', 'SSL').'" class="thickbox">'.tep_image(DIR_WS_LANGUAGES.$language.'/images/buttons/button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER)).'</a>");

     

    Simply change the width / height settings in the url above.


  2. Hi Dave,

     

    Thanks for flagging this up - unfortunately I don't know what is causing this problem from the information provided. What would be really useful would be to know exactly what happened at the customer side - any error messages (or lack of messages) either from the site or the browser itself etc.

     

    So far I've not had reports of this specific problem from other users which unfortunately makes it even harder to track down.

     

    Is this happening frequently?


  3. Hi Peter,

     

    The scripts load at the top of the page and should normally be loaded by the time someone has had time to enter their credit card details and press submit. I suppose you could add the calls to load the script to the <head> section of checkout_payment so that the files are downloaded to the customer's pc on the previous page and should be in their cache for when they need them.

     

    To go back to the old style the module would need re-writing.

     

    It would be nice to get to the bottom of this problem - as I said previously it is in use on several very busy sites without issue.

     

    Can you PM me your email and I'll send over the latest version of the module which contains a few tweaks I've done - I can't say that any one of them would definitely fix your intermittent problem but you never know!


  4. Hi Peter,

     

    I'm not sure what the problem is. The latest version of the module is operating in a number of sites (several very busy) and I've not had feedback relating to this issue so I wonder if it may be a server issue.

     

    The only thing I can think is perhaps the jquery or thickbox javascript files are not downloading fast enough (though they are not particularly large) is the server is intermittently slow or the user's connection too slow, particularly as it doesn't seem to be any one browser.

     

    Are you on a shared or dedicated server?


  5. Possibly - since the release of PayPal via SagePay (about 1 year) you are only the second person to request it hence why it hasn't been a priority.

     

    Which type of integration would you be looking for - "Express Checkout" or "Mark" (Mark integration is where PayPal is simply presented as a card type option or similar, Express checkout has that big yellow button that bypasses the rest of the checkout process)?


  6. The link you posted is for an "official, osCommerce certified" module. That module does not contain any of the admin-side features that my module includes (anti-fraud results, ability to refund/repeat/release payments, live status etc) and also does not use the "lightbox" type feature that my v5 module does on the customer side.

     

    It also contains a referral ID so that Harald receives commission.

     

    I shall continue to support my module for those that prefer to us it instead - minor update due in the next few days to correct an issue that a small number of people have had with "virtual" orders and an issue that sometimes presents during the 3D-Secure phase on IE6.


  7. The main difference is that the service URLs have changed.

     

    I suggest downloading the latest version of this module and upgrading your installation - all the changes are in the latest version.


  8. It is safe to comment out only on low volume sites.

     

    It is required because the order_id of an order is not known until we reach after_process() - the order_id before then is best guess - this normally works but it you have a busy site with several customers placing orders at the same time but some taking longer than others then the order_id in the protx_direct table will be wrong.


  9. That's quite odd.

     

    To follow the process:

    function before_process()
    {
     // Payment should be complete by this stage - if not abort order
     if (tep_session_is_registered('protx_id') && $_SESSION['protx_id'] > 0)
     {
      $this->protx_id = (int)$_SESSION['protx_id'];
      tep_session_unregister('protx_id');
     }
     else
     {
    tep_redirect(str_replace('&amp','&', tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=protx_direct&error='.urlencode('Sorry, your order could not be processed as no payment transaction was found (ID Missing). Please try again or contact the store owner.'), 'SSL')));
     }
    ...
    }

    So $this->protx_id from the session, then the session variable (not the class variable) is destroyed - if it isn't there you are redirected away so can't get to after_process()

     

    The only thing I can think is that something in checkout_process.php is causing the id to be lost.


  10. It is helpful if you either post in the module support thread, or if you keep you postings in a single thread rather than starting a new topic for each reply - when you do that it make it difficult to follow the problem.

     

    I have looked at you site. Firstly you are not use v5.x of this module but an earlier version - I recommend you upgrade following the instuctions in the .zip file you have posted a link to.

     

    Secondly, the root of your problem is that you have "Use Search-Engine Safe URLs (still in development)" enabled. To switch it off go to your store admin, select Configuration->My Store->Use Search-Engine Safe URLs (still in development)->false.

     

    The module should then work.


  11. His best options would be to use a payment gateway and take deferred payments - I know SagePay can do this but I'm sure others can as well - that way the credit card is authorised but payment is not taken until "released" i.e. at the time of dispatch


  12. Sorry that is entirely my typo

     

    Please replace

    if( (MODULE_PAYMENT_PO_STATUS == 'True') && ($state_funded['value'] == 'yes') );

    with

    if( (MODULE_PAYMENT_PO_STATUS == 'True') && ($state_funded['value'] == 'yes') )

    (i.e. remove the semi-colon)


  13. The new function was added in the wrong place, it should be:

    <?php
    /*
     $Id: cc.php,v 1.1.1.1 2004/03/04 23:41:17 ccwjr Exp $
     osCommerce, Open Source E-Commerce Solutions
     [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]
     Copyright © 2003 osCommerce
     Released under the GNU General Public License
    */
    
     class po {
       var $code, $title, $description, $enabled;
    
    // class constructor
       function po() {
         global $order;
         $this->code = 'N/A  Doing a FREE trial';
         $this->title = MODULE_PAYMENT_PO_TEXT_TITLE;
         $this->description = MODULE_PAYMENT_PO_TEXT_DESCRIPTION;
         $this->email_footer = MODULE_PAYMENT_PO_TEXT_EMAIL_FOOTER;
         $this->sort_order = MODULE_PAYMENT_PO_SORT_ORDER;
    
         $state_funded_query = tep_db_query("SELECT value, fields_id FROM " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id ='" . $customer_id . "' AND fields_id=7");
         $state_funded = tep_db_fetch_array($state_funded_query);
         if( (MODULE_PAYMENT_PO_STATUS == 'True') && ($state_funded['value'] == 'yes') );
         {
           $this->enabled = true;
         } else {
           $this->enabled = false;        
         }
     }
    
    // class methods
     function update_status() {
       global $customer_id;
    
       $state_funded_query = tep_db_query("SELECT value, fields_id FROM " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id ='" . $customer_id . "' AND fields_id=7");
       $state_funded = tep_db_fetch_array($state_funded_query);
    
       if( (MODULE_PAYMENT_PO_STATUS == 'True') && ($state_funded['value'] == 'yes') );
       {
         $this->enabled = true;
       } else {
         $this->enabled = false;        
       }
     }
    
       function selection() {
         global $order;
         $selection = array('id' => $this->code,
                            'module' => $this->title);
                            //'fields' => array(array('title' => MODULE_PAYMENT_PO_TEXT_NUMBER,
                            //                        'field' => tep_draw_input_field('po_number', ''))));
         return $selection;
       }
       function javascript_validation() {
        /* $js = '  if (payment_value == "' . $this->code . '") {' . "\n" .
               '    var cc_owner = document.checkout_payment.cc_owner.value;' . "\n" .
               '    var cc_number = document.checkout_payment.cc_number.value;' . "\n" .
               '    if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "\n" .
               '      error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CC_OWNER . '";' . "\n" .
               '      error = 1;' . "\n" .
               '    }' . "\n" .
               '    if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" .
               '      error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CC_NUMBER . '";' . "\n" .
               '      error = 1;' . "\n" .
               '    }' . "\n" .
               '  }' . "\n";
       */
         return $js;
       }
       function pre_confirmation_check()
       {
           /*
           global $HTTP_POST_VARS;
           global $order;
           global $customer_id;
           $error = '';
    
           $check_credit = tep_db_query("SELECT customers_credit_account_status,customers_credit_status, customers_credit_left from " . TABLE_CUSTOMERS . " where customers_id ='" . $customer_id . "'");
    
           $credit = tep_db_fetch_array($check_credit);
    
           If ($credit['customers_credit_account_status'] =='1' )
           {
               If ($HTTP_POST_VARS['po_number'] == '')
               {
                   $error = sprintf(MODULE_PAYMENT_PO_TEXT_ERROR_NO_NUMBER);
               }
               else
               {
                   if ($credit['customers_credit_status'] == "1")
                   {
                       if ($order->info['total'] > $credit['customers_credit_left'])
                       {
                           $error = sprintf(MODULE_PAYMENT_PO_TEXT_ERROR_NOT_ENOUGH_CREDIT. $credit['customers_credit_left']);
                       }
                   }
                   else
                   {
                       $error = MODULE_PAYMENT_PO_TEXT_ERROR_CREDIT_DISABLED;
                   }
               }
           }
           else
           {
    
               $error = sprintf(MODULE_PAYMENT_PO_TEXT_ERROR_NO_CREDIT_ACCOUNT);
           }
         If ($error)
         {
              $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error);
             tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));
           }
           */
           return false;
       }
    
       function confirmation() {
         /*global $HTTP_POST_VARS;
         $confirmation = array('title' => $this->title,
                               'fields' => array(array('title' => MODULE_PAYMENT_PO_TEXT_NUMBER,
                                                       'field' => $HTTP_POST_VARS['po_number'])));
         return $confirmation;*/
         return false;
       }
    
       function process_button() {
         global $HTTP_POST_VARS;
         $process_button_string = tep_draw_hidden_field('po_number', $HTTP_POST_VARS['po_number']);
         return $process_button_string;
       }
    
       function before_process() {
         global $HTTP_POST_VARS, $order;
    
       $order->info['po_number'] = $HTTP_POST_VARS['po_number'];
       }
    
       function after_process()
       {
           return false;
       }
    
       function get_error() {
         global $HTTP_GET_VARS;
         $error = array('title' => MODULE_PAYMENT_PO_TEXT_ERROR,
                        'error' => stripslashes(urldecode($HTTP_GET_VARS['error'])));
         return $error;
       }
    
       function check() {
         if (!isset($this->check)) {
           $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_PO_STATUS'");
           $this->check = tep_db_num_rows($check_query);
         }
         return $this->check;
       }
    
       function install() {
         tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable credit account Module', 'MODULE_PAYMENT_PO_STATUS', 'True', 'Do you want to accept payments by credit account?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
         tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_PO_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0' , now())");
       }
    
       function remove() {
         tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
       }
    
       function keys() {
         return array('MODULE_PAYMENT_PO_STATUS', 'MODULE_PAYMENT_PO_SORT_ORDER');
       }
     }
    ?>


  14. I didn't spot that you didn't have an update function

     

    You need to add the following:

    function update_status() {
     global $customer_id;
    
     $state_funded_query = tep_db_query("SELECT value, fields_id FROM " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id ='" . $customer_id . "' AND fields_id=7");
     $state_funded = tep_db_fetch_array($state_funded_query);
    
     if( (MODULE_PAYMENT_PO_STATUS == 'True') && ($state_funded['value'] == 'yes') );
     {
    $this->enabled = true;
     } else {
    $this->enabled = false;		
     }
    }


  15. //Added for state funded check
    $state_funded = tep_db_query("SELECT value, fields_id FROM " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id ='" . $customer_id . "'");
    //end added

    should be

    //Added for state funded check
    $state_funded_query = tep_db_query("SELECT value, fields_id FROM " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id ='" . $customer_id . "'");
    $state_funded = tep_db_fetch_array($state_funded_query);
    //end added

     

    and

    // Added for state funded check
    // $this->enabled = ((MODULE_PAYMENT_INSTALLMENT_STATUS == 'True') ? true : false);
    if(MODULE_PAYMENT_INSTALLMENT_STATUS == 'True'){
    if(($state_funded->value) == yes){
    $this->enabled = true;
    } else {
    $this->enabled = false;
    }
    } else {
    $this->enabled = false;
    }
    ;
    
    // End added

    should be

    // Added for state funded check
    // $this->enabled = ((MODULE_PAYMENT_INSTALLMENT_STATUS == 'True') ? true : false);
    if( (MODULE_PAYMENT_INSTALLMENT_STATUS == 'True') && ($state_funded['value'] == 'yes') )
    {
    $this->enabled = true;
    } else {
    $this->enabled = false;
    }
    // End added


  16. Those messages suggest to me that application_top.php is being included / required more than once though I couldn't say why. The payoffline does nothing special on the checkout_payment screen compared to other payment modules

×