Currently the card details are being passed as string, and it is failing at connector call.
There is no check what values are being passed in card_expiry_month, card_expiry_year or card_cvc.
Anybody can pass random string, without conveying the liability of the wrong input
Expected Behavior
While parsing the request, there should be a validation check over the fields to include what values are expected out of them so that it need not be applied at individual connectors.
Actual Behavior
Currently all strings are accepted.
Steps To Reproduce
Create a Payments Request Call
Put any string in card_month like "card": { "card_number": "4035 5010 0000 0008", "card_exp_month": "av", "card_exp_year": "cadge", "card_holder_name": "john Doe", "card_cvc": "bug" }
Context For The Bug
No response
Environment
Are you using hyperswitch hosted version? Yes/No
If yes, please provide the value of the x-request-id response header for helping us debug your issue.
If not (or if building/running locally), please provide the following details:
Operating System or Linux distribution:
Rust version (output of rustc --version): ``
App version (output of cargo r -- --version): ``
Have you spent some time to check if this bug has been raised before?
Bug Description
Currently the card details are being passed as string, and it is failing at connector call.
There is no check what values are being passed in
card_expiry_month
,card_expiry_year
orcard_cvc
.Anybody can pass random string, without conveying the liability of the wrong input
Expected Behavior
While parsing the request, there should be a validation check over the fields to include what values are expected out of them so that it need not be applied at individual connectors.
Actual Behavior
Currently all strings are accepted.
Steps To Reproduce
card_month
like"card": { "card_number": "4035 5010 0000 0008", "card_exp_month": "av", "card_exp_year": "cadge", "card_holder_name": "john Doe", "card_cvc": "bug" }
Context For The Bug
No response
Environment
Are you using hyperswitch hosted version? Yes/No If yes, please provide the value of the
x-request-id
response header for helping us debug your issue.If not (or if building/running locally), please provide the following details:
rustc --version
): ``cargo r -- --version
): ``Have you spent some time to check if this bug has been raised before?
Have you read the Contributing Guidelines?
Are you willing to submit a PR?
No, but I'm happy to collaborate on a PR with someone else