Validating webhook request causes InvalidProgramException

BRIQTeam
Contributor
Contributor

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?

Login to Me Too
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.