add paymal payment
This commit is contained in:
2
Gemfile
Executable file → Normal file
2
Gemfile
Executable file → Normal file
@@ -1,5 +1,5 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
ruby '2.4.0'
|
ruby '2.4.1'
|
||||||
git_source(:github) do |repo_name|
|
git_source(:github) do |repo_name|
|
||||||
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
|
||||||
"https://github.com/#{repo_name}.git"
|
"https://github.com/#{repo_name}.git"
|
||||||
|
|||||||
0
Gemfile.lock
Executable file → Normal file
0
Gemfile.lock
Executable file → Normal file
@@ -26,7 +26,7 @@ _MASTER_ = "/ MASTER PAYMENT";
|
|||||||
_MPU_ = "/ MPU PAYMENT";
|
_MPU_ = "/ MPU PAYMENT";
|
||||||
_ALIPAY_ = "/ Alipay";
|
_ALIPAY_ = "/ Alipay";
|
||||||
_JUNCTIONPAY_ = "/ JunctionPay";
|
_JUNCTIONPAY_ = "/ JunctionPay";
|
||||||
_PAYMAL_ = "/ Paymal";
|
_PAYMAL_ = "/ PAYMAL";
|
||||||
_OTHER_CHARGES_ = "/ CHARGES";
|
_OTHER_CHARGES_ = "/ CHARGES";
|
||||||
_OTHER_PAYMENTS_ = "/ OTHER PAYMENT";
|
_OTHER_PAYMENTS_ = "/ OTHER PAYMENT";
|
||||||
_PAYMENTS_ = "/ PAYMENT";
|
_PAYMENTS_ = "/ PAYMENT";
|
||||||
|
|||||||
@@ -49,15 +49,12 @@ class SalePayment < ApplicationRecord
|
|||||||
payment_status = paypar_payment
|
payment_status = paypar_payment
|
||||||
when "foc"
|
when "foc"
|
||||||
payment_status = foc_payment
|
payment_status = foc_payment
|
||||||
<<<<<<< HEAD
|
|
||||||
when "paymal"
|
when "paymal"
|
||||||
payment_status = paymal_payment
|
payment_status = paymal_payment
|
||||||
=======
|
|
||||||
when "JunctionPay"
|
when "JunctionPay"
|
||||||
payment_status = junction_pay_payment
|
payment_status = junction_pay_payment
|
||||||
when "alipay"
|
when "alipay"
|
||||||
payment_status = external_terminal_card_payment(:alipay)
|
payment_status = external_terminal_card_payment(:alipay)
|
||||||
>>>>>>> 996392a041cb5f92a3b2985cbd0379210132d829
|
|
||||||
else
|
else
|
||||||
puts "it was something else"
|
puts "it was something else"
|
||||||
end
|
end
|
||||||
@@ -360,7 +357,6 @@ class SalePayment < ApplicationRecord
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
def paymal_payment
|
def paymal_payment
|
||||||
payment_status = false
|
payment_status = false
|
||||||
|
|
||||||
@@ -386,7 +382,10 @@ class SalePayment < ApplicationRecord
|
|||||||
else
|
else
|
||||||
sale_update_payment_status(0)
|
sale_update_payment_status(0)
|
||||||
end
|
end
|
||||||
=======
|
|
||||||
|
return payment_status
|
||||||
|
end
|
||||||
|
|
||||||
def junction_pay_payment
|
def junction_pay_payment
|
||||||
payment_status = false
|
payment_status = false
|
||||||
|
|
||||||
@@ -398,10 +397,7 @@ class SalePayment < ApplicationRecord
|
|||||||
self.payment_status = "paid"
|
self.payment_status = "paid"
|
||||||
payment_method = self.save!
|
payment_method = self.save!
|
||||||
sale_update_payment_status(self.received_amount)
|
sale_update_payment_status(self.received_amount)
|
||||||
|
|
||||||
>>>>>>> 996392a041cb5f92a3b2985cbd0379210132d829
|
|
||||||
return payment_status
|
return payment_status
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def sale_update_payment_status(paid_amount,check_foc = false)
|
def sale_update_payment_status(paid_amount,check_foc = false)
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</ol>
|
</ol>
|
||||||
</div> -->
|
</div> -->
|
||||||
<h5>PayMal Payment</h5>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-5 col-md-5 col-sm-5">
|
<div class="col-lg-5 col-md-5 col-sm-5">
|
||||||
<div class="card m-l-10 m-t-10" style="padding:0px 20px;">
|
<div class="card m-l-10 m-t-10" style="padding:0px 20px;">
|
||||||
@@ -110,11 +109,13 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var cashier_type = "<%= @cashier_type %>";
|
var cashier_type = "<%= @cashier_type %>";
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
setHeaderBreadCrumb(_PAYMAL_);
|
||||||
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||||
else {
|
else {
|
||||||
$('#paymentamt').attr("value",parseFloat("<%= @payment_prices %>") - parseFloat(localStorage.getItem("cash")));
|
$('#paymentamt').attr("value",parseFloat("<%= @payment_prices %>") - parseFloat(localStorage.getItem("cash")));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.cashier_number', function(event){
|
$(document).on('click', '.cashier_number', function(event){
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user