payment status update from gateway

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
KCarlson
Lieutenant (LT)
Lieutenant (LT)
Posts: 71
Joined: Mon Dec 13, 2004 5:35 pm
Location: Santa Barbara, CA
Contact:

payment status update from gateway

Post by KCarlson » Tue Feb 24, 2009 2:02 pm

We are working on some integration with MAS200 where we are moving orders over to MAS once they get a successful checkout in the payment forms (mostly the CreditCardPaymentForm.ascx). The problem we have now is that we are moving over orders that are properly authorized and those that are declined, and we would like to not move over the declines. We have the HandleFailedPayments set, and we were thinking we could look at the payment status to determine if the payment was declined or not. But it seems that the payment status is not updated yet when we are doing that. Is the only time you know for sure what the returned payment status from a payment gateway is is when you are on the receipt page? I thought about how the HandleFailedPayments works, and that is all in the receipt conlib, so I am starting to think that there is where you know the status.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: payment status update from gateway

Post by mazhar » Wed Feb 25, 2009 4:36 am

Well give a try and use

Code: Select all

OrderDataSource.Load(orderId, false);
version of OrderDataSource to load order where you are loading and checking the payments status. It would be some caching problem so give a try by forcing a fresh load.

KCarlson
Lieutenant (LT)
Lieutenant (LT)
Posts: 71
Joined: Mon Dec 13, 2004 5:35 pm
Location: Santa Barbara, CA
Contact:

Re: payment status update from gateway

Post by KCarlson » Wed Feb 25, 2009 11:52 am

OK. Thanks, I will give that a try. So would I be able to determine the final value of the payment status from a call in the CreditCardPaymentForm.ascx, or do I need to wait until the receipt conlib?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: payment status update from gateway

Post by mazhar » Wed Feb 25, 2009 11:58 am

you can put the code for this in OnePageCheckout.ascx.cs files CheckedOut method.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: payment status update from gateway

Post by mazhar » Wed Feb 25, 2009 11:59 am

Code in checkedout handler
viewtopic.php?f=42&t=9597

KCarlson
Lieutenant (LT)
Lieutenant (LT)
Posts: 71
Joined: Mon Dec 13, 2004 5:35 pm
Location: Santa Barbara, CA
Contact:

Re: payment status update from gateway

Post by KCarlson » Wed Feb 25, 2009 5:28 pm

That is exactly where we are doing it. Thanks. I am having a problem with the status not getting set there on declines. I will do some more testing to confirm the behavior.

Post Reply