Method: ActiveMerchant::Billing::MigsGateway#refund

Defined in:
lib/active_merchant/billing/gateways/migs.rb

#refund(money, authorization, options = {}) ⇒ Object

Options

  • :unique_id – A unique id for this request (Max 40 chars).

If not supplied one will be generated.



96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/active_merchant/billing/gateways/migs.rb', line 96

def refund(money, authorization, options = {})
  requires!(@options, :advanced_login, :advanced_password)

  post = options.merge(TransNo: authorization)

  add_amount(post, money, options)
  add_advanced_user(post)
  add_standard_parameters('refund', post, options[:unique_id])
  add_tx_source(post, options)

  commit(post)
end