Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong payment transaction status after AUTHORISATION Fail #1247

Open
kaplansin opened this issue Mar 12, 2025 · 0 comments
Open

Wrong payment transaction status after AUTHORISATION Fail #1247

kaplansin opened this issue Mar 12, 2025 · 0 comments

Comments

@kaplansin
Copy link

Describe the bug
After a failed AUTHORISATION , we are seeing pending transaction, and this pending transactions block any further action.

To Reproduce
On Test env.
Steps to reproduce the behavior:

  1. Create a payment session.
  2. Chose Ideal as payment method.
  3. in Ideal Payment simulator, choose Failure.
  4. Check CT payment object's transactions

** Mode detail**
After failed AUTHORISATION we are getting this message.

    "live": "false",
    "notificationItems": [
      {
        "NotificationRequestItem": {
          "additionalData": {
            "metadata.ctProjectKey": "***
          },
          "amount": {
            "currency": "EUR",
            "value": 21962
          },
          "eventCode": "AUTHORISATION",
          "eventDate": "2025-03-03T11:56:33+01:00",
          "merchantAccountCode": "***",
          "merchantReference": "***",
          "paymentMethod": "ideal",
          "pspReference": "***",
          "reason": "Refused",
          "success": "false"
        }
      }
    ]
  }

Notification Module Converts this request into this actions

[
    [
        {
            "action": "addInterfaceInteraction",
            "type": {
                "key": "ctp-adyen-integration-interaction-notification",
                "typeId": "type"
            },
            "fields": {
                "createdAt": "2025-03-03T10:56:43.363Z",
                "status": "authorisation",
                "type": "notification",
                "notification": "{\"NotificationRequestItem\":{\"amount\":{\"currency\":\"EUR\",\"value\":21962},\"eventCode\":\"AUTHORISATION\",\"eventDate\":\"2025-03-03T11:56:33+01:00\",\"merchantAccountCode\":\"***\",\"merchantReference\":\"***\",\"paymentMethod\":\"ideal\",\"pspReference\":\"***\",\"success\":\"false\"}}"
            }
        },
        {
            "action": "addTransaction",
            "transaction": {
                "timestamp": "2025-03-03T10:56:33.000Z",
                "type": "Authorization",
                "amount": {
                    "currencyCode": "EUR",
                    "centAmount": 21962
                },
                "state": "Pending",
                "interactionId": "***"
            }
        },
        {
            "action": "setKey",
            "key": "***"
        },
        {
            "action": "setMethodInfoMethod",
            "method": "ideal"
        }
    ]
]

As a result payment has this pending transaction.

"transactions": [
                        {
                            "id": "***",
                            "timestamp": "2025-03-03T10:56:33.000Z",
                            "type": "Authorization",
                            "amount": {
                                "type": "centPrecision",
                                "currencyCode": "EUR",
                                "centAmount": 21962,
                                "fractionDigits": 2
                            },
                            "interactionId": "***",
                            "state": "Pending"
                        }
                    ],

But interface Interactions clearly shows that authorization has failed.

"interfaceInteractions": [
                        
                        {
                            "type": {
                                "typeId": "type",
                                "id": "***"
                            },
                            "fields": {
                                "createdAt": "2025-03-03T10:56:43.363Z",
                                "status": "authorisation",
                                "type": "notification",
                                "notification": "{\"NotificationRequestItem\":{\"amount\":{\"currency\":\"EUR\",\"value\":21962},\"eventCode\":\"AUTHORISATION\",\"eventDate\":\"2025-03-03T11:56:33+01:00\",\"merchantAccountCode\":\"***\",\"merchantReference\":\"***\",\"paymentMethod\":\"ideal\",\"pspReference\":\"***\",\"success\":\"false\"}}"
                            }
                        }
                  
                    ]
 

Expected behavior
Since the payment has failed we should not see pending transaction.

Used version v11.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant