Skip to content

WebhookNotification object payload parsed incorrectly #86

@soundsgoodsofar

Description

@soundsgoodsofar

I'm using version 1.6.3 of the SDK

The constructor of WebhookNotification.php appears to parse the object payload incorrectly for a number of webhooks.

It assumes that any webhook type starting with 'USER' will have an object of type User. This appears to be incorrect for webhooks for different payment method events.

For example, for a webhook of type USERS.VENMO_ACCOUNTS.CREATED, I get an object with the following structure:

‌‌print_r($properties['object'], true);
‌Array
(
    [token] => trm-REDACTED
    [type] => VENMO_ACCOUNT
    [status] => ACTIVATED
    [createdOn] => 2021-05-28T15:36:53
    [transferMethodCountry] => US
    [transferMethodCurrency] => USD
    [accountId] => REDACTED
    [userToken] => usr-REDACTED
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions