Preliminar Paylane support #25

Closed
wants to merge 22 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

cpinto commented Feb 16, 2012

Hi, I updated merchant with some support for the Paylane gateway (operates in Europe). It's not complete, but it's a good start and the implementation needed for SaaS companies (one-time billing and recurring) is done. Would love to see this being merged into the official branch as it should allow other to take the Paylane gateway implementation to 100%.

Contributor

theju commented Mar 9, 2012

I am fine with accepting the patch. Have contacted Paylane for a sandbox account.

Contributor

theju commented Mar 27, 2012

What are the attributes we need to setup to be able to run the tests successfully?
I have setup the 'PAYLANE_USERNAME' and 'PAYLANE_PASSWORD' and getting the following error.

ERROR: testOneShotPurchaseOK (billing.tests.paylane_tests.PaylaneTestCase)

Traceback (most recent call last):
File "/home/theju/venvs/merchant_env/src/merchant/example/billing/tests/paylane_tests.py", line 49, in testOneShotPurchaseOK
res = self.merchant.purchase(1.0,credit_card,options=options)
File "/home/theju/venvs/merchant_env/src/merchant/example/billing/gateways/paylane_gateway.py", line 188, in purchase
res = self.client.service.multiSale(params)
File "/home/theju/venvs/merchant_env/local/lib/python2.7/site-packages/suds/client.py", line 542, in call
return client.invoke(args, kwargs)
File "/home/theju/venvs/merchant_env/local/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
result = self.send(soapenv)
File "/home/theju/venvs/merchant_env/local/lib/python2.7/site-packages/suds/client.py", line 649, in send
result = self.failed(binding, e)
File "/home/theju/venvs/merchant_env/local/lib/python2.7/site-packages/suds/client.py", line 698, in failed
reply = error.fp.read()
AttributeError: 'NoneType' object has no attribute 'read'

Contributor

theju commented Jul 16, 2012

Managed to overcome the above error but now running into validation errors with suds (the official pypi download v0.4.0)

ERROR: testRecurringSetupOK (billing.tests.paylane_tests.PaylaneTestCase)

Traceback (most recent call last):
File "/home/theju/venvs/merchant_env/src/merchant/example/billing/tests/paylane_tests.py", line 30, in setUp
self.merchant = get_gateway("paylane")
File "/home/theju/venvs/merchant_env/src/merchant/example/billing/gateway.py", line 125, in get_gateway
return clazz(_args, *_kwargs)
File "/home/theju/venvs/merchant_env/src/merchant/example/billing/gateways/paylane_gateway.py", line 38, in init
self.client = Client(wsdl, username=username, password=password,cache = ObjectCache(location=wsdl_cache,days=15))
File "/home/theju/venvs/merchant_env/local/lib/python2.7/site-packages/suds/client.py", line 119, in init
sd = ServiceDefinition(self.wsdl, s)
File "/home/theju/venvs/merchant_env/local/lib/python2.7/site-packages/suds/servicedefinition.py", line 57, in init
self.addports()
File "/home/theju/venvs/merchant_env/local/lib/python2.7/site-packages/suds/servicedefinition.py", line 85, in addports
method = (m.name, binding.param_defs(m))
File "/home/theju/venvs/merchant_env/local/lib/python2.7/site-packages/suds/bindings/rpc.py", line 39, in param_defs
return self.bodypart_types(method)
File "/home/theju/venvs/merchant_env/local/lib/python2.7/site-packages/suds/bindings/binding.py", line 441, in bodypart_types
raise TypeNotFound(query.ref)
TypeNotFound: Type not found: '(check_card_params, http://www.w3.org/2001/XMLSchema, )'


@cpinto Any tips on how to overcome this?

@theju theju closed this in f8f43fe Jul 19, 2012

Contributor

theju commented Jul 19, 2012

Managed to get it to work. Was wrongly using the test mode username and password. Thanks @cpinto for the contribution.

Contributor

cpinto commented Jul 19, 2012

Sorry, I forgot to tell you guys about it. Paylane had a small hiccup in the WSDL but they've stated that it's since been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment