Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Moneybookers IPN - browser problems


Guest

Recommended Posts

Hi@all!

i got problems with the contribution: MoneyBookers IPN v2.1 for osC MS2.2 RC2a - http://addons.oscommerce.com/info/5200

 

i have installed it and it work fine, but only with just few browser like Internet Explorer 8 and Opera 10.53

It doesn't work with Firefox 3.6.3 , Google Chrome 4.1 and Safari 4: when i click on the button "Confirm Order" in the checkout_confirmation.php page, nothing happen.

I got Oscommerce 2.2RC2a

 

any solution ?

Link to comment
Share on other sites

Usually when a button doesn't work it means your <form> </form> tags are screwed up.

 

They must appear in equal number and cannot be nested (i.e. two <form> tags in succession without an intervening </form> tag).

 

Since I don't have your URL I can't be sure....

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

the moneybookers_ipn.php file is this:

 

<?php


class moneybookers_ipn {
       var $code, $title, $description, $enabled;

       // class constructor
       function moneybookers_ipn() {
               global $order;

               $this->code = 'moneybookers_ipn';
               $this->title = MODULE_PAYMENT_MONEYBOOKERS_IPN_TEXT_TITLE;
               $this->description = MODULE_PAYMENT_MONEYBOOKERS_IPN_TEXT_DESCRIPTION;
               $this->sort_order = MODULE_PAYMENT_MONEYBOOKERS_IPN_SORT_ORDER;
               $this->enabled = ((MODULE_PAYMENT_MONEYBOOKERS_IPN_STATUS == 'True') ? true : false);

               if ((int)MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID > 0) {
                       $this->order_status = MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID;
               }

               $this->form_action_url = 'javascript:showbuypage();';
       }

       // class methods

       function update_status() {
               global $order;

               if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYBOOKERS_IPN_ZONE > 0) ) {
                       $check_flag = false;
                       $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_MONEYBOOKERS_IPN_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
                       while ($check = tep_db_fetch_array($check_query)) {
                               if ($check['zone_id'] < 1) {
                                       $check_flag = true;
                                       break;
                               } elseif ($check['zone_id'] == $order->billing['zone_id']) {
                                       $check_flag = true;
                                       break;
                               }
                       }

                       if ($check_flag == false) {
                               $this->enabled = false;
                       }
               }
       }

       function javascript_validation() {
               return false;
       }

       function selection() {
$mb_cc_txt = sprintf(MODULE_PAYMENT_MONEYBOOKERS_OL_CC_TEXT,
		    tep_image($img_moneybookers,' Moneybookers ','','','align=ABSMIDDLE')
		    //tep_image($img_visa,' Visa ','','','align=ABSBOTTOM'),
		    //tep_image($img_mc,' MasterCard ','','','align=ABSBOTTOM'),
		    //tep_image($img_amex,' American Express ','','','align=ABSBOTTOM'),
		    //tep_image($img_diners,' Diners Club ','','','align=ABSBOTTOM'),
		    //tep_image($img_jcb,' JCB ','','','align=ABSBOTTOM')
		    );
$fields[] = array('title' => '', //MODULE_PAYMENT_MONEYBOOKERS_IPN_TEXT_TITLE,
		    'field' => MODULE_PAYMENT_MONEYBOOKERS_IPN_TEXT_HTML);
return array('id' => $this->code,
	     'module' => $this->title,
	     'fields' => $fields);

 /*return array('id' => $this->code,
               'module' => $this->title);*/
       }

       function pre_confirmation_check() {
               return false;
       }

       function confirmation() {

	echo "<div align=\"center\"><iframe name=\"iframe\" width=\"800\" height=\"0\" src=\"".FILENAME_CHECKOUT_MONEYBOOKERSIPN.
		"\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\"".
		" frameborder=\"No\" id=\"alexiframe\"></iframe> </div>";
	//return array('title' => MODULE_PAYMENT_MONEYBOOKERS_IPN_TEXT_TITLE);

}

       function process_button() {
               return("
			<br>
			<script>
				function showbuypage() {
			document.getElementById(\"alexiframe\").style.height=\"800\";
				}
			</script>");
       }

       function before_process() {
               return false;
       }

       function after_process() {
               return false;
       }

       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_MONEYBOOKERS_IPN_STATUS'");
                       $this->_check = tep_db_num_rows($check_query);
               }
               return $this->_check;
       }

       function install() {

               if (function_exists('curl_exec')) {
                       $curl_message = '<br>php cURL has been <b>DETECTED</b> in your system';
               } else {
                       $curl_message = '<br>php cURL has <b>NOT</b> been <b>DETECTED</b> in your system';
               };

               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 moneybookers_ipn Module', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_STATUS', 'True', 'Do you want to accept moneybookers_ipn 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 ('E-Mail Address', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ID', '', 'The eMail address to use for the moneybookers 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 ('Customer ID', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_REFID', '', 'Your Moneybookers customer ID (can be found in your Moneybookers account)', '6', '7', 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_MONEYBOOKERS_IPN_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
               tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Transaction Language', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_LANGUAGE', 'Selected Language', 'The default language for the payment transactions', '6', '6', 'tep_cfg_pull_down_language(', 'tep_get_language', now())");
          	tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_CURRENCY', 'Selected Currency', 'The default currency for the payment transactions', '6', '5', 'tep_cfg_pull_down_currency(', 'tep_get_currency',  now())");
//               tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Payment Method', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_METHOD', 'Selected Method', 'The default Payment Method for the payment transactions', '6', '8', 'tep_cfg_pull_down_method(', 'tep_get_method', now())");
               tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Secret Word:', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_SECRET_WORD', '', 'Enter Secret Word - must also be in profile section of moneybookers account (Optional)', '6', '3', now());");

