當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MarketplaceWebService_Interface::submitFeed方法代碼示例

本文整理匯總了PHP中MarketplaceWebService_Interface::submitFeed方法的典型用法代碼示例。如果您正苦於以下問題:PHP MarketplaceWebService_Interface::submitFeed方法的具體用法?PHP MarketplaceWebService_Interface::submitFeed怎麽用?PHP MarketplaceWebService_Interface::submitFeed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MarketplaceWebService_Interface的用法示例。


在下文中一共展示了MarketplaceWebService_Interface::submitFeed方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: invokeSubmitFeed

 public function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
 {
     try {
         $response = $service->submitFeed($request);
         if ($response->isSetSubmitFeedResult()) {
             echo "<p>SubmitFeedResult</p>\n";
             $submitFeedResult = $response->getSubmitFeedResult();
             if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                 $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
                 if ($feedSubmissionInfo->isSetFeedSubmissionId()) {
                     echo "<p>FeedSubmissionId:\n";
                     echo " " . $feedSubmissionInfo->getFeedSubmissionId() . "</p>\n";
                 }
                 if ($feedSubmissionInfo->isSetFeedType()) {
                     echo "<p>FeedType:\n";
                     echo " " . $feedSubmissionInfo->getFeedType() . "</p>\n";
                 }
                 if ($feedSubmissionInfo->isSetSubmittedDate()) {
                     echo "<p>SubmittedDate:\n";
                     echo " " . $feedSubmissionInfo->getSubmittedDate()->format(DATE_FORMAT) . "</p>\n";
                 }
                 if ($feedSubmissionInfo->isSetFeedProcessingStatus()) {
                     echo "<p>FeedProcessingStatus:\n";
                     echo " " . $feedSubmissionInfo->getFeedProcessingStatus() . "</p>\n";
                 }
                 if ($feedSubmissionInfo->isSetStartedProcessingDate()) {
                     echo "<p>StartedProcessingDate\n";
                     echo " " . $feedSubmissionInfo->getStartedProcessingDate()->format(DATE_FORMAT) . "</p>\n";
                 }
                 if ($feedSubmissionInfo->isSetCompletedProcessingDate()) {
                     echo "<p>CompletedProcessingDate\n";
                     echo " " . $feedSubmissionInfo->getCompletedProcessingDate()->format(DATE_FORMAT) . "</p>\n";
                 }
             }
         }
     } catch (MarketplaceWebService_Exception $ex) {
         echo "Caught Exception: " . $ex->getMessage() . "\n";
         echo "Response Status Code: " . $ex->getStatusCode() . "\n";
         echo "Error Code: " . $ex->getErrorCode() . "\n";
         echo "Error Type: " . $ex->getErrorType() . "\n";
         echo "Request ID: " . $ex->getRequestId() . "\n";
         echo "XML: " . $ex->getXML() . "\n";
     }
 }
開發者ID:nuandy,項目名稱:alloy,代碼行數:44,代碼來源:SubmitFeed.php

示例2: invokeSubmitFeed

function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
{
    try {
        $response = $service->submitFeed($request);
        //file_put_contents('d:/public.txt',$response);
        //echo ("Service Response\n");
        //echo ("=============================================================================\n");
        //echo ("        SubmitFeedResponse\n");
        if ($response->isSetSubmitFeedResult()) {
            //echo ("            SubmitFeedResult\n");
            $submitFeedResult = $response->getSubmitFeedResult();
            if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                //echo ("                FeedSubmissionInfo\n");
                $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
            }
        }
        return $feedSubmissionInfo->getFeedSubmissionId();
    } catch (MarketplaceWebService_Exception $ex) {
        $str = "Caught Exception: " . $ex->getMessage() . "\r\n" . "Response Status Code: " . $ex->getStatusCode() . "\r\n" . "Error Code: " . $ex->getErrorCode() . "\r\n" . "Error Type: " . $ex->getErrorType() . "\r\n" . "Request ID: " . $ex->getRequestId() . "\r\n" . "XML: " . $ex->getXML() . "\r\n" . "ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "\r\n";
        errorLog($str, 'N');
    }
}
開發者ID:ohjack,項目名稱:newErp,代碼行數:22,代碼來源:update_order_shipingdetail_to_amazon_new.php

