Skip to content

Commit

Permalink
delete obsolete additionalData and reason fields from the interfa…
Browse files Browse the repository at this point in the history
…ceIntegration.fields.notification
  • Loading branch information
ahmetoz committed Nov 20, 2019
1 parent 7cc6018 commit 0dff86b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
10 changes: 0 additions & 10 deletions notification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ Adyen sends notifications which look like this:
"notificationItems": [
{
"NotificationRequestItem": {
"additionalData": {
"expiryDate": "12\/2012",
" NAME1 ": "VALUE1",
"authCode": "1234",
"cardSummary": "7777",
"totalFraudScore": "10",
"NAME2": " VALUE2 ",
"fraudCheck-6-ShopperIpUsage": "10"
},
"amount": {
"currency": "EUR",
"value": 10100
Expand All @@ -44,7 +35,6 @@ Adyen sends notifications which look like this:
],
"paymentMethod": "visa",
"pspReference": "test_AUTHORISATION_1",
"reason": "1234:7777:12\/2012",
"success": "true"
}
}
Expand Down
3 changes: 3 additions & 0 deletions notification/src/handler/notification/notification.handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ function calculateUpdateActionsForPayment (payment, notification) {
}

function getAddInterfaceInteractionUpdateAction (notification) {
delete notification.additionalData
delete notification.reason

return {
action: 'addInterfaceInteraction',
type: {
Expand Down
10 changes: 0 additions & 10 deletions notification/test/resources/notification.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
"notificationItems": [
{
"NotificationRequestItem": {
"additionalData": {
"expiryDate": "12\/2012",
" NAME1 ": "VALUE1",
"authCode": "1234",
"cardSummary": "7777",
"totalFraudScore": "10",
"NAME2": " VALUE2 ",
"fraudCheck-6-ShopperIpUsage": "10"
},
"amount": {
"currency": "EUR",
"value": 10100
Expand All @@ -27,7 +18,6 @@
],
"paymentMethod": "visa",
"pspReference": "test_AUTHORISATION_1",
"reason": "1234:7777:12\/2012",
"success": "true"
}
}
Expand Down

0 comments on commit 0dff86b

Please sign in to comment.