{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/rest-api-sample-app-php/issues/15","labels_url":"https://api.github.com/repos/paypal/rest-api-sample-app-php/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/paypal/rest-api-sample-app-php/issues/15/comments","events_url":"https://api.github.com/repos/paypal/rest-api-sample-app-php/issues/15/events","html_url":"https://github.com/paypal/rest-api-sample-app-php/issues/15","id":55639063,"number":15,"title":"Payment details broken under php 5.3","user":{"login":"jeff1985","id":6595789,"avatar_url":"https://avatars.githubusercontent.com/u/6595789?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff1985","html_url":"https://github.com/jeff1985","followers_url":"https://api.github.com/users/jeff1985/followers","following_url":"https://api.github.com/users/jeff1985/following{/other_user}","gists_url":"https://api.github.com/users/jeff1985/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff1985/subscriptions","organizations_url":"https://api.github.com/users/jeff1985/orgs","repos_url":"https://api.github.com/users/jeff1985/repos","events_url":"https://api.github.com/users/jeff1985/events{/privacy}","received_events_url":"https://api.github.com/users/jeff1985/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-27T16:21:58Z","updated_at":"2015-01-27T16:53:58Z","closed_at":null,"body":"The readme states that this app reqires php 5.3+\r\n\r\nHowever in the file /app/order/payment.php you are using the constant JSON_PRETTY_PRINT, which was defined in php 5.4 according to the docs under http://php.net/manual/de/function.json-encode.php\r\n\r\nFor me (PHP 5.3.10) using this constant causes missing output in the payment details page (no json data at all!). \r\n\r\nI suggest the following fix:\r\n\r\n```php\r\nif (defined(\"JSON_PRETTY_PRINT\")) {\r\n    echo $paymentDetails->toJSON(JSON_PRETTY_PRINT);\r\n}\r\nelse {\r\n    echo $paymentDetails->toJSON();\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/paypal/rest-api-sample-app-php/issues/comments/71682875","html_url":"https://github.com/paypal/rest-api-sample-app-php/issues/15#issuecomment-71682875","issue_url":"https://api.github.com/repos/paypal/rest-api-sample-app-php/issues/15","id":71682875,"user":{"login":"jaypatel512","id":1309895,"avatar_url":"https://avatars.githubusercontent.com/u/1309895?v=3","gravatar_id":"","url":"https://api.github.com/users/jaypatel512","html_url":"https://github.com/jaypatel512","followers_url":"https://api.github.com/users/jaypatel512/followers","following_url":"https://api.github.com/users/jaypatel512/following{/other_user}","gists_url":"https://api.github.com/users/jaypatel512/gists{/gist_id}","starred_url":"https://api.github.com/users/jaypatel512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaypatel512/subscriptions","organizations_url":"https://api.github.com/users/jaypatel512/orgs","repos_url":"https://api.github.com/users/jaypatel512/repos","events_url":"https://api.github.com/users/jaypatel512/events{/privacy}","received_events_url":"https://api.github.com/users/jaypatel512/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T16:53:58Z","updated_at":"2015-01-27T16:53:58Z","body":"You are completely right about this. I have realized this when working in REST SDK. I had to make an if-else for setting this PRETTY_PRINT. \r\n\r\nyour code suggestion definitely makes sense. I will make the change as soon as possible, and update the sample app soon."}}