ich versuche mich gerade an einer External Method, lokal (auf meinem Arbeitsplatz) hat folgende wunderbar funktioniert, aber am Server plötzlich nicht mehr.?
Noch etwas wie es funktionieren soll:
1- ich übergebe einem Python-Skript eine "tid"
Code: Alles auswählen
#Parameters: RESPONSE,tid
exturl = context.mpay(tid)
return RESPONSE.redirect(exturl)
Code: Alles auswählen
def mpay(tid):
import urllib
mpay24 = 'https://www.mpay24.com/bin/secure/at/etpv5?OPERATION=SELECTPAYMENT&MERCHANTID=70462&TID='+tid
if tid is None: return "No TID found"
f = urllib.urlopen(mpay24)
readme = f.read()
f.close()
params = readme.split('&')
status = params[0].split('=')
returncode = params[1].split('=')
loc = params[2].split('=')
location = urllib.unquote(loc[1])
if returncode[1] == 'REDIRECT':
target_url=location[1]
else:
target_url='2'
return location
Vielleicht kann mir ja jemand helfe?
lg
michi