Jump to content

holepro

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

holepro's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the response. I just figured out my problem that had been staring me in the face for a very long time. The function -- function invokeGetReportList(MarketplaceWebService_Interface $service, $request) Had 'echos' to print out the values coming back including the headers for the value. I have now created an array within the function and directly pass the value into the array *** foreach ($reportInfoList as $reportInfo) { echo(" ReportInfo\n"); if ($reportInfo->isSetReportId()) { echo(" ReportId\n"); echo(" " . $reportInfo->getReportId() . "\n"); $azreports[$i]=$reportInfo->getReportId() ; $i++; ** The above code isn't working yet, but I'm fairly certain I'm moving in the right direction, and I should have figured this out before posting this question, but I'm a novice PHP programmer and know enough to be dangerous. Closing out this problem/question. Thanks for your comments again
  2. I'm a PHP newbie and trying to get addressability to an Amazon sample program GetReportListSample found in amazon-mws-v20090101-php-2011-08-01._V147626421_.zip I successfully get the data from the following: invokeGetReportList($service, $request); The following data is returned as **** Service Response ============================================================================= GetReportListResponse GetReportListResult HasNext ReportInfo ReportId 6014247793 ReportType _GET_ORDERS_DATA_ ReportRequestId 5013134548 AvailableDate 2012-03-24T20:01:41Z Acknowledged **** I'm trying to figure out the code on how to get the value (6014247793) in the ReportInfo->ReportId->6014247793 location. I have unsuccessfully tried different scenarios of "foreach" which may not be the right method to use If anyone can point me in a direction to get the results into an array, I'd appreciate it. Thanks in advance for your help Peggy
  3. I can call the following function successfully as a single php program // Acknowledge and clear the orders function ack($client, $merchant, $id) { $docs = array('string' => $id); $params = array('merchant' => $merchant, 'documentIdentifierArray' => $docs); $result = $client->call('postDocumentDownloadAck', $params); return $result; } with $result = ack($t, $merchant,'2779540483'); successful output [documentDownloadAckProcessingStatus] => _SUCCESSFUL_ [documentID] => 2779540483 I'm trying to figure out how to call this function as an object from another program. Trying the following gives error ***Call to a member function call() on a non-object*** function postDocumentDownloadAck($t, $merchant, $id) { $this->error = null; $docs = array('string' => $this->id); $params = array('merchant' => $this->merchant, 'documentIdentifierArray' => $docs); ** I've tried the following which does nothing $result = $this->soap->call('postDocumentDownloadAck', $params); ** I've tried the following - which gives error "Call to a member function call() on a non-object" $result = $this->t->soap->call('postDocumentDownloadAck', $params); if($this->soap->fault) { $this->error = $result; return false; } return $result; } *** calling program snippet for above function $merchant= array( "merchant"=> $merchantid, "merchantName" => $merchantname, "email"=> $login, "password"=> $password); $t = new AmazonMerchantAPI($merchantid, $merchantname, $login, $password); $documentlist= $t->GetAllPendingDocumentInfo('_GET_ORDERS_DATA_'); $docid = $documentlist['MerchantDocumentInfo'][$i]['documentID']; $docs = array('string' => $docid); $ackorders = $t->postDocumentDownloadAck($t, $merchant,$docs); Any ideas of what I'm doing wrong are greatly appreciated.
  4. THANK YOU SHAWN.. this is what I needed.. really appreciate your help. Have a super evening!
  5. Given the following array $documentlist, displayed from print_r Array ( [MerchantDocumentInfo] => Array ( [0] => Array ( [documentID] => 2760322451 [generatedDateTime] => 2010-08-03T16:02:45-07:00 ) [1] => Array ( [documentID] => 2761837402 [generatedDateTime] => 2010-08-03T23:01:15-07:00 ) ) ) I'm trying to figure out the syntax to use the documentID as a dynamic variable When I 'hard code' the variable, I get the document I want eg $order = $t->GetDocument('2760322451'); -- returns requested document info into $order array where $order is an array and $t are my connection credentials. I've made numerous attempts, but get errors in anything I try. Can someone tell me the correct syntax to use to pass a dynamic value for documentID from the $documentlist array at the top? I've tried $order = $t->GetDocument($documentlist['MerchantDocumentInfo'[0]]['documentID']) ; and get ===> syntax error, unexpected '[', expecting ']' $order = $t->GetDocument($documentlist->MerchantDocumentInfo[0]['documentID']) ; get nothing $order = $t->GetDocument($documentlist->MerchantDocumentInfo[1]['documentID']) ; get nothing $order = $t->GetDocument($documentlist->MerchantDocumentInfo[1][documentID]) ; get nothing Thanks in advance for any ideas, I've been trying to figure this out for days.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.