kbzpay setting

This commit is contained in:
Zoey
2019-06-24 14:22:44 +06:30
parent cd2e003945
commit 88c5dc2144
3 changed files with 22 additions and 19 deletions

View File

@@ -105,12 +105,15 @@ class Origami::PaymentsController < BaseOrigamiController
#TODO :: KBZPAY ( QR )
# On/Off setting ( show or not qr )
# qrCode = "00020101021202021110500346KBZ005ab0ed5c1ed09d1c4585ff1313170389160831435294600062000040732kp1e78f7efddca190042638341afb88d50200006KBZPay0106KBZPay5303MMK5802MM62170813PAY_BY_QRCODE64060002my6304FBBD"
kbz_pay_status = PaymentMethodSetting.where(:payment_method => 'KBZPay').last
kbz_pay_setting = PaymentMethodSetting.where(:payment_method => 'KBZPay').last
status = false
if kbz_pay_status
status, qr = KbzPay.pay(sale_data.grand_total, sale_data.receipt_no)
qr = nil
if !kbz_pay_setting.nil?
if kbz_pay_setting.is_active == true
status, qr = KbzPay.pay(sale_data.grand_total, sale_data.receipt_no)
end
end
filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings, status, qr, cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount,nil,nil,nil)