Thread: Pay Mate

Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Posts
    8
    Plugin Contributions
    0

    red flag Pay Mate

    Hi all,

    I want to use paymate.com.au as my payment gate way, OsCommerce have one, i tried to install it but it wont work

    Code:
    <?php
    /*
      // $Id: paymate.php,v 2.0 2002/01/17
    
      $Id: paymate.php,v 2.3 2005/11/27
    
      This module was modifed and rev'd to 2.3 by Mark Edwards to provide better support for paymate.
      
      New features in v3.0
       * Uses POST instead of GET for better functionality
       * Supports a return URL, which streamlines payment processing
       * Supports return codes from paymate in case a payment is declined
       * Supports sort order for payment choice listings
       * No longer requires the use of the paymate graphic and separate payment window which 
         formerly depended on the user returning to the store to confirm completion of their order,
         this is all done automatically now
    
    
      The module works per paymate's spec as of Nov 27, 2005.
    
      Paymate dev help and testing info:
      http://www.paymate.com.au/help/help.do?helpSet=paymate&item=siteintegration
    
      Paymate integration info:
      http://www.paymate.com.au/help/help.do?helpSet=paymate&item=siteintegration 
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2003 osCommerce
    
      Released under the GNU General Public License
    */
    
      class paymate {
        var $code, $title, $description, $enabled;
    
    // class constructor
        function paymate() {
          $this->code = 'paymate';
          $this->title = MODULE_PAYMENT_PAYMATE_TEXT_TITLE;
          $this->description = MODULE_PAYMENT_PAYMATE_TEXT_DESCRIPTION;
          $this->enabled = ((MODULE_PAYMENT_PAYMATE_STATUS == 'True') ? true : false);
          $this->sort_order = MODULE_PAYMENT_PAYMATE_SORT_ORDER;
          $this->form_action_url = 'https://www.paymate.com.au/PayMate/ExpressPayment';
     }
    
    // class methods
        function javascript_validation() {
          return false;
        }
    
        function selection() {
          return array('id' => $this->code,
                       'module' => $this->title);
        }
    
        function pre_confirmation_check() {
          return false;
        }
    
        function confirmation() {
          return false;
        }
    
        function process_button() {
          global $order, $currency, $currencies;
          $my_currency = $currency;
    
    
          $process_button_string = tep_draw_hidden_field('mid', MODULE_PAYMENT_PAYMATE_MID) .
        tep_draw_hidden_field('popup', 'false') .
        tep_draw_hidden_field('amt', number_format($order->info['total'] * $currencies->get_value($my_currency), 2) ).
        tep_draw_hidden_field('amt_editable', 'N') .
        tep_draw_hidden_field('ref',STORE_NAME).
        tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL') ) .
        tep_draw_hidden_field('currency', $mycurrency) .
        tep_draw_hidden_field('PMT_RECIPIENT_EMAIL', MODULE_PAYMENT_PAYMATE_ID) .
        tep_draw_hidden_field('PMT_TRANSACTION_ORDERREF', time()) .
        tep_draw_hidden_field('PMT_SENDER_EMAIL', $order->customer['email_address']) .
        tep_draw_hidden_field('PMT_CONTACT_FIRSTNAME', $order->billing['firstname']) .
        tep_draw_hidden_field('PMT_CONTACT_SURNAME', $order->billing['lastname']) .
        tep_draw_hidden_field('regindi_address1', $order->billing['street_address']) .
        tep_draw_hidden_field('regindi_sub', $order->billing['city']) .
        tep_draw_hidden_field('regindi_pcode', $order->billing['postcode']) .
        tep_draw_hidden_field('PMT_TRANSACTION_SELLERAMOUNT', number_format($order->info['total'] *     $currencies->get_value($my_currency), 2));
    
        return $process_button_string;
         
        }
    
        function before_process() {
          global $HTTP_POST_VARS;
    
          if ($HTTP_POST_VARS['responseCode'] == 'PD') { // declined
                tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=YOUR PAYMENT WAS DECLINED BY YOUR PAYMENT PROCESSOR. PLEASE SELECT ANOTHER PAYMENT METHOD:', 'SSL', true, false));
          }
          if ($HTTP_POST_VARS['responseCode'] == 'PA') { // approved
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'error_message=Your payment was approved! Thank you!', 'SSL', true, false));
          }
          if ($HTTP_POST_VARS['responseCode'] == 'PP') { // processing
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, 'error_message=Your payment is being processed. Thank you!', 'SSL', true, false));
          }
    
        }
    
        function after_process() {
          return false;   
    
        }
    
        function get_error() {
             global $HTTP_GET_VARS;
       
             $error = array('title' => 'ERROR PROCESSING YOUR PAYMENT',
                            'error' => stripslashes(urldecode($HTTP_GET_VARS['error'])));
       
             return $error;
        }
    
        function output_error() {
          return false;
        }
    
        function check() {
          if (!isset($this->_check)) {
            $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_PAYMATE_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 PAYMATE Module', 'MODULE_PAYMENT_PAYMATE_STATUS', 'True', 'Do you want to accept PAYMATE payments?', '6', '3', '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 ('Paymate ID', 'MODULE_PAYMENT_PAYMATE_MID', 'your Paymate ID', 'The merchant ID paymate assigned to you for the PAYMATE service', '6', '4', now())");
          tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('E-Mail Address', 'MODULE_PAYMENT_PAYMATE_ID', '[email protected]', 'The e-mail address registered for the Paymate service', '6', '5', 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_PAYMATE_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
    
        }
    
        function remove() {
          $keys = '';
          $keys_array = $this->keys();
          for ($i=0; $i<sizeof($keys_array); $i++) {
            $keys .= "'" . $keys_array[$i] . "',";
          }
          $keys = substr($keys, 0, -1);
    
          tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in (" . $keys . ")");
        }
    
        function keys() {
          return array('MODULE_PAYMENT_PAYMATE_STATUS', 'MODULE_PAYMENT_PAYMATE_MID', 'MODULE_PAYMENT_PAYMATE_ID','MODULE_PAYMENT_PAYMATE_SORT_ORDER');
        }
      }
    ?>

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Pay Mate

    Please dont double post,

    also you might want to search for paymate,
    I think thats the one that got the rant the otherday
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Pay Mate

    See other post this is a duplicate ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. v150 Paypal Express Checkout 10417 error; only from Customers using Pay-pal account to pay
    By mikecnz in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 5 Mar 2013, 05:15 AM
  2. v150 how do I let customer choose an amount to pay? to pay support fees
    By SohrabSohail in forum General Questions
    Replies: 5
    Last Post: 16 Jul 2012, 02:35 AM
  3. Replies: 2
    Last Post: 17 Apr 2010, 05:48 PM
  4. Pay Mate
    By Relic in forum Addon Payment Modules
    Replies: 1
    Last Post: 4 Feb 2007, 10:28 AM

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