GithubHelp home page GithubHelp logo

gopay-python-api's People

Contributors

dependabot[bot] avatar geeshta avatar gopayprovoz avatar jsmitka avatar standakouba avatar zdenekdrahos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gopay-python-api's Issues

Error on `examples/get_status.py`

Hi there,

I am getting this when executing the examples/get_status.py:

(gopay-py3.10) ➜  gopay-python-api git:(master) ✗ python3 examples/get_status.py

> /gopay-python-api/gopay/__init__.py(27)payments()
-> config_model = GopayConfig.parse_obj(config)
(Pdb) config
{'goid': 'my goid', 'client_id': 'my id', 'client_secret': 'my secret', 'gateway_url': 'https://gw.sandbox.gopay.com/', 'scope': <TokenScope.ALL: 'payment-all'>, 'language': <Language.CZECH: 'CS'>}
(Pdb) GopayConfig.parse_obj(config)
*** pydantic.error_wrappers.ValidationError: 1 validation error for GopayConfig
goid
  value is not a valid integer (type=type_error.integer)
(Pdb) c
Traceback (most recent call last):
  File "/gopay-python-api/examples/get_status.py", line 4, in <module>
    payments = gopay.payments(
  File "/gopay-python-api/gopay/__init__.py", line 27, in payments
    config_model = GopayConfig.parse_obj(config)
  File "pydantic/main.py", line 526, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for GopayConfig
goid
  value is not a valid integer (type=type_error.integer)

Am I missing something? Or we should replace goid value with an integer?

pip install ends up in error

the python 3.5 pip install on Ubuntu 16.04 throws:

Collecting gopay==1.1.0 (from -r /home/merchang/code/requirements/base.txt (line 22))
  Downloading gopay-1.1.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-qh0r3wdc/gopay/setup.py", line 2, in <module>
        from pypandoc import convert
    ImportError: No module named 'pypandoc'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-qh0r3wdc/gopay/

ASCII encoding issue in README when installing through pip

Hi,

I receive the following error:

Downloading gopay-1.2.3.tar.gz
Storing download in cache at ./pip-cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2F85%2F42%2Fd90d0cc3236429117aa65f68aad698769cd6b6a51550d34bc7d7f051c668%2Fgopay-1.2.3.tar.gz
Running setup.py (path:/tmp/pip-build-50hlgr_q/gopay/setup.py) egg_info for package gopay
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip-build-50hlgr_q/gopay/setup.py", line 11, in
long_description=read('README.rst'),
File "/tmp/pip-build-50hlgr_q/gopay/setup.py", line 5, in read
return open(os.path.join(os.path.dirname(file), fname)).read()
File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 99: ordinal not in range(128)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip-build-50hlgr_q/gopay/setup.py", line 11, in
long_description=read('README.rst'),
File "/tmp/pip-build-50hlgr_q/gopay/setup.py", line 5, in read
return open(os.path.join(os.path.dirname(file), fname)).read()
File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 99: ordinal not in range(128)

This is caused by wrong setup of docker image default encoding. You can use docker run -e LANG=C.UTF-8 or in Dockerfile ENV LANG C.UTF-8

Embed_js returns invalid URL

Calling get_embedjs_url returns //gp-gw/js/embed.js which is a non-sense.

Looking to the code of the method:

@property
def get_embedjs_url(self) -> str:
    return self.gopay.base_url[-4] + "/gp-gw/js/embed.js"

It probably should be changed to:

@property
def get_embedjs_url(self) -> str:
    return self.gopay.base_url[:-4] + "/gp-gw/js/embed.js"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.