//                tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Path to curl', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_CURL_PATH', '/usr/bin/curl', 'Path to curl on your server. You can leave it empty if php cUrl has detected." . $curl_message . "', '6', '0', now())");

               tep_db_query("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_MONEYBOOKERS_IPN_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");

               tep_db_query("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 Before', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_BEFORE', '88888', 'Set the status of orders made with this payment module to this value before going to the payment gateway', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");

               tep_db_query("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 After', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_AFTER', '88890', 'Set the status of orders made with this payment module to this value after successful comeback from payment gateway', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");

               tep_db_query("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 for scheduled response', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_SCHEDULED', '88891', 'Set the status of orders made with this payment module to this value if  payment gateway has returned scheduled response', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
               tep_db_query("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 for pending response', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_PENDING', '88892', 'Set the status of orders made with this payment module to this value if  payment gateway has returned response - pending (using for bank transfer)', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
               tep_db_query("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 for Cancelled response', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_CANCELLED', '88893', 'Set the status of orders made with this payment module to this value if  payment has cancelled by payment gateway ', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
//		tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Log url', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_LOGOURL', '', 'Logo URL for you shop for exmple http://www.mylog.de/logo.gif', '6', '9', now())");



       }

       function remove() {
               tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
       }

       function keys() {
               return array('MODULE_PAYMENT_MONEYBOOKERS_IPN_STATUS', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ID',  'MODULE_PAYMENT_MONEYBOOKERS_IPN_REFID', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_LANGUAGE', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_CURRENCY', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_SECRET_WORD',/*'MODULE_PAYMENT_MONEYBOOKERS_IPN_CURL_PATH', */'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_BEFORE', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_AFTER', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_SCHEDULED', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_PENDING', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ORDER_STATUS_ID_CANCELLED', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_SORT_ORDER', 'MODULE_PAYMENT_MONEYBOOKERS_IPN_ZONE' );
       }


       function get_key_values(){
         $res = tep_db_query("select configuration_key, configuration_value from ".
                       TABLE_CONFIGURATION . " where configuration_key in ('" . 
                       implode("', '", $this->keys()) . "')");
         $tudo = array();
         while ($row = tep_db_fetch_array($res)){
           $tudo[$row["configuration_key"]] = $row["configuration_value"];
         }    
         return $tudo;
       }    
}
?>

Link to comment
Share on other sites

Absolutely useless in solving your problem.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...