chargify/active_merchant — pull request #18 by moklett (2014-01-23 19:28:54+00:00)
Title: Quickpay v7 has an "acquirers" field in requests

The original implementation of protocol v7 called this field "acquirer"
(without the "s"), which matches some of the current Quickpay
documentation but contradicts other parts. We learned via Quickpay
support (through debug of a chargify.com merchant issue) that the field
in the request is called "acquirers", representing a list of acquirers
to attempt, ordered by preference (i.e. `acquirers=nets,teller`). The
response will contain a field called "acquirer" which conveys which
acquirer was actually used in the transaction.

Before this change, attempting to set the old `:acquirer` option would
result in an MD5check hash mismatch, since the ActiveMerchant code would
use the `acquirer` field in the calculation, but Quickpay would not.

After this change, both ActiveMerchant and Quickpay agree on the
MD5check hash when the `:acquirers` option is set, and the `:acquirers`
option has the intended effect of setting the preferred acquirers for
the transaction. (The latter can be negative-tested by setting the
value for acquirers to an invalid acquirer value and observing the
error response: "Error in field: acquirers")

Despite the change to the option key (`acquirer` to `acquirers`), I feel
this is a safe, backwards compatible change since attempting to set the
old option could never result in a successful transaction - the MD5check
hash mismatch error would always occur.

Note: I have asked Quickpay that they update all of their v7
documentation to reflect the correct field name. At this time I am
still waiting for those changes to happen.