You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This wasn't an issue until today, no other website or code changes were made in the last week. My only guess is that intuit changed their API response handling.
Within the PaymentClient class the "charge" method has a duplicate httpClient->send method call. This is now causing the first call to have a valid "$response->getBody()" value, while the second call, which is the one that gets returned by the "charge" method to have an empty body value. Up until today the second "send" method call returned a valid body response. Today's issue caused the credit card to be charged successfully, but the order to fail because the body was empty and the response couldn't be verified as successful or not. Commenting out line 95 resolves the issue.
Line 95: $response = $this->httpClient->send($request);
Another item to note, there is also a duplicate "send" method call on line 110 within the voidChargeTransaction method of this same class.
The text was updated successfully, but these errors were encountered:
Seconded, we just started getting reports today of payments failing, and this seems to be the root.
I'd guess their API just implemented some sort of idempotency check today, ignoring duplicate requests (with the same request-id), and unfortunately this SDK specifically performs exactly that.
Nebual
added a commit
to Nebual/PHP-Payments-SDK
that referenced
this issue
Nov 20, 2021
We see in the SDK source code, sending the same request twice in charge method. I am not sure why this is the case but removing the first send solves the problem. But why there were two of them in the first place. Are we missing anything here?
This wasn't an issue until today, no other website or code changes were made in the last week. My only guess is that intuit changed their API response handling.
Within the PaymentClient class the "charge" method has a duplicate httpClient->send method call. This is now causing the first call to have a valid "$response->getBody()" value, while the second call, which is the one that gets returned by the "charge" method to have an empty body value. Up until today the second "send" method call returned a valid body response. Today's issue caused the credit card to be charged successfully, but the order to fail because the body was empty and the response couldn't be verified as successful or not. Commenting out line 95 resolves the issue.
Line 95: $response = $this->httpClient->send($request);
Another item to note, there is also a duplicate "send" method call on line 110 within the voidChargeTransaction method of this same class.
The text was updated successfully, but these errors were encountered: