[getpaid] r2888 committed - Changed merchant_id to verkkomaksut_merchant_id in schema, since at th...

5 views
Skip to first unread message

codesite...@google.com

unread,
Aug 11, 2009, 6:22:02 AM8/11/09
to getpaid...@groups.google.com
Revision: 2888
Author: ilja.e...@twinapex.com
Date: Tue Aug 11 03:21:06 2009
Log: Changed merchant_id to verkkomaksut_merchant_id in schema, since at
the moment payment processor variables are stored in the same location for
every processor. Caused problems with PayPal.

http://code.google.com/p/getpaid/source/detail?r=2888

Modified:

/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/adapters/order.py

/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/browser/templates/checkout-verkkomaksut-pay.pt

/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/interfaces.py

/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/tests/unittests/adapters_unittests.txt

=======================================
---
/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/adapters/order.py
Sat May 16 04:01:58 2009
+++
/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/adapters/order.py
Tue Aug 11 03:21:06 2009
@@ -34,7 +34,7 @@
customer_id = 'anonymous'
verkkomaksut_price = '%.2f' %(context.getTotalPrice())
options = IVerkkomaksutOptions(site)
- merchant_id = options.merchant_id
+ verkkomaksut_merchant_id = options.verkkomaksut_merchant_id
base_url = site.absolute_url()
# context.finance_workflow.fireTransition( "create" )
# state = context.finance_state
@@ -48,7 +48,7 @@

m = md5.new()
m.update(options.merchant_authentication_code)
- m.update('&' + merchant_id)
+ m.update('&' + verkkomaksut_merchant_id)
m.update('&' + verkkomaksut_price)
m.update('&' + order_id)
m.update('&&' + customer_id)
@@ -60,7 +60,7 @@
auth_code = m.hexdigest()
AUTH_CODE = auth_code.upper()
order_info = {
- "MERCHANT_ID" : merchant_id,
+ "MERCHANT_ID" : verkkomaksut_merchant_id,
"AMOUNT" : verkkomaksut_price,
"ORDER_NUMBER" : order_id,
"ORDER_DESCRIPTION" : customer_id,
=======================================
---
/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/browser/templates/checkout-verkkomaksut-pay.pt
Fri Jul 31 13:29:29 2009
+++
/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/browser/templates/checkout-verkkomaksut-pay.pt
Tue Aug 11 03:21:06 2009
@@ -95,7 +95,7 @@
tal:define="options view/verkkomaksut_options;
order_info view/order_info">
<input name="MERCHANT_ID" id="MERCHANT_ID" type="hidden" value="123466"
- tal:attributes="value options/merchant_id">
+ tal:attributes="value options/verkkomaksut_merchant_id">
<input name="AMOUNT" id="AMOUNT" type="hidden" value="99.90"
tal:attributes="value order_info/AMOUNT">
<input name="ORDER_NUMBER" id="ORDER_NUMBER" type="hidden"
value="123456"
=======================================
---
/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/interfaces.py
Sat May 16 04:01:58 2009
+++
/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/interfaces.py
Tue Aug 11 03:21:06 2009
@@ -14,7 +14,7 @@
Verkkomaksut Options
"""

- merchant_id = schema.ASCIILine(
+ verkkomaksut_merchant_id = schema.ASCIILine(
title = _(u"Merchant ID"),
description = _("Input merchant ID provided by
Verkkomaksut."),
required=True,
=======================================
---
/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/tests/unittests/adapters_unittests.txt
Fri May 15 14:11:05 2009
+++
/getpaid.verkkomaksut/branches/multipayment/getpaid/verkkomaksut/tests/unittests/adapters_unittests.txt
Tue Aug 11 03:21:06 2009
@@ -22,10 +22,10 @@
>>> len(fields)
2
>>> [w.__name__ for w in fields]
- ['merchant_id', 'merchant_authentication_code']
- >>> fields['merchant_id'].field
+ ['verkkomaksut_merchant_id', 'merchant_authentication_code']
+ >>> fields['verkkomaksut_merchant_id'].field
<zope.schema._field.ASCIILine object at ...
- >>> fields['merchant_id'].field.required
+ >>> fields['verkkomaksut_merchant_id'].field.required
True
>>> fields['merchant_authentication_code'].field
<zope.schema._field.ASCIILine object at ...

Reply all
Reply to author
Forward
0 new messages