Test Webhook at localhost in braintree

后端 未结 7 2300
故里飘歌
故里飘歌 2021-02-06 01:03

I am working on braintree and I want to send custom email notifications to my customers as I am working with recurring billing, so every month these custom notifications should

7条回答
  •  無奈伤痛
    2021-02-06 01:19

    I know this is an old question, but according to the docs, you can use this code to test your webhook code:

    Dictionary sampleNotification = gateway.WebhookTesting.SampleNotification(
        WebhookKind.SUBSCRIPTION_WENT_PAST_DUE, "my_id"
    );
    
    WebhookNotification webhookNotification = gateway.WebhookNotification.Parse(
        sampleNotification["bt_signature"],
        sampleNotification["bt_payload"]
    );
    
    webhookNotification.Subscription.Id;
    // "my_id"
    

提交回复
热议问题