-
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
CardConnect: Add frontendid parameter to requests #3198
Conversation
Add `frontendid` parameter to request bodies using the gateway's application_id as the value. This enables CardConnect to internally account for their costs by attributing transactions to the originating application / platform associated with the frontendid. ECS-287 Closes #3198 Unit: 22 tests, 92 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Remote: 23 tests, 55 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
end.respond_with(successful_purchase_response) | ||
ensure | ||
@gateway.class.application_id = nil | ||
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.
Do we need the ensure
block? The @gateway
instance variable and application_id
should be reset for each test.
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'm not sure. This test was adapted from https://github.com/activemerchant/active_merchant/blob/master/test/unit/gateways/authorize_net_test.rb#L1011
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.
Verified this an existing pattern in place in ActiveMerchant.
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.
One minor comment, but LGTM otherwise.
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.
🚢
Add `frontendid` parameter to request bodies using the gateway's application_id as the value. This enables CardConnect to internally account for their costs by attributing transactions to the originating application / platform associated with the frontendid. ECS-287 Closes activemerchant#3198 Unit: 22 tests, 92 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Remote: 23 tests, 55 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
Add
frontendid
parameter to request bodies using the gateway'sapplication_id as the value. This enables CardConnect to internally
account for their costs by attributing transactions to the originating
application / platform associated with the frontendid.
ECS-287
Closes #3198
Unit:
22 tests, 92 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Remote:
23 tests, 55 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed