作者:fst123 | 来源:互联网 | 2023-05-27 16:35
我想用不同的通知测试我的webhook功能.现在我能够测试它只是为了取消订阅(通过取消braintree后端的订阅).
$webhookNotification = Braintree_WebhookNotification::parse($sampleNotification["bt_signature"], $sampleNotification["bt_payload"]);
我也试过https://www.braintreepayments.com/docs/php/webhooks/testing:
$sampleNotification = Braintree_WebhookTesting::sampleNotification(Braintree_WebhookNotification::SUBSCRIPTION_WENT_ACTIVE,'1234qwe');
$webhookNotification = Braintree_WebhookNotification::parse($sampleNotification["bt_signature"], $sampleNotification["bt_payload"]);
但API返回的结果并不令人满意.无论订阅ID是否存在,它始终为所有通知类型返回相同的数组.