davidtsadler / ebay-sdk-examples

Several examples of using the eBay SDK for PHP
http://devbay.net
Apache License 2.0
184 stars 100 forks source link

addfixedpriceitem with SellerProfiles - PaymentProfileID, ReturnProfileID, ShippingProfileID #76

Closed sunil11475 closed 6 years ago

sunil11475 commented 6 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 = (int)$Payment[0];
        $businessProfiles->PaymentProfileName = (string)$Payment[1];
        $item->SellerProfiles->SellerPaymentProfile = $businessProfiles;

        $businessProfiles = new Types\SellerReturnProfileType();
        $businessProfiles->ReturnProfileID = (int)$Return[0];
        $businessProfiles->ReturnProfileName  = (string)$Return[1];
        $item->SellerProfiles->SellerReturnProfile = $businessProfiles;

        $businessProfiles = new Types\SellerShippingProfileType();
        $businessProfiles->ShippingProfileID = (int)$Shipping[0];
        $businessProfiles->ShippingProfileName = (string)$Shipping[1];
        $item->SellerProfiles->SellerShippingProfile = $businessProfiles;

But still getting same error .

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

sunil11475 commented 6 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 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 say they had issue in 32bit but i got issue in php5.6.35 (64 bit).

I hope it will help somebody..