Commit 0fca3693 by yasir

tes perbaikan

1 parent f1118bf9
...@@ -99,12 +99,17 @@ class view_pay(BaseView): ...@@ -99,12 +99,17 @@ class view_pay(BaseView):
request = self.req request = self.req
session = self.ses session = self.ses
url_dict = request.matchdict url_dict = request.matchdict
params = request.params
data_form = {} data_form = {}
post_data = request.POST post_data = request.POST
items = dict(post_data) items = dict(post_data)
produks = [] produks = []
is_pay_info = False
is_pay_info = params and 'end_info' in params or False
if post_data: if post_data:
if 'bayar' in post_data: if 'bayar' in post_data:
...@@ -345,9 +350,10 @@ class view_pay(BaseView): ...@@ -345,9 +350,10 @@ class view_pay(BaseView):
formEm.request = request formEm.request = request
formEm = Form(formEm) formEm = Form(formEm)
# params = req.params
return dict( return dict(
pay_info = False, pay_info = is_pay_info,
form = form, form = form,
formVa = formVa, formVa = formVa,
......
...@@ -336,6 +336,12 @@ td, th { ...@@ -336,6 +336,12 @@ td, th {
} }
$(document).ready(function() { $(document).ready(function() {
if (${pay_info} == true){
$("#div_info").show();
$("#div_pay").hide();
$("#div_gagal").hide();
}
$("#bt_bayar").click(function(){ $("#bt_bayar").click(function(){
var pay_method = $('#pay_method').val(); var pay_method = $('#pay_method').val();
var va_opt = $('#va_opt').val(); var va_opt = $('#va_opt').val();
...@@ -364,6 +370,7 @@ td, th { ...@@ -364,6 +370,7 @@ td, th {
}else{ }else{
$("#lb_state").html(data.state); $("#lb_state").html(data.state);
$("#div_info").hide(); $("#div_info").hide();
$("#div_pay").hide(); $("#div_pay").hide();
$("#div_gagal").show(); $("#div_gagal").show();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!