示例3: invokeSubmitFeed

function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
{
    try {
        $response = $service->submitFeed($request);
        if ($response->isSetSubmitFeedResult()) {
            $submitFeedResult = $response->getSubmitFeedResult();
            if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
                if ($feedSubmissionInfo->isSetFeedSubmissionId()) {
                    echo "                        " . $feedSubmissionInfo->getFeedSubmissionId() . "\n";
                }
            }
        }
        echo "            ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "\n";
    } catch (MarketplaceWebService_Exception $ex) {
        echo "Caught Exception: " . $ex->getMessage() . "\n";
        echo "Response Status Code: " . $ex->getStatusCode() . "\n";
        echo "Error Code: " . $ex->getErrorCode() . "\n";
        echo "Error Type: " . $ex->getErrorType() . "\n";
        echo "Request ID: " . $ex->getRequestId() . "\n";
        echo "XML: " . $ex->getXML() . "\n";
        echo "ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "\n";
    }
}
開發者ID:bizonix,項目名稱:sailvan,代碼行數:24,代碼來源:S.php

示例4: invokeSubmitFeed

 private function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
 {
     $feedSubmissionId = null;
     try {
         $response = $service->submitFeed($request);
         echo "Service Response\n";
         echo "=============================================================================\n";
         echo "        SubmitFeedResponse\n";
         if ($response->isSetSubmitFeedResult()) {
             echo "            SubmitFeedResult\n";
             $submitFeedResult = $response->getSubmitFeedResult();
             if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                 echo "                FeedSubmissionInfo\n";
                 $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
                 if ($feedSubmissionInfo->isSetFeedSubmissionId()) {
                     echo "                    FeedSubmissionId\n";
                     echo "                        " . $feedSubmissionInfo->getFeedSubmissionId() . "\n";
                     $feedSubmissionId = $feedSubmissionInfo->getFeedSubmissionId();
                 }
                 if ($feedSubmissionInfo->isSetFeedType()) {
                     echo "                    FeedType\n";
                     echo "                        " . $feedSubmissionInfo->getFeedType() . "\n";
                 }
                 if ($feedSubmissionInfo->isSetSubmittedDate()) {
                     echo "                    SubmittedDate\n";
                     echo "                        " . $feedSubmissionInfo->getSubmittedDate()->format(DATE_FORMAT) . "\n";
                 }
                 if ($feedSubmissionInfo->isSetFeedProcessingStatus()) {
                     echo "                    FeedProcessingStatus\n";
                     echo "                        " . $feedSubmissionInfo->getFeedProcessingStatus() . "\n";
                 }
                 if ($feedSubmissionInfo->isSetStartedProcessingDate()) {
                     echo "                    StartedProcessingDate\n";
                     echo "                        " . $feedSubmissionInfo->getStartedProcessingDate()->format(DATE_FORMAT) . "\n";
                 }
                 if ($feedSubmissionInfo->isSetCompletedProcessingDate()) {
                     echo "                    CompletedProcessingDate\n";
                     echo "                        " . $feedSubmissionInfo->getCompletedProcessingDate()->format(DATE_FORMAT) . "\n";
                 }
             }
         }
         if ($response->isSetResponseMetadata()) {
             echo "            ResponseMetadata\n";
             $responseMetadata = $response->getResponseMetadata();
             if ($responseMetadata->isSetRequestId()) {
                 echo "                RequestId\n";
                 echo "                    " . $responseMetadata->getRequestId() . "\n";
             }
         }
         echo "            ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "\n";
     } catch (MarketplaceWebService_Exception $ex) {
         echo "Caught Exception: " . $ex->getMessage() . "\n";
         echo "Response Status Code: " . $ex->getStatusCode() . "\n";
         echo "Error Code: " . $ex->getErrorCode() . "\n";
         echo "Error Type: " . $ex->getErrorType() . "\n";
         echo "Request ID: " . $ex->getRequestId() . "\n";
         echo "XML: " . $ex->getXML() . "\n";
         echo "ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "\n";
     }
     return $feedSubmissionId;
 }
開發者ID:priyankajsr19,項目名稱:indusdiva2,代碼行數:61,代碼來源:product-feed.php

示例5: invokeSubmitFeed

function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
{
    try {
        $response = $service->submitFeed($request);
        print_r($response);
        echo 'cccc';
        die;
        if ($response->isSetSubmitFeedResult()) {
            $submitFeedResult = $response->getSubmitFeedResult();
            if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
                if ($feedSubmissionInfo->isSetFeedSubmissionId()) {
                    echo "                        " . $feedSubmissionInfo->getFeedSubmissionId() . "\n";
                    $sb = "update ebay_order set ebay_markettime='{$mctime}',ShippedTime='{$mctime}' where ebay_id='{$ebay_id}'";
                    echo $sb . '<br>';
                    $dbConn->execute($sb);
                }
            }
        }
        echo "            ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "\n";
    } catch (MarketplaceWebService_Exception $ex) {
        echo "Caught Exception: " . $ex->getMessage() . "\n";
        echo "Response Status Code: " . $ex->getStatusCode() . "\n";
        echo "Error Code: " . $ex->getErrorCode() . "\n";
        echo "Error Type: " . $ex->getErrorType() . "\n";
        echo "Request ID: " . $ex->getRequestId() . "\n";
        echo "XML: " . $ex->getXML() . "\n";
        echo "ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "\n";
    }
}
開發者ID:bizonix,項目名稱:sailvan,代碼行數:30,代碼來源:S1.php

示例6: invokeSubmitFeed

 function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
 {
     try {
         $response = $service->submitFeed($request);
         if ($response->isSetSubmitFeedResult()) {
             $submitFeedResult = $response->getSubmitFeedResult();
             if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                 $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
                 if ($feedSubmissionInfo->isSetFeedSubmissionId()) {
                     $feedSubmissionId = $feedSubmissionInfo->getFeedSubmissionId();
                     $param['message'] = 'Order Acknowledged : Feed Submission Id - ' . $feedSubmissionId;
                     $obj = new Pwapresta();
                     $obj->generate_log($param);
                 }
             }
         }
     } catch (MarketplaceWebService_Exception $ex) {
         $message = 'MWS Feed API : Caught Exception : ' . $ex->getMessage() . "\n";
         $message .= "Response Status Code: " . $ex->getStatusCode() . "\n";
         $message .= "Error Code: " . $ex->getErrorCode() . "\n";
         $message .= "Error Type: " . $ex->getErrorType() . "\n";
         $param['message'] = $message;
         $obj = new Pwapresta();
         $obj->generate_log($param);
     }
 }
開發者ID:ankkal,項目名稱:SPN_project,代碼行數:26,代碼來源:SubmitFeed.php

示例7: invokeSubmitFeed

