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

addfixedpriceitem with SellerProfiles - PaymentProfileID, ReturnProfileID, ShippingProfileID #228

Closed sunil11475 closed 5 years ago

sunil11475 commented 5 years ago

Hi,

I have setup and got the all profile id from my eBay sandbox but when i trying to do verifyAddFixedPriceItem using PaymentProfileID, ReturnProfileID, ShippingProfileID it showing error -

Error: Return policy is not specified. A return option is missing or not valid. Update your return options. Error: Return policy is not specified. A return option is missing or not valid. Update your return options. Error: Return policy is not specified. A return option is missing or not valid. Update your return options. Error: Approved electronic payment method is missing To list this item, you need to accept PayPal or other approved electronic payments as a payment method. Error: A shipping service is not specified. At least one valid shipping service must be specified.

I have search on google so i found your (David's) code which is -

$item->SellerProfiles = new Types\SellerProfilesType();

$businessProfiles = new Types\SellerPaymentProfileType();
$businessProfiles->PaymentProfileID = $businessPolicy['paymentProfiles']['profileId']; //passed back from busines polices api
$businessProfiles->PaymentProfileName = $businessPolicy['paymentProfiles']['profileName'];
$item->SellerProfiles->SellerPaymentProfile = $businessProfiles;

$businessProfiles = new Types\SellerReturnProfileType();
$businessProfiles->ReturnProfileID = $businessPolicy['returnProfiles']['profileId'];
$businessProfiles->ReturnProfileName  = $businessPolicy['returnProfiles']['profileName'];
$item->SellerProfiles->SellerReturnProfile = $businessProfiles;

$businessProfiles = new Types\SellerShippingProfileType();
$businessProfiles->ShippingProfileID = $businessPolicy['shippingProfiles']['profileId'];
$businessProfiles->ShippingProfileName = $businessPolicy['shippingProfiles']['profileName'];
$item->SellerProfiles->SellerShippingProfile = $businessProfiles;

But still getting same error .

Can you please check and let us know what i am doing wrong?

sunil11475 commented 5 years ago

After 3 days pulling my hair. I have finally figure out. what was the issue.

The SellerProfiles ids (int) passing wrong value for item verification. I was using php5.6.35 (64 bit) so i have change the PHP version to php7.0.29 (64bit) then it start showing correct value and complete the item verification without any issue...

Many post i seen says they had issue in 32bit but i got issue in php5.6.35 (64 bit).

I hope it will help somebody..

michabbb commented 5 years ago

as long as you use 64bit, you shouldn´t have any problems, doesn´t matter if you use 5.6 oder 7.x.....

sunil11475 commented 5 years ago

Yes it was php5.6.35 (64 bit)*