pay_info.py
1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from opensipkd.base.views import BaseView
from opensipkd.pasar.models.produk import PartnerPay
from pyramid.view import view_config
class view_pay(BaseView):
@view_config(route_name = 'pay-info', renderer = 'templates/pay_info.pt')#permission = 'pay-form',
def the_form(self):
request = self.req
session = self.ses
url_dict = request.matchdict
meth = url_dict['meth']
pay_token = url_dict['pay_token']
row = PartnerPay.query().filter(PartnerPay.token_pay_req == pay_token).first()
if meth == 'VA':
subject = 'Nomor VA :'
content = row.card_no
elif meth == 'CC':
content = row.card_no
elif meth == 'CVS':
subject = ''
content = ''
elif meth == 'EM':
subject = ''
content = ''
elif meth == 'loan':
subject = ''
content = ''
elif meth == 'CP':
subject = ''
content = ''
return dict(
subject = subject,
content = content
)