Exemplo n.º 1
0
            public string CreatePaymentProfile()
            {
                V1.APIResponse response = new V1.APIResponse();
                string         profileId;

                _processor.CreatePMI(response, out profileId);
                ProcessAPIResponse(response);
                return(profileId);
            }
Exemplo n.º 2
0
            public string CreateCustomerProfile()
            {
                V1.APIResponse response = new V1.APIResponse();
                string         customerId;

                _processor.CreateCustomer(response, out customerId);
                ProcessAPIResponse(response);
                return(customerId);
            }
Exemplo n.º 3
0
            public IEnumerable <V2.CreditCardData> GetMissingPaymentProfiles()
            {
                V1.ICCProcessingHostedForm processor    = GetProcessor();
                V1.APIResponse             response     = new V1.APIResponse();
                V1.SyncPMResponse          syncResponse = new V1.SyncPMResponse();
                processor.SynchronizePaymentMethods(response, syncResponse);
                List <V2.CreditCardData>        cardList        = GetCardData(syncResponse);
                IEnumerable <V2.CreditCardData> missingProfiles = cardList.Except(GetExistingProfiles(_provider), new V2.InterfaceExtensions.CreditCardDataEqualityComparer());

                return(missingProfiles);
            }
Exemplo n.º 4
0
            public V2.CreditCardData GetPaymentProfile()
            {
                V1.APIResponse    response     = new V1.APIResponse();
                V1.SyncPMResponse syncResponse = new V1.SyncPMResponse();
                _processor.GetPMI(response, syncResponse);
                ProcessAPIResponse(response);
                List <V2.CreditCardData> cardList = GetCardData(syncResponse);

                if (cardList.Count != 1)
                {
                    throw new PXException(V1.Messages.UnexpectedResult, _plugin.GetType().Name);
                }
                return(cardList[0]);
            }
            public void TestCredentials(V1.APIResponse apiResponse)
            {
                V2SettingsGenerator seetingsGen = new V2SettingsGenerator(_provider);

                try
                {
                    _plugin.TestCredentials(seetingsGen.GetSettings());
                    V1ProcessingDTOGenerator.ApiResponseSetSuccess(apiResponse);
                }
                catch (V2.CCProcessingException e)
                {
                    V1ProcessingDTOGenerator.ApiResponseSetError(apiResponse, e);
                }
            }
Exemplo n.º 6
0
 public void DeletePaymentProfile()
 {
     V1.APIResponse response = new V1.APIResponse();
     _processor.DeletePMI(response);
     ProcessAPIResponse(response);
 }
Exemplo n.º 7
0
 public void DeleteCustomerProfile()
 {
     V1.APIResponse response = new V1.APIResponse();
     _processor.DeleteCustomer(response);
     ProcessAPIResponse(response);
 }
Exemplo n.º 8
0
 public void GetManageForm()
 {
     V1.ICCProcessingHostedForm processor = GetProcessor();
     V1.APIResponse             response  = new V1.APIResponse();
     processor.ManagePaymentMethodHostedForm(response, processor.GetCallbackURL());
 }
 public static void ApiResponseSetError(V1.APIResponse apiResponse, V2.CCProcessingException e)
 {
     apiResponse.ErrorSource           = V1.CCErrors.CCErrorSource.ProcessingCenter;
     apiResponse.isSucess              = false;
     apiResponse.Messages["Exception"] = e.Message;
 }
 public static void ApiResponseSetSuccess(V1.APIResponse apiResponse)
 {
     apiResponse.isSucess    = true;
     apiResponse.ErrorSource = V1.CCErrors.CCErrorSource.None;
     apiResponse.Messages    = null;
 }
 public void TestCredentials(V1.APIResponse apiResponse)
 {
     _plugin.Initialize(_provider.GetProcessingCenterSettingsStorage(), null, null);
     _plugin.TestCredentials(apiResponse);
 }