我想使用 php 从获取 FedEx Shipping 的运费中获取费率,但是如何?
我从http://www.varnagiris.net/2006/06/01/php-fedex-shipping-rates-calculator/得到一些代码
和代码是
$fedex = new Fedex;
$fedex->setServer("https://gatewaybeta.fedex.com/GatewayDC");
$fedex->setAccountNumber(123123123);
$fedex->setMeterNumber(12312312);
$fedex->setCarrierCode("FDXE");
$fedex->setDropoffType("REGULARPICKUP");
$fedex->setService($service, $serviceName);
$fedex->setPackaging("YOURPACKAGING");
$fedex->setWeightUnits("LBS");
$fedex->setWeight(17);
$fedex->setOriginStateOrProvinceCode("OH");
$fedex->setOriginPostalCode(44333);
$fedex->setOriginCountryCode("US");
$fedex->setDestStateOrProvinceCode("CA");
$fedex->setDestPostalCode(90210);
$fedex->setDestCountryCode("US");
$fedex->setPayorType("SENDER");
$price = $fedex->getPrice();
但我不知道如何使用它?你能帮我吗。