8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'app/jobs/super_good/solidus_taxjar/replace_transaction_job.rb', line 8
def perform(order)
order_transaction = SuperGood::SolidusTaxjar.reporting.refund_and_create_new_transaction(order)
SuperGood::SolidusTaxjar::TransactionSyncLog.create!(
order: order,
order_transaction: order_transaction,
status: :success
)
rescue Taxjar::Error => exception
SuperGood::SolidusTaxjar::TransactionSyncLog.create!(
order: order,
status: :error,
error_message: exception.message
)
end
|