Sha256: 9531ab5578f6e7e51ff40a70c350c97ecc04fc2f07a3b644b420b3cddc105824
Contents?: true
Size: 925 Bytes
Versions: 6
Compression:
Stored size: 925 Bytes
Contents
module Workarea class Payment class Refund class GiftCard include OperationImplementation def complete! Payment::GiftCard.refund(tender.number, transaction.amount.cents) transaction.response = ActiveMerchant::Billing::Response.new( true, I18n.t( 'workarea.gift_cards.credit', amount: transaction.amount, number: tender.number ) ) end def cancel! return unless transaction.success? Payment::GiftCard.purchase(tender.number, transaction.amount.cents) transaction.cancellation = ActiveMerchant::Billing::Response.new( true, I18n.t( 'workarea.gift_cards.debit', amount: transaction.amount, number: tender.number ) ) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems