Skip to content

Commit

Permalink
Pull the Subscription ID from the 2nd item in the reference string
Browse files Browse the repository at this point in the history
At some point the CyberSource gateway was updated to pull it from the 
6th item, but our records are still storing it on the 2nd.

Probably update/migrate all of our strings soon to make them match 
ActiveMerhant master.
  • Loading branch information
jeffschuil committed Aug 6, 2018
1 parent 3d6b3b4 commit b06262b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/active_merchant/billing/gateways/cyber_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,9 @@ def add_subscription(xml, options, reference = nil)

xml.tag! 'recurringSubscriptionInfo' do
if reference
subscription_id = reference.split(';')[6]
# subscription_id = reference.split(';')[6]
# our subscription/request id has historically been the second item
subscription_id = reference.split(';')[1]
xml.tag! 'subscriptionID', subscription_id
end

Expand Down

0 comments on commit b06262b

Please sign in to comment.