mollie-api-php: Testmode is lost when fetching chargeback from payment entity
Specifications
- API Version: v2.12.0
 
Describe the issue
When fetching payments using
$response = $this->mollieApiClient->payments->get([
            $payment->number,
            [
                     'testmode' => 'test'
            ]
]);
And afterwards calling
$response-chargebacks();
The testmode variable is lost.
I would prefer to get the testmode variable from the response and reuse it for the chargebacks call.
About this issue
- Original URL
 - State: closed
 - Created 5 years ago
 - Comments: 16 (6 by maintainers)
 
@bobbybouwmann I think it will take a few weeks, I have to find some capacity to fix this within our teams. We’ll consider the breaking cases.
This should now be fixed, please let us know if it works for you!
@sandervanhooft Yeah, this happens on almost all endpoints. Right now I’m working with chargebacks and refunds from payments as well. I have to do the calls myself and pass the test mode flag to the URL instead of using the
$payment->chargebacks()or$payment->refunds()methods.Wouldn’t it be better if the URLs that are returned from the API already have the
?testmode=trueappended to the URL? This way it would work automatically since the test mode is already requested in the initial request. However, this would also mean a breaking change!Let me know if I can help in any way! I will dive into a possible, no breaking change, solution as well!