Changeset 14792


Ignore:
Timestamp:
10 Aug 2017, 06:54:48 (7 years ago)
Author:
Henrik Bettermann
Message:

Define MERCHANTID, HOST, HTTPS, API_KEY, SERVICETYPEID in one place.

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

Legend:

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

    r14778 r14792  
    2020    module_activated,
    2121    RemitaRequestPaymentStatusPageStudent,
     22    RemitaVerifyPaymentStatusPageStudent,
    2223    RemitaPageStudent)
    2324from kofacustom.nigeria.remita.applicantsbrowser import (
    2425    RemitaRequestPaymentStatusPageApplicant,
     26    RemitaVerifyPaymentStatusPageApplicant,
    2527    RemitaPageApplicant)
     28
     29# Temporarily we can use the test portal like in kofacustom.nigeria
     30MERCHANTID = '2547916'
     31HOST = 'www.remitademo.net'
     32HTTPS = False
     33API_KEY = '1946'
     34SERVICETYPEID = '4430731'
    2635
    2736class CustomRemitaRequestPaymentStatusPageStudent(
     
    3039    """
    3140
    32     # Here we use Remita test portal data
    33     merchantId = '2547916'
    34     host = 'www.remitademo.net'
    35     https = False
    36     api_key = '1946'
     41    merchantId = MERCHANTID
     42    host = HOST
     43    https = HTTPS
     44    api_key = API_KEY
     45    serviceTypeId = SERVICETYPEID
     46
     47class CustomRemitaVerifyPaymentStatusPageStudent(
     48    RemitaVerifyPaymentStatusPageStudent):
     49    """ Request webservice view for the Remita gateway.
     50    """
     51
     52    merchantId = MERCHANTID
     53    host = HOST
     54    https = HTTPS
     55    api_key = API_KEY
    3756
    3857class CustomRemitaPageStudent(RemitaPageStudent):
     
    4059    """
    4160
    42     # Here we use Remita test portal data
    43     merchantId = '2547916'
    44     serviceTypeId = '4430731'
    45     api_key = '1946'
    46     #orderId = '3456346346'
    47     host = 'www.remitademo.net'
     61    merchantId = MERCHANTID
     62    host = HOST
     63    https = HTTPS
     64    api_key = API_KEY
     65    serviceTypeId = SERVICETYPEID
     66
    4867    init_url = '/remita/ecomm/split/init.reg'
    49     #amount='1000'
    50     https = False
    51 
    5268    action = 'http://www.remitademo.net/remita/ecomm/finalize.reg'
    5369
     
    114130    """
    115131
    116     # Here we use Remita test portal data
    117     merchantId = '2547916'
    118     host = 'www.remitademo.net'
    119     https = False
    120     api_key = '1946'
     132    merchantId = MERCHANTID
     133    host = HOST
     134    https = HTTPS
     135    api_key = API_KEY
     136    serviceTypeId = SERVICETYPEID
     137
     138class CustomRemitaVerifyPaymentStatusPageApplicant(
     139    RemitaVerifyPaymentStatusPageApplicant):
     140    """ Request webservice view for the Remita gateway.
     141    """
     142
     143    merchantId = MERCHANTID
     144    host = HOST
     145    https = HTTPS
     146    api_key = API_KEY
    121147
    122148class CustomRemitaPageApplicant(RemitaPageApplicant):
     
    124150    """
    125151
    126     # Here we use Remita test portal data
    127     merchantId = '2547916'
    128     serviceTypeId = '4430731'
    129     api_key = '1946'
    130     #orderId = '3456346346'
    131     host = 'www.remitademo.net'
     152    merchantId = MERCHANTID
     153    host = HOST
     154    https = HTTPS
     155    api_key = API_KEY
     156    serviceTypeId = SERVICETYPEID
     157
    132158    init_url = '/remita/ecomm/split/init.reg'
    133     #amount='1000'
    134     https = False
    135 
    136159    action = 'http://www.remitademo.net/remita/ecomm/finalize.reg'
    137160
  • main/waeup.uniben/trunk/src/waeup/uniben/remita/webservices.py

    r14789 r14792  
    1818
    1919from kofacustom.nigeria.remita.webservices import PaymentNotificationListenerWebservice
     20from waeup.uniben.remita.browser import MERCHANTID, HOST, HTTPS, API_KEY
    2021
    21 class CustomPaymentNotificationListenerWebservice(PaymentNotificationListenerWebservice):
     22class CustomPaymentNotificationListenerWebservice(
     23    PaymentNotificationListenerWebservice):
    2224    """A webservice to receive payment notifications from
    2325    accepted IP addresses without authentication which trigger
     
    2830                   '162.13.211.92', '83.138.167.2',)
    2931
    30     # We temporarily use Remita test portal data
    31     merchantId = '2547916'
    32     host = 'www.remitademo.net'
    33     https = False
    34     api_key = '1946'
     32    merchantId = MERCHANTID
     33    host = HOST
     34    https = HTTPS
     35    api_key = API_KEY
Note: See TracChangeset for help on using the changeset viewer.