Mangopay / mangopay2-php-sdk

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

Authentification with first CreateRecurringPayInRegistrationCIT requires to not have NO DebitedFunds nor fees #537

Closed Hmastery closed 2 years ago

Hmastery commented 2 years ago

While the documentation specifies that Fees and DebitedFunds are optional (https://docs.mangopay.com/endpoints/v2.01/payins#e1053_create-a-recurring-payin-cit), for the first CIT that will auth your RecurringRegistration (and only for this one) it is forbidden to use these two parameters.

If you use these params it generates a generic Fatal Error, I had to call MangoPay Technical support to deep dive into their logs in order to understand this issue.

fredericdelordm commented 2 years ago

Hello @Hmastery, we are looking into it

SoloJr commented 2 years ago

Hi @Hmastery

Actually, that's the behaviour and there's nothing that can be changed in the SDK. Please take a look at this test, that shows how you can use DebitedFunds and Fees in a CIT.

Hmastery commented 2 years ago

Alright :) Yeah I integrated it taking into account that behaviour. It’s just that it was not documented properly in the API doc. And there is/was no specific error message to help us understand what went wrong.

Le 5 févr. 2022 à 16:41, SoloJr @.***> a écrit :

 Hi @Hmastery

Actually, that's the behaviour and there's nothing that can be changed in the SDK. Please take a look at this test, that shows how you can use DebitedFunds and Fees in a CIT.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.

SoloJr commented 2 years ago

I get you, but the intended behaviour from our side is that we throw the API error. Basically each SDK calls an .NET API and we just parse their error.. :)