diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3aef977 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "sample-code-python"] + path = sample-code-python + url = https://github.com/AuthorizeNet/sample-code-python diff --git a/.travis.yml b/.travis.yml index cad78f3..078aea0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,12 @@ install: - pip install unittest2 - pip install nose - pip install pyxb -script: nosetests + +before_script: + - git submodule update --remote --recursive + +script: + - nosetests + - python setup.py install + - cd sample-code-python + - for i in `ls */*.py`;do python $i;done diff --git a/README.md b/README.md index 3d06d0e..1a39af4 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build Status](https://travis-ci.org/AuthorizeNet/sdk-python.png?branch=master)] (https://travis-ci.org/AuthorizeNet/sdk-python) +[![Coverage Status](https://coveralls.io/repos/AuthorizeNet/sdk-php/badge.svg?branch=master&service=github)](https://coveralls.io/github/AuthorizeNet/sdk-php?branch=master) `pip install authorizenet` diff --git a/authorizenet/apicontrollers.py b/authorizenet/apicontrollers.py index 4e4b68e..f654bf7 100644 --- a/authorizenet/apicontrollers.py +++ b/authorizenet/apicontrollers.py @@ -111,13 +111,18 @@ def getresponseclass(self): ''' Returns the response class ''' return apicontractsv1.ARBGetSubscriptionStatusResponse() - def afterExecute(self, response): - if constants.StatusStart in response: + def afterexecute(self): + response = self._httpResponse + if constants.note in response: response = response.replace(constants.note, '') + + if constants.StatusStart in response: start = response.index(constants.StatusStart) end = response.index(constants.StatusEnd) response = response.replace(response[start:end+9], '') - return response + + self._httpResponse = response + return class ARBUpdateSubscriptionController(apicontrollersbase.APIOperationBase): diff --git a/sample-code-python b/sample-code-python new file mode 160000 index 0000000..7e00de2 --- /dev/null +++ b/sample-code-python @@ -0,0 +1 @@ +Subproject commit 7e00de25aaa48e574e9f99b2396362b87085ed49