Off Amazon Payments Notifications message verification

I am currently writing an application which will need to receive notifications from Amazon. I have used the code provided in AmazonPaymentsAdvancedSDK-dotnet-1.0.14_UK from IpnHandler.aspx. The error I am recieving on the stack trace is:

18-05-2023 11:25:53: An exception occured in OffAmazonPaymentsNotifications with the message Error with sns message verification - certificate in Notification is not a valid certificate issued to Amazon
StackTrace: at OffAmazonPaymentsNotifications.SnsSignatureVerification.VerifyMsgMatchesSignatureV1WithCert(Message snsMessage)
at OffAmazonPaymentsNotifications.SnsMessageValidator.VerifySnsMessageWithVersion1SignatureAlgorithm(Message snsMessage)
at OffAmazonPaymentsNotifications.SnsMessageValidator.ValidateMessageIsTrusted(Message snsMessage)
at OffAmazonPaymentsNotifications.NotificationsParser.ParseRawMessage(NameValueCollection headers, String body)
at Plugin.Payment.OffAmazonPayment.Controllers.AmazonPaymentController.Convert(NameValueCollection headers, String json)
at Plugin.Payment.OffAmazonPayment.Controllers.AmazonPaymentController.Notifications()

I get the same error when I send a message from the IPN testing tool. Can anyone shine a light on the problem? I believe all of the verification is performed by Amazon and the code which fails is located in the OffAmazonPaymentsNotifications.dll - VerifyMsgMatchesSignatureV1WithCert(Message snsMessage).

Has anyone had this error before or do they know how to resolve?

Happy Coding!

The following two help pages may be of assistance to you if you have not resolved the issue by now.

[Verifying the Signatures of Amazon SNS Messages|Verifying the signatures of Amazon SNS messages - Amazon Simple Notification Service].
[Example Code for an Amazon SNS Endpoint Java Servlet|Amazon Simple Notification Service].