This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Ticket #1078: 0001-FEAT-Add-a-bank-transfer-payment-module.patch

File 0001-FEAT-Add-a-bank-transfer-payment-module.patch, 45.9 KB (added by pedersen, 3 years ago)

Main patch

  • new file indico/MaKaC/plugins/EPayment/bankTransfer/__init__.py

    From bab1a22f345374c767b493754e282f00e9eda461 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Bj=C3=B6rn=20Pedersen?= <bjoern.pedersen@frm2.tum.de>
    Date: Tue, 21 Aug 2012 17:47:30 +0200
    Subject: [PATCH] [FEAT] Add a bank transfer payment module
    
     * field for account data
     * field for pknumber/additional payment info
    ---
     .../plugins/EPayment/bankTransfer/__init__.py      |  28 ++
     .../plugins/EPayment/bankTransfer/epayment.py      | 327 +++++++++++++++++++++
     .../tpls/CancelEPaymentBankTransfer.tpl            |   8 +
     .../tpls/ConfModifEPaymentBankTransfer.tpl         |  36 +++
     .../ConfModifEPaymentBankTransferDataModif.tpl     |  39 +++
     .../tpls/confirmEPaymentBankTransfer.tpl           |  33 +++
     .../EPayment/bankTransfer/webinterface/__init__.py |  21 ++
     .../bankTransfer/webinterface/pages/__init__.py    |  21 ++
     .../bankTransfer/webinterface/pages/ePayments.py   | 175 +++++++++++
     .../bankTransfer/webinterface/rh/__init__.py       |  37 +++
     .../bankTransfer/webinterface/rh/ePaymentModif.py  | 131 +++++++++
     .../bankTransfer/webinterface/urlHandlers.py       |  66 +++++
     .../bankTransfer/webinterface/wcomponents.py       |  47 +++
     indico/htdocs/bankTransfer.py                      |  26 ++
     setup.py                                           |   1 +
     15 Dateien geÀndert, 996 Zeilen hinzugefÌgt(+)
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/__init__.py
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/epayment.py
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/tpls/CancelEPaymentBankTransfer.tpl
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/tpls/ConfModifEPaymentBankTransfer.tpl
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/tpls/ConfModifEPaymentBankTransferDataModif.tpl
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/tpls/confirmEPaymentBankTransfer.tpl
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/__init__.py
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/pages/__init__.py
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/pages/ePayments.py
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/rh/__init__.py
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/rh/ePaymentModif.py
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/urlHandlers.py
     create mode 100644 indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/wcomponents.py
     create mode 100644 indico/htdocs/bankTransfer.py
    
    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/__init__.py b/indico/MaKaC/plugins/EPayment/bankTransfer/__init__.py
    new file mode 100644
    index 0000000..fda09ff
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21__metadata__ = { 
     22    'type': "EPayment", 
     23    'name': "BankTransfer" 
     24    } 
     25 
     26MODULE_ID = 'banktransfer' 
     27 
     28modules = {} 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/epayment.py

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/epayment.py b/indico/MaKaC/plugins/EPayment/bankTransfer/epayment.py
    new file mode 100644
    index 0000000..80fcb42
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21from MaKaC.epayment import BaseEPayMod, BaseTransaction 
     22import MaKaC.webinterface.urlHandlers as urlHandlers 
     23from MaKaC.webinterface.common.tools import strip_ml_tags 
     24 
     25 
     26from MaKaC.plugins.EPayment.bankTransfer.webinterface import urlHandlers as localUrlHandlers 
     27from MaKaC.plugins.EPayment.bankTransfer import MODULE_ID 
     28 
     29class BankTransferMod(BaseEPayMod): 
     30    _accountBank = "" 
     31    _accountBLZ = "" 
     32    _accountNumber = "" 
     33    _accountIBAN = "" 
     34    _accountSwift = "" 
     35 
     36    def __init__(self, data=None): 
     37        BaseEPayMod.__init__(self) 
     38        self._title = "bank transfer" 
     39        self._detailPayment= "" 
     40        self._accountBank = "" 
     41        self._accountBLZ = "" 
     42        self._accountNumber = "" 
     43        self._accountIBAN = "" 
     44        self._accountSwift = "" 
     45        self._pknumber = "" 
     46        if data is not None: 
     47            self.setValues(data) 
     48        self._id="banktransfer" 
     49 
     50    def getId(self): 
     51        try: 
     52            if self._id: 
     53                pass 
     54        except AttributeError, e: 
     55            self._id="banktransfer" 
     56        return self._id 
     57 
     58    def clone(self, newSessions): 
     59        sesf = BankTransferMod() 
     60        sesf.setTitle(self.getTitle()) 
     61 
     62 
     63        return sesf 
     64 
     65    def setValues(self, data): 
     66        try: 
     67            self.setTitle(data.get("title", "epayment")) 
     68            self.setdetailPayment(data.get("detailPayment", "")) 
     69            self.setAccountBank(data.get("accountBank","")) 
     70            self.setAccountBLZ(data.get("accountBLZ","")) 
     71            self.setAccountNumber(data.get("accountNumber","")) 
     72            self.setAccountIBAN(data.get("accountIBAN","")) 
     73            self.setAccountSwift(data.get("accountSwift","")) 
     74            self.setPKNumber(data.get("pknumber","")) 
     75        except: 
     76            pass 
     77 
     78    def getPaymentDetails(self): 
     79 
     80        txt="""<td align="right"><b>account bank</b></td> 
     81        <td align="left">%s</td> 
     82    </tr> 
     83    <tr> 
     84        <td align="right"><b>account BLZ</b></td> 
     85        <td align="left">%s</td> 
     86    </tr> 
     87    <tr> 
     88        <td align="right"><b>account Number</b></td> 
     89        <td align="left">%s</td> 
     90    </tr> 
     91    <tr> 
     92        <td align="right"><b>account IBAN</b></td> 
     93        <td align="left">%s</td> 
     94    </tr> 
     95    <tr> 
     96        <td align="right"><b>account SWIFT</b></td> 
     97        <td align="left">%s</td> 
     98    </tr> 
     99        <tr> 
     100            <td align="right"><b>Subject</b></td> 
     101            <td align="left">PK-Nr %s ID </td> 
     102        </tr> 
     103 
     104                        </table>"""%( 
     105                             self.getAccountBank(), 
     106                             self.getAccountBLZ(), 
     107                             self.getAccountNumber(), 
     108                             self.getAccountIBAN(), 
     109                             self.getAccountSwift(), 
     110                             self.getPKNumber()) 
     111#        txt="""\tBank: %s\n 
     112#\tBLZ: %s\n 
     113#\tAccount: %s\n 
     114#\tIBAN: %s\n 
     115#\tSWIFT: %s\n 
     116#\tSubject: PK-Nr %s  ID \n 
     117#"""%( 
     118#                             self.getAccountBank(), 
     119#                             self.getAccountBLZ(), 
     120#                             self.getAccountNumber(), 
     121#                             self.getAccountIBAN(), 
     122#                             self.getAccountSwift(), 
     123#                             self.getPKNumber()) 
     124# 
     125#        raise Exception("test") 
     126        return txt 
     127    def getdetailPayment(self): 
     128        return self._detailPayment 
     129    def setdetailPayment(self, detailPayment): 
     130        self._detailPayment= detailPayment 
     131 
     132    def getAccountBank(self): 
     133        return self._accountBank 
     134    def setAccountBank(self, accountBank): 
     135        self._accountBank = accountBank 
     136    def getAccountBLZ(self): 
     137        return self._accountBLZ 
     138    def setAccountBLZ(self, accountBLZ): 
     139        self._accountBLZ = accountBLZ 
     140    def getAccountNumber(self): 
     141        return self._accountNumber 
     142    def setAccountNumber(self, accountNumber): 
     143        self._accountNumber = accountNumber 
     144    def getAccountIBAN(self): 
     145        return self._accountIBAN 
     146    def setAccountIBAN(self, accountIBAN): 
     147        self._accountIBAN = accountIBAN 
     148    def getAccountSwift(self): 
     149        return self._accountSwift 
     150    def setAccountSwift(self, accountSwift): 
     151        self._accountSwift = accountSwift 
     152 
     153    def getPKNumber(self): 
     154        return self._pknumber 
     155    def setPKNumber(self, pknumber): 
     156        self._pknumber = pknumber 
     157 
     158 
     159    def getTitle(self): 
     160        return self._title 
     161    def setTitle(self, title): 
     162        self._title = title 
     163 
     164    def getUrl(self, registrant): 
     165        return localUrlHandlers.UHPayConfirmBankTransfer.getURL(registrant) 
     166 
     167    def getFormHTML(self,prix,Currency,conf,registrant,lang = "en_GB", secure=False): 
     168        url_return=localUrlHandlers.UHPayConfirmBankTransfer.getURL(registrant) 
     169        url_cancel_return=localUrlHandlers.UHPayCancelBankTransfer.getURL(registrant) 
     170        url_notify=localUrlHandlers.UHPayParamsBankTransfer.getURL(registrant) 
     171        s=""" <form action="%s" method="POST" id="%s"> 
     172                        <input type="hidden" name="cmd" value="_xclick"> 
     173                        <input type="hidden" name="item_name" value="%s"> 
     174                        <input type="hidden" name="amount" value="%s"> 
     175                        <INPUT TYPE="hidden" NAME="currency_code" value="%s"> 
     176                        <input type="hidden" name="charset" value="utf-8"> 
     177                        <input type="hidden" name="return" value="%s"> 
     178                        <input type="hidden" name="cancel_return" value="%s"> 
     179                        <input type="hidden" name="notify_url" value="%s"> 
     180                   </form> 
     181                       """%(self.getUrl(registrant), self.getId(), "%s: registration for %s"%(registrant.getFullName(),strip_ml_tags(conf.getTitle())),prix,Currency,\ 
     182                            url_return,url_cancel_return,url_notify) 
     183        #s=cgi.escape(s) 
     184        return s 
     185 
     186    def getConfModifEPaymentURL(self, conf): 
     187        return localUrlHandlers.UHConfModifEPaymentBankTransfer.getURL(conf) 
     188 
     189 
     190 
     191class TransactionBankTransferMod(BaseTransaction): 
     192 
     193    def __init__(self,parms): 
     194        BaseTransaction.__init__(self) 
     195        self._Data=parms 
     196 
     197    def isChangeable(self): return True 
     198 
     199    def getId(self): 
     200        try: 
     201            if self._id: 
     202                pass 
     203        except AttributeError, e: 
     204            self._id="banktransfer" 
     205        return self._id 
     206 
     207    def getTransactionHTML(self): 
     208        payMod = getPayMod() 
     209        return"""<table> 
     210                          <tr> 
     211                            <td align="right"><b>Payment with:</b></td> 
     212                            <td align="left">Bank transfer</td> 
     213                          </tr> 
     214                          <tr> 
     215                            <td align="right"><b>OrderTotal:</b></td> 
     216                            <td align="left">%s %s</td> 
     217                          </tr> 
     218                          <tr><td>%s</td></tr> 
     219                        </table>%s"""%(self._Data["OrderTotal"], \ 
     220                             self._Data["Currency"], self._Data["payer_id"],payMod.getdetailPayment()) 
     221 
     222 
     223class TransactionBankTransfer(BaseTransaction): 
     224 
     225    def __init__(self,parms): 
     226        BaseTransaction.__init__(self) 
     227        self._Data=parms 
     228 
     229 
     230    def getId(self): 
     231        try: 
     232            if self._id: 
     233                pass 
     234        except AttributeError, e: 
     235            self._id="banktransfer" 
     236        return self._id 
     237 
     238    def getTransactionHTML(self): 
     239        payMod = getPayMod() 
     240        return"""<table> 
     241                          <tr> 
     242                            <td align="right"><b>Payment with:</b></td> 
     243                            <td align="left">Bank transfer</td> 
     244                          </tr> 
     245                          <tr> 
     246                            <td align="right"><b>Payment Date:</b></td> 
     247                            <td align="left">%s</td> 
     248                          </tr> 
     249                          <tr> 
     250                            <td align="right"><b>Payment ID:</b></td> 
     251                            <td align="left">%s</td> 
     252                          </tr> 
     253                          <tr> 
     254                            <td align="right"><b>Order Total:</b></td> 
     255                            <td align="left">%s %s</td> 
     256                          </tr> 
     257                          <tr> 
     258                            <td align="right"><b>verify sign:</b></td> 
     259                            <td align="left">%s</td> 
     260                          </tr> 
     261                              <tr> 
     262        <td align="right"><b>account bank</b></td> 
     263        <td align="left">%s</td> 
     264    </tr> 
     265    <tr> 
     266        <td align="right"><b>account BLZ</b></td> 
     267        <td align="left">%s</td> 
     268    </tr> 
     269    <tr> 
     270        <td align="right"><b>account Number</b></td> 
     271        <td align="left">%s</td> 
     272    </tr> 
     273    <tr> 
     274        <td align="right"><b>account IBAN</b></td> 
     275        <td align="left">%s</td> 
     276    </tr> 
     277    <tr> 
     278        <td align="right"><b>account SWIFT</b></td> 
     279        <td align="left">%s</td> 
     280    </tr> 
     281        <tr> 
     282            <td align="right"><b>Subject</b></td> 
     283            <td align="left">PK-Nr %s ID %s</td> 
     284        </tr> 
     285 
     286                        </table>"""%("",self._Data["payer_id"], self._Data["mc_gross"], \ 
     287                             self._Data["mc_currency"], self._Data["verify_sign"], 
     288                             payMod.getAccountBank(), 
     289                             payMod.getAccountBLZ(), 
     290                             payMod.getAccountNumber(), 
     291                             payMod.getAccountIBAN(), 
     292                             payMod.getAccountSwift(), 
     293                             payMod.getPKNumber(), self._Data["payer_id"]) 
     294 
     295    def getTransactionTxt(self): 
     296        payMod=getPayMod() 
     297 
     298 
     299        return""" 
     300\tPayment with:BankTransfer\n 
     301\tPayment Date:%s\n 
     302\tPayment ID:%s\n 
     303\tOrder Total:%s %s\n 
     304\tverify sign:%s\n 
     305\n 
     306\tBank: %s\n 
     307\tBLZ: %s\n 
     308\tAccount: %s\n 
     309\tIBAN: %s\n 
     310\tSWIFT: %s\n 
     311\tSubject: PK-Nr %s  ID %s\n 
     312"""%("",self._Data["payer_id"], self._Data["mc_gross"], \ 
     313                             self._Data["mc_currency"], self._Data["verify_sign"], 
     314                             payMod.getAccountBank(), 
     315                             payMod.getAccountBLZ(), 
     316                             payMod.getAccountNumber(), 
     317                             payMod.getAccountIBAN(), 
     318                             payMod.getAccountSwift(), 
     319                             payMod.getPKNumber(), self._Data["payer_id"]) 
     320 
     321 
     322 
     323def getPayMod(): 
     324    return BankTransferMod() 
     325 
     326def getPayModClass(): 
     327    return BankTransferMod 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/tpls/CancelEPaymentBankTransfer.tpl

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/tpls/CancelEPaymentBankTransfer.tpl b/indico/MaKaC/plugins/EPayment/bankTransfer/tpls/CancelEPaymentBankTransfer.tpl
    new file mode 100644
    index 0000000..69f1221
    - +  
     1    <table width="60%" align="center" border="0" style="border: 1px solid #777777"> 
     2        <tr> 
     3            <td class="groupTitle" colspan="2" style="text-align:center; background:#E5E5E5; color:gray">${ message }</td> 
     4        </tr> 
     5        <tr> 
     6            <td align="center" colspan="2" bgcolor="white" style="padding-bottom:10px">${ messagedetailPayment }</td> 
     7        </tr> 
     8    </table> 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/tpls/ConfModifEPaymentBankTransfer.tpl

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/tpls/ConfModifEPaymentBankTransfer.tpl b/indico/MaKaC/plugins/EPayment/bankTransfer/tpls/ConfModifEPaymentBankTransfer.tpl
    new file mode 100644
    index 0000000..e57a60a
    - +  
     1<table width="90%" align="left" border="0"> 
     2    <tr> 
     3        <td class="dataCaptionTD"><span class="dataCaptionFormat">Title</span></td> 
     4        <td bgcolor="white" width="100%" class="blacktext">${ title }</td> 
     5        <form action=${ dataModificationURL } method="POST"> 
     6        <td rowspan="3" valign="bottom" align="right"> 
     7            <input type="submit" value="modify"> 
     8        </td> 
     9        </form> 
     10    </tr> 
     11    <tr> 
     12        <td class="dataCaptionTD"><span class="dataCaptionFormat">account bank</span></td> 
     13        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountBank }</pre></td> 
     14    </tr> 
     15    <tr> 
     16        <td class="dataCaptionTD"><span class="dataCaptionFormat">account BLZ</span></td> 
     17        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountBLZ }</pre></td> 
     18    </tr> 
     19    <tr> 
     20        <td class="dataCaptionTD"><span class="dataCaptionFormat">account Number</span></td> 
     21        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountNumber }</pre></td> 
     22    </tr> 
     23    <tr> 
     24        <td class="dataCaptionTD"><span class="dataCaptionFormat">account IBAN</span></td> 
     25        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountIBAN }</pre></td> 
     26    </tr> 
     27    <tr> 
     28        <td class="dataCaptionTD"><span class="dataCaptionFormat">account SWIFT</span></td> 
     29        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountSwift }</pre></td> 
     30    </tr> 
     31    <tr> 
     32        <td class="dataCaptionTD"><span class="dataCaptionFormat">PK-Number</span></td> 
     33        <td bgcolor="white" width="100%" class="blacktext"><pre>${ pknumber }</pre></td> 
     34    </tr> 
     35    <tr><td>&nbsp;</td></tr> 
     36</table> 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/tpls/ConfModifEPaymentBankTransferDataModif.tpl

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/tpls/ConfModifEPaymentBankTransferDataModif.tpl b/indico/MaKaC/plugins/EPayment/bankTransfer/tpls/ConfModifEPaymentBankTransferDataModif.tpl
    new file mode 100644
    index 0000000..7836244
    - +  
     1<form action=${ postURL } method="POST"> 
     2    <table width="80%" align="center" border="0" style="border-left: 1px solid #777777"> 
     3        <tr> 
     4            <td class="groupTitle" colspan="2">Configuration of Bank transfer</td> 
     5        </tr> 
     6        <tr> 
     7            <td nowrap class="dataCaptionTD"><span class="titleCellFormat">Title</span></td> 
     8            <td align="left"><input type="text" name="title" size="60" value="${ title }"></td> 
     9        </tr> 
     10        <tr> 
     11            <td class="dataCaptionTD"><span class="dataCaptionFormat"> Bank</span></td> 
     12            <td align="left"><input type="text" name="accountBank" size="90" value="${ accountBank }"></td> 
     13        </tr> 
     14        <tr> 
     15            <td class="dataCaptionTD"><span class="dataCaptionFormat"> BLZ</span></td> 
     16            <td align="left"><input type="text" name="accountBLZ" size="90" value="${ accountBLZ }"></td> 
     17        </tr> 
     18        <tr> 
     19            <td class="dataCaptionTD"><span class="dataCaptionFormat">Account Number</span></td> 
     20            <td align="left"><input type="text" name="accountNumber" size="90" value="${ accountNumber }"></td> 
     21        </tr> 
     22        <tr> 
     23            <td class="dataCaptionTD"><span class="dataCaptionFormat"> IBAN</span></td> 
     24            <td align="left"><input type="text" name="accountIBAN" size="90" value="${ accountIBAN }"></td> 
     25        </tr> 
     26        <tr> 
     27            <td class="dataCaptionTD"><span class="dataCaptionFormat"> Swift</span></td> 
     28            <td align="left"><input type="text" name="accountSwift" size="90" value="${ accountSwift }"></td> 
     29        </tr> 
     30        <tr> 
     31            <td class="dataCaptionTD"><span class="dataCaptionFormat">PK-Number</span></td> 
     32            <td align="left"><input type="text" name="pknumber" size="60" value="${ pknumber }"></td> 
     33        </tr> 
     34        <tr><td>&nbsp;</td></tr> 
     35        <tr> 
     36            <td colspan="2" align="left"><input type="submit" value="OK">&nbsp;<input type="submit" value="cancel" name="cancel"></td> 
     37        </tr> 
     38    </table> 
     39</form> 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/tpls/confirmEPaymentBankTransfer.tpl

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/tpls/confirmEPaymentBankTransfer.tpl b/indico/MaKaC/plugins/EPayment/bankTransfer/tpls/confirmEPaymentBankTransfer.tpl
    new file mode 100644
    index 0000000..695c200
    - +  
     1 
     2    <table width="60%" align="center" border="0" style="border: 1px solid #777777"> 
     3        <tr> 
     4            <td class="groupTitle" colspan="2" style="text-align:center; background:#E5E5E5; color:gray">${ message }</td> 
     5        </tr> 
     6    <tr> 
     7        <td class="dataCaptionTD"><span class="dataCaptionFormat">Bank</span></td> 
     8        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountBank }</pre></td> 
     9    </tr> 
     10    <tr> 
     11        <td class="dataCaptionTD"><span class="dataCaptionFormat">BLZ</span></td> 
     12        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountBLZ }</pre></td> 
     13    </tr> 
     14    <tr> 
     15        <td class="dataCaptionTD"><span class="dataCaptionFormat">Number</span></td> 
     16        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountNumber }</pre></td> 
     17    </tr> 
     18    <tr> 
     19        <td class="dataCaptionTD"><span class="dataCaptionFormat">IBAN</span></td> 
     20        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountIBAN }</pre></td> 
     21    </tr> 
     22    <tr> 
     23        <td class="dataCaptionTD"><span class="dataCaptionFormat">SWIFT</span></td> 
     24        <td bgcolor="white" width="100%" class="blacktext"><pre>${ accountSwift }</pre></td> 
     25    </tr> 
     26        <tr> 
     27            <td class="dataCaptionTD"> <span class="dataCaptionFormat">Subject</span></td> 
     28            <td bgcolor="white" width="100%" class="blacktext"><pre>PK-Nr ${ pknumber} ID ${ id }</pre></td> 
     29        </tr> 
     30        <tr> 
     31            <td align="center" colspan="2" bgcolor="white" style="padding-bottom:10px">${ trinfo }</td> 
     32        </tr> 
     33    </table> 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/__init__.py

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/__init__.py b/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/__init__.py
    new file mode 100644
    index 0000000..46ad351
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21modules = {} 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/pages/__init__.py

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/pages/__init__.py b/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/pages/__init__.py
    new file mode 100644
    index 0000000..46ad351
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21modules = {} 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/pages/ePayments.py

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/pages/ePayments.py b/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/pages/ePayments.py
    new file mode 100644
    index 0000000..1f6559d
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21import MaKaC.webinterface.pages.conferences as conferences 
     22import MaKaC.webinterface.pages.registrationForm as registrationForm 
     23from MaKaC.webinterface import wcomponents 
     24from xml.sax.saxutils import quoteattr 
     25from MaKaC.common import Configuration 
     26from MaKaC.webinterface import urlHandlers 
     27import MaKaC 
     28from MaKaC.i18n import _ 
     29 
     30 
     31from MaKaC.plugins.EPayment.bankTransfer import MODULE_ID 
     32from MaKaC.plugins.EPayment.bankTransfer.webinterface.wcomponents import WTemplated 
     33from MaKaC.plugins.EPayment.bankTransfer.webinterface import urlHandlers as localUrlHandlers 
     34 
     35 
     36 
     37class WPConfModifEPaymentBankTransferBase(registrationForm.WPConfModifRegFormBase): 
     38 
     39    def _createTabCtrl( self ): 
     40        self._tabCtrl = wcomponents.TabControl() 
     41        self._tabMain = self._tabCtrl.newTab( "main", _("Main"), \ 
     42                localUrlHandlers.UHConfModifEPaymentBankTransfer.getURL( self._conf ) ) 
     43        wf = self._rh.getWebFactory() 
     44        if wf: 
     45            wf.customiseTabCtrl( self._tabCtrl ) 
     46        self._setActiveTab() 
     47 
     48    def _setActiveTab( self ): 
     49        pass 
     50 
     51    def _setActiveSideMenuItem(self): 
     52        self._regFormMenuItem.setActive(True) 
     53 
     54    def _getPageContent( self, params ): 
     55        self._createTabCtrl() 
     56        banner = wcomponents.WEpaymentBannerModif(self._conf.getModPay().getPayModByTag(MODULE_ID), self._conf).getHTML() 
     57        html = wcomponents.WTabControl( self._tabCtrl, self._getAW() ).getHTML( self._getTabContent( params ) ) 
     58        return banner+html 
     59 
     60    def _getTabContent( self, params ): 
     61        return "nothing" 
     62 
     63class WPConfModifEPaymentBankTransfer( WPConfModifEPaymentBankTransferBase ): 
     64 
     65    def _getTabContent( self, params ): 
     66        wc = WConfModifEPaymentBankTransfer(self._conf) 
     67        p = { 
     68             'dataModificationURL': quoteattr(str(localUrlHandlers.UHConfModifEPaymentBankTransferDataModif.getURL( self._conf ))) 
     69            } 
     70        return wc.getHTML(p) 
     71 
     72class WConfModifEPaymentBankTransfer( WTemplated ): 
     73 
     74    def __init__( self, conference ): 
     75        self._conf = conference 
     76 
     77    def getVars( self ): 
     78        vars = WTemplated.getVars(self) 
     79        modBankTransfer = self._conf.getModPay().getPayModByTag(MODULE_ID) 
     80        vars["title"] = modBankTransfer.getTitle() 
     81        vars["accountBank"] = modBankTransfer.getAccountBank() 
     82        vars["accountBLZ"] = modBankTransfer.getAccountBLZ() 
     83        vars["accountNumber"] = modBankTransfer.getAccountNumber() 
     84        vars["accountIBAN"] = modBankTransfer.getAccountIBAN() 
     85        vars["accountSwift"] = modBankTransfer.getAccountSwift() 
     86        vars["pknumber"] =  modBankTransfer.getPKNumber() 
     87        return vars 
     88 
     89class WPConfModifEPaymentBankTransferDataModif( WPConfModifEPaymentBankTransferBase ): 
     90 
     91    def _getTabContent( self, params ): 
     92        wc = WConfModifEPaymentBankTransferDataModif(self._conf) 
     93        p = {'postURL': quoteattr(str(localUrlHandlers.UHConfModifEPaymentBankTransferPerformDataModif.getURL( self._conf ))) 
     94            } 
     95        return wc.getHTML(p) 
     96 
     97class WConfModifEPaymentBankTransferDataModif( WTemplated ): 
     98 
     99    def __init__( self, conference ): 
     100        self._conf = conference 
     101 
     102    def getVars( self ): 
     103        vars = WTemplated.getVars(self) 
     104        modBankTransfer = self._conf.getModPay().getPayModByTag(MODULE_ID) 
     105        vars["title"] = modBankTransfer.getTitle() 
     106        vars["accountBank"] = modBankTransfer.getAccountBank() 
     107        vars["accountBLZ"] = modBankTransfer.getAccountBLZ() 
     108        vars["accountNumber"] = modBankTransfer.getAccountNumber() 
     109        vars["accountIBAN"] = modBankTransfer.getAccountIBAN() 
     110        vars["accountSwift"] = modBankTransfer.getAccountSwift() 
     111        vars["pknumber"] =  modBankTransfer.getPKNumber() 
     112        return vars 
     113 
     114class WPconfirmEPaymentBankTransfer( conferences.WPConferenceDefaultDisplayBase ): 
     115    #navigationEntry = navigation.NERegistrationFormDisplay 
     116 
     117    def __init__(self, rh, conf, reg): 
     118        conferences.WPConferenceDefaultDisplayBase.__init__(self, rh, conf) 
     119        self._registrant=reg 
     120 
     121 
     122    def _getBody( self, params ): 
     123        wc = WconfirmEPaymentBankTransfer(self._conf, self._registrant) 
     124        return wc.getHTML() 
     125 
     126    def _defineSectionMenu( self ): 
     127        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
     128        self._sectionMenu.setCurrentItem(self._regFormOpt) 
     129 
     130 
     131class WconfirmEPaymentBankTransfer( WTemplated ): 
     132    def __init__( self,configuration, registrant): 
     133        self._registrant = registrant 
     134        self._conf = configuration 
     135 
     136    def getVars( self ): 
     137        vars = WTemplated.getVars(self) 
     138        modBankTransfer = self._conf.getModPay().getPayModByTag(MODULE_ID) 
     139        vars["message"] = "Thank you for the payment!<br/> You have choosen payment by BankTransfer<br>"\ 
     140                          "Please see the information below for details." 
     141        vars["accountBank"] = modBankTransfer.getAccountBank() 
     142        vars["accountBLZ"] = modBankTransfer.getAccountBLZ() 
     143        vars["accountNumber"] = modBankTransfer.getAccountNumber() 
     144        vars["accountIBAN"] = modBankTransfer.getAccountIBAN() 
     145        vars["accountSwift"] = modBankTransfer.getAccountSwift() 
     146        vars["pknumber"] = modBankTransfer.getPKNumber() 
     147        vars["id"] = self._registrant.getIdPay() 
     148        vars["trinfo"]="%s:%s"%(self._registrant.getFirstName(),self._registrant.getSurName()) 
     149        return vars 
     150 
     151class WPCancelEPaymentBankTransfer( conferences.WPConferenceDefaultDisplayBase ): 
     152    #navigationEntry = navigation.NERegistrationFormDisplay 
     153 
     154    def __init__(self, rh, conf, reg): 
     155        conferences.WPConferenceDefaultDisplayBase.__init__(self, rh, conf) 
     156        self._registrant=reg 
     157 
     158    def _getBody( self, params ): 
     159        wc = WCancelEPaymentBankTransfer( self._conf,self._registrant ) 
     160        return wc.getHTML() 
     161 
     162    def _defineSectionMenu( self ): 
     163        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
     164        self._sectionMenu.setCurrentItem(self._regFormOpt) 
     165 
     166class WCancelEPaymentBankTransfer( WTemplated ): 
     167    def __init__( self, conference,reg ): 
     168        self._conf = conference 
     169        self._registrant=reg 
     170 
     171    def getVars( self ): 
     172        vars = WTemplated.getVars(self) 
     173        vars["message"] = "You have cancelled your transaction.\nPlease check your email in order to complete your BankTransfer transaction." 
     174        vars["messagedetailPayment"]="%s:%s"%(self._registrant.getFirstName(),self._registrant.getSurName()) 
     175        return vars 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/rh/__init__.py

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/rh/__init__.py b/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/rh/__init__.py
    new file mode 100644
    index 0000000..1fe3d4d
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21modules = {} 
     22 
     23 
     24 
     25def getRHByTag(self, tag): 
     26    """Do the link between url handlers and request handlers""" 
     27    for mod in self.modules.values(): 
     28        for RH in mod.__dict__.keys(): 
     29            try: 
     30                if mod.__dict__[RH]._requestTag == tag: 
     31                    return mod.__dict__[RH] 
     32            except: 
     33                pass 
     34 
     35 
     36def preprocessParams(params): 
     37    return True 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/rh/ePaymentModif.py

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/rh/ePaymentModif.py b/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/rh/ePaymentModif.py
    new file mode 100644
    index 0000000..ba8ee9e
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21from MaKaC.webinterface.rh.ePaymentModif import RHEPaymentModifBase, RHConferenceBaseDisplay, RHRegistrationFormDisplayBase 
     22import MaKaC.webinterface.urlHandlers as urlHandlers 
     23from datetime import datetime 
     24from MaKaC.common.timezoneUtils import nowutc 
     25 
     26 
     27from MaKaC.plugins.EPayment.bankTransfer.webinterface.pages import ePayments 
     28from MaKaC.plugins.EPayment.bankTransfer.webinterface import urlHandlers as localUrlHandlers 
     29from MaKaC.plugins.EPayment.bankTransfer import epayment as ePayment 
     30from MaKaC.plugins.EPayment.bankTransfer import MODULE_ID 
     31 
     32 
     33class RHEPaymentmodifBankTransfer( RHEPaymentModifBase ): 
     34    _requestTag = "modifBankTransfer" 
     35 
     36    def _process( self ): 
     37        p = ePayments.WPConfModifEPaymentBankTransfer( self, self._conf ) 
     38        return p.display() 
     39 
     40class RHEPaymentmodifBankTransferDataModif( RHEPaymentModifBase ): 
     41    _requestTag = "modifBankTransferData" 
     42 
     43    def _process( self ): 
     44        p = ePayments.WPConfModifEPaymentBankTransferDataModif( self, self._conf ) 
     45        return p.display() 
     46 
     47class RHEPaymentmodifBankTransferPerformDataModif( RHEPaymentModifBase ): 
     48    _requestTag = "modifBankTransferPerformDataModif" 
     49 
     50    def _checkParams( self, params ): 
     51        RHEPaymentModifBase._checkParams( self, params ) 
     52        self._params=params 
     53        self._cancel = params.has_key("cancel") 
     54 
     55    def _process( self ): 
     56        if not self._cancel: 
     57            ses = self._conf.getModPay().getPayModByTag(MODULE_ID) 
     58            ses.setValues(self._params) 
     59        self._redirect(localUrlHandlers.UHConfModifEPaymentBankTransfer.getURL(self._conf)) 
     60 
     61 
     62 
     63 
     64class RHEPaymentconfirmBankTransfer( RHRegistrationFormDisplayBase ): 
     65    _requestTag = "confirm" 
     66 
     67    def _checkParams( self, params ): 
     68        RHRegistrationFormDisplayBase._checkParams( self, params ) 
     69        self._registrant=None 
     70        regId= params.get("registrantId","") 
     71        if regId is not None: 
     72            self._registrant=self._conf.getRegistrantById(regId) 
     73 
     74    def _processIfActive( self ): 
     75        if self._registrant is not None: 
     76            p = ePayments.WPconfirmEPaymentBankTransfer( self,self._conf,self._registrant) 
     77            return p.display() 
     78 
     79class RHEPaymentCancelBankTransfer( RHRegistrationFormDisplayBase ): 
     80    _requestTag = "cancel" 
     81 
     82    def _checkParams( self, params ): 
     83        RHRegistrationFormDisplayBase._checkParams( self, params ) 
     84        self._registrant=None 
     85        regId=params.get("registrantId","") 
     86        if regId is not None: 
     87            self._registrant=self._conf.getRegistrantById(regId) 
     88 
     89    def _processIfActive( self ): 
     90        if self._registrant is not None: 
     91            p = ePayments.WPCancelEPaymentBankTransfer( self,self._conf ,self._registrant) 
     92            return p.display() 
     93 
     94 
     95class RHEPaymentValideParamBankTransfer( RHConferenceBaseDisplay ): 
     96    _requestTag = "params" 
     97 
     98    def _checkParams( self, params ): 
     99        RHConferenceBaseDisplay._checkParams(self, params) 
     100        self._regForm = self._conf.getRegistrationForm() 
     101        self._params=params 
     102        self._registrant=None 
     103        regId=params.get("registrantId","") 
     104        if regId is not None: 
     105            self._registrant=self._conf.getRegistrantById(regId) 
     106 
     107    def _checkProtection(self): 
     108        # Just bypass everything else, as we want the payment service 
     109        # to acknowledge the payment 
     110        pass 
     111 
     112    def _process( self ): 
     113        regForm = self._conf.getRegistrationForm() 
     114        if not regForm.isActivated() or not self._conf.hasEnabledSection("regForm"): 
     115            p = registrationForm.WPRegFormInactive( self, self._conf ) 
     116            return p.display() 
     117        else: 
     118            if self._registrant is not None: 
     119                #self._registrant.setPayed(True) 
     120                d={} 
     121                #d["payment_date"]=nowutc() 
     122                d["payer_id"]=self._params.get("payer_id") 
     123                d["mc_currency"]=self._params.get("mc_currency") 
     124                d["mc_gross"]=self._params.get("mc_gross") 
     125                d["verify_sign"]=self._params.get("verify_sign") 
     126                tr=ePayment.TransactionBankTransfer(d) 
     127                self._registrant.setTransactionInfo(tr) 
     128                self._regForm.getNotification().sendEmailNewRegistrantConfirmPay(self._regForm,self._registrant ) 
     129 
     130 
     131 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/urlHandlers.py

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/urlHandlers.py b/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/urlHandlers.py
    new file mode 100644
    index 0000000..1587769
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21from MaKaC.webinterface.urlHandlers import URLHandler as MainURLHandler 
     22from MaKaC.plugins.EPayment import bankTransfer 
     23 
     24class EPURLHandler(MainURLHandler): 
     25 
     26    _requestTag = "" 
     27 
     28    def getURL(cls, target=None): 
     29        """Gives the full URL for the corresponding request handler. In case 
     30            the target parameter is specified it will append to the URL the 
     31            the necessary parameters to make the target be specified in the url. 
     32 
     33            Parameters: 
     34                target - (Locable) Target object which must be uniquely 
     35                    specified in the URL so the destination request handler 
     36                    is able to retrieve it. 
     37        """ 
     38        #url = MainURLHandler.getURL(target) 
     39        url = cls._getURL() 
     40        if target is not None: 
     41            url.setParams(target.getLocator()) 
     42        url.addParam("EPaymentName", bankTransfer.MODULE_ID) 
     43        url.addParam("requestTag", cls._requestTag) 
     44        return url 
     45    getURL = classmethod(getURL) 
     46 
     47class UHConfModifEPayment(EPURLHandler): 
     48    _relativeURL = "confModifEpayment.py/modifModule" 
     49 
     50class UHConfModifEPaymentBankTransfer(UHConfModifEPayment): 
     51    _requestTag = "modifBankTransfer" 
     52class UHConfModifEPaymentBankTransferDataModif(UHConfModifEPayment): 
     53    _requestTag = "modifBankTransferData" 
     54class UHConfModifEPaymentBankTransferPerformDataModif(UHConfModifEPayment): 
     55    _requestTag = "modifBankTransferPerformDataModif" 
     56 
     57 
     58class UHPay(EPURLHandler): 
     59    _relativeURL = "payment.py" 
     60 
     61class UHPayConfirmBankTransfer(UHPay): 
     62    _requestTag = "confirm" 
     63class UHPayCancelBankTransfer(UHPay): 
     64    _requestTag = "cancel" 
     65class UHPayParamsBankTransfer(UHPay): 
     66    _requestTag = "params" 
  • new file indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/wcomponents.py

    diff --git a/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/wcomponents.py b/indico/MaKaC/plugins/EPayment/bankTransfer/webinterface/wcomponents.py
    new file mode 100644
    index 0000000..d28122c
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21from MaKaC.webinterface import wcomponents 
     22import os 
     23import MaKaC.common.Configuration as Configuration 
     24 
     25from MaKaC.plugins.EPayment import bankTransfer 
     26 
     27class WTemplated(wcomponents.WTemplated): 
     28 
     29    def _setTPLFile(self): 
     30        """Sets the TPL (template) file for the object. It will try to get 
     31            from the configuration if there's a special TPL file for it and 
     32            if not it will look for a file called as the class name+".tpl" 
     33            in the configured TPL directory. 
     34        """ 
     35        cfg = Configuration.Config.getInstance() 
     36 
     37        dir = os.path.join(bankTransfer.__path__[0], "tpls") 
     38        file = cfg.getTPLFile( self.tplId ) 
     39        if file == "": 
     40            file = "%s.tpl"%self.tplId 
     41        self.tplFile = os.path.join(dir, file) 
     42 
     43        hfile = self._getSpecificTPL(os.path.join(dir,'chelp'), 
     44                                     self.tplId, 
     45                                     extension='wohl') 
     46 
     47        self.helpFile = os.path.join(dir,'chelp',hfile) 
  • new file indico/htdocs/bankTransfer.py

    diff --git a/indico/htdocs/bankTransfer.py b/indico/htdocs/bankTransfer.py
    new file mode 100644
    index 0000000..1714862
    - +  
     1# -*- coding: utf-8 -*- 
     2## 
     3## 
     4## This file is part of CDS Indico. 
     5## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. 
     6## 
     7## CDS Indico is free software; you can redistribute it and/or 
     8## modify it under the terms of the GNU General Public License as 
     9## published by the Free Software Foundation; either version 2 of the 
     10## License, or (at your option) any later version. 
     11## 
     12## CDS Indico is distributed in the hope that it will be useful, but 
     13## WITHOUT ANY WARRANTY; without even the implied warranty of 
     14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
     15## General Public License for more details. 
     16## 
     17## You should have received a copy of the GNU General Public License 
     18## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
     19## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
     20 
     21import MaKaC.webinterface.rh.ePaymentModif as ePaymentModif 
     22def confirm(req, **params): 
     23    return ePaymentModif.RHEPaymentConfirmBankTransfer( req ).process( params ) 
     24 
     25def cancel(req, **params): 
     26    return ePaymentModif.RHEPaymentCancelBankTransfer ( req ).process( params ) 
  • setup.py

    diff --git a/setup.py b/setup.py
    index 6f738b1..1a3b282 100644
    a b if __name__ == '__main__': 
    545545            EPayment.worldPay = MaKaC.plugins.EPayment.worldPay 
    546546            EPayment.yellowPay = MaKaC.plugins.EPayment.yellowPay 
    547547            EPayment.skipjack = MaKaC.plugins.EPayment.skipjack 
     548            EPayment.bankTransfer = MaKaC.plugins.EPayment.bankTransfer 
    548549 
    549550            importer.invenio = indico.ext.importer.invenio 
    550551            importer.dummy = indico.ext.importer.dummy