Open dechov opened 3 months ago
https://github.com/Automattic/woocommerce-payments/issues/8642 is related – it don't think we currently show a generic decline message, except perhaps in the case of the "generic_decline" decline_code
, but that seller_message
from the charge outcome might be helpful to display.
When a card is declined, the error response from the API contains an
error
code of "card_declined", adecline_code
, and amessage
describing the decline reason. We appear to just present the latter, without an explicit acknowledgement of the initial fact that the card was declined. It might be acceptable to keep it implicit in most cases, since certain common scenarios would be understood to describe declines:Front-end (shopper-facing):
Admin (merchant-facing):
However, some messages (codes listed here) are more ambiguous, such as "Invalid account" – without the context of it being a decline, it could be (and has been, anecdotally) interpreted as something more to do with the merchant account, and it could be helpful to prefix the message to suit this particular "card_declined" error case.