Ignore:
Timestamp:
26 Apr 2012, 07:16:27 (13 years ago)
Author:
Henrik Bettermann
Message:

Send local time of creation to Interswitch not UTC.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/interswitch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py

    r8276 r8281  
    2121from xml.dom.minidom import parseString
    2222import grok
     23from zope.component import getUtility
    2324from waeup.kofa.browser.layout import KofaPage, UtilityView
    2425from waeup.kofa.accesscodes import create_accesscode
    25 from waeup.kofa.interfaces import RETURNING
     26from waeup.kofa.interfaces import RETURNING, IKofaUtils
     27from waeup.kofa.utils.helpers import to_timezone
    2628from waeup.kofa.students.browser import write_log_message
    2729from waeup.kofa.students.viewlets import RequestCallbackActionButton as RCABStudent
     
    238240        self.category = payment_categories.getTermByToken(
    239241            self.context.p_category).title
    240         self.local_date_time = str(self.context.creation_date)
     242        tz = getUtility(IKofaUtils).tzinfo
     243        self.local_date_time = to_timezone(
     244            self.context.creation_date, tz).strftime("%Y-%m-%d %H:%M:%S %Z")
    241245        self.site_redirect_url = self.url(self.context, 'request_webservice')
    242246        # Provider data
     
    324328        self.category = payment_categories.getTermByToken(
    325329            self.context.p_category).title
    326         self.local_date_time = str(self.context.creation_date)
     330        tz = getUtility(IKofaUtils).tzinfo
     331        self.local_date_time = to_timezone(
     332            self.context.creation_date, tz).strftime("%Y-%m-%d %H:%M:%S %Z")
    327333        self.site_redirect_url = self.url(self.context, 'request_webservice')
    328334        # Provider data
     
    334340        # Institution data
    335341        xmldict['institution_amt'] = 100 * (self.context.amount_auth - 400 - 150)
    336         xmldict['institution_acct'] = '123456'
    337         xmldict['institution_bank_id'] = '99'
     342        xmldict['institution_acct'] = '0031716030'
     343        xmldict['institution_bank_id'] = '10'
    338344        xmldict['institution_item_name'] = self.context.p_category
    339345        xmldict['institution_name'] = INSTITUTION_NAME
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py

    r8276 r8281  
    140140        configuration.application_fee = 1000.0
    141141        self.app['configuration'].addSessionConfiguration(configuration)
     142        self.browser.open(self.manage_path)
    142143        self.browser.getControl("Add online").click()
    143144        self.assertMatches('...ticket created...',
    144145                           self.browser.contents)
    145         ctrl = self.browser.getControl(name='val_id')
    146         value = ctrl.options[0]
    147         self.browser.getLink(value).click()
     146        #ctrl = self.browser.getControl(name='val_id')
     147        #value = ctrl.options[0]
     148        #self.browser.getLink(value).click()
    148149        self.assertMatches('...Amount Authorized...',
    149150                           self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.