Skip to main content

Notifications

Supply chain | Supply Chain Management, Commerce
Unanswered

Getting error while using custom tender type Id on tender line

Posted on by 62

Hello Retail experts,

I have created a custom payment method (5001) in the back office and added a custom Default function by extending the enum. I have created a new payment method (5001) on the store using my custom payment method and I have configured my custom POS operation (5001) there.

pastedimage1669389527127v2.png

pastedimage1669389622330v3.png

I have also implemented a POS operation that adds a tender line to the cart with Tender type Id = 5001

I am getting the below exception while adding a tender line to the cart with my custom tender type Id (5001). When I use any other tender type Id (Cash or Other), I don't get any error and am able to complete the transaction.

pastedimage1669389161762v1.png
I also tried to debug the request handler for SaveTenderLineRequest to get more information on the exception. I am getting below exception on CRT.

pastedimage1669390614294v5.png

Below is the stack trace of CRT exception:

"   at Microsoft.Dynamics.Commerce.Runtime.Services.PaymentManagerService.<ResolvePaymentService>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Dynamics.Commerce.Runtime.Services.PaymentManagerService.<AuthorizePayment>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.<Execute>d__48`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.<Execute>d__48`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Dynamics.Commerce.Runtime.Workflow.CartWorkflowHelper.<AddOrUpdateTenderLine>d__39.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Dynamics.Commerce.Runtime.Workflow.SaveTenderLineRequestHandler.<CalculateRequiredReasonCodesAndAddOrUpdateTenderLine>d__8.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Dynamics.Commerce.Runtime.Workflow.SaveTenderLineRequestHandler.<CreateTenderLine>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Dynamics.Commerce.Runtime.Workflow.SaveTenderLineRequestHandler.<Process>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.<Execute>d__48`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.<Execute>d__48`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at Contoso.ModernPosPackagingSample.CommerceRuntime.RequestHandlers.MyTest.<Execute>d__2.MoveNext()"


Any idea what else I am missing?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans