JeremyDunn / php-fedex-api-wrapper

This library provides a fluid interface for constructing requests to the FedEx web service API.
269 stars 184 forks source link

Requests are done to production instead of beta #98

Closed contika closed 5 years ago

contika commented 5 years ago

I am trying to do a test run on the beta environment using script from ship.php in the examples folder. I even have set $shipService->getSoapClient()->__setLocation('https://wsbeta.fedex.com:443/web-services'); but still according to FedEx the production API is called. How can I switch between TESTING_URL and PRODUCTION_URL, cause in the Requests there are 2 constants but cannot seem to find where or how to switch between them

shahrooz7216 commented 5 years ago

I am trying to do a test run on the beta environment using script from ship.php in the examples folder. I even have set $shipService->getSoapClient()->__setLocation('https://wsbeta.fedex.com:443/web-services'); but still according to FedEx the production API is called. How can I switch between TESTING_URL and PRODUCTION_URL, cause in the Requests there are 2 constants but cannot seem to find where or how to switch between them

you must set the complete service url. for example: https://wsbeta.fedex.com:443/web-services/addressvalidation or https://wsbeta.fedex.com:443/web-services/rate

Or simply call the constant of the related Request Class like: $shipService->getSoapClient()->__setLocation(Request::TESTING_URL);

contika commented 5 years ago

Thanks... although I figured it out previously