-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BlueSnap: Default to not send amount on capture #3270
BlueSnap: Default to not send amount on capture #3270
Conversation
|
5fa2d87
to
dc52872
Compare
@@ -95,7 +95,7 @@ def capture(money, authorization, options={}) | |||
commit(:capture, :put) do |doc| | |||
add_authorization(doc, authorization) | |||
add_order(doc, options) | |||
add_amount(doc, money, options) | |||
add_amount(doc, money, options) if options[:partial_amount] == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@curiousepic I believe I addressed what you were talking about, let me know if I missed what you meant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I'm sorry, in fact I just misunderstood the original, it was fine, but it brings up a concern - the option name could be more explicit, since "amount" kinda implies it should be a the actual amount, rather than a boolean flag. Perhaps "partial_capture" or "capture_partial_amount", or even "include_capture_amount" (since it doesn't necessarily need to be partial)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confusion is never a good sign. I think I like include_capture_amount
since it is the most descriptive of what is happening here. I have re-named it so.
dc52872
to
ba42c50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
ba42c50
to
72709a7
Compare
Including an amount on capture can cause an issue if attempting to capture full amount authorized and there are slight differences in amount requested and amount actually authorized due to currency exchange. BlueSnap will capture full amount authorized if no amount is included in the capture request. Adds a flag for including the amount only in the case of partial capture. Continues ECS-454 Relates to ECS-430 Unit: 27 tests, 110 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Remote: 35 tests, 109 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
72709a7
to
c120007
Compare
Including an amount on capture can cause an issue if attempting to
capture full amount authorized and there are slight differences in
amount requested and amount actually authorized due to currency
exchange. BlueSnap will capture full amount authorized if no amount is
included in the capture request. Adds a flag for including the amount
only in the case of partial capture.
Continues ECS-454
Relates to ECS-430
Unit:
27 tests, 110 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Remote:
35 tests, 109 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed