I am working on the billing component of a Ruby on Rails application using ActiveMerchant. The payment gateway we have chosen is PaymentExpress.
Code examples I am seeing such as the one below, use authorize()
and void()
to test the validity of a card:
def test_card!
auth_response = gateway.authorize(100, card)
gateway.void(auth_response.authorization) if auth_response.success?
raise AuthorizationFailed.new(auth_response) unless auth_response.success?
end
However, PaymentExpress does not support the void action. Is there an alternate way to perform this authorisation action, or is it OK to leave out the void action, considering gateways such as PaymentExpress expire the authorisation request after 7 days?
I can find no mention of void
ing an authorisation in the documentation or Google, nor can I find any indication of how important it is.
Some help?