function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request, $ebay_id)
{
    global $dbcon, $mctime;
    try {
        $response = $service->submitFeed($request);
        if ($response->isSetSubmitFeedResult()) {
            $submitFeedResult = $response->getSubmitFeedResult();
            if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
                if ($feedSubmissionInfo->isSetFeedSubmissionId()) {
                    echo "                        " . $feedSubmissionInfo->getFeedSubmissionId() . "\n";
                    $sb = "update ebay_order set ebay_markettime='{$mctime}',ShippedTime='{$mctime}' where ebay_id='{$ebay_id}'";
                    echo '訂單編號: ' . $ebay_id . ' 標記發出成功到amazon' . '<br>';
                    $dbcon->execute($sb);
                }
            }
        }
        //   echo("            ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "\n");
    } catch (MarketplaceWebService_Exception $ex) {
        echo "Caught Exception: " . $ex->getMessage() . "\n";
        echo "Response Status Code: " . $ex->getStatusCode() . "\n";
        echo "Error Code: " . $ex->getErrorCode() . "\n";
        echo "Error Type: " . $ex->getErrorType() . "\n";
        echo "Request ID: " . $ex->getRequestId() . "\n";
        echo "XML: " . $ex->getXML() . "\n";
        echo "ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "\n";
    }
}
開發者ID:ohjack,項目名稱:newErp,代碼行數:28,代碼來源:S.php

示例8: invokeSubmitFeed

 function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
 {
     try {
         $response = $service->submitFeed($request);
         if ($response->isSetSubmitFeedResult()) {
             $submitFeedResult = $response->getSubmitFeedResult();
             if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                 $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
                 if ($feedSubmissionInfo->isSetFeedSubmissionId()) {
                     $result = new stdClass();
                     $result->FeedSubmissionId = $feedSubmissionInfo->getFeedSubmissionId();
                     $result->FeedProcessingStatus = $feedSubmissionInfo->getFeedProcessingStatus();
                     $result->FeedType = $feedSubmissionInfo->getFeedType();
                     $result->SubmittedDate = $feedSubmissionInfo->getSubmittedDate()->format(DATE_FORMAT);
                     $result->success = true;
                     // log to db - parsed request
                     $this->dblogger->updateLog(array('result' => json_encode($result), 'success' => 'Success'));
                     return $result;
                 }
             }
         }
     } catch (MarketplaceWebService_Exception $ex) {
         $error = new stdClass();
         $error->ErrorMessage = $ex->getMessage();
         $error->ErrorCode = $ex->getErrorCode();
         $error->StatusCode = $ex->getStatusCode();
         $error->success = false;
         return $error;
     }
     $result = new stdClass();
     $result->success = false;
     return $result;
 }
開發者ID:imranshuvo,項目名稱:wp-lister-for-amazon,代碼行數:33,代碼來源:WPLA_AmazonAPI.php

示例9: invokeSubmitFeed

/**
 * Submit Feed Action Sample
 * Uploads a file for processing together with the necessary
 * metadata to process the file, such as which type of feed it is.
 * PurgeAndReplace if true means that your existing e.g. inventory is
 * wiped out and replace with the contents of this feed - use with
 * caution (the default is false).
 *
 * @param MarketplaceWebService_Interface $service instance of MarketplaceWebService_Interface
 * @param mixed $request MarketplaceWebService_Model_SubmitFeed or array of parameters
 */
