Rag*_*hav 1 java soap web-services fedex
我正在使用 FEDEX API 通过他们的 ShipService WSDL 从 FEDEX 获取运输标签。我已将该功能集成到我的应用程序中,并成功地从 FEDEX 生成标签。
由于最近的要求,我们需要从我们的应用程序中添加第三方作为付款人选项。为了实现这一点,我将PaymentType 从 SENDER 更改为 THIRD_PARTY,并根据 FEDEX API 文档填充了地址、联系人等必要字段。
payment.setPaymentType(PaymentType.THIRD_PARTY);
服务调用成功,我也得到了有效的响应,但使用 THIRD_PARTY 作为付款人时缺少 ShipmentRate 详细信息,而使用 SENDER 作为 PaymentType 时可用。我需要费率详细信息以便在我的申请中进行进一步处理。
以下是我通过 SENDER PaymentType 获得的详细信息。
<v13:CompletedShipmentDetail>
    <v13:ShipmentRating>
        <v13:ActualRateType>PAYOR_ACCOUNT_PACKAGE</v13:ActualRateType>
        <v13:ShipmentRateDetails>
            <v13:RateType>PAYOR_ACCOUNT_PACKAGE</v13:RateType>
            <v13:RateZone>4</v13:RateZone>
            <v13:RatedWeightMethod>DIM</v13:RatedWeightMethod>
            <v13:DimDivisor>166</v13:DimDivisor>
            <v13:FuelSurchargePercent>4.25</v13:FuelSurchargePercent>
            <v13:TotalBillingWeight>
                <v13:Units>LB</v13:Units>
                <v13:Value>17.0</v13:Value>
            </v13:TotalBillingWeight>
            <v13:TotalDimWeight>
                <v13:Units>LB</v13:Units>
                <v13:Value>17.0</v13:Value>
            </v13:TotalDimWeight>
            <v13:TotalBaseCharge>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>11.32</v13:Amount>
            </v13:TotalBaseCharge>
            <v13:TotalFreightDiscounts>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>0.0</v13:Amount>
            </v13:TotalFreightDiscounts>
            <v13:TotalNetFreight>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>11.32</v13:Amount>
            </v13:TotalNetFreight>
            <v13:TotalSurcharges>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>9.48</v13:Amount>
            </v13:TotalSurcharges>
            <v13:TotalNetFedExCharge>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>20.8</v13:Amount>
            </v13:TotalNetFedExCharge>
            <v13:TotalTaxes>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>0.0</v13:Amount>
            </v13:TotalTaxes>
            <v13:TotalNetCharge>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>20.8</v13:Amount>
            </v13:TotalNetCharge>
            <v13:TotalRebates>
                <v13:Currency>USD</v13:Currency>
                <v13:Amount>0.0</v13:Amount>
            </v13:TotalRebates>
            <v13:Surcharges>
                <v13:SurchargeType>ADDITIONAL_HANDLING</v13:SurchargeType>
                <v13:Level>PACKAGE</v13:Level>
                <v13:Description>Additional handling surcharge - dimension</v13:Description>
                <v13:Amount>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>9.0</v13:Amount>
                </v13:Amount>
            </v13:Surcharges>
            <v13:Surcharges>
                <v13:SurchargeType>FUEL</v13:SurchargeType>
                <v13:Level>PACKAGE</v13:Level>
                <v13:Description>FedEx Ground Fuel</v13:Description>
                <v13:Amount>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>0.48</v13:Amount>
                </v13:Amount>
            </v13:Surcharges>
        </v13:ShipmentRateDetails>
    </v13:ShipmentRating>
    <v13:CompletedPackageDetails>
        <v13:SequenceNumber>1</v13:SequenceNumber>
        <v13:TrackingIds>
            <v13:TrackingIdType>FEDEX</v13:TrackingIdType>
            <v13:TrackingNumber>794662859722</v13:TrackingNumber>
        </v13:TrackingIds>
        <v13:GroupNumber>0</v13:GroupNumber>
        <v13:PackageRating>
            <v13:ActualRateType>PAYOR_ACCOUNT_PACKAGE</v13:ActualRateType>
            <v13:PackageRateDetails>
                <v13:RateType>PAYOR_ACCOUNT_PACKAGE</v13:RateType>
                <v13:RatedWeightMethod>DIM</v13:RatedWeightMethod>
                <v13:BillingWeight>
                    <v13:Units>LB</v13:Units>
                    <v13:Value>17.0</v13:Value>
                </v13:BillingWeight>
                <v13:DimWeight>
                    <v13:Units>LB</v13:Units>
                    <v13:Value>17.0</v13:Value>
                </v13:DimWeight>
                <v13:BaseCharge>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>11.32</v13:Amount>
                </v13:BaseCharge>
                <v13:TotalFreightDiscounts>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>0.0</v13:Amount>
                </v13:TotalFreightDiscounts>
                <v13:NetFreight>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>11.32</v13:Amount>
                </v13:NetFreight>
                <v13:TotalSurcharges>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>9.48</v13:Amount>
                </v13:TotalSurcharges>
                <v13:NetFedExCharge>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>20.8</v13:Amount>
                </v13:NetFedExCharge>
                <v13:TotalTaxes>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>0.0</v13:Amount>
                </v13:TotalTaxes>
                <v13:NetCharge>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>20.8</v13:Amount>
                </v13:NetCharge>
                <v13:TotalRebates>
                    <v13:Currency>USD</v13:Currency>
                    <v13:Amount>0.0</v13:Amount>
                </v13:TotalRebates>
                <v13:Surcharges>
                    <v13:SurchargeType>ADDITIONAL_HANDLING</v13:SurchargeType>
                    <v13:Level>PACKAGE</v13:Level>
                    <v13:Description>Additional handling surcharge - dimension</v13:Description>
                    <v13:Amount>
                        <v13:Currency>USD</v13:Currency>
                        <v13:Amount>9.0</v13:Amount>
                    </v13:Amount>
                </v13:Surcharges>
                <v13:Surcharges>
                    <v13:SurchargeType>FUEL</v13:SurchargeType>
                    <v13:Level>PACKAGE</v13:Level>
                    <v13:Description>FedEx Ground Fuel</v13:Description>
                    <v13:Amount>
                        <v13:Currency>USD</v13:Currency>
                        <v13:Amount>0.48</v13:Amount>
                    </v13:Amount>
                </v13:Surcharges>
            </v13:PackageRateDetails>
        </v13:PackageRating>
        <v13:SignatureOption>SERVICE_DEFAULT</v13:SignatureOption>
    </v13:CompletedPackageDetails>
