예제 #1
0
        public GetAuthorizeAnswerResponse getAuthorizeAnswer(GetAuthorizeAnswerData gaa)
        {
            try
            {
                using (client = new AuthorizeService.AuthorizePortTypeClient(this.AuthorizeBinding, this.AuthorizeEndpoint))
                {
                    Console.WriteLine(client.Endpoint.Address);
                    HeaderHttpExtension.AddCustomHeaderUserInformation(new OperationContextScope(client.InnerChannel), this.Headers);

                    string statusMessage, authorizationKey, encodingMethod;
                    object payload;

                    var statusCode = client.GetAuthorizeAnswer(
                        gaa.getSecurity(),
                        gaa.getSession(),
                        gaa.getMerchant(),
                        gaa.getRequestKey(),
                        gaa.getAnswerKey(),
                        out statusMessage,
                        out authorizationKey,
                        out encodingMethod,
                        out payload);

                    GetAuthorizeAnswerResponse response = new GetAuthorizeAnswerResponse(statusCode, statusMessage, authorizationKey, encodingMethod, payload);
                    return response;
                }
            }
            catch (Exception ex)
            {
                GetAuthorizeAnswerResponse response = new GetAuthorizeAnswerResponse(0, ex.Message, "", "", "");
                return response;
            }
        }
예제 #2
0
파일: Program.cs 프로젝트: decidir/sdk-net
 public static GetAuthorizeAnswerData initGetAuthorizeAnswerData(SendAuthorizeRequestResponse sar)
 {
     string answerKey = "77215fe6-f9d5-f1c2-372b-c0065e0c4429";
     GetAuthorizeAnswerData gaa = new GetAuthorizeAnswerData();
     gaa.setMerchant(MERCHANT);
     gaa.setSecurity(SECURITY);
     gaa.setRequestKey(sar.getRequestKey());
     gaa.setAnswerKey(answerKey);
     return gaa;
 }
예제 #3
0
파일: Decidir.cs 프로젝트: decidir/sdk-net
 public GetAuthorizeAnswerResponse getAuthorizeAnswer(GetAuthorizeAnswerData gaa)
 {
     return auth.getAuthorizeAnswer(gaa);
 }