update rebate and update api
This commit is contained in:
@@ -199,7 +199,7 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
auth_token:auth_token}.to_json,
|
||||
:headers => {
|
||||
'Content-Type' => 'application/json',
|
||||
'Accept' => 'application/json'
|
||||
'Accept' => 'application/json; version=2'
|
||||
}, :timeout => 10)
|
||||
rescue HTTParty::Error
|
||||
response = {"status": false, "message": "Can't open membership server " }
|
||||
@@ -215,7 +215,8 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
else
|
||||
response = {"status": false, "message": "You have no selected discount item" }
|
||||
end
|
||||
|
||||
puts "discount"
|
||||
puts response.to_json
|
||||
# Re-calc All Amount in Sale
|
||||
if response["status"] == true
|
||||
discount_amount = response["discount_earned"]
|
||||
@@ -229,7 +230,7 @@ class Origami::DiscountsController < BaseOrigamiController
|
||||
else
|
||||
result = {:status=> response["message"],:title=>"Alert", :table_id => table_id,:table_type => table_type }
|
||||
end
|
||||
|
||||
|
||||
render :json => result.to_json
|
||||
|
||||
end #end Is Card Payment
|
||||
|
||||
Reference in New Issue
Block a user