{"action":"closed","issue":{"url":"https://api.github.com/repos/solidusio/solidus/issues/1336","repository_url":"https://api.github.com/repos/solidusio/solidus","labels_url":"https://api.github.com/repos/solidusio/solidus/issues/1336/labels{/name}","comments_url":"https://api.github.com/repos/solidusio/solidus/issues/1336/comments","events_url":"https://api.github.com/repos/solidusio/solidus/issues/1336/events","html_url":"https://github.com/solidusio/solidus/issues/1336","id":165828252,"number":1336,"title":"Multiple Payment Methods not working in Admin","user":{"login":"ericsaupe","id":5138892,"avatar_url":"https://avatars.githubusercontent.com/u/5138892?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsaupe","html_url":"https://github.com/ericsaupe","followers_url":"https://api.github.com/users/ericsaupe/followers","following_url":"https://api.github.com/users/ericsaupe/following{/other_user}","gists_url":"https://api.github.com/users/ericsaupe/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsaupe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsaupe/subscriptions","organizations_url":"https://api.github.com/users/ericsaupe/orgs","repos_url":"https://api.github.com/users/ericsaupe/repos","events_url":"https://api.github.com/users/ericsaupe/events{/privacy}","received_events_url":"https://api.github.com/users/ericsaupe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-15T16:32:18Z","updated_at":"2016-08-05T14:52:54Z","closed_at":"2016-08-05T14:52:54Z","body":"With the changes in 1.3 the javascript on `admin_order_payments_path` is no longer firing. It looks like it is because `#new_payment` is gone.\r\n\r\nhttps://github.com/solidusio/solidus/blob/master/backend/app/views/spree/admin/payments/new.html.erb#L13 renders \r\n\r\n```\r\n<form class=\"edit_payment\" id=\"edit_payment_3126575\" action=\"/admin/orders/:order_id/payments\" accept-charset=\"UTF-8\" method=\"post\">\r\n  <input type=\"hidden\" name=\"_method\" value=\"patch\">\r\n...\r\n</form>\r\n```\r\n\r\nand the javascript for that page is looking for `#new_payment` https://github.com/solidusio/solidus/blob/master/backend/app/assets/javascripts/spree/backend/payments/new.js#L3\r\n\r\nThis causes issues if there are more than one payment method set up where the form will submit all fields even for non-selected payment methods.\r\n\r\nIt's also rendering the `patch` hidden method and as far as I can tell there is no `PATCH` path for admin payments which causes `No route matches [PATCH] \"/admin/orders/:order_id/payments\"`"}}
{"actor":{"display_login":"ericsaupe"}}