{"action":"created","issue":{"url":"https://api.github.com/repos/solidusio/solidus_paypal_braintree/issues/153","repository_url":"https://api.github.com/repos/solidusio/solidus_paypal_braintree","labels_url":"https://api.github.com/repos/solidusio/solidus_paypal_braintree/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/solidusio/solidus_paypal_braintree/issues/153/comments","events_url":"https://api.github.com/repos/solidusio/solidus_paypal_braintree/issues/153/events","html_url":"https://github.com/solidusio/solidus_paypal_braintree/issues/153","id":300076772,"number":153,"title":"Silent failure after payment","user":{"login":"mntmn","id":150458,"avatar_url":"https://avatars3.githubusercontent.com/u/150458?v=4","gravatar_id":"","url":"https://api.github.com/users/mntmn","html_url":"https://github.com/mntmn","followers_url":"https://api.github.com/users/mntmn/followers","following_url":"https://api.github.com/users/mntmn/following{/other_user}","gists_url":"https://api.github.com/users/mntmn/gists{/gist_id}","starred_url":"https://api.github.com/users/mntmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mntmn/subscriptions","organizations_url":"https://api.github.com/users/mntmn/orgs","repos_url":"https://api.github.com/users/mntmn/repos","events_url":"https://api.github.com/users/mntmn/events{/privacy}","received_events_url":"https://api.github.com/users/mntmn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-26T00:21:46Z","updated_at":"2018-03-01T20:28:15Z","closed_at":null,"author_association":"NONE","body":"I'm locally testing solidus_paypal_braintree and configured a payment method to use my Braintree sandbox account which in turn is linked to the Paypal sandbox. \r\n\r\nI then add a product to my cart and click the \"Paypal Check out\" button. I log in with my sandbox account, which is based in Germany, and pay for the order. Then, the paypal popup window closes and nothing happens on the cart page. \r\n\r\nWhen running web inspector, I can see that the request to /solidus_paypal_braintree/transactions failed with error 422:\r\n\r\n`{errors: {Address: [\"is invalid\"], address: [\"spree_state can't be blank\"]}, status: 422}`\r\n\r\nBut no error message is displayed to the (fake) customer. \r\n\r\nThe parameters submitted where:\r\n```\r\nProcessing by SolidusPaypalBraintree::TransactionsController#create as JSON\r\n  Parameters: {\"payment_method_id\"=>\"4\", \"transaction\"=>{\"email\"=>\"office-buyer@mnt.mn\", \"nonce\"=>\"03485389-9766-0c0a-7883-a095b3e72f0e\", \"payment_type\"=>\"PayPalAccount\", \"address_attributes\"=>{\"first_name\"=>\"test\", \"last_name\"=>\"buyer\", \"address_line_1\"=>\"ESpachstr. 1\", \"city\"=>\"Freiburg\", \"state_code\"=>\"Empty\", \"zip\"=>\"79111\", \"country_code\"=>\"DE\"}}}\r\n```\r\n\r\nIn Germany, states are not relevant/normally not included in addresses. This might trigger the spree_state problem. But this bug report is more about the silent failure. Is there a workaround to at least show the error to the customer?\r\n"},"comment":{"url":"https://api.github.com/repos/solidusio/solidus_paypal_braintree/issues/comments/369720435","html_url":"https://github.com/solidusio/solidus_paypal_braintree/issues/153#issuecomment-369720435","issue_url":"https://api.github.com/repos/solidusio/solidus_paypal_braintree/issues/153","id":369720435,"user":{"login":"alepore","id":557414,"avatar_url":"https://avatars3.githubusercontent.com/u/557414?v=4","gravatar_id":"","url":"https://api.github.com/users/alepore","html_url":"https://github.com/alepore","followers_url":"https://api.github.com/users/alepore/followers","following_url":"https://api.github.com/users/alepore/following{/other_user}","gists_url":"https://api.github.com/users/alepore/gists{/gist_id}","starred_url":"https://api.github.com/users/alepore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alepore/subscriptions","organizations_url":"https://api.github.com/users/alepore/orgs","repos_url":"https://api.github.com/users/alepore/repos","events_url":"https://api.github.com/users/alepore/events{/privacy}","received_events_url":"https://api.github.com/users/alepore/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T20:28:15Z","updated_at":"2018-03-01T20:28:15Z","author_association":"CONTRIBUTOR","body":"Yes, you have to set `states_required: false` on Germany to make it work.\r\nThis is actually a problem of the Solidus data and we are thinking about a clean, long term solution.\r\n\r\nI have to check what we do with error messages but, in this case, this is not an error the user can fix himself."}}
{"actor":{"display_login":"alepore"}}