Page 1 of 1

payment status update from gateway

Posted: Tue Feb 24, 2009 2:02 pm
by KCarlson
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.

Re: payment status update from gateway

Posted: Wed Feb 25, 2009 4:36 am
by mazhar
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.

Re: payment status update from gateway

Posted: Wed Feb 25, 2009 11:52 am
by KCarlson
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?

Re: payment status update from gateway

Posted: Wed Feb 25, 2009 11:58 am
by mazhar
you can put the code for this in OnePageCheckout.ascx.cs files CheckedOut method.

Re: payment status update from gateway

Posted: Wed Feb 25, 2009 11:59 am
by mazhar
Code in checkedout handler
viewtopic.php?f=42&t=9597

Re: payment status update from gateway

Posted: Wed Feb 25, 2009 5:28 pm
by KCarlson
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.