Developer forum

Forum » Ecommerce - Standard features » DW9 Inactive Payment Method bypass

DW9 Inactive Payment Method bypass

Andrew Rushworth
Reply

Dynamicweb 9.17.x

I disabled multiple Payment Methods in the Admin centre.
These do not show on the front end.
However the Id of the payment method can be guessed as it is essentially PAY01,PAY02, etc.
If i edit the html on the payment page and change the EcomCartPaymethodId value in the form post to one of the disabled payment methods,
then the order will processess using that payment method even though it is disabled.

Is there a way to validate the Payment method before processing the order?


Replies

 
Andrew Rushworth
Reply

I've added a BeforeOrderValidation subscriber to check the payment provider being passed is active.
If its not active then I add a custom error to the order.
The order  does then not proceed to the checkout handler.
 

This does not cater for active handlers that are only applicable to specific users or handlers that are not allocated to the checkout  app but are active.

Still a loophole but works in my scenario as the payment methods are inactive if not in use, and i don't have any user specific providers.

 

You must be logged in to post in the forum