Skip to content

Add children classes to PayboxException #29

Description

@greg0ire

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions