pay_info.py 1.11 KB

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
                    )