Mangopay / mangopay2-php-sdk

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

Idempotency Key #620

Open beerbohmdo opened 9 months ago

beerbohmdo commented 9 months ago

Is the Idempotency Key feature disabled on the sandbox or does it just not work?

I tried it by creating the same user twice (same key). But it succeeds and gives me two users with different ids.

The unittests fails also: https://github.com/Mangopay/mangopay2-php-sdk/actions/runs/7125884722/job/19402676990#step:6:152

And this test method is poorly implemented: https://github.com/Mangopay/mangopay2-php-sdk/blob/master/tests/Cases/IdempotencyTest.php#L35

renanbr commented 9 months ago

Same issue here.

We tried creating the same PayIn on the sandbox.

I have no idea if in production this is working.

ps: We don't have this feature implemented in production.

beerbohmdo commented 9 months ago

We generate idempotency keys in production, but I don't know if they work.(I never directly tested that).

I only tested it now, because I wanted to add a auto retry mechanic ... But as we speak about 1-3 failed requests in the last year, I should skip this idea. That can only go wrong, even with working idempotency keys.

fredericdelordm commented 8 months ago

Hello @beerbohmdo,

We are looking into it