Changeset 7875 for main/waeup.kofa/trunk


Ignore:
Timestamp:
14 Mar 2012, 07:52:17 (13 years ago)
Author:
Henrik Bettermann
Message:

Surcharge 1 is portal provider fee.

Show data on goto_interswitch page.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r7871 r7875  
    570570
    571571    surcharge_1 = schema.Int(
    572         title = _(u'Surcharge 1'),
     572        title = _(u'Portal Fee'),
    573573        default = 0,
    574574        )
  • main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py

    r7819 r7875  
    104104
    105105    surcharge_1 = schema.Int(
    106         title = _(u'Surcharge 1'),
     106        title = _(u'Portal Fee'),
    107107        default = 0,
    108108        required = False,
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r7873 r7875  
    11261126    pay_item_id = '5700'
    11271127
     1128    action = 'https://testwebpay.interswitchng.com/test_paydirect/webpay/pay.aspx'
    11281129    site_redirect_url = 'http://localhost?echo='
    11291130    site_name = 'xyz.waeup.org'
    1130     provider_amt = 1000
    11311131    provider_acct = '2345'
    11321132    provider_bank_id = '8'
    1133     provider_item_name = 'Kofa Provider'
     1133    provider_item_name = 'Kofa Provider Fee'
    11341134    institution_acct = '1234'
    11351135    institution_bank_id = '9'
     1136    institution_name = 'Sample University'
    11361137
    11371138    def update(self):
     
    11411142            return
    11421143        xmldict = {}
    1143         student = self.context.getStudent()
     1144        self.student = self.context.getStudent()
    11441145        self.amount = (self.context.amount_auth + self.context.surcharge_1 +
    11451146            self.context.surcharge_2 + self.context.surcharge_3)
    1146         self.txn_ref = xmldict['detail_ref'] = self.context.p_id
    1147         self.cust_id = student.student_id
    1148         self.cust_id_desc = self.context.p_item
    1149         self.pay_item_name = xmldict['institution_item_name'] = self.context.p_category
    1150         self.cust_name = student.display_fullname
    11511147        self.local_date_time = str(self.context.creation_date)
    1152         self.certificate = getattr(student['studycourse'],'certificate',None)
    1153         if self.certificate is not None:
    1154             xmldict['department'] = self.certificate.__parent__.__parent__.code
    1155             xmldict['faculty'] = self.certificate.__parent__.__parent__.__parent__.code
     1148        certificate = getattr(self.student['studycourse'],'certificate',None)
     1149        if certificate is not None:
     1150            xmldict['department'] = certificate.__parent__.__parent__.code
     1151            xmldict['faculty'] = certificate.__parent__.__parent__.__parent__.code
    11561152        else:
    11571153            xmldict['department'] = None
    11581154            xmldict['faculty'] = None
    1159         xmldict['provider_amt'] = self.provider_amt
     1155        xmldict['detail_ref'] = self.context.p_id
     1156        xmldict['provider_amt'] = self.context.surcharge_1
    11601157        xmldict['provider_acct'] = self.provider_acct
    11611158        xmldict['provider_bank_id'] = self.provider_bank_id
    11621159        xmldict['provider_item_name'] = self.provider_item_name
    1163         xmldict['institution_amt'] = self.amount - self.provider_amt
     1160        xmldict['institution_amt'] = self.amount
    11641161        xmldict['institution_acct'] = self.institution_acct
    11651162        xmldict['institution_bank_id'] = self.institution_bank_id
     1163        xmldict['institution_item_name'] = self.context.p_category
     1164        xmldict['institution_name'] = self.institution_name
    11661165        xmltext = """<payment_item_detail>
    1167 <item_details detail_ref="%(detail_ref)s" college="institution" department="%(department)s" faculty="%(faculty)s">
     1166<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    11681167<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
    11691168<item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/goto_interswitch.pt

    r7873 r7875  
    11<form i18n:domain="waeup.kofa"
    2   action="https://testwebpay.interswitchng.com/test_paydirect/webpay/pay.aspx"
    3   method="POST">
     2  tal:attributes="action view/action" method="POST">
     3
     4  <p i18n:translate="">
     5    These data will be submitted to the CollegePAY payment gateway,
     6    please check:
     7  </p>
     8
     9  <table class="form-table" i18n:domain="waeup.kofa">
     10    <thead>
     11    </thead>
     12    <tbody>
     13      <tr>
     14        <td i18n:translate="" class="fieldname">
     15          Total Amount Authorized:</td>
     16        <td>
     17          <span tal:replace="view/amount">AMOUNT</span>
     18        </td>
     19      </tr>
     20      <tr>
     21        <td i18n:translate="" class="fieldname">
     22          Transaction Reference:</td>
     23        <td>
     24          <span tal:replace="view/context/p_id">TXNREF</span>
     25        </td>
     26      </tr>
     27      <tr>
     28        <td i18n:translate="" class="fieldname">
     29          Customer Id:</td>
     30        <td>
     31          <span tal:replace="view/student/student_id">CUSTID</span>
     32        </td>
     33      </tr>
     34      <tr>
     35        <td i18n:translate="" class="fieldname">
     36          Customer Name:</td>
     37        <td>
     38          <span tal:replace="view/student/display_fullname">CUSTNAME</span>
     39        </td>
     40      </tr>
     41      <tr>
     42        <td i18n:translate="" class="fieldname">
     43          Payment Item:</td>
     44        <td>
     45          <span tal:replace="view/context/p_item">PAYMENTITEM</span>
     46        </td>
     47      </tr>
     48      <tr>
     49        <td i18n:translate="" class="fieldname">
     50          Payment Category:</td>
     51        <td>
     52          <span tal:replace="view/context/p_category">PAYMENTCATEGORY</span>
     53        </td>
     54      </tr>
     55    </tbody>
     56  </table>
    457
    558  <input type="hidden" name="product_id" tal:attributes="value view/product_id" />
    6   <input type="hidden" name="amount" tal:attributes="value view/amount" />
    759  <input type="hidden" name="currency" tal:attributes="value view/currency" />
     60  <input type="hidden" name="pay_item_id" tal:attributes="value view/pay_item_id" />
    861  <input type="hidden" name="site_redirect_url" tal:attributes="value view/site_redirect_url" />
    962  <input type="hidden" name="site_name" tal:attributes="value view/site_name" />
    10   <input type="hidden" name="txn_ref" tal:attributes="value view/txn_ref" />
    11   <input type="hidden" name="cust_id" tal:attributes="value view/cust_id" />
    12   <input type="hidden" name="cust_name" tal:attributes="value view/cust_name" />
    13   <input type="hidden" name="cust_id_desc" tal:attributes="value view/cust_id_desc" />
    14   <input type="hidden" name="pay_item_id" tal:attributes="value view/pay_item_id" />
    15   <input type="hidden" name="pay_item_name" tal:attributes="value view/pay_item_name" />
    1663  <input type="hidden" name="local_date_time" tal:attributes="value view/local_date_time" />
     64  <input type="hidden" name="amount" tal:attributes="value view/amount" />
     65
     66  <input type="hidden" name="txn_ref" tal:attributes="value view/context/p_id" />
     67  <input type="hidden" name="cust_id_desc" tal:attributes="value view/context/p_item" />
     68  <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_category" />
     69
     70  <input type="hidden" name="cust_id" tal:attributes="value view/student/student_id" />
     71  <input type="hidden" name="cust_name" tal:attributes="value view/student/display_fullname" />
     72
     73
    1774  <input type="hidden" name="payment_params" value="college_split" />
    1875  <span tal:replace="structure view/xml_data"></span>
     76
    1977  <input type="submit" class="btn" tal:attributes="value view/submit_button"/>
     78
    2079</form>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r7843 r7875  
    214214            d['p_item'] = student['studycourse'].certificate.code
    215215            d['amount'] = academic_session.clearance_fee
     216            d['surcharge_1'] = 0 # no portal fee
    216217        elif category == 'bed_allocation':
    217218            d['p_item'] = self.getAccommodationDetails(student)['bt']
    218219            d['amount'] = academic_session.booking_fee
     220            d['surcharge_1'] = 0 # no portal fee
    219221        return d
    220222
Note: See TracChangeset for help on using the changeset viewer.