-
Notifications
You must be signed in to change notification settings - Fork 11
Description
When doing an authorization, the plugin needs to build up the riskInformation and needs the total number of orders placed by the customer in the last 6 months. The current implementation here is very inefficient, as it loads up all the orders for the last 6 months, only to use the total count field.
In our scenario, we've found that for certain customers
- The network IO and server CT query to load up all these orders is quite expensive (upto 5 seconds).
- The deserialization of all the payload is even more expensive and can take upto 10 seconds
The CommerceTools payment extension has a hard limit of a 15 seconds execution timeout. This often results in cybersource processing the auth payment, but the CT payment extension terminates the HTTP request since the plugin processing is not complete within 15 seconds, hence the customers get an error message, and order creation fails.
The customer keeps on retrying, same timeout issue happens, cybersource keeps on processing the auth payment on their end. Eventually the customer looks at their credit card statement, and realise they have been charged multiple times, resulting in a very bad customer experience.
Suggestions
- Can the building up of this risk information be made configurable so a client can turn it on/off as per their need
- Can the fetching of the total order count be made more efficient? Perhaps use GraphQL api?