Page 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 64
  1. #41
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Payment module admin section writing guidelines?

    I have errors and the admin section is not listing the module as expected, I am not sure if there is a problem with a parameter, that fails to create the entries in the config file.

    Here is the script so far:

    check function

    PHP Code:
    function check() {
        global 
    $db;
        if (!isset(
    $this->_check)) {
          
    $check_query $db->Execute("select configuration_value from " TABLE_CONFIGURATION " where configuration_key = 'MODULE_PAYMENT_IC_STATUS'");
          
    $this->_check $check_query->RecordCount();
        }
        return 
    $this->_check;
      } 
    Install function
    PHP Code:
     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 International Checkout Module', 'MODULE_PAYMENT_IC_STATUS', 'True', 'Do you want to accept International Checkout payments?', '6', '130', '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, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_IC_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '131' , now())");
        
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('International Checkout Company ID', 'MODULE_PAYMENT_IC_COMPANY', '', 'Company used for International Checkout payments', '6', '132', now())");
       } 
    PHP Code:
     function remove() {
          
    $db->Execute("delete from " TABLE_CONFIGURATION " where configuration_key in ('" implode("', '"$this->keys()) . "')");
        } 
    PHP Code:
      function keys() {
          return array(
    'MODULE_PAYMENT_IC_STATUS''MODULE_PAYMENT_IC_SORT_ORDER''MODULE_PAYMENT_IC_COMPANY'); 
    When I move it to includes/modules/payment/ I get errors and nothing is written to the db ...

  2. #42
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: Create a new module for International Checkout payment module

    Apparently the problem was a missing language file ... but I still have another error in one of the loops that traverses the product array and creates the form:



    PHP Code:
    foreach ($productArray as $product) {
        
         
    // Comment the string until it has proper form
         
         
    $process_button_string zen_draw_hidden_field('ItemQuantity',$product['quantityField'] . 
                                  
    zen_draw_hidden_field('ItemImage',$product['productsImage']) . 
                                  
    zen_draw_hidden_field('ItemDescription',$product['productsName']) . 
                                  
    zen_draw_hidden_field('ItemPrice',$product['productsPrice']);

    // echo $process_button_string;



         // $process_button_string .= zen_draw_hidden_field(zen_session_name(), zen_session_id());
          
    return $process_button_string;
        } 
    I get a parsing error unexpected semicolon at the end of the active $process_button_string,
    don't know why, is the syntax wrong?

  3. #43
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Create a new module for International Checkout payment module

    Looks like you're missing a closing parenthesis on your ItemQuantity line.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #44
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: Create a new module for International Checkout payment module

    Quote Originally Posted by DrByte View Post
    Looks like you're missing a closing parenthesis on your ItemQuantity line.
    yes! thanks couldn't see that ...

  5. #45
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: Create a new module for International Checkout payment module

    ok, the module is now listed in Admin, so the next step will be to go into testing phase, to see if the values are retrieved from the shopping cart and the string properly filled, but what should I use to draw a button(use an image), linked to the process button class? I mean do I have to make it separately from the class?

  6. #46
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Create a new module for International Checkout payment module

    You don't. The submit button on the page takes care of that for you.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #47
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: Create a new module for International Checkout payment module

    Quote Originally Posted by DrByte View Post
    You don't. The submit button on the page takes care of that for you.

    Do you mean the SUBMIT button in the shopping cart page?
    but I need to draw a new button, such as the one Google Checkout does, before going to checkout, I was looking all google checkout and Paypal files to see how they do it, but couldn't find a single reference?

    My class supposed to do this:

    Read and list all products and image locations from the cart plus the company's id and session's id, after that is ready submit the hidden fields, using an image submit.

    So far the module is installed but don't know where I can place the code for the button. I noticed a nice Install button in Admin as soon as the class was listed and recognized, but what I need is the submit button for the end user to click, this button is a custom image ...

  8. #48
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Create a new module for International Checkout payment module

    I was referring to the Submit button on the checkout-confirmation page. That's what uses the process_button() "function".
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #49
    Join Date
    Jul 2008
    Posts
    360
    Plugin Contributions
    0

    Default Re: Create a new module for International Checkout payment module

    Quote Originally Posted by DrByte View Post
    I was referring to the Submit button on the checkout-confirmation page. That's what uses the process_button() "function".
    ok, but that draws the standard checkout button pages, and that is not what I want, I need to draw a button below the cart the way paypal and google checkout do, because the standard checkout process, has to be avoided, the only thing my process_button() method(sorry for the function thing), needs to do is submit these data, using a custom International Checkout button, that will not interfere with the standard checkout process. That's why I wanted to know if the code can go withing the class or I have to write in other file, or somewhere in the shopping cart.

  10. #50
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Create a new module for International Checkout payment module

    Quote Originally Posted by icecold View Post
    ok, but that draws the standard checkout button pages, and that is not what I want, I need to draw a button below the cart the way paypal and google checkout do, because the standard checkout process, has to be avoided, the only thing my process_button() method(sorry for the function thing), needs to do is submit these data, using a custom International Checkout button, that will not interfere with the standard checkout process.
    LOL - sounds like it is absolutely interfering with the standard checkout process, by bypassing it entirely!
    Quote Originally Posted by icecold View Post
    That's why I wanted to know if the code can go withing the class or I have to write in other file, or somewhere in the shopping cart.
    I don't know how GC does it.
    The PayPal button is simply drawn within the template where it's required.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 5 of 7 FirstFirst ... 34567 LastLast

Similar Threads

  1. How to create new payment module?
    By Macedonium in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 15 May 2009, 09:47 PM
  2. Create payment module for cc gateway
    By ccppll in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 22 Apr 2009, 05:00 PM
  3. How to Create a Transaction ID for Payment Module?
    By Diego Vieira in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 21 Mar 2009, 04:40 PM
  4. How to create new payment module?
    By mscro in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 28 Apr 2008, 12:23 AM
  5. How do I create a new payment module?
    By meeven in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 12 Aug 2007, 01: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