From ed8e9836fe2a9d2a5e7ee83c37460aa8928a9c7f Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 19 Apr 2018 10:16:38 +0630 Subject: [PATCH] check and update qrcode payment --- app/controllers/origami/order_reservation_controller.rb | 5 ++--- app/models/order_reservation.rb | 4 ++-- app/views/origami/dinga/index.html.erb | 8 +++++--- app/views/origami/paymal/index.html.erb | 2 ++ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/controllers/origami/order_reservation_controller.rb b/app/controllers/origami/order_reservation_controller.rb index 87e8b18f..562eaaed 100644 --- a/app/controllers/origami/order_reservation_controller.rb +++ b/app/controllers/origami/order_reservation_controller.rb @@ -50,10 +50,9 @@ class Origami::OrderReservationController < BaseOrigamiController status = params[:status] end - # response = OrderReservation.send_status_to_ordering(params[:url],params[:ref_no],status) + response = OrderReservation.send_status_to_ordering(params[:url],params[:ref_no],status) - result = {:status=> true, :message => " accepted !" } - render :json => result.to_json + render :json => response end end diff --git a/app/models/order_reservation.rb b/app/models/order_reservation.rb index 21c76030..2fa99cf4 100644 --- a/app/models/order_reservation.rb +++ b/app/models/order_reservation.rb @@ -92,7 +92,7 @@ class OrderReservation < ApplicationRecord @status, @sale = Sale.request_bill(@order,current_user,current_user) #order status send to doemal - # callback_response = send_status_to_ordering(order.callback_url,order.transaction_ref,SEND_TO_KITCHEN) + callback_response = send_status_to_ordering(order.callback_url,order.transaction_ref,SEND_TO_KITCHEN) #order reservation status updated update_order_reservation(order.id, @sale.sale_id, SEND_TO_KITCHEN) @@ -123,7 +123,7 @@ class OrderReservation < ApplicationRecord sale_payment.process_payment(saleObj, current_user.name, saleObj.grand_total, "cash") #order status send to doemal - # callback_response = send_status_to_ordering(order.callback_url,order.transaction_ref,DELIVERED) + callback_response = send_status_to_ordering(order.callback_url,order.transaction_ref,DELIVERED) #order reservation status updated update_order_reservation(order.id, saleObj.sale_id, DELIVERED) diff --git a/app/views/origami/dinga/index.html.erb b/app/views/origami/dinga/index.html.erb index e9205fbf..1a7bd798 100644 --- a/app/views/origami/dinga/index.html.erb +++ b/app/views/origami/dinga/index.html.erb @@ -118,7 +118,7 @@