Post by JNeuhoff » Thu Oct 30, 2008 5:55 am

I think the code in file /catalog/extension/payment/paypal.php needs to be changed for the lines at

Code: Select all

		$this->response =& $locator->get('request');
		$this->session  =& $locator->get('response');
into the correct lines

Code: Select all

		$this->response =& $locator->get('response');
		$this->session  =& $locator->get('session');
Otherwise, if you have configured your Paypal to using a geo-zone other than 'All Zones', it will always come with an error message during the checkout process, as follows:
Fatal error: Call to undefined method Response::get() in /catalog/extension/payment/paypal.php on line 31
because on line 31 it uses the code

Code: Select all

             ..... $this->session->get('payment_address_id') ....

BTW.: The Google Checkout payment extension, which is quite similar in program logic to the Paypal module, has the same bug.

Bruce, you are the expert on this because you were involved in the original creation of the Paypal Improved module which I believe is being used by OpenCart 0.7.9RC3. Can you confirm that this is indeed a bug before I enter it into the http://code.google.com/p/open-cart/issues/list?

And talking about Paypal and Google payment modules: Perhaps it is a good idea to insert the missing 'Paid Unconfirmed' order_status line into the /install/opencart.sql file, the cleaned-up code for creating the order_status should look like this:

Code: Select all

DROP TABLE IF EXISTS `order_status`;
CREATE TABLE `order_status` (
  `order_status_id` int(11) NOT NULL auto_increment,
  `language_id` int(11) NOT NULL default '1',
  `name` varchar(32) collate utf8_unicode_ci NOT NULL default '',
  PRIMARY KEY  (`order_status_id`,`language_id`),
  KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `order_status` (`order_status_id`, `language_id`, `name`) VALUES ('1', '1', 'Canceled');
INSERT INTO `order_status` (`order_status_id`, `language_id`, `name`) VALUES ('2', '1', 'Complete');
INSERT INTO `order_status` (`order_status_id`, `language_id`, `name`) VALUES ('3', '1', 'Paid Unconfirmed');
INSERT INTO `order_status` (`order_status_id`, `language_id`, `name`) VALUES ('4', '1', 'Pending');
INSERT INTO `order_status` (`order_status_id`, `language_id`, `name`) VALUES ('5', '1', 'Processing');
INSERT INTO `order_status` (`order_status_id`, `language_id`, `name`) VALUES ('6', '1', 'Shipped');
Last edited by JNeuhoff on Thu Oct 30, 2008 6:06 am, edited 1 time in total.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by bruce » Thu Oct 30, 2008 7:10 am

Its a bug.

Nice catch!!

I knew about the symptom but had not managed to find the source of the problem.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by hm2k » Thu Oct 30, 2008 7:16 am

The first part is a bug, yes, and I have corrected that as per r186.

As for the second part, I discussed the order_status with Q and he said that some of the contribs use the existing id's as references, so a "cleanup" of this table may break those contribs.

Yes, you're right, it seems that the paypal and google checkout modules require the "Paid Unconfirmed" status, so I will add that.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by hm2k » Thu Oct 30, 2008 7:20 am

Added in r187.

This thread will now be locked, open a new thread if the problem persists or it has caused another issue.

Thanks.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Qphoria » Thu Oct 30, 2008 7:29 am

Yea, in the latest svn i did a lot of sql cleanup for the default install. But I left the weird numbered order states because of the sedex payment module I know references the completed code as "16" instead of doing a proper lookup.  So I will leave it alone for 0.7.9

But in 0.8 I will fix it, as we are going to (silently) imply that 0.7.x contribs will need to be updated to work with 0.8.x

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 1 guest