{"action":"created","issue":{"url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/274","labels_url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/274/comments","events_url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/274/events","html_url":"https://github.com/angelleye/paypal-woocommerce/issues/274","id":102097665,"number":274,"title":"Better error handling when PayPal server response is empty.","user":{"login":"angelleye","id":629241,"avatar_url":"https://avatars.githubusercontent.com/u/629241?v=3","gravatar_id":"","url":"https://api.github.com/users/angelleye","html_url":"https://github.com/angelleye","followers_url":"https://api.github.com/users/angelleye/followers","following_url":"https://api.github.com/users/angelleye/following{/other_user}","gists_url":"https://api.github.com/users/angelleye/gists{/gist_id}","starred_url":"https://api.github.com/users/angelleye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelleye/subscriptions","organizations_url":"https://api.github.com/users/angelleye/orgs","repos_url":"https://api.github.com/users/angelleye/repos","events_url":"https://api.github.com/users/angelleye/events{/privacy}","received_events_url":"https://api.github.com/users/angelleye/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angelleye/paypal-woocommerce/labels/cleanup","name":"cleanup","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"kcppdevelopers","id":13145461,"avatar_url":"https://avatars.githubusercontent.com/u/13145461?v=3","gravatar_id":"","url":"https://api.github.com/users/kcppdevelopers","html_url":"https://github.com/kcppdevelopers","followers_url":"https://api.github.com/users/kcppdevelopers/followers","following_url":"https://api.github.com/users/kcppdevelopers/following{/other_user}","gists_url":"https://api.github.com/users/kcppdevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/kcppdevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcppdevelopers/subscriptions","organizations_url":"https://api.github.com/users/kcppdevelopers/orgs","repos_url":"https://api.github.com/users/kcppdevelopers/repos","events_url":"https://api.github.com/users/kcppdevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/kcppdevelopers/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angelleye/paypal-woocommerce/milestones/29","html_url":"https://github.com/angelleye/paypal-woocommerce/milestones/1.1.8","labels_url":"https://api.github.com/repos/angelleye/paypal-woocommerce/milestones/29/labels","id":1474565,"number":29,"title":"1.1.8","description":"","creator":{"login":"angelleye","id":629241,"avatar_url":"https://avatars.githubusercontent.com/u/629241?v=3","gravatar_id":"","url":"https://api.github.com/users/angelleye","html_url":"https://github.com/angelleye","followers_url":"https://api.github.com/users/angelleye/followers","following_url":"https://api.github.com/users/angelleye/following{/other_user}","gists_url":"https://api.github.com/users/angelleye/gists{/gist_id}","starred_url":"https://api.github.com/users/angelleye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angelleye/subscriptions","organizations_url":"https://api.github.com/users/angelleye/orgs","repos_url":"https://api.github.com/users/angelleye/repos","events_url":"https://api.github.com/users/angelleye/events{/privacy}","received_events_url":"https://api.github.com/users/angelleye/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":31,"state":"open","created_at":"2015-12-26T08:12:59Z","updated_at":"2015-12-29T11:01:54Z","due_on":"2016-01-16T06:00:00Z","closed_at":null},"comments":2,"created_at":"2015-08-20T09:16:44Z","updated_at":"2015-12-29T12:49:04Z","closed_at":null,"body":"When PayPal's API server times out or simply doesn't return a result for some reason we end up with a bunch of PHP notices because the usual data is not available.  Something like this...\r\n\r\n>[20-Aug-2015 08:23:38 UTC] PHP Notice:  Undefined index: ACK in /home/angelley/sandbox_woocommerce/wp-content/plugins/paypal-for-woocommerce/classes/wc-gateway-paypal-express-angelleye.php on line 2005\r\n[20-Aug-2015 08:23:38 UTC] PHP Notice:  Undefined index: INVNUM in /home/angelley/sandbox_woocommerce/wp-content/plugins/paypal-for-woocommerce/classes/wc-gateway-paypal-express-angelleye.php on line 928\r\n[20-Aug-2015 08:23:38 UTC] PHP Notice:  Undefined index: INVNUM in /home/angelley/sandbox_woocommerce/wp-content/plugins/paypal-for-woocommerce/template/paypal-review-order.php on line 13\r\n[20-Aug-2015 08:24:36 UTC] PHP Notice:  Undefined offset: 0 in /home/angelley/sandbox_woocommerce/wp-content/plugins/paypal-for-woocommerce/classes/wc-gateway-paypal-express-angelleye.php on line 1082\r\n[20-Aug-2015 08:24:36 UTC] PHP Notice:  Uninitialized string offset: 0 in /home/angelley/sandbox_woocommerce/wp-content/plugins/paypal-for-woocommerce/classes/lib/NameParser.php on line 21\r\n[20-Aug-2015 08:24:36 UTC] PHP Notice:  Undefined variable: order in /home/angelley/sandbox_woocommerce/wp-content/plugins/paypal-for-woocommerce/classes/wc-gateway-paypal-express-angelleye.php on line 2089\r\n[20-Aug-2015 08:24:36 UTC] PHP Fatal error:  Call to a member function get_order_item_totals() on a non-object in /home/angelley/sandbox_woocommerce/wp-content/plugins/paypal-for-woocommerce/classes/wc-gateway-paypal-express-angelleye.php on line 2089\r\n\r\nThe user is left with errors or a blank white page if they don't have errors displaying.  \r\n\r\nWhat we need to do is make sure that we got valid data back from the PayPal API.  If not, we should return a general error to be displayed the same way any other error would be displayed on the cart page.  The error could read \"There was a communication issue with PayPal's server.  Please try again.\""},"comment":{"url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/comments/167782448","html_url":"https://github.com/angelleye/paypal-woocommerce/issues/274#issuecomment-167782448","issue_url":"https://api.github.com/repos/angelleye/paypal-woocommerce/issues/274","id":167782448,"user":{"login":"kcppdevelopers","id":13145461,"avatar_url":"https://avatars.githubusercontent.com/u/13145461?v=3","gravatar_id":"","url":"https://api.github.com/users/kcppdevelopers","html_url":"https://github.com/kcppdevelopers","followers_url":"https://api.github.com/users/kcppdevelopers/followers","following_url":"https://api.github.com/users/kcppdevelopers/following{/other_user}","gists_url":"https://api.github.com/users/kcppdevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/kcppdevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcppdevelopers/subscriptions","organizations_url":"https://api.github.com/users/kcppdevelopers/orgs","repos_url":"https://api.github.com/users/kcppdevelopers/repos","events_url":"https://api.github.com/users/kcppdevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/kcppdevelopers/received_events","type":"User","site_admin":false},"created_at":"2015-12-29T12:49:04Z","updated_at":"2015-12-29T12:49:04Z","body":"I have push latest code in issue-274 branch."}}