Class: Workarea::Payment::Capture::GiftCard

Inherits:
Object
  • Object
show all
Includes:
OperationImplementation, GiftCardOperation
Defined in:
app/models/workarea/payment/capture/gift_card.rb

Instance Method Summary collapse

Methods included from GiftCardOperation

#gateway

Instance Method Details

#cancel!Object



17
18
19
# File 'app/models/workarea/payment/capture/gift_card.rb', line 17

def cancel!
  # noop, nothing to cancel
end

#complete!Object



8
9
10
11
12
13
14
15
# File 'app/models/workarea/payment/capture/gift_card.rb', line 8

def complete!
  response = gateway.capture(transaction.amount.cents, tender)

  transaction.response = ActiveMerchant::Billing::Response.new(
    response.success?,
    response.message
  )
end