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

GetItemByLegacyId Fatal error #3

Open
sunil11475-dev opened this issue May 23, 2022 · 1 comment
Open

GetItemByLegacyId Fatal error #3

sunil11475-dev opened this issue May 23, 2022 · 1 comment

Comments

@sunil11475-dev
Copy link

I am trying to call for GetItemByLegacyId but getting below error, I tried with David's SDK as well and same error -

Fatal error: Uncaught TypeError: Argument 2 passed to DTS\eBaySDK\Parser\JsonParser::assignProperties() must be of the type array, string given, called in libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php on line 99 and defined in libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php:16 Stack trace: #0 libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php(99): DTS\eBaySDK\Parser\JsonParser::assignProperties(Object(DTS\eBaySDK\Browse\Types\TaxType), 'VAT') #1 libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php(65): DTS\eBaySDK\Parser\JsonParser::actualValue(Object(stdClass), 'VAT') #2 libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php(26): DTS\eBaySDK\Parser\JsonParser::determineActual in libraries/ebaylegacy/vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php on line 16

This is my code -

	$service = new Services\BrowseService([
	    'authorization' => $accesstoken,
	    'marketplaceId' => 'EBAY-US'
	]);
	$request = new Types\GetItemByLegacyIdRestRequest();
	$request->legacy_item_id = '2834XXX97525';
	//$request->legacy_variation_id = '584XXX4289';
	$request->legacy_variation_sku = 'BXXC6_Le_1';
	$response = $service->GetItemByLegacyId($request);
@sunil11475-dev
Copy link
Author

sunil11475-dev commented May 23, 2022

Resolved - I have removed Array from private static function

vendor/zvps/ebay-legacy-php-client/src/Parser/JsonParser.php

16    private static function assignProperties(\DTS\eBaySDK\Types\BaseType $object, array $properties)
    {

to

16    private static function assignProperties(\DTS\eBaySDK\Types\BaseType $object, $properties)
    {

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

1 participant