Esempio n. 1
0
    def _get_merchant(self, id):
        """
		Cimri service'den belli bir merchanti alir

		@type id: str
		@param id: merchant ID

		@rtype: L{cimri.api.cimriservice.data.merchant.MerchantInfo}
		@return: MerchantInfo objecti
                """

        self.logger.info("getting merchant..." + str(id))

        # get active merchants
        api = MerchantsAPI()
        merchant = api.get_merchant(id)
        if merchant is None:
            self._log_error("error getting cimri service merchant " + str(id))
            self.logger.warn("did not get merchant from cimri-service")
            return None

        return merchant