Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal Payment Option Disappears


ravihars

Recommended Posts

Posted

I am running osCommerce v2.2 Rc2a with the PayPal Website Payments Standard configured and running.

 

If my shopping cart total is under £50, PayPal shows up as a payment option under checkout. If the total is £50 or above, it does not show up on the checkout_shipping.php screen.

 

It appears that there is a limit set up somewhere, but I've gone through both the osCommerce and PayPal configurations and have not been able to find anything relevant. Can someone please help and point me in the right direction?

 

Thanks!

Ravi Har

Posted
PayPal shows up as a payment option under checkout. If the total is £50 or above, it does not show up on the checkout_shipping.php screen.

do you use special PayPal module with some kind of restriction module?

Could you post first 70 lines of the PayPal module code, please?

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted
do you use special PayPal module with some kind of restriction module?

Could you post first 70 lines of the PayPal module code, please?

 

here it is ...

 

<?php
/*
 $Id: paypal_standard.php 1803 2008-01-11 18:16:37Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2008 osCommerce

 Released under the GNU General Public License
*/

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

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

     $this->signature = 'paypal|paypal_standard|1.0|2.2';

     $this->code = 'paypal_standard';
     $this->title = MODULE_PAYMENT_PAYPAL_STANDARD_TEXT_TITLE;
     $this->public_title = MODULE_PAYMENT_PAYPAL_STANDARD_TEXT_PUBLIC_TITLE;
     $this->description = MODULE_PAYMENT_PAYPAL_STANDARD_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_PAYMENT_PAYPAL_STANDARD_SORT_ORDER;
     $this->enabled = ((MODULE_PAYMENT_PAYPAL_STANDARD_STATUS == 'True') ? true : false);

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

     if (is_object($order)) $this->update_status();

     if (MODULE_PAYMENT_PAYPAL_STANDARD_GATEWAY_SERVER == 'Live') {
       $this->form_action_url = 'https://www.paypal.com/cgi-bin/webscr';
     } else {
       $this->form_action_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
     }
   }

// class methods
   function update_status() {
     global $order;

     if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_STANDARD_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_PAYPAL_STANDARD_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() {
     global $cart_PayPal_Standard_ID;

     if (tep_session_is_registered('cart_PayPal_Standard_ID')) {
       $order_id = substr($cart_PayPal_Standard_ID, strpos($cart_PayPal_Standard_ID, '-')+1);

       $check_query = tep_db_query('select orders_id from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int)$order_id . '" limit 1');

       if (tep_db_num_rows($check_query) < 1) {
         tep_db_query('delete from ' . TABLE_ORDERS . ' where orders_id = "' . (int)$order_id . '"');
         tep_db_query('delete from ' . TABLE_ORDERS_TOTAL . ' where orders_id = "' . (int)$order_id . '"');
         tep_db_query('delete from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int)$order_id . '"');
         tep_db_query('delete from ' . TABLE_ORDERS_PRODUCTS . ' where orders_id = "' . (int)$order_id . '"');
         tep_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' where orders_id = "' . (int)$order_id . '"');
         tep_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_DOWNLOAD . ' where orders_id = "' . (int)$order_id . '"');

         tep_session_unregister('cart_PayPal_Standard_ID');
       }
     }

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

Archived

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

×
×
  • Create New...