0

I am implementing a 3rd party Payment gateway using URL redirection. After the Payment I will automatically get redirected to my page by the PG. When I redirect the user to the payment gateway page, as an user I can open cart in another browser and edit the products because the order is still in "order incomplete" state. If I want to hold the order in "waiting for payment" state, it fails in a scenario where there is no response from payment gateway. How to change the order back. I want to implement a time out schedule for this waiting state, but I cannot say how many minutes it will take for an order payment to get processed. Please help me with this design.If there is any better solution, please suggest.

Thanks, Pradeep Shankar.

4

1 回答 1

1

I would suggest you investigate using locked caching with isolation level of serializable for the order repository item and sub items. This would mean that that the thread trying to authorize payment would acquire a write lock, preventing other updates to the order.

From the ATG documentation:

A multi-server application might require locked caching, where only one Oracle ATG Web Commerce instance at a time has write access to the cached data of a given item type. You can use locked caching to prevent multiple servers from trying to update the same item simultaneously—for example, Commerce order items, which can be updated by customers on an external-facing server and by customer service agents on an internal-facing server. By restricting write access, locked caching ensures a consistent view of cached data among all Oracle ATG Web Commerce instances.

Setting up locked caching:

  1. Correctly configured lock servers and client lock managers on all instances of ATG
  2. Changes to the repository definition
  3. Substantial performance testing

This is typically a fairly big change to make as it has potential implications on performance and stability.

More info can be found here.

于 2014-08-14T15:51:25.870 回答