Page 1 of 1

Updating Payment Status Programmatically

Posted: Fri Feb 27, 2009 6:09 am
by niall08
Is it possible to programmatically identify a specific order (based on OrderId) and change the status of the payment for that order - e.g. from "Authorisation failed" to "Authorised" (maybe using payment.PaymentStatus or PaymentStatusId)??

Re: Updating Payment Status Programmatically

Posted: Fri Feb 27, 2009 6:19 am
by mazhar
Check this thread
viewtopic.php?f=42&t=8681

Re: Updating Payment Status Programmatically

Posted: Fri Feb 27, 2009 6:26 am
by niall08
Mazhar - that's very useful - thanks.

There is one issue - is there an ac_PaymentStatuses table in the DB? If not, where are the Payment Status flags stored?

Re: Updating Payment Status Programmatically

Posted: Fri Feb 27, 2009 6:30 am
by mazhar
The payment statues are defined in an enum. Its not something dynamic as is the case with order statuses.

Code: Select all

CommerceBuilder.Payments.PaymentStatus

Re: Updating Payment Status Programmatically

Posted: Fri Feb 27, 2009 6:58 am
by niall08
Mazhar - you're a legend - thanks!

Re: Updating Payment Status Programmatically

Posted: Tue Jul 28, 2009 8:12 am
by ptscorp
I am currently using an SQL backend on the site we are developing. We would like to know what tables contain the mappings for two fields from the table ac_Orders. The fields are PaymentStatusID and ShipmentStatusID. We have been unable to find the mapping tables for these ID fields, which I assume would be similar to how the field OrderStatusID is clearly mapped to the table ac_OrderStatuses. Any help you could provide would be greatly appreciated.

Re: Updating Payment Status Programmatically

Posted: Tue Jul 28, 2009 9:09 am
by mazhar
Those both contains the Enum values and doesn't come from tables. The case with order status is that you can create new statuses that's when they are implemented from table. Those order table fields represents the values of following Enums

CommerceBuilder.Payments.PaymentStatus and CommerceBuilder.Orders.OrderShipmentStatus

Re: Updating Payment Status Programmatically

Posted: Thu Jul 30, 2009 7:54 am
by ptscorp
Thanks for the help Mazhar...

Where in the source code can this enum info be found?

Re: Updating Payment Status Programmatically

Posted: Thu Jul 30, 2009 8:22 am
by mazhar
These are in backend(CommerceBuilder) source code. You can view the definitions by using Object Browser window in Visual Studio or can download the API docs from here
ftp://ftp.ablecommerce.com/evals/Commer ... 7_Help.zip