add paymal payment

This commit is contained in:
phyusin
2018-03-30 16:53:38 +06:30
parent ac5987fbb5
commit fc8d8eea4a
6 changed files with 51 additions and 54 deletions

View File

@@ -49,15 +49,12 @@ class SalePayment < ApplicationRecord
payment_status = paypar_payment
when "foc"
payment_status = foc_payment
<<<<<<< HEAD
when "paymal"
payment_status = paymal_payment
=======
when "JunctionPay"
payment_status = junction_pay_payment
when "alipay"
payment_status = external_terminal_card_payment(:alipay)
>>>>>>> 996392a041cb5f92a3b2985cbd0379210132d829
else
puts "it was something else"
end
@@ -360,7 +357,6 @@ class SalePayment < ApplicationRecord
end
<<<<<<< HEAD
def paymal_payment
payment_status = false
@@ -386,7 +382,10 @@ class SalePayment < ApplicationRecord
else
sale_update_payment_status(0)
end
=======
return payment_status
end
def junction_pay_payment
payment_status = false
@@ -398,10 +397,7 @@ class SalePayment < ApplicationRecord
self.payment_status = "paid"
payment_method = self.save!
sale_update_payment_status(self.received_amount)
>>>>>>> 996392a041cb5f92a3b2985cbd0379210132d829
return payment_status
end
def sale_update_payment_status(paid_amount,check_foc = false)