Skip to content

Commit

Permalink
fix(webhook): change id to string
Browse files Browse the repository at this point in the history
Holy shoot Mercado Pago, your documentation says it's number

https://www.mercadopago.com.br/developers/pt/docs/your-integrations/notifications/webhooks
  • Loading branch information
jackskelt committed May 30, 2024
1 parent 56be0f0 commit df6d739
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webhooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type HmacSha256 = Hmac<Sha256>;
#[derive(Deserialize, Debug)]
#[serde(rename_all = "snake_case")]
pub struct WebhookBody {
pub id: u64,
pub id: String,
pub live_mode: bool,
pub r#type: WebhookType,
pub date_created: String,
Expand Down Expand Up @@ -116,7 +116,7 @@ mod webhook_tests {
#[test]
fn test_webhook_valid_without_request_id() {
let body = WebhookBody {
id: 1234567890,
id: "1234567890".to_owned(),
live_mode: false,
r#type: WebhookType::Payment,
date_created: "2021-01-01
Expand All @@ -138,7 +138,7 @@ mod webhook_tests {
#[test]
fn test_webhook_valid_with_request_id() {
let body = WebhookBody {
id: 1234567890,
id: "1234567890".to_owned(),
live_mode: false,
r#type: WebhookType::Payment,
date_created: "2021-01-01
Expand Down

0 comments on commit df6d739

Please sign in to comment.