Esempio n. 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;
            }
        }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public GetAuthorizeAnswerResponse getAuthorizeAnswer(GetAuthorizeAnswerData gaa)
 {
     return auth.getAuthorizeAnswer(gaa);
 }