Validating webhook request causes InvalidProgramException
BRIQTeam
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Aug-23-2021
01:51 AM
Hi!
We're using the PayPalHttp.NET SDK to call the /v1/notifications/verify-webhook-signature API endpoint in order to verify a webhook came from PayPal.
When we try to read the response using response.Result<VerifyWebhookSignatureResponse>(), we get an InvalidProgramException.
The VerifyWebhookSignatureResponse is:
public enum VerificationStatus
{
SUCCESS,
FAILURE
}
[DataContract]
public class VerifyWebhookSignatureResponse
{
[DataMember(Name = "verification_status")]
public VerificationStatus VerificationStatus { get; set; }
}
This is on Sandbox environment, it is a .NET Core 3.1 Web API project. The crash happens specifically on the deserialization of the response from PayPal. We're not sure how to continue with this problem.
Has anyone faced this?
Labels:
- Labels:
-
Webhooks REST APIs
0 REPLIES 0
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- PayPal gateway has rejected request. Security header is not valid (#10002: Security error). in Sandbox Environment
- patch payment returning validation error for field not in request in Sandbox Environment
- The requested action could not be performed, semantically incorrect, or failed business validation. in SDKs
- a valid payment_source in the request. in REST APIs