fix
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
class Api::Payment::MobilepaymentController < Api::ApiController
|
||||
|
||||
# skip_before_action :authenticate
|
||||
|
||||
def cash
|
||||
|
||||
|
||||
cash = params[:cash]
|
||||
sale_id = params[:sale_id]
|
||||
member_info = nil
|
||||
type = params[:type]
|
||||
tax_type = params[:tax_type]
|
||||
path = request.fullpath
|
||||
latest_order_no = nil
|
||||
cashier_id = params[:cashier_id]
|
||||
|
||||
current_user = Employee.find(cashier_id)
|
||||
@@ -47,7 +44,17 @@ class Api::Payment::MobilepaymentController < Api::ApiController
|
||||
|
||||
else
|
||||
@out =false,"Something wrong!"
|
||||
sale_payment = SalePayment.new
|
||||
sale_payment = sale_payment.process_payment(saleObj, current_user, cash, "cash")
|
||||
if sale_payment[0]
|
||||
@cash = {"change_amount"=>sale_payment[3],"balance_amount"=>sale_payment[4] ,"receipt_url"=>''}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def kbz_pay
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user