change process flow for cb with bank_integration in lookups
This commit is contained in:
@@ -29,7 +29,13 @@ class Origami::JcbController < BaseOrigamiController
|
|||||||
@member_discount = MembershipSetting.find_by_discount(1)
|
@member_discount = MembershipSetting.find_by_discount(1)
|
||||||
@sub_total = sale_data.total_amount
|
@sub_total = sale_data.total_amount
|
||||||
@membership_id = sale_data.customer.membership_id
|
@membership_id = sale_data.customer.membership_id
|
||||||
|
#for bank integration
|
||||||
@receipt_no = sale_data.receipt_no
|
@receipt_no = sale_data.receipt_no
|
||||||
|
bank_integration = Lookup.collection_of('bank_integration')
|
||||||
|
@bank_integration = 0
|
||||||
|
if !bank_integration[0].nil?
|
||||||
|
@bank_integration = bank_integration[0][1]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
@@ -28,7 +28,13 @@ class Origami::MasterController < BaseOrigamiController
|
|||||||
@member_discount = MembershipSetting.find_by_discount(1)
|
@member_discount = MembershipSetting.find_by_discount(1)
|
||||||
@sub_total = sale_data.total_amount
|
@sub_total = sale_data.total_amount
|
||||||
@membership_id = sale_data.customer.membership_id
|
@membership_id = sale_data.customer.membership_id
|
||||||
|
#for bank integration
|
||||||
@receipt_no = sale_data.receipt_no
|
@receipt_no = sale_data.receipt_no
|
||||||
|
bank_integration = Lookup.collection_of('bank_integration')
|
||||||
|
@bank_integration = 0
|
||||||
|
if !bank_integration[0].nil?
|
||||||
|
@bank_integration = bank_integration[0][1]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
@@ -28,7 +28,13 @@ class Origami::MpuController < BaseOrigamiController
|
|||||||
@member_discount = MembershipSetting.find_by_discount(1)
|
@member_discount = MembershipSetting.find_by_discount(1)
|
||||||
@sub_total = sale_data.total_amount
|
@sub_total = sale_data.total_amount
|
||||||
@membership_id = sale_data.customer.membership_id
|
@membership_id = sale_data.customer.membership_id
|
||||||
|
#for bank integration
|
||||||
@receipt_no = sale_data.receipt_no
|
@receipt_no = sale_data.receipt_no
|
||||||
|
bank_integration = Lookup.collection_of('bank_integration')
|
||||||
|
@bank_integration = 0
|
||||||
|
if !bank_integration[0].nil?
|
||||||
|
@bank_integration = bank_integration[0][1]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
@@ -27,7 +27,13 @@ class Origami::VisaController < BaseOrigamiController
|
|||||||
@member_discount = MembershipSetting.find_by_discount(1)
|
@member_discount = MembershipSetting.find_by_discount(1)
|
||||||
@sub_total = sale_data.total_amount
|
@sub_total = sale_data.total_amount
|
||||||
@membership_id = sale_data.customer.membership_id
|
@membership_id = sale_data.customer.membership_id
|
||||||
|
#for bank integration
|
||||||
@receipt_no = sale_data.receipt_no
|
@receipt_no = sale_data.receipt_no
|
||||||
|
bank_integration = Lookup.collection_of('bank_integration')
|
||||||
|
@bank_integration = 0
|
||||||
|
if !bank_integration[0].nil?
|
||||||
|
@bank_integration = bank_integration[0][1]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
<span class="hidden" id="sub-total"><%= @sub_total%></span>
|
<span class="hidden" id="sub-total"><%= @sub_total%></span>
|
||||||
<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;">
|
||||||
<div class="rebate-form">
|
<div class="rebate-form">
|
||||||
|
<% if @bank_integration == '1' %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
<label for="com_port_name">Select Device</label>
|
<label for="com_port_name">Select Device</label>
|
||||||
@@ -29,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
<label>You can pay up to </label>
|
<label>You can pay up to </label>
|
||||||
@@ -120,25 +121,28 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var sale_id = "<%= @sale_id %>";
|
var sale_id = "<%= @sale_id %>";
|
||||||
|
var bank_integration = "<%= @bank_integration %>";
|
||||||
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||||
else {
|
else {
|
||||||
$('#validamount').attr("value",parseFloat("<%= @can_jcb %>") - parseFloat(localStorage.getItem("cash")));
|
$('#validamount').attr("value",parseFloat("<%= @can_jcb %>") - parseFloat(localStorage.getItem("cash")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(typeof code2lab != 'undefined'){
|
if(bank_integration == '1'){
|
||||||
code2lab.getCommPorts(); //get comportlists from jade
|
if(typeof code2lab != 'undefined'){
|
||||||
}else{
|
code2lab.getCommPorts(); //get comportlists from jade
|
||||||
swal({
|
}else{
|
||||||
title: 'Oops',
|
swal({
|
||||||
text: 'JCB is not available in here!',
|
title: 'Oops',
|
||||||
type: 'error',
|
text: 'JCB is not available in here!',
|
||||||
html: true,
|
type: 'error',
|
||||||
closeOnConfirm: false,
|
html: true,
|
||||||
closeOnCancel: false,
|
closeOnConfirm: false,
|
||||||
allowOutsideClick: false
|
closeOnCancel: false,
|
||||||
}, function () {
|
allowOutsideClick: false
|
||||||
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment";
|
}, function () {
|
||||||
});
|
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// number key pad
|
// number key pad
|
||||||
@@ -191,6 +195,7 @@ $('#jcb_pay').on('click',function(){
|
|||||||
var amount = $('#amount').text();
|
var amount = $('#amount').text();
|
||||||
var sale_id = "<%= @sale_id %>";
|
var sale_id = "<%= @sale_id %>";
|
||||||
var receipt_no = "<%= @receipt_no %>";
|
var receipt_no = "<%= @receipt_no %>";
|
||||||
|
var bank_integration = "<%= @bank_integration %>";
|
||||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||||
$(this).off("click");
|
$(this).off("click");
|
||||||
//start member discount 5% by pay card
|
//start member discount 5% by pay card
|
||||||
@@ -207,7 +212,28 @@ $('#jcb_pay').on('click',function(){
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
//end member discount
|
//end member discount
|
||||||
pay_withBank("SALE", "jcb", amount, sale_id, receipt_no);
|
if(bank_integration == '1'){
|
||||||
|
pay_withBank("SALE", "jcb", amount, sale_id, receipt_no);
|
||||||
|
}else{
|
||||||
|
$.ajax({type: "POST",
|
||||||
|
url: "<%= origami_payment_jcb_path %>",
|
||||||
|
data: "amount="+ amount + "&sale_id="+ sale_id,
|
||||||
|
success:function(result){
|
||||||
|
if(result){
|
||||||
|
swal({
|
||||||
|
title: "Information!",
|
||||||
|
text: "Payment Successfully",
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
if (amount>0) {
|
if (amount>0) {
|
||||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
<span class="hidden" id="sub-total"><%= @sub_total%></span>
|
<span class="hidden" id="sub-total"><%= @sub_total%></span>
|
||||||
<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;">
|
||||||
<div class="rebate-form">
|
<div class="rebate-form">
|
||||||
|
<% if @bank_integration == '1' %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
<label for="com_port_name">Select Device</label>
|
<label for="com_port_name">Select Device</label>
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
@@ -120,25 +122,28 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var sale_id = "<%= @sale_id %>";
|
var sale_id = "<%= @sale_id %>";
|
||||||
|
var bank_integration = "<%= @bank_integration %>";
|
||||||
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||||
else {
|
else {
|
||||||
$('#validamount').attr("value",parseFloat("<%= @can_master %>") - parseFloat(localStorage.getItem("cash")));
|
$('#validamount').attr("value",parseFloat("<%= @can_master %>") - parseFloat(localStorage.getItem("cash")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(typeof code2lab != 'undefined'){
|
if(bank_integration == '1'){
|
||||||
code2lab.getCommPorts(); //get comportlists from jade
|
if(typeof code2lab != 'undefined'){
|
||||||
}else{
|
code2lab.getCommPorts(); //get comportlists from jade
|
||||||
swal({
|
}else{
|
||||||
title: 'Oops',
|
swal({
|
||||||
text: 'MASTER is not available in here!',
|
title: 'Oops',
|
||||||
type: 'error',
|
text: 'MASTER is not available in here!',
|
||||||
html: true,
|
type: 'error',
|
||||||
closeOnConfirm: false,
|
html: true,
|
||||||
closeOnCancel: false,
|
closeOnConfirm: false,
|
||||||
allowOutsideClick: false
|
closeOnCancel: false,
|
||||||
}, function () {
|
allowOutsideClick: false
|
||||||
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment";
|
}, function () {
|
||||||
});
|
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(document).on('click', '.cashier_number', function(event){
|
$(document).on('click', '.cashier_number', function(event){
|
||||||
@@ -188,6 +193,7 @@
|
|||||||
var amount = $('#amount').text();
|
var amount = $('#amount').text();
|
||||||
var sale_id = "<%= @sale_id %>";
|
var sale_id = "<%= @sale_id %>";
|
||||||
var receipt_no = "<%= @receipt_no %>";
|
var receipt_no = "<%= @receipt_no %>";
|
||||||
|
var bank_integration = "<%= @bank_integration %>";
|
||||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||||
$(this).off("click");
|
$(this).off("click");
|
||||||
//start member discount 5% by pay card
|
//start member discount 5% by pay card
|
||||||
@@ -204,7 +210,28 @@
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
//end member discount
|
//end member discount
|
||||||
pay_withBank("SALE", "master", amount, sale_id, receipt_no);
|
if(bank_integration == '1'){
|
||||||
|
pay_withBank("SALE", "master", amount, sale_id, receipt_no);
|
||||||
|
}else{
|
||||||
|
$.ajax({type: "POST",
|
||||||
|
url: "<%= origami_payment_master_path %>",
|
||||||
|
data: "amount="+ amount + "&sale_id="+ sale_id,
|
||||||
|
success:function(result){
|
||||||
|
if(result){
|
||||||
|
swal({
|
||||||
|
title: "Information!",
|
||||||
|
text: "Payment Successfully",
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
if (amount>0) {
|
if (amount>0) {
|
||||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<div class="card" style="margin-top:10px;padding:20px;">
|
<div class="card" style="margin-top:10px;padding:20px;">
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<div class="rebate-form">
|
<div class="rebate-form">
|
||||||
|
<% if @bank_integration == '1' %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
<label for="com_port_name">Select Device</label>
|
<label for="com_port_name">Select Device</label>
|
||||||
@@ -30,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
<label>You can pay up to </label>
|
<label>You can pay up to </label>
|
||||||
@@ -123,26 +124,28 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var sale_id = "<%= @sale_id %>";
|
var sale_id = "<%= @sale_id %>";
|
||||||
|
var bank_integration = "<%= @bank_integration %>";
|
||||||
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||||
else {
|
else {
|
||||||
$('#validamount').attr("value",parseFloat("<%= @can_mpu %>") - parseFloat(localStorage.getItem("cash")));
|
$('#validamount').attr("value",parseFloat("<%= @can_mpu %>") - parseFloat(localStorage.getItem("cash")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(typeof code2lab != 'undefined'){
|
if(bank_integration == '1'){
|
||||||
code2lab.getCommPorts(); //get comportlists from jade
|
if(typeof code2lab != 'undefined'){
|
||||||
}else{
|
code2lab.getCommPorts(); //get comportlists from jade
|
||||||
swal({
|
}else{
|
||||||
title: 'Oops',
|
swal({
|
||||||
text: 'MPU is not available in here!',
|
title: 'Oops',
|
||||||
type: 'error',
|
text: 'MPU is not available in here!',
|
||||||
html: true,
|
type: 'error',
|
||||||
closeOnConfirm: false,
|
html: true,
|
||||||
closeOnCancel: false,
|
closeOnConfirm: false,
|
||||||
allowOutsideClick: false
|
closeOnCancel: false,
|
||||||
}, function () {
|
allowOutsideClick: false
|
||||||
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment";
|
}, function () {
|
||||||
});
|
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -194,6 +197,7 @@
|
|||||||
var amount = $('#amount').text();
|
var amount = $('#amount').text();
|
||||||
var sale_id = "<%= @sale_id %>";
|
var sale_id = "<%= @sale_id %>";
|
||||||
var receipt_no = "<%= @receipt_no %>";
|
var receipt_no = "<%= @receipt_no %>";
|
||||||
|
var bank_integration = "<%= @bank_integration %>";
|
||||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||||
$(this).off("click");
|
$(this).off("click");
|
||||||
//start member discount 5% by pay card
|
//start member discount 5% by pay card
|
||||||
@@ -210,7 +214,28 @@
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
//end member discount
|
//end member discount
|
||||||
pay_withBank("SALE", "mpu", amount, sale_id, receipt_no);
|
if(bank_integration == '1'){
|
||||||
|
pay_withBank("SALE", "mpu", amount, sale_id, receipt_no);
|
||||||
|
}else{
|
||||||
|
$.ajax({type: "POST",
|
||||||
|
url: "<%= origami_payment_mpu_path %>",
|
||||||
|
data: "amount="+ amount + "&sale_id="+ sale_id,
|
||||||
|
success:function(result){
|
||||||
|
if(result){
|
||||||
|
swal({
|
||||||
|
title: "Information!",
|
||||||
|
text: "Payment Successfully",
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if (amount>0) {
|
if (amount>0) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
<span class="hidden" id="sub-total"><%= @sub_total%></span>
|
<span class="hidden" id="sub-total"><%= @sub_total%></span>
|
||||||
<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;">
|
||||||
<div class="rebate-form">
|
<div class="rebate-form">
|
||||||
|
<% if @bank_integration == '1' %>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
<label for="com_port_name">Select Device</label>
|
<label for="com_port_name">Select Device</label>
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
<div class="form-group col-lg-12 col-md-12 col-sm-12">
|
||||||
@@ -120,27 +122,32 @@
|
|||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var sale_id = "<%= @sale_id %>";
|
var sale_id = "<%= @sale_id %>";
|
||||||
|
var bank_integration = "<%= @bank_integration %>";
|
||||||
|
|
||||||
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
if(localStorage.getItem("cash") == null || localStorage.getItem("cash") == 'null'){}
|
||||||
else {
|
else {
|
||||||
$('#validamount').attr("value",parseFloat("<%= @can_visa %>") - parseFloat(localStorage.getItem("cash")));
|
$('#validamount').attr("value",parseFloat("<%= @can_visa %>") - parseFloat(localStorage.getItem("cash")));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(typeof code2lab != 'undefined'){
|
if(bank_integration == '1'){
|
||||||
code2lab.getCommPorts(); //get comportlists from jade
|
if(typeof code2lab != 'undefined'){
|
||||||
}else{
|
code2lab.getCommPorts(); //get comportlists from jade
|
||||||
swal({
|
}
|
||||||
title: 'Oops',
|
else{
|
||||||
text: 'VISA is not available in here!',
|
swal({
|
||||||
type: 'error',
|
title: 'Oops',
|
||||||
html: true,
|
text: 'VISA is not available in here!',
|
||||||
closeOnConfirm: false,
|
type: 'error',
|
||||||
closeOnCancel: false,
|
html: true,
|
||||||
allowOutsideClick: false
|
closeOnConfirm: false,
|
||||||
}, function () {
|
closeOnCancel: false,
|
||||||
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment";
|
allowOutsideClick: false
|
||||||
});
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id + "/payment/others_payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
$(document).on('click', '.cashier_number', function(event){
|
$(document).on('click', '.cashier_number', function(event){
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@@ -207,7 +214,30 @@
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
//end member discount
|
//end member discount
|
||||||
pay_withBank("SALE", "visa", amount, sale_id, receipt_no);
|
var bank_integration = "<%= @bank_integration %>";
|
||||||
|
if(bank_integration == '1'){
|
||||||
|
pay_withBank("SALE", "visa", amount, sale_id, receipt_no);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$.ajax({type: "POST",
|
||||||
|
url: "<%= origami_payment_visa_path %>",
|
||||||
|
data: "amount="+ amount + "&sale_id="+ sale_id,
|
||||||
|
success:function(result){
|
||||||
|
if(result){
|
||||||
|
swal({
|
||||||
|
title: "Information!",
|
||||||
|
text: "Payment Successfully",
|
||||||
|
html: true,
|
||||||
|
closeOnConfirm: false,
|
||||||
|
closeOnCancel: false,
|
||||||
|
allowOutsideClick: false
|
||||||
|
}, function () {
|
||||||
|
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
if (amount>0) {
|
if (amount>0) {
|
||||||
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
swal ( "Oops" , "Paid Amount is over!" , "error" );
|
||||||
|
|||||||
Reference in New Issue
Block a user