-
Notifications
You must be signed in to change notification settings - Fork 2
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
Could not find required constructor arguments for PaypalServerSdkLib\\Models\\NetworkTransactionReference: id #10
Comments
Seems to no longer be occurring. |
Seem to be randomly getting this issue in production fyi. The order id is populated. $captureBody = [ $this->client->getOrdersController()->ordersCapture($captureBody); apimatic\jsonmapper\JsonMapperException: Could not find required constructor arguments for PaypalServerSdkLib\Models\NetworkTransactionReference: id (apimatic\jsonmapper\JsonMapperException(code: 0): Could not find required constructor arguments for PaypalServerSdkLib\Models\NetworkTransactionReference: id at /app/vendor/apimatic/jsonmapper/src/JsonMapperException.php:169) It also seems like the charge to the user is occurring even though this errors so potentially occurring when parsing the paypal api response? The response on these is a 201 with status COMPLETED |
Switching back to old payment flow until this is resolved |
$captureBody = {"id":"0SV24052CE043231L"} is this legit for php? $captureBody = ['id' => '0SV24052CE043231L']; |
Thanks, @alisacorporation just an issue copy and pasting code to github, since I redacted the order id. I've updated the post in github but that is not the issue. Most of our transactions are going through successfully in both the sandbox and production. This issue occurs occasionally and from the call stack is from parsing the capture response in the Paypal PHP SDK. If it was an issue with the capture body we wouldn't be getting to this point. |
@DPoplin Hey do you have any insight into this issue? I also received a support response from Paypal Technical Support that this library is deprecated which is hopefully not the case. |
This library is not deprecated; it is new and in beta, some kinks left to work out apparently... That confusion must arise because a much older repository, called "PayPal-PHP-SDK" (no "server-") was long ago deprecated |
Hello all. Apologies for being late to the discussion. @james-ingold I can confirm that @PrestonPHX is correct, this SDK is part of six (6) new SDKs we are building to replace older deprecated SDKs. There may be some folks on our support teams who aren't aware of this. In any case, I and my team are very much working on them to correct issues and add additional features. To the point, would it be possible for you to grab a debug ID from a failed request as well as a non-failed request for me? These should be available in the response headers or possibly logged by the SDK depending on your logging config. With those I can take a look and try to compare what's going on here. |
Thanks @LeonarthusMectus for checking this out. Just to clarify these are all successful, non-failed responses in paypal, (200, 201 response codes) but seem to be erroring in the SDK when parsing the response: Example request that threw this error: DEBUG ID: 6f4811777118b (capture request) |
3 more examples from today: @LeonarthusMectus DEBUG ID: 030f6676c8f78 |
Not sure if it helps but these seem to be debit cards when this occurs, but that might just be a coincidence |
Perfect! Thanks for those. It definitely looks like all these instances are all Debit cards, and are missing the I'm following up with some colleagues on our API teams to try and understand the relationship between Debit networks & the network transaction reference to work out if there's a case where the ID would not be present, or if it's mistakenly being omitted in the response. That should give us an idea of where the fix is needed, and we can go about getting that put into place to remediate the exception. I'll follow up here just as soon I have any details or updates to share. |
Anything we can do to move forward on this ASAP? We hit another instance today with a user charged 3 times due to this error. Not the best experience for our customers. |
…quired Allows the NetworkTransactionReference class to be instantiated without a transaction ID, and the JsonMapper will no longer throw an exception when the ID is not provided in the response.
@PrestonPHX @DPoplin this production issue is almost a month old now. Any updates on when a fix is expected to be deployed? |
…to-be-null Fix for paypal#10 - Allow NetworkTransactionReference id to not be required
@james-ingold We're working with the teams that maintain the APIs to confirm the fixes for both of your issues. While it appears you have a patch in place for the problem you're seeing in specifically in your implementations, we're trying to ensure we address all issues related to this specific bug with these teams. We're working to avoid adding values piece by piece as folks encounter issues. |
Yep, I can confirm my patch is working in production. Had to get a bandaid in before Black Friday. Looking forward to a proper fix in the lib. 👍 |
Just started getting this error in the sandbox when calling ordersCapture. I've been testing error handling so not sure if I've made too many calls or something. Order is created and then the error happens on capture. This was working previously.
$captureBody = [
"id" => _the_order_id,
];
$apiResponse = $this->client->getOrdersController()->ordersCapture($captureBody);
The text was updated successfully, but these errors were encountered: