当前位置: 首页>>代码示例>>PHP>>正文


PHP soapclient::AddAPACShippingPackage方法代码示例

本文整理汇总了PHP中soapclient::AddAPACShippingPackage方法的典型用法代码示例。如果您正苦于以下问题:PHP soapclient::AddAPACShippingPackage方法的具体用法?PHP soapclient::AddAPACShippingPackage怎么用?PHP soapclient::AddAPACShippingPackage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在soapclient的用法示例。


在下文中一共展示了soapclient::AddAPACShippingPackage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

     $goodsinfo['customsName'] = $hsinfo['customsName'];
     $customsNameEN = $hsinfo['customsNameEN'] ? $hsinfo['customsNameEN'] : $ebay_itemtitle;
     $customsName = $hsinfo['customsName'] ? $goodsinfo['customsName'] : $ebay_itemtitle;
     $DeclaredValue = 1;
     //不知从哪里获取,定义为1
     if (!in_array($ebay_itemid . '-' . $ebay_tid, $unique_item_tid)) {
         $unique_item_tid[] = $ebay_itemid . '-' . $ebay_tid;
         $item[] = array('CurrencyCode' => $ebay_currency, 'EBayEmail' => $ebay_usermail, 'EBayBuyerID' => $ebay_userid, 'EBayItemID' => $ebay_itemid, 'EBayItemTitle' => $ebay_itemtitle, 'EBayMessage' => '', 'EBaySiteID' => "0", 'EBayTransactionID' => $ebay_tid, 'Note' => '', 'OrderSalesRecordNumber' => $recordnumber, 'PaymentDate' => $ebay_paidtime, 'PayPalEmail' => "0", 'PayPalMessage' => '', 'PostedQTY' => $ebay_amount, 'ReceivedAmount' => $ebay_total, 'SalesRecordNumber' => $recordnumber, 'SoldDate' => $ebay_createdtime, 'SoldPrice' => $ebay_itemprice, 'SoldQTY' => $ebay_amount, 'SKU' => array('SKUID' => $sku, 'Weight' => $weight * $ebay_amount, 'CustomsTitleCN' => $customsName, 'CustomsTitleEN' => $customsNameEN . ' ' . $sku, 'DeclaredValue' => $DeclaredValue * $ebay_amount, 'OriginCountryName' => "China", 'OriginCountryCode' => "CN"));
     }
 }
 sort($item);
 //EUB异常订单申请订单,修改料号,没有对应的物品交易号,不能申请跟踪号问题解决
 $params = array('Version' => "3.0.0", 'APIDevUserID' => $APIDevUserID, 'APIPassword' => $APIPassword, 'APISellerUserID' => $APISellerUserID, 'MessageID' => "135625622432", "OrderDetail" => array("PickUpAddress" => $PickUpAddress, "ShipFromAddress" => $ShipFromAddress, "ShipToAddress" => $ShipToAddress, "ItemList" => array("Item" => $item), "EMSPickUpType" => $shiptype, "ReturnAddress" => $ReturnAddress));
 var_dump($params);
 try {
     $functions = @$soapclient->AddAPACShippingPackage(array("AddAPACShippingPackageRequest" => $params));
 } catch (Exception $e) {
     print $e->getMessage();
     continue;
 }
 var_dump($shipOrderId, $APIDevUserID, $functions);
 foreach ($functions as $aa) {
     $bb = (array) $aa;
     $ack = $bb['Ack'];
     if ($ack != 'Failure') {
         $TrackCode = $bb['TrackCode'];
         echo $TrackCode . "\n";
         $trackNumberData = array('tracknumber' => $TrackCode, 'shipOrderId' => $shipOrderId, 'createdTime' => time());
         if (!WhOrderTracknumberModel::insert($trackNumberData)) {
             echo $log .= "发货单-{$shipOrderId}插入跟踪号{$TrackCode}信息表失败\n";
         }
开发者ID:ohjack,项目名称:newErp,代码行数:31,代码来源:wh_eub_tracknumber_ebay.php

示例2: isset


//.........这里部分代码省略.........
     		$skuInfo = $memc_obj->get_extral("sku_info_" . $sku);
     		$DeclaredValue = $skuInfo['goods_sbjz'] * $amount ? $skuInfo['goods_sbjz'] * $amount : 1; //申报价值
     		$Weight = $skuInfo['goods_weight'] * $amount ? $skuInfo['goods_weight'] * $amount : 0.01; //重量
     		$CustomsTitleCN = $skuInfo['goods_zysbmc'] ? $skuInfo['goods_zysbmc'] : $sku; //中文申报名称
     		$CustomsTitleEN = $skuInfo['goods_ywsbmc'] ? $skuInfo['goods_ywsbmc'] : $sku; //英文申报名称
     		$OriginCountryCode = 'CN'; //原产地简码
     		//echo "##".$EBayItemID."##";
     		/*if((!in_array($ebay_itemid.'-'.$ebay_tid, $unique_item_tid))){
     			$unique_item_tid[] = $ebay_itemid.'-'.$ebay_tid;
     			$item[$i]		= array(
     			'CurrencyCode' => $ebay_currency,
     			'EBayEmail' => $ebay_usermail,
     			'EBayBuyerID' => $ebay_userid,
     			'EBayItemID' => $ebay_itemid,
     			'EBayItemTitle' => $ebay_itemtitle,
     			'EBayMessage' => $ebay_note,
     			'EBaySiteID' => "0",
     			'EBayTransactionID' => $ebay_tid,  
     			'Note' => $ebay_noteb,  
     			'OrderSalesRecordNumber' => $recordnumber,
     			'PaymentDate' => $ebay_paidtime,
     			'PayPalEmail' => "0",
     			'PayPalMessage' => $ebay_note,
     			'PostedQTY' => $ebay_amount,
     			'ReceivedAmount' => $ebay_total,
     			'SalesRecordNumber' => $recordnumber1,
     			'SoldDate'			=> $ebay_createdtime,
     			'SoldPrice'			=> $ebay_itemprice,
     			'SoldQTY' 			=> $ebay_amount,
     			'SKU'				=>array(
     								'SKUID' => $sku,
     								'Weight' => $weight * $ebay_amount,
     								'CustomsTitleCN' => $goods_zysbmc,
     								'CustomsTitleEN' => $goods_ywsbmc.' '.$sku,
     								'DeclaredValue' => $goods_sbjz*$ebay_amount,
     								'OriginCountryName' => "China",
     								'OriginCountryCode' => "CN",
     								)
     			);
     		}*/
     $where = "WHERE omOrderId='{$omOrderId}'";
     $orderarr = OrderindexModel::showSearchOrderList("om_unshipped_order", $where);
     //print_r($orderarr);
     $unique_item_tid = array();
     foreach ($orderarr as $key => $order) {
         foreach ($order['orderDetail'] as $k => $detail) {
             $sku = $detail['orderDetailData']['sku'];
             $amount = $detail['orderDetailData']['amount'];
             //$goods = ExportsToXlsModel::getGoods($detail['orderDetailData']['sku']);
             $skus = GoodsModel::get_realskuinfo($detail['orderDetailData']['sku']);
             foreach ($skus as $k => $v) {
                 $goods = GoodsModel::getSkuList($k);
                 if (!in_array($detail['orderDetailExtenData']['itemId'] . '-' . $detail['orderDetailExtenData']['transId'], $unique_item_tid)) {
                     $unique_item_tid[] = $detail['orderDetailExtenData']['itemId'] . '-' . $detail['orderDetailExtenData']['transId'];
                     $Item[] = array('EBayBuyerID' => $order['orderUserInfoData']['platformUsername'], 'EBayItemID' => $detail['orderDetailExtenData']['itemId'], 'EBayEmail' => $order['orderUserInfoData']['email'], 'EBayTransactionID' => $detail['orderDetailExtenData']['transId'], 'PostedQTY' => $detail['orderDetailData']['amount'], 'EBaySiteID' => "0", 'PayPalEmail' => "0", 'EBayItemTitle' => $detail['orderDetailExtenData']['itemTitle'], 'OrderSalesRecordNumber' => $order['orderData']['recordNumber'], 'EBayMessage' => $order['orderExtenData']['feedback'], 'CurrencyCode' => $order['orderExtenData']['currency'], 'SoldDate' => date("Y-m-d", $order['orderData']['ordersTime']), 'SoldPrice' => $detail['orderDetailData']['itemPrice'], 'SoldQTY' => $detail['orderDetailData']['amount'], 'ReceivedAmount' => $order['orderData']['actualTotal'], 'PayPalMessage' => $order['orderExtenData']['feedback'], 'PaymentDate' => date("Y-m-d", $order['orderData']['paymentTime']), 'SalesRecordNumber' => $order['orderData']['recordNumber'], 'Note' => isset($order['orderNote'][0]['content']) ? $order['orderNote'][0]['content'] : "", 'SKU' => array('SKUID' => $detail['orderDetailData']['sku'], 'Weight' => $goods['goodsWeight'] * $amount * $v, 'CustomsTitleCN' => $goods['goodsName'], 'CustomsTitleEN' => $sku, 'DeclaredValue' => $detail['orderDetailData']['itemPrice'] * $amount * $v, 'OriginCountryName' => "China", 'OriginCountryCode' => "CN"));
                 }
             }
         }
     }
     $url_test = "http://epacketws.pushauction.net/v3/orderservice.asmx?WSDL";
     $url = "http://shippingapi.ebay.cn/production/v3/orderservice.asmx?wsdl";
     $soapclient = new soapclient($url);
     $params = array('Version' => "3.0.0", 'APIDevUserID' => $APIDevUserID, 'APIPassword' => $APIPassword, 'APISellerUserID' => $APISellerUserID, "OrderDetail" => array("PickUpAddress" => $PickUpAddress, "ShipFromAddress" => $ShipFromAddress, "ShipToAddress" => $ShipToAddress, "ItemList" => array("Item" => $Item), "EMSPickUpType" => $shiptype, "ReturnAddress" => $ReturnAddress));
     try {
         //print_r($params);
         $functions = $soapclient->AddAPACShippingPackage(array("AddAPACShippingPackageRequest" => $params));
         //echo "dfg";
         foreach ($functions as $value) {
             $bb = (array) $value;
             $ack = $bb['Ack'];
             if ($ack == 'Success') {
                 $TrackCode = $bb['TrackCode'];
                 //这里插入记录到records表中
                 $tName = 'om_order_tracknumber';
                 $set = "SET omOrderId='{$omOrderId}',addUser='{$addUser}',tracknumber='{$TrackCode}',createdTime='" . time() . "'";
                 $affectRow = OmAvailableModel::insertRow($tName, $set);
                 if ($affectRow) {
                     self::$errCode = '200';
                     self::$errMsg = "success";
                     return 200;
                 } else {
                     self::$errCode = '0011';
                     self::$errMsg = "添加跟踪号失败";
                     return 11;
                 }
             } else {
                 $tName = 'om_order_notes';
                 $set = "SET omOrderId='{$omOrderId}',content='{$bb['Message']}',userId='{$addUser}',createdTime='" . time() . "'";
                 $affectRow = OmAvailableModel::insertRow($tName, $set);
                 self::$errCode = '0012';
                 self::$errMsg = $bb['Message'];
                 return 12;
             }
         }
     } catch (Exception $e) {
         self::$errCode = '0013';
         self::$errMsg = $e->getMessage();
         return 0;
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:omEUBTrackNumber.action.php


注:本文中的soapclient::AddAPACShippingPackage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。