davidtsadler / ebay-sdk-php

An eBay SDK for PHP. Use the eBay API in your PHP projects.
Apache License 2.0
349 stars 341 forks source link

Post-Order:submitCancellationRequest - Unknown property exception #105

Closed kingsaj closed 7 years ago

kingsaj commented 7 years ago

Hi,

I'm trying to make a submitCancellationRequest call in sandbox, which is part of the post-order apis

Soon as this line is run:

$response = $service->submitCancellationRequest($request);

It crashes out with the below error:

DTS\eBaySDK\Exceptions\UnknownPropertyException with message 'Unknown property errorName'

I've tried to debug and this is the raw json that is returned, which is what I'm expecting for the orderId I provided..

{
    "error": [{
        "errorId": 10005,
        "domain": "CancelSvcErrorDomain",
        "subdomain": "Buying",
        "severity": "ERROR",
        "category": "APPLICATION",
        "message": "Eligibility Check failed",
        "parameter": [],
        "errorName": "eligibilityCheckFailed",
        "resolution": "Retry",
        "organization": "Marketplace",
        "errorGroups": ""
    }]
}

Regards

davidtsadler commented 7 years ago

Looks like another case where the API response is not matching the documentation.

I'll add the missing fields to the Error class.