Updating Payment Status Programmatically

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Updating Payment Status Programmatically

Post by niall08 » Fri Feb 27, 2009 6:09 am

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)??


niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Updating Payment Status Programmatically

Post by niall08 » Fri Feb 27, 2009 6:26 am

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?

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

Re: Updating Payment Status Programmatically

Post by mazhar » Fri Feb 27, 2009 6:30 am

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

niall08
Commander (CMDR)
Commander (CMDR)
Posts: 175
Joined: Tue Dec 09, 2008 10:29 am

Re: Updating Payment Status Programmatically

Post by niall08 » Fri Feb 27, 2009 6:58 am

Mazhar - you're a legend - thanks!

ptscorp
Ensign (ENS)
Ensign (ENS)
Posts: 2
Joined: Tue Jul 28, 2009 8:00 am

Re: Updating Payment Status Programmatically

Post by ptscorp » Tue Jul 28, 2009 8:12 am

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.

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

Re: Updating Payment Status Programmatically

Post by mazhar » Tue Jul 28, 2009 9:09 am

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

ptscorp
Ensign (ENS)
Ensign (ENS)
Posts: 2
Joined: Tue Jul 28, 2009 8:00 am

Re: Updating Payment Status Programmatically

Post by ptscorp » Thu Jul 30, 2009 7:54 am

Thanks for the help Mazhar...

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

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

Re: Updating Payment Status Programmatically

Post by mazhar » Thu Jul 30, 2009 8:22 am

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

Post Reply