amazon-pay-sdk-php icon indicating copy to clipboard operation
amazon-pay-sdk-php copied to clipboard

Exceptions

Open asilgalis opened this issue 6 years ago • 0 comments

Description of changes:

If something bad happens all of the time generic \Exception is throw at all times. It is quite hard to handle such problems properly. One way is to parse exception messages but one should not rely on these messages.

By throwing specific exceptions it would help developers to implement solutions that help to recover from some errors. For example with AmazonPay\IpnHandler:

  • incoming SNS messages can be rejected if signature verification fails.
  • incoming SNS message can be re-processed if connectivity with amazon fails due to timeout for signature verification.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

asilgalis avatar Jan 30 '20 11:01 asilgalis