Mangopay / mangopay2-php-sdk

PHP SDK for MANGOPAY
https://packagist.org/packages/mangopay/php-sdk-v2
MIT License
123 stars 134 forks source link

Wrong ColorDepth Validation Regular Expression! #468

Closed ashok-kr closed 3 years ago

ashok-kr commented 3 years ago

Hello Support,

While implementing 3DS2 support in mangopay, we upgraded to the latest SDK and for some reason it is NOT accepting [BrowserInfo]=>[ColorDepth] => 30 as a valid value! The error response provides a regular expression which must match for [ColorDepth] value But it seems it has not all the supportive values like 30 in my development machine case.

[BrowserInfo.ColorDepth] => The field ColorDepth must match the regular expression '^(1|4|8|15|16|24|32|48)$'. ) ) )

Please check and do the needful ASAP.

Regards, Ashok

dduwoyemgp commented 3 years ago

Hello @ashok-kr Thank for you report, we'll have a look

dduwoyemgp commented 3 years ago

Hello @ashok-kr As you can see in our 3DS2 integration guide, the allowed values for BrowserInfo.ColorDepth are 1, 4, 8, 15, 16, 24, 32, 48.

This is why we've implemented a regexp to handle this restriction

ashok-kr commented 3 years ago

Ok, however, the value 30 is provided by browser Microsoft Edge on Apple macbook pro M1. So it is a real world value for the color depth field.. Hence, you should check the validation values again for this attribute. Otherwise, the code might fail when the end user is using the same combination of the computer system and there might be other values as well.

dduwoyemgp commented 3 years ago

Thank you for the insight @ashok-kr , I'll have a look at it

ashok-kr commented 3 years ago

Thank you for the insight @ashok-kr , I'll have a look at it

Any update on this?

dduwoyemgp commented 3 years ago

Hello @ashok-kr We will fix the issue by removing the RegExp that controls the allowed values for BrowserInfo.ColorDepth and the corrections of value will be made at the payment gateway level

dduwoyemgp commented 3 years ago

Hello @ashok-kr Just to inform you that the verification on the BrowserInfo.ColorDepth is made by the API and not at the level of the SDK.

Dekari commented 3 years ago

I experienced this issue today in my live site. I have sent urgent support message to Mangopay Support. Hope they solve it soon.

fredericdelordm commented 3 years ago

Hello @ashok-kr & @Dekari,

Great news : the Mangopay API has improved the BrowserInfo.ColorDepth management. The value 30 will be considered as valid. Don't hesitate to test on your side.

Have a nice day,