Class: Vpago::PaymentVoiderJob

Inherits:
ApplicationUniqueJob show all
Defined in:
app/jobs/vpago/payment_voider_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(payment_id) ⇒ Object



6
7
8
9
# File 'app/jobs/vpago/payment_voider_job.rb', line 6

def perform(payment_id)
  payment = Spree::Payment.find(payment_id)
  payment.void_transaction! if payment.actions.include?('void')
end