lib/active_merchant/billing/gateways/safe_charge.rb in activemerchant-1.65.0 vs lib/active_merchant/billing/gateways/safe_charge.rb in activemerchant-1.66.0

- old
+ new

@@ -61,9 +61,18 @@ post[:sg_ExpYear] = exp_year commit(post) end + def credit(money, payment, options={}) + post = {} + add_payment(post, payment) + add_transaction_data("Credit", post, money, options) + post[:sg_CreditType] = 1 + + commit(post) + end + def void(authorization, options={}) post = {} auth, transaction_id, token, exp_month, exp_year, original_amount = authorization.split("|") add_transaction_data("Void", post, (original_amount.to_f * 100), options) post[:sg_CreditType] = 2