-
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
Bambora Asia-Pacific: Adds Store #3147
Conversation
861b6d3
to
672d8fe
Compare
@@ -82,6 +82,26 @@ def void(money, authorization, options={}) | |||
end | |||
end | |||
|
|||
def verify(credit_card, options={}) | |||
MultiResponse.run(:use_first_response) do |r| | |||
r.process { purchase(200, credit_card, options) } |
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.
I assume 200 is it the minimum? If not, try 0.
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.
I wanted to, but I could not get 100 or 0 to work. Voids only work on purchases, not auths, and it won't accept a $0 purchase. It seems that 100 is an amount that generates an error for tests ("declined_message"=>"Refer Card Issuer"), though that did not seem apparent in the docs. https://dev-apac.bambora.com/checkout/guides/get-up-and-running/test-your-setup
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.
🤔 I wonder if an un-voided auth is preferable...
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.
I was having the same thought, it would be lame if the void fails, then there are random $2 purchases 😬
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.
Updated to a 0 un-voided auth.
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.
@molbrown Sorry for leaving this out initially, but there may be reasons that un-voided auths are undesirable as well. It should be fine if they are automatically canceled after a short time, but I can't tell if this is the case from their Docs. Any insight on that?
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.
I have contacted Bambora support about this, and have decided to remove verify
from this commit and proceed without it. It will be added in once there is more information about how to best implement.
672d8fe
to
05f3ad6
Compare
Not a big deal but it might be nice to pull out the endpoint determination ( |
|
||
response = @gateway.purchase(500, store_response.authorization, @options) | ||
assert_success response | ||
assert_equal '', response.message |
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.
This is a little weird. We usually set the response's message
to something like "Success" on success; let's add that to message_from
.
f285968
to
b74907c
Compare
Updated with some re-factoring around the endpoint determination, removes verify, adds Succeeded to |
b74907c
to
06dd8ab
Compare
end | ||
end | ||
end | ||
end | ||
xml.target! | ||
end | ||
|
||
def define_endpoint(action) | ||
action == 'TokeniseCreditCard' ? '/sipp' : '/dts' | ||
end |
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.
This won't hold up approval, just something to consider. I think I would name the function endpoint
and avoid including the beginning forward slash in the return values - it was not immediately apparent when reviewing the URL's where it was or how it was included.
def endpoint(action)
action == 'TokeniseCreditCard' ? 'sipp' : 'dts'
end
# Example usage
response = parse(ssl_post("#{commit_url}/#{endpoint(action)}.asmx", new_submit_xml(action, &block), headers))
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.
➕
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.
✅
ECS-159 Unit: 7 tests, 47 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Remote: 15 tests, 30 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
06dd8ab
to
2bb5b0f
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.
👍 LGTM
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.
👍 Looks good.
ECS-159 Unit: 7 tests, 47 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Remote: 15 tests, 30 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Closes activemerchant#3147
ECS-159
Unit:
8 tests, 50 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Remote:
17 tests, 32 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed