logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to forums.ablecommerce.com. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
ray22901031  
#1 Posted : Wednesday, November 17, 2021 8:55:05 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 506

Thanks: 2 times
Was thanked: 8 time(s) in 8 post(s)
Hopefully support can shed some light on this, we are using the new PayFlow Gateway that was introduced in 9.0.4. We're still using 9.0.4, I get these messages once in a while. I do not need to intervene as this does not appear to be a serious problem. But there's enough of these messages that I'm trying to figure out what is going on? I can trace the specific orders because I get notification from PayPal the money was captured. When I go to the order itself, there doesn't seem to be any problems whatsoever, the money gets captured and that it.

Can support try to shed some light on this error message?

Thanks,

An eror has occured at https://www.myradiomall....in/Orders/CapturePayment View less
Exception: Capture can only be called when payment status is 'Authorized' or 'CapturedPartial' Stack Trace: at CommerceBuilder.Payments.PaymentEngine.DoCapture(CaptureTransactionRequest request, Boolean async) in D:\Users\Ray\Documents\Visual Studio Projects\01-Repos\9.0.4\07\Able-RFL-9.0.4-b\Projects\AbleSource\CommerceBuilder\Payments\PaymentEngine.cs:line 1000 at CommerceBuilder.Payments.Payment.Capture(Decimal amount, Boolean final, Boolean async, String remoteIP) in D:\Users\Ray\Documents\Visual Studio Projects\01-Repos\9.0.4\07\Able-RFL-9.0.4-b\Projects\AbleSource\CommerceBuilder\Payments\Payment.cs:line 233 at CommerceBuilder.Payments.Payment.Capture(Decimal amount, Boolean final, Boolean async) in D:\Users\Ray\Documents\Visual Studio Projects\01-Repos\9.0.4\07\Able-RFL-9.0.4-b\Projects\AbleSource\CommerceBuilder\Payments\Payment.cs:line 218 at AbleCommerce.Areas.Admin.Controllers.OrdersController.CapturePayment(CapturePaymentModel model) in D:\Users\Ray\Documents\Visual Studio Projects\01-Repos\9.0.4\07\Able-RFL-9.0.4-b\Website\Areas\Admin\Controllers\OrdersController.cs:line 5122 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.b__1c() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyar  
#2 Posted : Thursday, November 18, 2021 4:26:04 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 579

Thanks: 2 times
Was thanked: 88 time(s) in 87 post(s)
I just inspected the code to understand what is causing the issue but didn't get the point. If you look into the backend source code you will find that upon capture request from admin, the paymentStatus is not set to Authorized or CapturedPartial. This is what is throwing the error.

Quote:
// verify payment status
if (payment.PaymentStatus != PaymentStatus.Authorized && payment.PaymentStatus != PaymentStatus.CapturedPartial)
{
throw new PaymentStatusException("Capture can only be called when payment status is 'Authorized' or 'CapturedPartial'");
}



Please share if there are related steps that are necessary to consistently reproduce the issue.

Thanks
ray22901031  
#3 Posted : Thursday, November 18, 2021 7:24:32 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 506

Thanks: 2 times
Was thanked: 8 time(s) in 8 post(s)
Hello shaharyar,

The payment status is set to authorize, not authorized. Please review the two pictures attached. I can find the order that's causing this based on the timestamp, when an order gets captured we immediately get a notice from PayPal that money has come in. So between the error message and the email from PayPal, we are maybe a minute apart.

If you look at both pictures, both the notes and the payment statuses, you will see that this order was indeed at an authorize payment state.

This is happening more and more, right now we are capturing without any further interaction, but I don't want this issue to escalate into something that could prevent us from receiving payments for merchandise about to be shipped.

Question, the payment status says "Authorize", but the code is looking for "Authorized", could this be causing the issue?

I don't know what other pieces of information I can provide to try to pinpoint this error.

Able-Notes.png (175kb) downloaded 3 time(s). Able-Payments.png (165kb) downloaded 3 time(s).

