Page 1 of 1

PaymentStatusId in ac_Orders table - Important

Posted: Tue Sep 22, 2009 7:58 am
by Mike718NY
I really need to know exactly how the
"PaymentStatusId" tinyint field in the ac_Orders table works.

It seems to be either a value of 1 or 2, with 2 being a "Paid" status.

Is it safe to say that "Value = 2" is Paid and all other values equal Not Paid?

It is very important that I get exactly what is going on with this field. Thanks

Re: PaymentStatusId in ac_Orders table - Important

Posted: Tue Sep 22, 2009 8:22 am
by AbleMods
The Able documentation is incomplete and does not list the numerics involved. But you can find this in the CHM compiled help file http://wiki.ablecommerce.com/index.php/ ... uilder_API:
Member Description
Unspecified
Order Payment status is unspecified.

Unpaid
Order Payment status is unpaid.

Paid
Order Payment status is paid.

Problem
Order Payment has some problem.

Re: PaymentStatusId in ac_Orders table - Important

Posted: Tue Sep 22, 2009 1:57 pm
by Mike718NY
From looking at a AC7 site that has been up for a year, the
PaymentStatusId in the orders table has this in it:

PaymentStatusId -- Count
--- 1 -------------- 125
--- 2 -------------- 4192
--- 3 -------------- 12

I think the "3" happens when there is a Capture Failed or Authorization Failed.

So I guess it's safe to say that: "2" is Paid, . . which is what I need to know.

Re: PaymentStatusId in ac_Orders table - Important

Posted: Tue Sep 22, 2009 3:13 pm
by afm
AuthorizationFailed = 3
AuthorizationPending = 1
Authorized = 2
Captured = 5
CaptureFailed = 6
CapturePending = 4
Completed = 11
Refunded = 8
RefundPending = 7
Unprocessed = 0
Void = 10
VoidPending = 9

Re: PaymentStatusId in ac_Orders table - Important

Posted: Tue Sep 22, 2009 6:10 pm
by Logan Rhodehamel
Most of the additional statuses that seem unused are only employed by asynchronous payment processors. Gateways like PayPal and Google Checkout - where notifications about the payment may come in multiple phases over a period of time. For example, say your customer uses the PayPal site to pay via electronic check. AbleCommerce gets a payment pending notification, then later (perhaps as much as a week) we'll get another notification about the result of the check clearing.