Affected people are probably not the same depending on the origin of the exception.
- It the exception comes from the merchant, developers are affected, because the code probably needs to be changed
- If the exception comes from the gateway, the application should display a
502 or maybe a 503, beacuse it is probably an outage from paybox
- If the exception comes from the bank, the financial department probably needs to be aware of that.
Likewise, error in code and validation problems should be segregated. Ideally validation problems should only happen on the merchant side, but it could happen further down the chain in case of suspicious activity of the cardholder, for example.
Here is how I organised that:
Exception
├── Error
│ ├── BankErrorException.php
│ ├── GatewayErrorException.php
│ └── MerchantErrorException.php
├── ErrorException.php
├── Validation
│ ├── BankValidationException.php
│ ├── GatewayValidationException.php
│ └── MerchantValidationException.php
├── ValidationException.php
├── Wallet
│ └── CardNotFoundException.php
└── WalletException.php
Affected people are probably not the same depending on the origin of the exception.
502or maybe a503, beacuse it is probably an outage from payboxLikewise, error in code and validation problems should be segregated. Ideally validation problems should only happen on the merchant side, but it could happen further down the chain in case of suspicious activity of the cardholder, for example.
Here is how I organised that: