rapidwebltd / amazon-mws-config-generator
Generate configuration files for PHP Amazon MWS library - https://github.com/CPIGroup/phpAmazonMWS
Installs: 1 540
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 1
Open Issues: 0
This package is auto-updated.
Last update: 2024-10-08 11:11:07 UTC
README
Generate configuration files for PHP Amazon MWS library - https://github.com/CPIGroup/phpAmazonMWS
Example usage
use RapidWeb\AmazonMwsConfigGenerator\ConfigGenerator; // Create an Amazon config, setting all variable as necessary $amazonConfig = new ConfigGenerator; $amazonConfig->setStoreName('My Shop'); $amazonConfig->setMerchantId('ABC'); $amazonConfig->setMarketplaceId('ABC'); $amazonConfig->setKeyId('ABC'); $amazonConfig->setSecretKey('ABC'); $amazonConfig->setMWSAuthToken('ABC'); $amazonConfig->setAmazonServiceURL('https://mws.amazonservices.com/'); $amazonConfig->setLogPath('/tmp/amazon-log.txt'); $amazonConfig->setMuteLog(false); $amazonConfig->setConfigPath('/tmp/config/'); // Save out Amazon config to a file $configPath = $amazonConfig->save(); // Pass in the generated config path to class you wish to use $amz=new AmazonFeed(null, false, null, $configPath); // Use as normal... $amz->setFeedType("_POST_INVENTORY_AVAILABILITY_DATA_"); $amz->setFeedContent($feed); $amz->submitFeed(); return $amz->getResponse(); // Delete previously generated amazon config (for temporary use) $amazonConfig->delete();