# Path: zipfelchappe/postfinance/app_settings.py
# POSTFINANCE = {
#     'PSPID': '',
#     'LIVE': False,
#     'SHA1_IN': '',
#     'SHA1_OUT': '',
#     'USERID': '',
#     'PSWD': ''
# }


from xml.etree import ElementTree
from zipfelchappe.postfinance.app_settings import POSTFINANCE
import requests
import logging


env = 'prod' if POSTFINANCE['LIVE'] else 'test'
api_logger = logging.getLogger('zipfelchappe.postfinance.api')


def request_payment(payid):
    """ request payment of payid and close transaction """
    url = 'https://e-payment.postfinance.ch/ncol/%s/maintenancedirect.asp' % env
    payload = {
        'PSPID': POSTFINANCE['PSPID'],

# Path: zipfelchappe/postfinance/app_settings.py
# POSTFINANCE = {
#     'PSPID': '',
#     'LIVE': False,
#     'SHA1_IN': '',
#     'SHA1_OUT': '',
#     'USERID': '',
#     'PSWD': ''
# }


# Path: zipfelchappe/postfinance/api/direct_link_v1.py
from xml.etree import ElementTree
from zipfelchappe.postfinance.app_settings import POSTFINANCE
import requests
import logging



env = 'prod' if POSTFINANCE['LIVE'] else 'test'
api_logger = logging.getLogger('zipfelchappe.postfinance.api')


def request_payment(payid):
    """ request payment of payid and close transaction """
    url = 'https://e-payment.postfinance.ch/ncol/%s/maintenancedirect.asp' % env
    payload = {
        'PSPID': POSTFINANCE['PSPID'],

        'USERID': POSTFINANCE['USERID'],