Implement tab api cancelled

This commit is contained in:
benji 2015-09-12 11:28:50 +02:00
parent fc5fa70980
commit c24d7ad956

View file

@ -47,7 +47,9 @@ class Order < ActiveRecord::Base
handle_asynchronously :tab_api_created handle_asynchronously :tab_api_created
def tab_api_cancelled def tab_api_cancelled
puts "api cancelled" body = { transaction: { creditor: user.uid, cents: price_cents, message: "Order cancelled" } }
headers = { "Authorization" => "Token token=LNJxGqkM39O21gcJJq6BLQ==" }
HTTParty.post("https://zeus.ugent.be/tab/transactions", body: body, headers: headers )
end end
handle_asynchronously :tab_api_cancelled handle_asynchronously :tab_api_cancelled