Skip to content

Commit

Permalink
Merge pull request #99 from tungleduyxyz/issue_89_sync_killbill_payme…
Browse files Browse the repository at this point in the history
…nt_apis

Issue 89 Support external key
  • Loading branch information
tungleduyxyz authored Mar 26, 2024
2 parents 6b1a563 + 2597a09 commit 7ce8d28
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/killbill_client/models/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ def void(user = nil, reason = nil, comment = nil, options = {}, refresh_options
:reason => reason,
:comment => comment,
}.merge(options)
KillBillClient::Model::Payment.find_by_id(payment_id, false, false, options)
if payment_external_key
KillBillClient::Model::Payment.find_by_external_key(payment_external_key, false, false, options)
else
KillBillClient::Model::Payment.find_by_id(payment_id, false, false, options)
end
end
end

Expand Down Expand Up @@ -225,7 +229,11 @@ def complete_initial_transaction(user, reason, comment, options, refresh_options
:reason => reason,
:comment => comment
}.merge(options)
KillBillClient::Model::Payment.find_by_id(payment_id, false, false, options)
if payment_external_key
KillBillClient::Model::Payment.find_by_external_key(payment_external_key, false, false, options)
else
KillBillClient::Model::Payment.find_by_id(payment_id, false, false, options)
end
end
end

Expand Down

0 comments on commit 7ce8d28

Please sign in to comment.