I've got this code working with PHP 5's SOAP implementation, but I need to be able to send attachments so I have to convert it to work with NuSoap. I think I can figure the rest out once I just get the connection working. If you can help please do.
class AmazonMerchant
{
public $merchantIdentifier ;
public $merchantName ;
}
$classmap = array(
'Merchant' => 'AmazonMerchant'
);
$params = array(
'classmap' => $classmap,
'login' => 'username',
'password' => 'password',
'trace' => 1,
'exceptions' => 1
);
$client = new soapclient('https://merchant-api.amazon.com/gateway/merchant-interface-mime',$params);
$merchant = new AmazonMerchant() ;
$merchant->merchantIdentifier = 'Account_ID' ;
$merchant->merchantName = 'AccountName';
try
{
$response = $client->getAllPendingDocumentInfo($merchant, '_GET_ORDERS_DATA_') ;
$response = $client->__getLastResponse();
}
catch(SoapFault $fault) {
print_r($fault); // here ex returns us that there "looks like we got no XML document"
$response = $client->__getLastResponse();
echo $client->__getLastRequest();
}
|
Does anyone understand how both work well enough to help me rewrite this for use with NuSoap? I'm pretty sure the problem has to do with the $params array and maybe the $merchant class. Any help would be appreciated.