Edited by user Thursday, November 18, 2021 7:25:13 AM(UTC)  | Reason: Not specified

shaharyar  
#4 Posted : Thursday, November 18, 2021 8:01:05 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 579

Thanks: 2 times
Was thanked: 88 time(s) in 87 post(s)
I don't think this is the issue.
The one you are referring to is not payment status. It is showing transaction type. Payment status is captured as seen in the screenshot.
ray22901031  
#5 Posted : Thursday, November 18, 2021 8:32:53 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 506

Thanks: 2 times
Was thanked: 8 time(s) in 8 post(s)
No one is saying that the money is not being captured, I'm just bringing up the error message that makes no sense to your attention.

I will keep an eye on this since it's only happening to specific orders, I have a feeling as to what's going on, but I want to be able to back it up with facts.

I will keep you posted on this once I acquire additional information, just bringing it up to your attention.

Many Thanks
ray22901031  
#6 Posted : Wednesday, November 24, 2021 10:07:51 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 506

Thanks: 2 times
Was thanked: 8 time(s) in 8 post(s)
Dear support,

Again we are seeing this error message, I have an idea what's going on. Please view the two pictures enclosed in this email. The error itself does not have an order number or ID attached, but based on the time and date, I was able to pull up within minutes, a payment status report, almost to the second.

Within that two-minute timeframe, there were four orders that were captured for payments, this was done manually, the only thing that sticks out is order #12102221.

In the past, it was normal to have an authorized time frame of up to 30 days, that has been altered down to 7, and now it varies depending on credit cards and issuing banks. The timeframe between the order date and the order being completed, is exactly 7 days for this order.

The other three orders are either within the same date or a differences of about 24 hours. I think that what might be happening is as follows: In this particular order, the authorized had expired, so the system did what we call in the industry, a charge, an instant combination of authorize and captured at the same time. We believe the error message generates when there is no longer a valid authorization.

That being said, our old system, actually displayed this information. If this is indeed what is going on, I would recommend for a future version that this information also be recorded in the backend. Let the merchant know that an authorization has been expired, and a charge was done instead.

On another note: When we capture payments manually, there is absolutely no feedback, for about five seconds it looks like the screen has frozen. Surely something can be done to provide some type of feedback that a process is taking place.

I look forward to your feedback.


======== error message =======

An error has occured at https://www.myradiomall....in/Orders/CapturePayment View less
Exception: Capture can only be called when payment status is 'Authorized' or 'CapturedPartial' Stack Trace: at CommerceBuilder.Payments.PaymentEngine.DoCapture(CaptureTransactionRequest request, Boolean async) in D:\Users\Ray\Documents\Visual Studio Projects\01-Repo\01a\Able-MRM-9.0.4\Projects\AbleSource\CommerceBuilder\Payments\PaymentEngine.cs:line 1001 at CommerceBuilder.Payments.PaymentEngine.DoCapture(CaptureTransactionRequest request) in D:\Users\Ray\Documents\Visual Studio Projects\01-Repo\01a\Able-MRM-9.0.4\Projects\AbleSource\CommerceBuilder\Payments\PaymentEngine.cs:line 412 at CommerceBuilder.Payments.Payment.Capture(Decimal amount, Boolean final, Boolean async, String remoteIP) in D:\Users\Ray\Documents\Visual Studio Projects\01-Repo\01a\Able-MRM-9.0.4\Projects\AbleSource\CommerceBuilder\Payments\Payment.cs:line 232 at CommerceBuilder.Payments.Payment.Capture(Decimal amount, Boolean final, Boolean async) in D:\Users\Ray\Documents\Visual Studio Projects\01-Repo\01a\Able-MRM-9.0.4\Projects\AbleSource\CommerceBuilder\Payments\Payment.cs:line 217 at AbleCommerce.Areas.Admin.Controllers.OrdersController.CapturePayment(CapturePaymentModel model) in D:\Users\Ray\Documents\Visual Studio Projects\01-Repo\01a\Able-MRM-9.0.4\Website\Areas\Admin\Controllers\OrdersController.cs:line 5122 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.b__1c() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


