finished dinga and paymal payment

This commit is contained in:
Aung Myo
2018-04-18 16:47:38 +06:30
parent 5816a48d32
commit 2a26abff9a
4 changed files with 55 additions and 35 deletions

View File

@@ -205,7 +205,7 @@
$.ajax({
type: "POST",
url: "<%=origami_payment_dinga_path%>",
data: {payment_amount:payment_amount,membership_id:membership_id,sale_id:sale_id,transaction_ref:""},
data: {payment_amount:payment_amount,membership_id:membership_id,sale_id:sale_id,transaction_ref:"",account_no:0},
success: function(result){
if(result.status == true){
swal({
@@ -244,11 +244,11 @@
var receipt_no = $("#receipt_no").text() || 0;
var customer_mamber_card_no = 0;
// $("#is_paymemberModal").hide();
// $("#sxModal").show();
// setTimeout(function(){
// getCardNo();
// $("#sxModal").hide();
$("#is_paymemberModal").hide();
$("#sxModal").show();
setTimeout(function(){
getCardNo();
$("#sxModal").hide();
customer_mamber_card_no = $("#paypar_account_no").val();
if(sale_id != 0 && customer_mamber_card_no != 0){
$.ajax({
@@ -302,7 +302,7 @@
}
});
}
// },100);
},100);
});
// Read NFC card no from java
@@ -320,13 +320,13 @@
// QR Code Reader
$(".btn_qr_code").on('click', function(e){
$("#is_memberModal").hide();
var code = "1011002923682533";
var code = "";
var customer_id = '';
var customer_name = '';
var membership_id = '';
var membership_type = '';
// setTimeout(function(){
// code=getQRCode();
setTimeout(function(){
code=getQRCode();
if(sale_id != 0 && code != ""){
$.ajax({
type: "POST",
@@ -341,7 +341,7 @@
$.ajax({
type: "POST",
url: "<%=origami_payment_paymal_path%>",
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no : code},
data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:code},
success: function(result){
if(result.status == true){
swal({
@@ -376,7 +376,7 @@
}
});
}
// },100);
},100);
});
// Read qrcode from java