1

We have a system that allows non-profits to use whatever payment gateway they have setup. They select their gateway from a drop down, the correct inputs for the required API values are shown and they enter their details in.

We want to test these values to insure they are correct in order to alert the non-profit admin that the values provided will not work.

Does omnipay have this sort of functionality? Please keep in mind that at this point, we do not have any billing information. Nothing is actually being purchased.

We were going to submit a purchase amount of "0" and use dummy billing info and for the current gateways we are equipped to accept, this would work. What we did was trap the error the gateway submit returned. This is problematic because some of the gateways returned errors worded in a way that we wanted to insure they got sent back to a normal checkout process. Additionally If the gateways changed something about the error, this code would break. We would also have to go through this with each gateway added from here on out.

Thoughts? Recommendations?

Thanks

Nick DuBois
  • 207
  • 3
  • 12
  • 1
    Tricky question. Omnipay doesn't have this sort of functionality because in general gateways don't have this sort of functionality. What I would be inclined to do is to make a $0 authorize() transaction against a known good card on the gateway and see if it works. However some gateways don't even support that and will throw an error if a $0 transaction is submitted. So there's not a generic answer and you might have to code one for each gateway. – delatbabel Jul 19 '17 at 03:38

0 Answers0