My favorites | Sign in
Google
                
New issue | Search
for
| Advanced search | Search tips
Issue 31: googlecart->CheckoutServer2Server has a hardcoded include path
1 person starred this issue and may be notified of changes. Back to list
Status:  Started
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by adamsc, May 09, 2008
googlecart.php has a hard-coded require_once() which expects the googlerequest.php file to be 
in a directory named "library", which breaks on projects which use a different directory structure 
(e.g. includes/googlecheckout/ for us). 

The patch below removes this entirely on the grounds that the user should simply include that 
file as they do all of the other files but it might be considered preferable to do something like 
require_once(dirname(__FILE__) . "/googlerequest.php").

--- includes/GoogleCheckout/googlecart.php	(revision 45)
+++ includes/GoogleCheckout/googlecart.php	(working copy)
@@ -962,8 +962,6 @@
      *               and the redirect url returned by the server in index 1
      */
     function CheckoutServer2Server($proxy=array(), $certPath='') {
-      ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.'.');
-      require_once('library/googlerequest.php');
       $GRequest = new GoogleRequest($this->merchant_id, 
                       $this->merchant_key, 
                       $this->server_url=="https://checkout.google.com/"?


Comment 6 by peng.ying, Oct 22, 2008
added to sample code, new release coming soon
Status: Fixed
Comment 7 by peng.ying, Oct 22, 2008
(No comment was entered for this change.)
Status: Accepted
Comment 8 by taxdacia, Oct 25, 2008
do you have a date on the new release?
Comment 9 by kaixin110, Oct 28, 2008
http://www.visitchn.com
Comment 12 by lizadecausta, Dec 05, 2008
Nice piece of code.
keep up the good work.. :)

http://www.mindalbum.com/
Comment 14 by event366, Dec 30, 2008
Good job..

http://www.seozap.com/
Comment 15 by gethighranks, Dec 31, 2008
Keep up the awesome Work!!!

Thank you
Gethigharanks
http://www.gethighranks.com

Comment 16 by rajesh.magnon, Dec 31, 2008
yeah it's really helpful for me.

http://www.internetbusinessdirectory.org/
Comment 17 by peng.ying, Jan 27, 2009
(No comment was entered for this change.)
Status: Started
Comment 18 by mtahirrafiq, Jan 28, 2009
really helpful.

http://www.zahipedia.com


Comment 19 by lizadecausta, Feb 11, 2009
Nice explanation dude..
keep up the good work..

http://www.MindAlbum.com/
Comment 20 by kaixin110, Feb 20, 2009
Nice explanation dude..
keep up the good work.

http://www.visitchn.com
Comment 22 by izmocars123, Mar 03, 2009
Its cool...I would definitely try it :-)

http://www.carazoo.com/
Comment 23 by pinakis, Mar 05, 2009
Nice job..

http://blog.carazoo.com/
Comment 24 by cn...@yahoo.cn, Apr 02, 2009
http://www.cnhuu.cn
Comment 25 by altamiraweb, May 18, 2009
Keep up the awesome Work!!!

Thank you
Miadeo diseƱo web
http://www.miadeo.com

Comment 27 by zahidraf, Aug 20, 2009
this is great info

http://www.watchlivetv.us

Comment 28 by zahidraf, Aug 21, 2009
Great info here you can increase your page rank here .

http://www.zahipedia.com/links/
Comment 29 by zahidrafiqlhr, Oct 12, 2009
this info really help me a lot. It help me to fix my project bugs. 

http://www.healthgiants.com/
Sign in to add a comment