lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.0.2 vs lib/active_merchant/billing/gateways/authorize_net.rb in activemerchant-1.0.3
- old
+ new
@@ -78,9 +78,19 @@
def void(authorization, options = {})
post = {:trans_id => authorization}
commit('VOID', nil, post)
end
+
+ def credit(money, identification, options = {})
+ requires!(options, :card_number)
+
+ post = { :trans_id => identification,
+ :card_num => options[:card_number]
+ }
+
+ commit('CREDIT', money, post)
+ end
# We support visa and master card
def self.supported_cardtypes
[:visa, :master, :american_express, :discover]
end