yapily / yapily-sdk-python

Python SDK generated against the Yapily API. This SDK can be used to connect to Open Banking entities.
https://yapily.com
MIT License
13 stars 10 forks source link

Identified a bug in executing the payment request for EU - Need to set the _name to name, currently set to None. #6

Open manojvenkat opened 3 years ago

manojvenkat commented 3 years ago

https://github.com/yapily/yapily-sdk-python/blob/7000471c20fc68ba8ff671ee703555df97554ba0/sdk/yapily/models/payer.py#L53

This issue doesn't cause any kind of problems for UK to UK payment flows but it's a bug for EU to EU payment flow. We fixed this line in our local copy of the Yapily python SDK and the payment execution is happening correctly for EU.

Can you please fix this asap and release a new version?

Summary of the temporary fix we applied : Assign name to self._name,

manojvenkat commented 3 years ago

Full stack trace below:

[ CREATE PAYMENT ] Error Invalid value for `name`, must not be `None` - Traceback (most recent call last):
  File "/home/sharingan/Sprinque/sprinque_backend/checkout/views.py", line 140, in post
    response = CheckoutOperation().create_payment(request=request)
  File "/home/sharingan/Sprinque/sprinque_backend/checkout/service/checkout.py", line 501, in create_payment
    payment = payments_api.create_payment_using_post(consent=consent_token, payment_request=payment_request)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api/payments_api.py", line 619, in create_payment_using_post
    return self.create_payment_using_post_with_http_info(consent, payment_request, **kwargs)  # noqa: E501
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api/payments_api.py", line 735, in create_payment_using_post_with_http_info
    collection_formats=collection_formats)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api_client.py", line 353, in call_api
    _preload_content, _request_timeout, _host)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api_client.py", line 192, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api_client.py", line 264, in deserialize
    return self.__deserialize(data, response_type)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api_client.py", line 303, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api_client.py", line 639, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api_client.py", line 303, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api_client.py", line 639, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api_client.py", line 303, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/api_client.py", line 641, in __deserialize_model
    instance = klass(**kwargs)
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/models/payer.py", line 58, in __init__
    self.name = name
  File "/home/sharingan/Sprinque/sprinque_backend/venv/lib/python3.6/site-packages/yapily/models/payer.py", line 82, in name
    raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
ValueError: Invalid value for `name`, must not be `None`