Skip to content

Invalid constructor of PaymentRequestCard #5

Description

@varche1

Can't create PaymentRequestCard only with security_code in the case when we use token and wallet with gateway mode.

Got an error:

...
internal-api_1       |   File "/opt/project/card_pay/constructors.py", line 69, in _construct_card_account
internal-api_1       |     card = PaymentRequestCard(
internal-api_1       |   File "/usr/local/lib/python3.8/site-packages/cardpay/model/payment_request_card.py", line 63, in __init__
internal-api_1       |     self.expiration = expiration
internal-api_1       |   File "/usr/local/lib/python3.8/site-packages/cardpay/model/payment_request_card.py", line 122, in expiration
internal-api_1       |     raise ValueError(
internal-api_1       | ValueError: Invalid value for `expiration`, must not be `None`

But documentation says about field card as:

Card token value used instead of card information, except 'card.security_code' (it's mandatory).

If we paste some fake data to PaymentRequestCard constructor, we get error from API:

Reason: Errors: [fields ['card_account.card.expiration', 'card_account.card.holder', 'card_account.card.pan'] not expected in payment by token]

Using version is 2.28.0

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions