Closed oleksii-i-iol closed 1 year ago
If we try to get the metadata by 4010056200000018 and then to parse to Checkout.Metadata.Card.CardMetadataResponse object, the exception is thrown "Error converting value "deferred_debit" to type 'System.Nullable`1[Checkout.Common.CardType]"
Get card details without an error.
The exception is thrown.
Request:
curl --location 'https://api.sandbox.checkout.com/metadata/card' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer secret_key' \ --data ' { "source": { "type": "card", "number": "4010056200000018" }, "format": "basic" }'
Response:
{ "scheme": "visa", "scheme_local": "cartes_bancaires", "card_type": "deferred_debit", "card_category": "consumer", "issuer": "CREDIT DU NORD", "issuer_country": "FR", "product_id": "N", "product_type": "Visa Platinum", "issuer_country_name": "France", "bin": "40100562" }
Modify CardType enum value [EnumMember(Value = "Deferred Debit")] DeferredDebit -> [EnumMember(Value = "deferred_debit")] DeferredDebit
Environment
Description
If we try to get the metadata by 4010056200000018 and then to parse to Checkout.Metadata.Card.CardMetadataResponse object, the exception is thrown "Error converting value "deferred_debit" to type 'System.Nullable`1[Checkout.Common.CardType]"
Expected behavior
Get card details without an error.
Current behavior
The exception is thrown.
Steps to reproduce
Request:
Response:
Possible solution
Modify CardType enum value [EnumMember(Value = "Deferred Debit")] DeferredDebit -> [EnumMember(Value = "deferred_debit")] DeferredDebit