Class: VoidFailedTransactionWorker
- Inherits:
-
ApplicationWorker
- Object
- ApplicationWorker
- VoidFailedTransactionWorker
- Defined in:
- app/workers/void_failed_transaction_worker.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ApplicationWorker
Class Method Details
.void_later(reference_no, gb_secret_key = nil) ⇒ Object
11 12 13 |
# File 'app/workers/void_failed_transaction_worker.rb', line 11 def self.void_later(reference_no, gb_secret_key = nil) VoidFailedTransactionWorker.perform_in(3.minutes, reference_no, gb_secret_key) end |
Instance Method Details
#perform(reference_no, gb_secret_key = nil) ⇒ Object
4 5 6 7 8 9 |
# File 'app/workers/void_failed_transaction_worker.rb', line 4 def perform(reference_no, gb_secret_key = nil) if Externals::Omise::Charge.find_by(omise_charge_id: reference_no).blank? client = ::Payment::Gateway.new(provider: :gb_primepay) client.void(reference_no: reference_no, gb_secret_key: gb_secret_key) end end |