{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/7394","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/7394/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/7394/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/7394/events","html_url":"https://github.com/magento/magento2/issues/7394","id":188512298,"number":7394,"title":"Magento sending incorrect transaction type to Paypal while creating invoice from admin","user":{"login":"sreejith-cb","id":20572525,"avatar_url":"https://avatars.githubusercontent.com/u/20572525?v=3","gravatar_id":"","url":"https://api.github.com/users/sreejith-cb","html_url":"https://github.com/sreejith-cb","followers_url":"https://api.github.com/users/sreejith-cb/followers","following_url":"https://api.github.com/users/sreejith-cb/following{/other_user}","gists_url":"https://api.github.com/users/sreejith-cb/gists{/gist_id}","starred_url":"https://api.github.com/users/sreejith-cb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sreejith-cb/subscriptions","organizations_url":"https://api.github.com/users/sreejith-cb/orgs","repos_url":"https://api.github.com/users/sreejith-cb/repos","events_url":"https://api.github.com/users/sreejith-cb/events{/privacy}","received_events_url":"https://api.github.com/users/sreejith-cb/received_events","type":"User","site_admin":false},"labels":[{"id":429635502,"url":"https://api.github.com/repos/magento/magento2/labels/2.1.x","name":"2.1.x","color":"fbca04","default":false},{"id":147131376,"url":"https://api.github.com/repos/magento/magento2/labels/bug%20report","name":"bug report","color":"d93f0b","default":false},{"id":429635650,"url":"https://api.github.com/repos/magento/magento2/labels/develop","name":"develop","color":"fbca04","default":false},{"id":161563561,"url":"https://api.github.com/repos/magento/magento2/labels/needs%20update","name":"needs update","color":"b60205","default":false},{"id":374017037,"url":"https://api.github.com/repos/magento/magento2/labels/Payments","name":"Payments","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":{"login":"alena-marchenko","id":9049705,"avatar_url":"https://avatars.githubusercontent.com/u/9049705?v=3","gravatar_id":"","url":"https://api.github.com/users/alena-marchenko","html_url":"https://github.com/alena-marchenko","followers_url":"https://api.github.com/users/alena-marchenko/followers","following_url":"https://api.github.com/users/alena-marchenko/following{/other_user}","gists_url":"https://api.github.com/users/alena-marchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/alena-marchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena-marchenko/subscriptions","organizations_url":"https://api.github.com/users/alena-marchenko/orgs","repos_url":"https://api.github.com/users/alena-marchenko/repos","events_url":"https://api.github.com/users/alena-marchenko/events{/privacy}","received_events_url":"https://api.github.com/users/alena-marchenko/received_events","type":"User","site_admin":false},"assignees":[{"login":"alena-marchenko","id":9049705,"avatar_url":"https://avatars.githubusercontent.com/u/9049705?v=3","gravatar_id":"","url":"https://api.github.com/users/alena-marchenko","html_url":"https://github.com/alena-marchenko","followers_url":"https://api.github.com/users/alena-marchenko/followers","following_url":"https://api.github.com/users/alena-marchenko/following{/other_user}","gists_url":"https://api.github.com/users/alena-marchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/alena-marchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena-marchenko/subscriptions","organizations_url":"https://api.github.com/users/alena-marchenko/orgs","repos_url":"https://api.github.com/users/alena-marchenko/repos","events_url":"https://api.github.com/users/alena-marchenko/events{/privacy}","received_events_url":"https://api.github.com/users/alena-marchenko/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-11-10T13:47:04Z","updated_at":"2016-11-14T15:48:02Z","closed_at":"2016-11-14T15:48:02Z","body":"We need Paypal delayed capture at the time of manually creating invoice from admin. We have set 'Authorization' payment action in admin Paypal Payflow Pro section.\r\nFrom the debug log i have found that magento is sending the ‘trxtype’=> 'S' when invoicing the sale.\r\nI was able to compare them to PayPal’s documentation and found that we are using the incorrect ‘trxtype’.  \r\nThe ‘trxtype’ is set to ‘S’ which is Sale, and would typically only be used as the only transaction. \r\nBecause we do not instantly provide the product purchased right away we need to complete an Authorization (already in place) first, and then a Delayed Capture at the time of invoicing.  \r\nWe are needing to have the ‘trxtype’ populate ‘D’ when we invoice the sale. \r\nThis will trigger a Delayed Capture and will only associate the payment to the authorization that we already have.\r\n\r\n### Preconditions\r\n1. Magento 2.1.0\r\n\r\n### Steps to reproduce\r\n1. Add product to cart from frontend.\r\n2. Place the order\r\n3. Login to admin\r\n4. View the order\r\n5. Click invoice button\r\n6. Look at the request and response in debug.log for the order invoiced.\r\n\r\n### Expected result\r\n1. Magento should send a request to paypal for delayed capture with ‘trxtype’ D.\r\n\r\n### Actual result\r\n1. Magento is sending a request to paypal for sales with ‘trxtype’ S.\r\n2. Below is the request and its response generated when the invoice is generated.\r\n\r\n\r\n[2016-11-01 15:18:45] main.DEBUG: array (\r\n  'request' => \r\n  array (\r\n    'user' => '****',\r\n    'vendor' => 'vendor',\r\n    'partner' => 'VeriSign',\r\n    'pwd' => '****',\r\n    'verbosity' => 'MEDIUM',\r\n    'BUTTONSOURCE' => 'Magento_Cart_Community',\r\n    'tender' => 'C',\r\n    'amt' => 79.959999999999994,\r\n    'trxtype' => 'S',\r\n    'origid' => 'AQ0AGGA38978',\r\n    'ponum' => '7351',\r\n    'custref' => '100007541',\r\n    'invnum' => '100007541',\r\n    'comment_1' => '100007541',\r\n  ),\r\n  'result' => \r\n  array (\r\n    'result' => '0',\r\n    'pnref' => 'AU0AEGA998E5',\r\n    'respmsg' => 'Approved',\r\n    'authcode' => '04511H',\r\n    'avsaddr' => 'Y',\r\n    'avszip' => 'Y',\r\n    'hostcode' => 'A',\r\n    'procavs' => 'D',\r\n    'proccvv2' => 'Y',\r\n    'visacardlevel' => 'G1',\r\n    'iavs' => 'N',\r\n    'result_code' => '0',\r\n  ),\r\n) {\"is_exception\":false} []\r\n\r\n<!--- (This may be platform independent comment) -->\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/260372069","html_url":"https://github.com/magento/magento2/issues/7394#issuecomment-260372069","issue_url":"https://api.github.com/repos/magento/magento2/issues/7394","id":260372069,"user":{"login":"joni-jones","id":2736528,"avatar_url":"https://avatars.githubusercontent.com/u/2736528?v=3","gravatar_id":"","url":"https://api.github.com/users/joni-jones","html_url":"https://github.com/joni-jones","followers_url":"https://api.github.com/users/joni-jones/followers","following_url":"https://api.github.com/users/joni-jones/following{/other_user}","gists_url":"https://api.github.com/users/joni-jones/gists{/gist_id}","starred_url":"https://api.github.com/users/joni-jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joni-jones/subscriptions","organizations_url":"https://api.github.com/users/joni-jones/orgs","repos_url":"https://api.github.com/users/joni-jones/repos","events_url":"https://api.github.com/users/joni-jones/events{/privacy}","received_events_url":"https://api.github.com/users/joni-jones/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T15:48:02Z","updated_at":"2016-11-14T15:48:02Z","body":"@sreejith-cb, this issue is already fixed (MAGETWO-59124) and will be available in Magento 2.1.3.\r\n\r\nClosed as duplicate to https://github.com/magento/magento2/issues/6716 ."}}
{"actor":{"display_login":"joni-jones"}}