kmitgroup / google-checkout-php-sample-code

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

SendReq function - $b_e not written to $body #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. CheckoutServer2Server() gives a white page - due to $body being empty, so no 
redirect URL

What is the expected output? What do you see instead?
User should be redirected to Google Checkout. Instead there is a white screen 
with no output.

What version of the product are you using? On what operating system?
checkout-php-1.3.1 / PHP 5 / Apache

Please provide any additional information below.
function SendReq() in googlerequest.php does not write the generated $b_e 
SimpleXMLElement to the $body variable. This means that an empty $body is 
returned, so no redirection happens.

This can be fixed by adding $body = $b_e->asXML(); to line 721:

$b_e = new SimpleXMLElement($body_xml);
if ($b_e and !empty($b_e->{'error-message'})) {
          $body = $b_e->{'error-message'};
} else {
          $body = $b_e->asXML();
}

Original issue reported on code.google.com by p...@ewels.co.uk on 22 Jan 2011 at 2:01

GoogleCodeExporter commented 9 years ago

Original comment by mihai.io...@gmail.com on 29 Mar 2011 at 11:40

GoogleCodeExporter commented 9 years ago

Original comment by mihai.io...@gmail.com on 29 Mar 2011 at 11:41