DAILY COMPLETE ORDERS by Payment Status_001.png (70kb) downloaded 2 time(s). DAILY COMPLETE ORDERS by Payment Status_002.png (54kb) downloaded 2 time(s).

Edited by user Wednesday, November 24, 2021 10:09:19 PM(UTC)  | Reason: Not specified

shaharyar  
#7 Posted : Thursday, November 25, 2021 4:07:31 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 579

Thanks: 2 times
Was thanked: 88 time(s) in 87 post(s)
Thanks for sharing the details. We will think about the findings you shared about the time frame limit.

What I want to trace is that the code is executed where we log this error message.
Capture can only be called when payment status is 'Authorized' or 'CapturedPartial'

Can you please mention the details that how do you capture the payments?
Can you also share the order notes for this order? We need to trace the value assignment of payment status.
Are there any customizations related to this area?

What I suspect is that somewhere in the code the payment status is set to AuthorizePending or AuthorizationFailed and we treat it as a valid transaction to display the capture button.
ray22901031  
#8 Posted : Thursday, November 25, 2021 7:55:55 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 506

Thanks: 2 times
Was thanked: 8 time(s) in 8 post(s)
First, let me start by saying the payment always gets captured.

When an order comes in, we authorized only. We will manually capture only when we are about to ship the order. Usually, a majority of the orders get process within a 48 timeframe, but in the event of a back-order, partial back order, or even a quote, the difference between an authorization and a capture could definitely be over 30 days.

The day of the shipment, we set the order status to "SHIP-FULL", this will let us know that this order will be shipping out today. We round up these orders by statuses, and before we export to ship station, we manually click the capture button. We go through all the orders and capture the funds first before we ship, in the event of a problem.

Below are the notes for this order.

11/24/2021 2:17:28 PM System The order status has been changed from Ship-Full to COMPLETED.
11/24/2021 2:17:08 PM rene@arsradio.com The order has been paid, no balance remains.
11/24/2021 2:17:08 PM rene@arsradio.com A payment capture for $746.90 has been received. No further captures possible.
11/24/2021 2:17:06 PM rene@arsradio.com A payment capture for $746.90 is being requested.
11/24/2021 1:45:47 PM rene@arsradio.com The order status has been changed from New Order to Ship-Full.
11/24/2021 1:43:54 PM rene@arsradio.com Add 1 more channel
11/24/2021 1:42:36 PM rene@arsradio.com The order status has been changed from Quote Pending to New Order.
11/24/2021 1:41:39 PM rene@arsradio.com A payment authorization for $746.90 has been received.
11/24/2021 1:41:36 PM rene@arsradio.com A payment authorization for $746.90 is being requested.
11/17/2021 3:34:34 PM rene@arsradio.com The order status has been changed from New Order to Quote Pending.

I hope this helps
shaharyar  
#9 Posted : Thursday, November 25, 2021 10:27:20 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 579

Thanks: 2 times
Was thanked: 88 time(s) in 87 post(s)
I am able to reproduce the issue locally. It happens when you click the capture button and before the first request to the gateway is completed, the user clicks the button again. In this case, the error is being logged because the payment status is updated after the first valid request.

I hope you can easily reproduce the issue following these steps.

ray22901031  
#10 Posted : Thursday, November 25, 2021 10:58:35 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 506

Thanks: 2 times
Was thanked: 8 time(s) in 8 post(s)
I do not believe my people are clicking the button twice, I also have captured multiple times and I don't believe I'm clicking the button twice. That being said, you probably have noticed, that there is no notification or any indication that the money is being captured. It looks like the screen froze for about five seconds. I do believe some type of indication would be helpful.

Also, I would recommend in the future when specific orders generate specific errors, that the order ID be log into the error logs. Would that make things helpful?

Have a great holiday
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.