amzn / amazon-pay-sdk-java

Amazon Pay Java SDK
https://pay.amazon.com/documentation
Apache License 2.0
58 stars 51 forks source link

IPN parser does not parse SellerId #2

Closed rougou closed 7 years ago

rougou commented 8 years ago

The IPN parser does not parse the SellerId and other attributes for IPNs such as Capture notification. INotification only provides the notification type and no other common information. We would like to obtain the SellerId and use it to verify that some random other seller did not set our URL for the IPNs. Since we pass in the OffAmazonPaymentsServiceConfig when creating the NotificationParserFactory, I thought maybe the SDK was checking the sellerId internally, but this does not seem to be the case. As it is, we would have to parse the message again separately just to get the sellerId....

bjguillot commented 7 years ago

This item is fixed in the 2.2.1 Maintenance Release. I apologize for any inconvenience this may have caused.

Notification notification = NotificationFactory.parseNotification(headers, respBody);
...
System.out.println("sellerId=" + notification.getMessageMetadata().getSellerId());