Пример #1
0
        public Response GetMerchantAccountPropertyMetadata(Request request)
        {
            string methodName = "GetMerchantAccountPropertyMetadata";

            // Check null request
            List <PaymentError> errors = new List <PaymentError>();

            if (request == null)
            {
                errors.Add(new PaymentError(ErrorCode.InvalidRequest, "Request is null."));
                return(PaymentUtilities.CreateAndLogResponseForReturn(methodName, this.Name, Platform, locale: null, properties: null, errors: errors));
            }

            // Prepare response
            List <PaymentProperty> properties = new List <PaymentProperty>();
            PaymentProperty        property;

            property = new PaymentProperty(
                GenericNamespace.MerchantAccount,
                MerchantAccountProperties.AssemblyName,
                this.GetAssemblyName());
            property.SetMetadata("Assembly Name:", "The assembly name of the test provider", false, true, 0);
            properties.Add(property);

            Response response = new Response();

            response.Locale     = request.Locale;
            response.Properties = properties.ToArray();
            if (errors.Count > 0)
            {
                response.Errors = errors.ToArray();
            }

            PaymentUtilities.LogResponseBeforeReturn(methodName, this.Name, Platform, response);
            return(response);
        }