ccProcessing.CreateProcessor

Factory method that creates an instance of the appropriate processor. Use this method to create the appropriate provider.

ccProcessing CC = ccProcessing.CreateProcessor(CCType); if (CC == null) { this.SetError("Invalid Credit Card Processor or Processor not supported"); return false; } CC.MerchantId = App.Configuration.CCMerchantId; CC.MerchantPassword = App.Configuration.CCMerchantPassword; // ... set other properties bool Result = CC.ValidateCard(); // *** deal with the results Inv.Ccresult = CC.ValidatedResult; if (!Result) { this.ErrorMessage = CC.ValidatedMessage; Inv.Ccerror = this.ErrorMessage; } // *** Always write out the raw response if (wwUtils.Empty(CC.RawProcessorResult)) Inv.Ccresultx = CC.ValidatedMessage; else Inv.Ccresultx = CC.RawProcessorResult;


public static ccProcessing CreateProcessor(ccProcessors CCType)

Parameters

CCType
One of the supported Credit Card Processor Types


See also:

Class ccProcessing


 Last Updated: 9/11/2007 | Send topic feedback