{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/13902","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/13902/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/13902/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/13902/events","html_url":"https://github.com/magento/magento2/issues/13902","id":301298271,"number":13902,"title":"Carrier codes with '_' (underscores) break several payment API's","user":{"login":"thlassche","id":2959888,"avatar_url":"https://avatars3.githubusercontent.com/u/2959888?v=4","gravatar_id":"","url":"https://api.github.com/users/thlassche","html_url":"https://github.com/thlassche","followers_url":"https://api.github.com/users/thlassche/followers","following_url":"https://api.github.com/users/thlassche/following{/other_user}","gists_url":"https://api.github.com/users/thlassche/gists{/gist_id}","starred_url":"https://api.github.com/users/thlassche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlassche/subscriptions","organizations_url":"https://api.github.com/users/thlassche/orgs","repos_url":"https://api.github.com/users/thlassche/repos","events_url":"https://api.github.com/users/thlassche/events{/privacy}","received_events_url":"https://api.github.com/users/thlassche/received_events","type":"User","site_admin":false},"labels":[{"id":688811200,"url":"https://api.github.com/repos/magento/magento2/labels/G1%20Passed","name":"G1 Passed","color":"0e8a16","default":false},{"id":686420665,"url":"https://api.github.com/repos/magento/magento2/labels/G2%20Passed","name":"G2 Passed","color":"0e8a16","default":false},{"id":161563561,"url":"https://api.github.com/repos/magento/magento2/labels/needs%20update","name":"needs update","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-01T07:00:45Z","updated_at":"2018-03-06T12:49:22Z","closed_at":null,"author_association":"NONE","body":"### Preconditions\r\n1. Magento version >= 2.2 \r\n\r\n### Steps to reproduce\r\n1. Create a carrier with carrier code 'test_carrier' for example config.xml: \r\n```\r\n<?xml version=\"1.0\"?>\r\n<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:module:Magento_Store:etc/config.xsd\">\r\n    <default>\r\n        <carriers>\r\n            <test_carrier>\r\n                <active>1</active>\r\n                <title>Flatrate</title>\r\n                <name>Flatrate 1</name>\r\n                <price>0</price>\r\n                <model>Namespace\\Vendor\\Model\\Carrier\\Flatrate1</model>\r\n                <sallowspecific>0</sallowspecific>\r\n                <specificerrmsg>This shipping method is not available.</specificerrmsg>\r\n            </test_carrier>\r\n      </carriers>\r\n</default>\r\n</config>\r\n```\r\n2. Go to the checkout, select created carrier and see that for example POST set-payment-information fails\r\n\r\n### Expected result\r\n1. Order placement works\r\n\r\n### Actual result\r\n1. Several web api request fail with 400 bad request, please specify a shipping method\r\n\r\n\r\nThe cause of this is several explode's by '_' in the code, where `$addressInformation->getShippingCarrierCode()` should have been used in my opinion. Example: https://github.com/magento/magento2/blame/2.3-develop/app/code/Magento/Checkout/Model/PaymentInformationManagement.php#L118\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/370771051","html_url":"https://github.com/magento/magento2/issues/13902#issuecomment-370771051","issue_url":"https://api.github.com/repos/magento/magento2/issues/13902","id":370771051,"user":{"login":"thlassche","id":2959888,"avatar_url":"https://avatars3.githubusercontent.com/u/2959888?v=4","gravatar_id":"","url":"https://api.github.com/users/thlassche","html_url":"https://github.com/thlassche","followers_url":"https://api.github.com/users/thlassche/followers","following_url":"https://api.github.com/users/thlassche/following{/other_user}","gists_url":"https://api.github.com/users/thlassche/gists{/gist_id}","starred_url":"https://api.github.com/users/thlassche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thlassche/subscriptions","organizations_url":"https://api.github.com/users/thlassche/orgs","repos_url":"https://api.github.com/users/thlassche/repos","events_url":"https://api.github.com/users/thlassche/events{/privacy}","received_events_url":"https://api.github.com/users/thlassche/received_events","type":"User","site_admin":false},"created_at":"2018-03-06T12:49:22Z","updated_at":"2018-03-06T12:49:22Z","author_association":"NONE","body":"@magento-engcom-team I saw this when using it in combination with onestepcheckout. Please see here for the code that's definitely wrong in my opinion:\r\n\r\nhttps://github.com/magento/magento2/blame/2.3-develop/app/code/Magento/Checkout/Model/PaymentInformationManagement.php#L118\r\n\r\nYou can't explode by '_', compare it with this one:\r\n\r\nhttps://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Checkout/Model/ShippingInformationManagement.php#L160\r\n\r\n"}}
{"actor":{"display_login":"thlassche"}}