function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
{
    try {
        $response = $service->submitFeed($request);
        result("Service Response\n");
        result("=============================================================================\n");
        result("        SubmitFeedResponse\n");
        if ($response->isSetSubmitFeedResult()) {
            result("            SubmitFeedResult\n");
            $submitFeedResult = $response->getSubmitFeedResult();
            if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                result("                FeedSubmissionInfo\n");
                $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
                if ($feedSubmissionInfo->isSetFeedSubmissionId()) {
                    result("                    FeedSubmissionId\n");
                    result("                        " . $feedSubmissionInfo->getFeedSubmissionId() . "\n");
                    echo $feedSubmissionInfo->getFeedSubmissionId();
                }
                if ($feedSubmissionInfo->isSetFeedType()) {
                    result("                    FeedType\n");
                    result("                        " . $feedSubmissionInfo->getFeedType() . "\n");
                }
                if ($feedSubmissionInfo->isSetSubmittedDate()) {
                    result("                    SubmittedDate\n");
                    result("                        " . $feedSubmissionInfo->getSubmittedDate()->format(DATE_FORMAT) . "\n");
                }
                if ($feedSubmissionInfo->isSetFeedProcessingStatus()) {
                    result("                    FeedProcessingStatus\n");
                    result("                        " . $feedSubmissionInfo->getFeedProcessingStatus() . "\n");
                }
                if ($feedSubmissionInfo->isSetStartedProcessingDate()) {
                    result("                    StartedProcessingDate\n");
                    result("                        " . $feedSubmissionInfo->getStartedProcessingDate()->format(DATE_FORMAT) . "\n");
                }
                if ($feedSubmissionInfo->isSetCompletedProcessingDate()) {
                    result("                    CompletedProcessingDate\n");
                    result("                        " . $feedSubmissionInfo->getCompletedProcessingDate()->format(DATE_FORMAT) . "\n");
                }
            }
        }
        if ($response->isSetResponseMetadata()) {
            result("            ResponseMetadata\n");
            $responseMetadata = $response->getResponseMetadata();
            if ($responseMetadata->isSetRequestId()) {
                result("                RequestId\n");
                result("                    " . $responseMetadata->getRequestId() . "\n");
            }
        }
        result("            ResponseHeaderMetadata: " . $response->getResponseHeaderMetadata() . "\n");
    } catch (MarketplaceWebService_Exception $ex) {
        result("Caught Exception: " . $ex->getMessage() . "\n");
        result("Response Status Code: " . $ex->getStatusCode() . "\n");
        result("Error Code: " . $ex->getErrorCode() . "\n");
        result("Error Type: " . $ex->getErrorType() . "\n");
        result("Request ID: " . $ex->getRequestId() . "\n");
        result("XML: " . $ex->getXML() . "\n");
        result("ResponseHeaderMetadata: " . $ex->getResponseHeaderMetadata() . "\n");
        echo json_encode(array('Caught Exception' => $ex->getMessage(), 'Response Status Code' => $ex->getStatusCode(), 'Error Code' => $ex->getErrorCode()));
    }
}
開發者ID:adnanoner,項目名稱:purple-xmls-google-product-feed-for-woocommerce,代碼行數:71,代碼來源:upload_feed.php

示例10: invokeSubmitFeed

 /**
  * Submit Feed Action Sample
  * Uploads a file for processing together with the necessary
  * metadata to process the file, such as which type of feed it is.
  * PurgeAndReplace if true means that your existing e.g. inventory is
  * wiped out and replace with the contents of this feed - use with
  * caution (the default is false).
  *   
  * @param MarketplaceWebService_Interface $service instance of MarketplaceWebService_Interface
  * @param mixed $request MarketplaceWebService_Model_SubmitFeed or array of parameters
  * Added  to submit feeds through MWS (uses Amazon's MWS PHP SDK in magento/lib)
  */
 function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
 {
     try {
         $response = $service->submitFeed($request);
         $feedSubmissionId = null;
         if ($response->isSetSubmitFeedResult()) {
             $submitFeedResult = $response->getSubmitFeedResult();
             if ($submitFeedResult->isSetFeedSubmissionInfo()) {
                 $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
                 if ($feedSubmissionInfo->isSetFeedSubmissionId()) {
                     $feedSubmissionId = $feedSubmissionInfo->getFeedSubmissionId();
                 }
             }
         }
     } catch (MarketplaceWebService_Exception $ex) {
         Mage::log("Caught Exception: " . $ex->getMessage() . "\n");
         Mage::log("Response Status Code: " . $ex->getStatusCode() . "\n");
         Mage::log("Error Code: " . $ex->getErrorCode() . "\n");
         Mage::log("Error Type: " . $ex->getErrorType() . "\n");
         Mage::log("Request ID: " . $ex->getRequestId() . "\n");
         Mage::log("XML: " . $ex->getXML() . "\n");
         return null;
     }
     return $feedSubmissionId;
 }
開發者ID:xiaoguizhidao,項目名稱:blingjewelry-prod,代碼行數:37,代碼來源:Document.php


注:本文中的MarketplaceWebService_Interface::submitFeed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。