Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default can anyone help me get dirbank mod to work with Fast & Easy Checkout?

    I'm trying to get the direct bank deposit, as well as the check/money order, module to work with Fast and Easy checkout. The direct deposit and check/m.o. modules show the checking account info/ address info on the confirmation page, but FEC skips this page and shows a "processing" page instead( this is configurable via the admin controls), but even if FEC is set to show the confirmation page it still automatically redirects to checkout_success once the info is passed to the payment gateway or whatever is selected.

    I've been trying to figure out how to get the direct bank deposit and check/m.o. payment messages to show on the checkout_success page instead. So once it goes through to checkout_success, if you chose to pay via direct bank deposit, you would get the "here is our bank routing number, name, and checking account number, once we receive your payment we will ship your goods" message, or if it was check/m.o. you would instead get "please make your check/m.o. payable to xxx and send to: blah blah".

    So far, what I have tried with dirbank is changing it's code from

    PHP Code:
      function confirmation() {
          return array(
    'title' => MODULE_PAYMENT_DIRBANK_TEXT_DESCRIPTION);
        } 

    to

    PHP Code:
        function checkout_success() {
          return array(
    'title' => MODULE_PAYMENT_DIRBANK_TEXT_DESCRIPTION);
        } 
    but it just makes the checkout_confirmation page hang instead of going through to checkout_success.

    Here is the entire code for the dirbank module:

    PHP Code:
    <?php
    //
    // +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce                                       |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2003 The zen-cart developers                           |
    // |                                                                      |   
    // | http://www.zen-cart.com/index.php                                    |   
    // |                                                                      |   
    // | Portions Copyright (c) 2003 osCommerce                               |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license,       |
    // | that is bundled with this package in the file LICENSE, and is        |
    // | available through the world-wide-web at the following url:           |
    // | http://www.zen-cart.com/license/2_0.txt.                             |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to       |
    // | [email protected] so we can mail you a copy immediately.          |
    // +----------------------------------------------------------------------+
    // $Id: DIRBANK.php 1105 2006-06-06 22:05:35Z OZ_jack $ modify from Auzbank of OZcommerce module by birdbrain
    //
      
    class dirbank {
        var 
    $code$title$description$enabled;
    // class constructor
        
    function dirbank() {
          global 
    $order;
          
    $this->code 'dirbank';
          
    $this->title MODULE_PAYMENT_DIRBANK_TEXT_TITLE;
          
    $this->description MODULE_PAYMENT_DIRBANK_TEXT_DESCRIPTION;
          
    $this->email_footer MODULE_PAYMENT_DIRBANK_TEXT_EMAIL_FOOTER;
          
    $this->sort_order MODULE_PAYMENT_DIRBANK_SORT_ORDER;
          
    $this->enabled = ((MODULE_PAYMENT_DIRBANK_STATUS == 'True') ? true false);
          if ((int)
    MODULE_PAYMENT_DIRBANK_ORDER_STATUS_ID 0) {
            
    $this->order_status MODULE_PAYMENT_DIRBANK_ORDER_STATUS_ID;
          }
          if (
    is_object($order)) $this->update_status();
        }
    // class methods
        
    function update_status() {
          global 
    $order$db;
          if ( (
    $this->enabled == true) && ((int)MODULE_PAYMENT_DIRBANK_ZONE 0) ) {
            
    $check_flag false;
            
    $check $db->Execute("select zone_id from " TABLE_ZONES_TO_GEO_ZONES " where geo_zone_id = '" MODULE_PAYMENT_DIRBANK_ZONE "' and zone_country_id = '" $order->delivery['country']['id'] . "' order by zone_id");
            while (!
    $check->EOF) {
              if (
    $check->fields['zone_id'] < 1) {
                
    $check_flag true;
                break;
              } elseif (
    $check->fields['zone_id'] == $order->delivery['zone_id']) {
                
    $check_flag true;
                break;
              }
              
    $check->MoveNext();
            }
            if (
    $check_flag == false) {
              
    $this->enabled false;
            }
          }
    // disable the module if the order only contains virtual products
          
    if ($this->enabled == true) {
            if (
    $order->content_type == 'virtual') {
              
    $this->enabled false;
            }
          }
        }
        function 
    javascript_validation() {
          return 
    false;
        }
        function 
    selection() {
          return array(
    'id' => $this->code,
                       
    'module' => $this->title);
        }
        function 
    pre_confirmation_check() {
          return 
    false;
        }
        function 
    confirmation() {
          return array(
    'title' => MODULE_PAYMENT_DIRBANK_TEXT_DESCRIPTION);
        }
        function 
    process_button() {
          return 
    false;
        }
        function 
    before_process() {
          return 
    false;
        }
        function 
    after_process() {
          return 
    false;
        }
        function 
    get_error() {
          return 
    false;
        }
        function 
    check() {
          global 
    $db;
          if (!isset(
    $this->_check)) {
            
    $check_query $db->Execute("select configuration_value from " TABLE_CONFIGURATION " where configuration_key = 'MODULE_PAYMENT_DIRBANK_STATUS'");
            
    $this->_check $check_query->RecordCount();
          }
          return 
    $this->_check;
        }
        function 
    install() {
          global 
    $db;
         
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Direct Bank Deposit Module', 'MODULE_PAYMENT_DIRBANK_STATUS', 'True', 'Do you want to accept Australian Bank Deposit payments?', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
      
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_DIRBANK_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
         
    $db->Execute("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_DIRBANK_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
         
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('BSB Number', 'MODULE_PAYMENT_DIRBANK_BSB', '00-00-00', 'BSB Number in the format 000-000', '6', '1', now());");
         
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Account No.', 'MODULE_PAYMENT_DIRBANK_ACCNUM', '12345678', 'Bank Account No.', '6', '1', now());");
         
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Swift Code.', 'MODULE_PAYMENT_DIRBANK_SWIFT', '12345678', 'Swift Code.', '6', '1', now());");
         
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Account Name', 'MODULE_PAYMENT_DIRBANK_ACCNAM', 'Joe Bloggs', 'Bank account name', '6', '1', now());");
         
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Name', 'MODULE_PAYMENT_DIRBANK_BANKNAM', 'The Bank', 'Bank Name', '6', '1', now());");
         
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_DIRBANK_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
       }
        function 
    remove() {
          global 
    $db;
          
    $db->Execute("delete from " TABLE_CONFIGURATION " where configuration_key in ('" implode("', '"$this->keys()) . "')");
        }
        function 
    keys() {
       return array(
    'MODULE_PAYMENT_DIRBANK_STATUS''MODULE_PAYMENT_DIRBANK_ZONE''MODULE_PAYMENT_DIRBANK_SORT_ORDER''MODULE_PAYMENT_DIRBANK_BSB''MODULE_PAYMENT_DIRBANK_ACCNUM''MODULE_PAYMENT_DIRBANK_ACCNAM''MODULE_PAYMENT_DIRBANK_SWIFT''MODULE_PAYMENT_DIRBANK_BANKNAM''MODULE_PAYMENT_DIRBANK_ORDER_STATUS_ID');
        }
      }
    ?>
    Can anyone tell me what to do to make this work? I will gladly package it up with a new readme once it's working properly so others can make use of this.

    Thanks!

    Matt
    Last edited by lankeeyankee; 21 Nov 2007 at 05:15 AM.

 

 

Similar Threads

  1. v153 Using Fast and Easy Checkout, can't get Store Pickup to stay selected on Order Total
    By njlech in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 23 Dec 2014, 11:50 PM
  2. Troubleshooting Blank Screen - Errors with Fast & Easy Checkout
    By tcarden in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 17 Jan 2013, 10:47 PM
  3. Fast easy checkout with ajax and bogo mod?
    By zskiman in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 18 May 2011, 09:14 PM
  4. Fast & Easy Checkout not allowing customers with an account to checkout
    By zubenubi in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 6 Dec 2010, 10:45 PM
  5. Replies: 22
    Last Post: 12 Aug 2009, 06:29 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