Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete stored payment returns as error #462

Closed
gromez opened this issue Mar 29, 2023 · 1 comment
Closed

Delete stored payment returns as error #462

gromez opened this issue Mar 29, 2023 · 1 comment

Comments

@gromez
Copy link

gromez commented Mar 29, 2023

Calling deleteStoredPaymentMethods return a ConnectionException with message Probably your Web Service username and/or password is incorrect.

$resultOKHttpStatusCodes = array(200, 201, 202, 204);
if (!in_array($httpStatus, $resultOKHttpStatusCodes) && $result) {
$this->handleResultError($result, $logger);
} elseif (!$result) {
$this->handleCurlError($requestUrl, $errno, $message, $logger);
}

Maybe documentation about is wrong because I'm not getting a 200 HTTP status, but 204 with empty content, and the stored payment has been successfully deleted.
But, because result is empty, it raises error in handleCurlError.

Documentation reference: https://docs.adyen.com/api-explorer/Checkout/70/delete/storedPaymentMethods/_recurringId_

@jillingk
Copy link
Contributor

Hi @gromez,

Thanks a lot for reaching out to us and bringing this issue to our attention. We just added support for REST requests and did indeed not account for this empty response bodies for delete requests :) I opened a PR to fix this issue.

Best, Jilling
Adyen

@jillingk jillingk closed this as completed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants