|
StripeKit 0.1.1
Stripe integration toolkit for C++
|
A Drogon route that receives Stripe webhook deliveries. More...
#include <Drogon.h>
Public Member Functions | |
| WebhookEndpoint (WebhookProcessor &processor, std::string endpoint_secret) | |
| Creates an endpoint. | |
| void | register_handler (std::string path) const |
| Adds the route to the Drogon application. | |
A Drogon route that receives Stripe webhook deliveries.
Construct this directly only when webhook handling is driven by a stripekit::EventDispatcher; otherwise register_webhook_handler() is simpler.
The processor is referenced, not owned, so it must outlive the registered Drogon route.
| stripekit::drogon::WebhookEndpoint::WebhookEndpoint | ( | WebhookProcessor & | processor, |
| std::string | endpoint_secret ) |
Creates an endpoint.
| processor | Verifies, de-duplicates, and dispatches deliveries. Must outlive the endpoint. |
| endpoint_secret | Signing secret for this endpoint. |
| void stripekit::drogon::WebhookEndpoint::register_handler | ( | std::string | path | ) | const |
Adds the route to the Drogon application.
Call this before Drogon starts running.
| path | Route to register, for example "/stripe/webhook". |