[gen] Bugfix in computhin SHA1 keys.
This commit is contained in:
parent
3393effd7b
commit
625c8b079b
10
gen/ogone.py
10
gen/ogone.py
|
@ -41,8 +41,10 @@ class Ogone(Type):
|
||||||
master, masterValue, focus, False, True, mapping, label)
|
master, masterValue, focus, False, True, mapping, label)
|
||||||
# orderMethod must contain a method returning a dict containing info
|
# orderMethod must contain a method returning a dict containing info
|
||||||
# about the order. Following keys are mandatory:
|
# about the order. Following keys are mandatory:
|
||||||
# * orderID An identifier for the order. Tip: use the object uid,
|
# * orderID An identifier for the order. Don't use the object UID
|
||||||
# but the numeric part only, else, it could be too long.
|
# for this, use a random number, because if the payment
|
||||||
|
# is canceled, Ogone will not allow you to reuse the same
|
||||||
|
# orderID for the next tentative.
|
||||||
# * amount An integer representing the price for this order,
|
# * amount An integer representing the price for this order,
|
||||||
# multiplied by 100 (no floating point value, no commas
|
# multiplied by 100 (no floating point value, no commas
|
||||||
# are tolerated. Dont't forget to multiply the amount by
|
# are tolerated. Dont't forget to multiply the amount by
|
||||||
|
@ -67,6 +69,8 @@ class Ogone(Type):
|
||||||
shaRes = {}
|
shaRes = {}
|
||||||
for k, v in values.iteritems():
|
for k, v in values.iteritems():
|
||||||
if k in keysToIgnore: continue
|
if k in keysToIgnore: continue
|
||||||
|
# Ogone: we must not include empty values.
|
||||||
|
if (v == None) or (v == ''): continue
|
||||||
shaRes[k.upper()] = v
|
shaRes[k.upper()] = v
|
||||||
# Create a sorted list of keys
|
# Create a sorted list of keys
|
||||||
keys = shaRes.keys()
|
keys = shaRes.keys()
|
||||||
|
@ -85,7 +89,7 @@ class Ogone(Type):
|
||||||
# Basic Ogone parameters were generated in the app config module.
|
# Basic Ogone parameters were generated in the app config module.
|
||||||
res = obj.getProductConfig().ogone.copy()
|
res = obj.getProductConfig().ogone.copy()
|
||||||
shaKey = res['shaInKey']
|
shaKey = res['shaInKey']
|
||||||
# Remove elements from the Ogone configu that we must not send in the
|
# Remove elements from the Ogone config that we must not send in the
|
||||||
# payment request.
|
# payment request.
|
||||||
del res['shaInKey']
|
del res['shaInKey']
|
||||||
del res['shaOutKey']
|
del res['shaOutKey']
|
||||||
|
|
Loading…
Reference in a new issue