</v13:CompletedShipmentDetail>
以下是我目前在 THIRD_PARTY 付款方式的情况下收到的回复。(缺少上面显示的费率详细信息)
<v13:CompletedShipmentDetail>
<v13:UsDomestic>true</v13:UsDomestic>
<v13:CarrierCode>FDXG</v13:CarrierCode>
<v13:PackagingDescription>YOUR_PACKAGING</v13:PackagingDescription>
<v13:OperationalDetail>
    <v13:OriginLocationNumber>928</v13:OriginLocationNumber>
    <v13:DestinationLocationNumber>952</v13:DestinationLocationNumber>
    <v13:TransitTime>TWO_DAYS</v13:TransitTime>
    <v13:IneligibleForMoneyBackGuarantee>false</v13:IneligibleForMoneyBackGuarantee>
    <v13:DeliveryEligibilities>SATURDAY_DELIVERY</v13:DeliveryEligibilities>
    <v13:ServiceCode>92</v13:ServiceCode>
</v13:OperationalDetail>
<v13:CompletedPackageDetails>
    <v13:SequenceNumber>1</v13:SequenceNumber>
    <v13:TrackingIds>
        <v13:TrackingIdType>FEDEX</v13:TrackingIdType>
        <v13:TrackingNumber>TRACKING_NUMBER</v13:TrackingNumber>
    </v13:TrackingIds>
    <v13:GroupNumber>0</v13:GroupNumber>
    <v13:OversizeClass>OVERSIZE_2</v13:OversizeClass>
    <v13:OperationalDetail>
        <v13:OperationalInstructions>
            <v13:Number>2</v13:Number>
            <v13:Content>TRK#</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>7</v13:Number>
            <v13:Content>9622041730008000297100794662859700</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>8</v13:Number>
            <v13:Content>539J2/3F56/31D0</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>10</v13:Number>
            <v13:Content>7946 6285 9700</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>15</v13:Number>
            <v13:Content>95206</v13:Content>
        </v13:OperationalInstructions>
        <v13:OperationalInstructions>
            <v13:Number>18</v13:Number>
            <v13:Content>9622 0417 3 (000 800 0297) 1 00 7946 6285 9700</v13:Content>
        </v13:OperationalInstructions>
        <v13:Barcodes>
            <v13:BinaryBarcodes>
                <v13:Type>COMMON_2D</v13:Type>
                <v13:Value>REMOVED_BARCODE_DATA</v13:Value>
            </v13:BinaryBarcodes>
            <v13:StringBarcodes>
                <v13:Type>FEDEX_1D</v13:Type>
                <v13:Value>REMOVED_BARCODE_DATA</v13:Value>
            </v13:StringBarcodes>
        </v13:Barcodes>
        <v13:GroundServiceCode>417</v13:GroundServiceCode>
    </v13:OperationalDetail>
    <v13:Label>
        <v13:Type>OUTBOUND_LABEL</v13:Type>
        <v13:ShippingDocumentDisposition>RETURNED</v13:ShippingDocumentDisposition>
        <v13:ImageType>PNG</v13:ImageType>
        <v13:Resolution>200</v13:Resolution>
        <v13:CopiesToPrint>1</v13:CopiesToPrint>
        <v13:Parts>
            <v13:DocumentPartSequenceNumber>1</v13:DocumentPartSequenceNumber>
            <v13:Image>REMOVED_IMAGE_DATA</v13:Image>
        </v13:Parts>
    </v13:Label>
    <v13:SignatureOption>SERVICE_DEFAULT</v13:SignatureOption>
</v13:CompletedPackageDetails>
我是否需要在请求中发送一些标志来接收第三方付款的费率详细信息?或者 FEDEX 不会发送 THIRD_PARTY 付款案例中的运费详细信息吗?
任何帮助,将不胜感激。
谢谢
收到联邦快递支持团队的回复,如下所述。
“回答您的问题时,无论是 RECIPIENT 还是 THIRD_PARTY 结算,都不会返回费率详细信息。这被视为私人客户信息,只会为 SENDER 帐户提供。这是按设计工作的。”
希望它可以节省面临类似问题的人的时间:)。