Skip to main content

Hello,

On my payment plugin I’m getting the error

Value cannot be null.
Parameter name: source

 at System.Linq.Enumerable.WhereeTSource](IEnumerable`1 source, Func`2 predicate)
   at PX.Objects.Extensions.PaymentTransaction.PaymentTransactionAcceptFormGraph`2.GetTransByDoc(ICCPayment payment, IEnumerable`1 trans) in C:\build\code_repo\WebSites\Pure\PX.Objects\Extensions\PaymentTransaction\PaymentTransactionAcceptFormGraph.cs:line 1033
   at PX.Objects.Extensions.PaymentTransaction.PaymentTransactionAcceptFormGraph`2.<>c__DisplayClass29_0.<CheckPaymentTransaction>b__0(IEnumerable`1 i) in C:\build\code_repo\WebSites\Pure\PX.Objects\Extensions\PaymentTransaction\PaymentTransactionAcceptFormGraph.cs:line 617
   at PX.CCProcessingBase.RetryPolicy`1.DoExecute(Func`1 execAcion)
   at PX.CCProcessingBase.RetryPolicy`1.Execute(Func`1 execAcion)
   at PX.Objects.Extensions.PaymentTransaction.PaymentTransactionAcceptFormGraph`2.CheckPaymentTransaction(TPrimary doc) in C:\build\code_repo\WebSites\Pure\PX.Objects\Extensions\PaymentTransaction\PaymentTransactionAcceptFormGraph.cs:line 620
   at PX.Objects.Extensions.PaymentTransaction.PaymentTransactionAcceptFormGraph`2.DoValidateCCPayment(TPrimary doc) in C:\build\code_repo\WebSites\Pure\PX.Objects\Extensions\PaymentTransaction\PaymentTransactionAcceptFormGraph.cs:line 145

 

 

This happen only if the user start the payment and didn’t complete it, so the payment is already added and turned to  into pending processing status, but no transaction IDs were received because the user didn’t complete


How can we fix that error? on Auth.Net when you do the same the validate is working and the transaction is marked as doesn’t exists 

 

 

This error is happening when trying to “Validate Card Payment”

 

 

 


The issue was that GetUnsettledTransactions function implementaion was returning Null which was casuing the error.


Thank you for sharing your solution with the community ​@safetynetweb!


Reply