page de retour paypal
darcs-hash:20061007112422-f46e9-cd3ab12eb69267ed9e7aa58c45eca09051d8daec.gz
This commit is contained in:
parent
d9b34571ee
commit
a12c770ca5
2 changed files with 27 additions and 9 deletions
|
@ -192,11 +192,14 @@ class monCompte:
|
|||
combien = float(combien)
|
||||
# arrondissage-tronquage :
|
||||
combien = float(int(combien*100)/100.0)
|
||||
# nombre positif
|
||||
if combien < 0:
|
||||
raise ValueError
|
||||
except Exception:
|
||||
return {
|
||||
'template' :'MonCompteRechargePaypal2',
|
||||
'standalone' :True,
|
||||
'values' :{'error':"Le montant doit être un nombre !", 'combien':combien},
|
||||
'values' :{'error':"Le montant doit être un nombre positif !", 'combien':combien},
|
||||
}
|
||||
f.ajoute({'nombre': 1, 'code': 'SOLDE', 'designation': 'Credit du compte impression (intranet)', 'pu': combien})
|
||||
cherrypy.session['freshFacture'] = f
|
||||
|
@ -222,16 +225,28 @@ class monCompte:
|
|||
'template' :'MonCompteRechargePaypal4',
|
||||
'standalone' :True,
|
||||
'values' :{'lienPaypal' : f.urlPaypal(useSandbox = cherrypy.config.get("paypal.useSandbox", False),
|
||||
businessMail = cherrypy.config.get("paypal.businessAdress", "paypal@crans.org"))},
|
||||
businessMail = cherrypy.config.get("paypal.businessAdress", "paypal@crans.org"),
|
||||
return_page = "https://intranet.crans.org/monCompte/paypalReturn",
|
||||
cancel_return_page = "https://intranet.crans.org/monCompte/paypalCancel",
|
||||
)},
|
||||
}
|
||||
rechargerCompteImpression.exposed = True
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def paypalReturn(self):
|
||||
return {
|
||||
'template' :'MonComptePaypalReturn',
|
||||
'standalone' :True,
|
||||
'values' :{},
|
||||
}
|
||||
paypalReturn.exposed = True
|
||||
|
||||
def paypalCancel(self):
|
||||
return {
|
||||
'template' :'MonComptePaypalCancel',
|
||||
'standalone' :True,
|
||||
'values' :{},
|
||||
}
|
||||
paypalCancel.exposed = True
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue