{"action":"created","issue":{"url":"https://api.github.com/repos/killbill/killbill-cybersource-plugin/issues/14","repository_url":"https://api.github.com/repos/killbill/killbill-cybersource-plugin","labels_url":"https://api.github.com/repos/killbill/killbill-cybersource-plugin/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/killbill/killbill-cybersource-plugin/issues/14/comments","events_url":"https://api.github.com/repos/killbill/killbill-cybersource-plugin/issues/14/events","html_url":"https://github.com/killbill/killbill-cybersource-plugin/issues/14","id":197443114,"number":14,"title":"requestID being used in place of subscriptionID","user":{"login":"SquareMike","id":24719322,"avatar_url":"https://avatars.githubusercontent.com/u/24719322?v=3","gravatar_id":"","url":"https://api.github.com/users/SquareMike","html_url":"https://github.com/SquareMike","followers_url":"https://api.github.com/users/SquareMike/followers","following_url":"https://api.github.com/users/SquareMike/following{/other_user}","gists_url":"https://api.github.com/users/SquareMike/gists{/gist_id}","starred_url":"https://api.github.com/users/SquareMike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SquareMike/subscriptions","organizations_url":"https://api.github.com/users/SquareMike/orgs","repos_url":"https://api.github.com/users/SquareMike/repos","events_url":"https://api.github.com/users/SquareMike/events{/privacy}","received_events_url":"https://api.github.com/users/SquareMike/received_events","type":"User","site_admin":false},"labels":[{"id":94005632,"url":"https://api.github.com/repos/killbill/killbill-cybersource-plugin/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-12-24T01:57:42Z","updated_at":"2016-12-28T17:43:00Z","closed_at":null,"body":"I see here (https://github.com/killbill/killbill-cybersource-plugin/blob/master/lib/cybersource/ext/active_merchant/active_merchant.rb#L137) that we are packing the requestID into the authorization string, delimited by semicolons.  However, here (https://github.com/activemerchant/active_merchant/blob/master/lib/active_merchant/billing/gateways/cyber_source.rb#L605) we unpack that string to get the subscriptionID.\r\n\r\nWhen doing a vanilla recurring payment test with Cybersource I am seeing that the requestID is being sent to Cybersource in the recurringSubscriptionInfo/subscriptionID field.  Naturally Cybersource is replying with a 102;INVALIDDATA error as the requestID can not be used as a subscriptionID.  If I manually put the subscriptionID into the XML request then the request succeeds.  I do see many places in activemerchant where the requestID is unpacked from the ;-delimited string and used properly.\r\n\r\nIs this a bug, a case of trying to get the subscriptionID from the wrong place?  Seems odd that this bug has gone un-noticed for so long which makes me wonder if I am just using the software wrong."},"comment":{"url":"https://api.github.com/repos/killbill/killbill-cybersource-plugin/issues/comments/269512233","html_url":"https://github.com/killbill/killbill-cybersource-plugin/issues/14#issuecomment-269512233","issue_url":"https://api.github.com/repos/killbill/killbill-cybersource-plugin/issues/14","id":269512233,"user":{"login":"pierre","id":51940,"avatar_url":"https://avatars.githubusercontent.com/u/51940?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre","html_url":"https://github.com/pierre","followers_url":"https://api.github.com/users/pierre/followers","following_url":"https://api.github.com/users/pierre/following{/other_user}","gists_url":"https://api.github.com/users/pierre/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre/subscriptions","organizations_url":"https://api.github.com/users/pierre/orgs","repos_url":"https://api.github.com/users/pierre/repos","events_url":"https://api.github.com/users/pierre/events{/privacy}","received_events_url":"https://api.github.com/users/pierre/received_events","type":"User","site_admin":false},"created_at":"2016-12-28T17:43:00Z","updated_at":"2016-12-28T17:43:00Z","body":"> If I use my CyberSource credentials with the killbill-cybersource tests then everything passes.\r\n\r\nThat's odd, I would have expected token tests to fail.\r\n\r\nCan you run the 'should be able to charge and refund' scenario for example (e.g. `bundle exec ~/.rvm/rubies/jruby-1.7.20/bin/jruby -S rspec ./spec/cybersource/remote/integration_spec.rb:364`) and verify a subscription is created, and that the subscriptionID is then used to trigger the charge?\r\n\r\n> I'm surprised this doesn't trip up more folks.\r\n\r\nIndeed... I'm also surprised that it's never been caught in the vanilla version of ActiveMerchant (bug present since [2012](https://github.com/activemerchant/active_merchant/commit/cb0b7a6c70994d04ff2e494b5bcce083bb9d0ca5)).\r\n\r\n> I will work on an improvement to the plugin that allows this and tests it.\r\n\r\nThanks!"}}
{"actor":{"display_login":"pierre"}}