Class: Workarea::Payment::Authorize::GiftCard
- Inherits:
-
Object
- Object
- Workarea::Payment::Authorize::GiftCard
- Includes:
- OperationImplementation, GiftCardOperation
- Defined in:
- app/models/workarea/payment/authorize/gift_card.rb
Instance Method Summary collapse
Methods included from GiftCardOperation
Instance Method Details
#cancel! ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'app/models/workarea/payment/authorize/gift_card.rb', line 17 def cancel! return unless transaction.success? response = gateway.cancel(transaction.amount.cents, tender) transaction.cancellation = ActiveMerchant::Billing::Response.new( response.success?, response. ) end |
#complete! ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/models/workarea/payment/authorize/gift_card.rb', line 8 def complete! response = gateway.(transaction.amount.cents, tender) transaction.response = ActiveMerchant::Billing::Response.new( response.success?, response. ) end |