Cancel - subscription orders: Yellow screen of death

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
mezojeff
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Fri Jan 08, 2010 7:23 am

Cancel - subscription orders: Yellow screen of death

Post by mezojeff » Mon Feb 15, 2010 8:45 am

See below for the error - we need to be able to cancel subscription orders. I've put the code inside of the dovoid and do refund methods of our payments gateway implementation. Am I to understand there is no way to cancel subscription/recurring types? If so this is kind of a big deal since our whole implementation kind of centers around being able to sell subscriptions to our services.
Specified argument was out of the range of valid values.
Parameter name: Invalid Transaction Type : AuthorizeRecurring
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Invalid Transaction Type : AuthorizeRecurring

Source Error:

Line 67: Order.Notes.Save();
Line 68: }
Line 69: Order.Cancel();
Line 70: Response.Redirect( "ViewOrder.aspx?OrderNumber=" + Order.OrderNumber.ToString() + "&OrderId=" + OrderId.ToString());
Line 71: }


Source File: c:\inetpub\wwwroot\Mezolink\secure.mezolink.com\Admin\Orders\CancelOrder.aspx.cs Line: 69

mezojeff
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Fri Jan 08, 2010 7:23 am

Re: Cancel - subscription orders: Yellow screen of death

Post by mezojeff » Mon Feb 15, 2010 10:09 am

Update: I found another overridable method in the library I created for the braintree gateway called CancelAuthorizeRecurring

I have implemented this, but it is not getting called when I cancel a subscription from an order. The order is still erroring out when I try to cancel the whole order.

What I would like to have happen is when I cancel a subscription or an order from able commerce, have it hit the cancelauthorizerecurring method and use my payments gateway api to make the deletion. If ablecommerce doesn't not support this already how can I implement it? How can I also get the system to delete orders that have a transaction type of AuthorizeRecurring?

mezojeff
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Fri Jan 08, 2010 7:23 am

Re: Cancel - subscription orders: Yellow screen of death

Post by mezojeff » Mon Feb 22, 2010 8:52 am

I know "bumping" is frowned upon, but I'd really like to get some guidance on this. Anyone?

The error that happens when canceling an order created as a subscription has been officially entered as a bug http://bugs.ablecommerce.com/show_bug.cgi?id=8736 . For now there's a workaround that you have to first delete the payment, then the order will delete without issue.

I still would like some guidance to be able to use my gateway's API to cancel an order and have it happen when the cancellation of the subscription happens in able commerce. My gateway's API only needs the transaction ID when the subscription was purchased to issue a cancellation on the gateway, I thought that the overridable method "CancelAuthorizerecurring" would have been fired when cancelling the subscription through the admin interface, but I was wrong.

We have the skillset in house if this is some code customization, I would like some guidance about where we should implement/start before I assign anyone to the task however.

mezojeff
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Fri Jan 08, 2010 7:23 am

Re: Cancel - subscription orders: Yellow screen of death

Post by mezojeff » Mon Feb 22, 2010 6:36 pm

Is there another avenue besides the forums I should take? I've had this post up for over a week and have been pinging with our sales rep (Fred) to see if he could help us get an answer on this. It's been very frustrating since I was initially told (before we purchased our license) that normally you can expect some sort of response to forum questions within 24 hours of posting them.

I'm not trying to come across as an impatient or fussy customer, I certainly understand that the guys that answer these questions have jobs they do besides sitting on the forum and trying to help customers. If there's some other way I can get my questions in front of a set of eyes that could help us out I'd love to explore those options.

Thank you,
Jeff

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Cancel - subscription orders: Yellow screen of death

Post by jmestep » Tue Feb 23, 2010 8:37 am

I think the reason you are not getting answers is because it is something you have customized, so it isn't something easy to answer.
When I was having trouble with a custom gateway, Able suggested that I hardcode some values in the gateway code, compile it, then see what happened with the hardcoded values. It ended up being wrong information from the payment provider- they told me the response was coming back xml when it was actually coming back in ASCII.
You might also try putting a debug or trace in the code for the page you are using to cancel the orders.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

mezojeff
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Fri Jan 08, 2010 7:23 am

Re: Cancel - subscription orders: Yellow screen of death

Post by mezojeff » Tue Feb 23, 2010 9:09 pm

Thanks jmestep, I have set several breakpoints and stepped through in debug. this is how I determined that there's no gateway event being fired when cancelling a subscription through the admin.

The gateway that I created (custom code) works fine. My problem is not in there, my issue is really how to get ablecommerce to cancel the subscription on the gateway, since it does not currently appear to fire any events in CommerceBuilder.Payments.Providers.PaymentProviderBase when cancelling a subscription from the admin interface. I find it hard to believe that I'm the first one asking about how to do this, it seems like it should have come up at some point. Are the subscriptions and recurring billing support (on gateways) that new to ablecommerce?

It's just very frustrating that after a week, and several bumps the last 2 days that there's not even a "sorry we don't have the answer right now, but here's something you might want to look at".

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Cancel - subscription orders: Yellow screen of death

Post by jmestep » Wed Feb 24, 2010 8:42 am

As far as I know, there is no interaction between the gateway and Able after the order has been placed. For example, no automatically creating an order monthly for that kind of subscription.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

mezojeff
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Fri Jan 08, 2010 7:23 am

Re: Cancel - subscription orders: Yellow screen of death

Post by mezojeff » Wed Feb 24, 2010 10:47 am

hmm if that is true then that is odd. I was under the the impression that when you cancelled a non-subscription order that the dovoid or dorefund events were fired in commercebuilder.payments.providers.paymentproviderbase. I haven't actually tested that yet, but why else would they be in there?

As far as creating the subscription, I figured that out, if you have recurringbilling enabled in your gateway implementation then it will fire the doauthorizerecurring event when someone purchases a subscription item. There is a "DoCancelAuthorizeRecurring" that is overridable, but does not appear to fire when the subscription is cancelled from the interface.

Post Reply