feat(connector): [Trustpay] add webhooks (payment and refund events) (#746)

Co-authored-by: Sangamesh <sangamesh.kulkarni@juspay.in>
Co-authored-by: sai harsha <sai.harsha@sai.harsha-MacBookPro>
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
saiharsha-juspay
2023-03-20 11:32:23 +05:30
committed by GitHub
parent f27732a6e5
commit 853dfa1635
30 changed files with 398 additions and 86 deletions

View File

@ -41,8 +41,18 @@ pub struct IncomingWebhookRequestDetails<'a> {
pub type MerchantWebhookConfig = std::collections::HashSet<IncomingWebhookEvent>;
pub enum RefundIdType {
RefundId(String),
ConnectorRefundId(String),
}
pub enum ObjectReferenceId {
PaymentId(payments::PaymentIdType),
RefundId(RefundIdType),
}
pub struct IncomingWebhookDetails {
pub object_reference_id: String,
pub object_reference_id: ObjectReferenceId,
pub resource_object: Vec<u8>,
}