kiranpatil353 / google-checkout-php-sample-code

Automatically exported from code.google.com/p/google-checkout-php-sample-code
0 stars 0 forks source link

Why the package doesn't work the way it should and how to fix it #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If your having problems getting it work this will solve

Problem: Failed to Get Basic Authentication Headers

[Create two files and put the following]
.htaccess
  AuthName "Name that pops up when asking for pwd" 
  AuthType basic 
  AuthUserFile "full location to .htpasswd"
  require valid-user

.htpasswd
merchant_id:merchant_key

/* NOTE */
The merchant key must be stored in encrypted form so use something like
  http://www.kxs.net/support/htaccess_pw.html
to generate the correct one

[Open library/googleresponse.php]
find the function 
  function HttpAuthentication($headers=null, $die=true)
and delete everything in the function except for
  return true;

Problem 2: Does not do complete checkout process

process described here:
http://code.google.com/apis/checkout/developer/index.html#manage_orders

[Open library/googleresponse.php]
find the function
  function SendAck($die=true) 

and remove
  if($die) 
  {
    die($acknowledgment);    
  } 
  else 
  {
    echo $acknowledgment;    
  }
and replace with
  echo $acknowledgment;

this should fix the major problems, enjoy

Original issue reported on code.google.com by i...@ontop.co.uk on 19 Aug 2008 at 3:04

GoogleCodeExporter commented 8 years ago
I created the 2 files htaccess and htpasswd and and put these files into same 
folder
where responsehandler.php is in.

can you please give me more information about parameter and it's value

like  AuthName, what value i should put in it.

[Create two files and put the following]
.htaccess
  AuthName "Name that pops up when asking for pwd" 
  AuthType basic 
  AuthUserFile "full location to .htpasswd"
  require valid-user

.htpasswd
merchant_id:merchant_key

/* NOTE */
The merchant key must be stored in encrypted form so use something like
  http://www.kxs.net/support/htaccess_pw.html
to generate the correct one

[Open library/googleresponse.php]
find the function 
  function HttpAuthentication($headers=null, $die=true)
and delete everything in the function except for
  return true;

Original comment by manish...@gmail.com on 12 Nov 2008 at 1:37

GoogleCodeExporter commented 8 years ago
Nice bit of code. :-)

http://www.carazoo.com/

Original comment by izmocars...@gmail.com on 4 Mar 2009 at 7:12

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
.htaccess and .htpasswd are for basic auth on the server level.  Depending on 
your php installation, PHP also supports programmtic auth which is implemented 
in the sample code library.  You simply need to remove basic auth from the 
response handler folder.

Original comment by peng.y...@gmail.com on 13 Sep 2010 at 9:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thanks - this helped a lot.

http://www.tooltrolley.co.uk

Original comment by n...@getools.co.uk on 19 Jun 2012 at 6:57