kbzpay payment updated

This commit is contained in:
Zoey
2019-06-26 13:35:27 +06:30
parent 2e306a6339
commit 52a375f2a4
6 changed files with 35 additions and 17 deletions

View File

@@ -168,7 +168,7 @@ class Origami::PaymentsController < BaseOrigamiController
# salePayment = SalePayment.find(sale_payment_id)
# salePayment.process_kbz_payment(salePayment.sale_id, sale_data.grand_total, cash, 'paid')
# else
# sp = SalePayment.where('sale_id=? and payment_method=? and payment_status=?', sale_id, 'kbzpay', 'paid').last
sp = SalePayment.where('sale_id=? and payment_method=? and payment_status=?', sale_id, 'kbzpay', 'paid').last
if is_kbz == 'false'
Rails.logger.info '################ CASH PAYMENT #################'
sale_payment = SalePayment.new
@@ -177,6 +177,8 @@ class Origami::PaymentsController < BaseOrigamiController
else
sale_payment.process_payment(saleObj, current_user, cash, "cash")
end
else
sp.kbz_edit_sale_payment(sp.received_amount.to_f, current_user)
end
# end