コード例 #1
0
        /// <summary>
        /// Authorization
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        public PcidssResponse StepOne(StepOneRequest req)
        {
            PcidssResponse response;

            req.merchant_id = FondyConfig.MerchantId;
            req.version     = FondyConfig.Protocol;
            req.signature   = Signature.GetRequestSignature(RequiredParams.GetHashProperties(req));
            try
            {
                response = Client.Invoke <StepOneRequest, PcidssResponse>(req, req.ActionUrl);
            }
            catch (ClientException c)
            {
                response = new PcidssResponse {
                    Error = c
                };
            }

            if (response.data != null && FondyConfig.Protocol == "2.0")
            {
                return(JsonFormatter.ConvertFromJson <PcidssResponse>(response.data, true, "order"));
            }

            return(response);
        }