Search code examples
ruby-on-railsauthorize.netactivemerchant

When using Authorize.net, should the billing address be passed to the capture method?


We're already passing billing address to the authorize method. Should the billing address still be passed to the capture method later?

Example:

response = gateway.authorize(1000, credit_card, options_with_billing_address)
gateway.capture(1000, response.authorization, options_with_billing_address)

or no need to pass the billing address to the capture method? Like:

response = gateway.authorize(1000, credit_card, options_with_billing_address)
gateway.capture(1000, response.authorization)

Solution

  • You don't need the billing address, to capture a previously authorized amount using authOnlyTransaction. Though, the transactionType should be priorAuthCaptureTransaction and the refTransId(Transaction ID of the original authorization transaction) field is required.