本文整理汇总了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";
}
}
示例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');
}
}
示例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";
}
}
示例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;
}
示例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";
}
}
示例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);
}
}
示例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";
}
}
示例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;
}
示例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()));
}
}
示例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;
}