public static void ProcessPayment(ARPaymentCCProcessing aProcessingGraph, ARPaymentInfo aDoc) { aProcessingGraph.Clear(); aProcessingGraph.Document.Current = aProcessingGraph.Document.Search <ARPayment.docType, ARPayment.refNbr>(aDoc.DocType, aDoc.RefNbr); ARPaymentEntry.CheckValidPeriodForCCTran(aProcessingGraph, aProcessingGraph.Document.Current); CCPaymentEntry.CaptureCCPayment <ARPayment>(aDoc, aProcessingGraph.ccProcTran, true, ARPaymentEntry.UpdateARPaymentAndSetWarning); }
public static void ProcessPayment(ARPaymentCCProcessing aProcessingGraph, ARPaymentInfo aDoc) { aProcessingGraph.Clear(); aProcessingGraph.Document.Current = aProcessingGraph.Document.Search <ARPayment.docType, ARPayment.refNbr>(aDoc.DocType, aDoc.RefNbr); ARPaymentEntry graph = CreateInstance <ARPaymentEntry>(); graph.Document.Current = aDoc; var ext = graph.GetExtension <ARPaymentEntry.PaymentTransaction>(); ext.CheckHeldForReviewTranStatus(aDoc); ARPaymentEntry.CheckValidPeriodForCCTran(aProcessingGraph, aProcessingGraph.Document.Current); CCPaymentEntry paymentEntry = new CCPaymentEntry(aProcessingGraph); paymentEntry.AddAfterProcessCallback(ARPaymentEntry.PaymentTransaction.ChangeDocProcessingStatus); paymentEntry.AddAfterProcessCallback(ARPaymentEntry.PaymentTransaction.UpdateARPaymentAndSetWarning); paymentEntry.AddAfterProcessCallback(PaymentTransactionGraph <ARPaymentCCProcessing, ARPayment> .ReleaseARDocument); paymentEntry.AddAfterProcessCallback(PaymentTransactionGraph <ARPaymentCCProcessing, ARPayment> .CheckForHeldForReviewStatusAfterProc); paymentEntry.CaptureCCpayment(aDoc, new GenericExternalTransactionAdapter <ExternalTransaction>(aProcessingGraph.ExtTran)); }
public static void ProcessPayment(ARPaymentCCProcessing aProcessingGraph, ARPaymentInfo aDoc) { aProcessingGraph.Clear(); aProcessingGraph.Document.Current = aProcessingGraph.Document.Search <ARPayment.docType, ARPayment.refNbr>(aDoc.DocType, aDoc.RefNbr); CCPaymentEntry.CaptureCCPayment <ARPayment>(aDoc, aProcessingGraph.ccProcTran, true); }