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
|
@ -40,7 +40,10 @@ class root:
|
||||||
} for art in f.articles()]
|
} for art in f.articles()]
|
||||||
facture['montant'] = f.total()
|
facture['montant'] = f.total()
|
||||||
facture['paypal'] = f.urlPaypal(useSandbox = cherrypy.config.get("paypal.useSandbox", False),
|
facture['paypal'] = 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",
|
||||||
|
)
|
||||||
|
|
||||||
facture['payee'] = f.recuPaiement()
|
facture['payee'] = f.recuPaiement()
|
||||||
listeFactures.append(facture)
|
listeFactures.append(facture)
|
||||||
|
|
|
@ -192,11 +192,14 @@ class monCompte:
|
||||||
combien = float(combien)
|
combien = float(combien)
|
||||||
# arrondissage-tronquage :
|
# arrondissage-tronquage :
|
||||||
combien = float(int(combien*100)/100.0)
|
combien = float(int(combien*100)/100.0)
|
||||||
|
# nombre positif
|
||||||
|
if combien < 0:
|
||||||
|
raise ValueError
|
||||||
except Exception:
|
except Exception:
|
||||||
return {
|
return {
|
||||||
'template' :'MonCompteRechargePaypal2',
|
'template' :'MonCompteRechargePaypal2',
|
||||||
'standalone' :True,
|
'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})
|
f.ajoute({'nombre': 1, 'code': 'SOLDE', 'designation': 'Credit du compte impression (intranet)', 'pu': combien})
|
||||||
cherrypy.session['freshFacture'] = f
|
cherrypy.session['freshFacture'] = f
|
||||||
|
@ -222,16 +225,28 @@ class monCompte:
|
||||||
'template' :'MonCompteRechargePaypal4',
|
'template' :'MonCompteRechargePaypal4',
|
||||||
'standalone' :True,
|
'standalone' :True,
|
||||||
'values' :{'lienPaypal' : f.urlPaypal(useSandbox = cherrypy.config.get("paypal.useSandbox", False),
|
'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
|
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