Skip to content

Notify Pending Transaction State Change in Adyen Plugin #138

@faller-crowder

Description

@faller-crowder

Issue: Notify Pending Transaction State Change in Adyen Plugin

Description

While reviewing the Kill Bill Janitor documentation, I noticed that the Kill Bill API can be used to check the state of pending transactions.

In the AdyenPaymentPluginApi.java file at the following location:
AdyenPaymentPluginApi.java#L610,
we could notify Kill Bill about the state change by adding the following code:

try{
    final Account kbAccount = killbillAPI
            .getAccountUserApi()
            .getAccountById(UUID.fromString(record.getKbAccountId()), tempContext);

    this.killbillAPI
            .getPaymentApi()
            .notifyPendingTransactionOfStateChanged(
                    kbAccount,
                    UUID.fromString(record.getKbPaymentTransactionId()),
                    notificationItem.isSuccess(),
                    tempContext);
} catch (Exception e) {
    logger.error("Error Notifying state change {}", e.getMessage(), e);
}

Expected Behavior

Ensure that the plugin properly informs Kill Bill about the state change of pending transactions.

Reduce inconsistencies by leveraging the Kill Bill API's existing functionality.

Suggested Resolution

Please review and consider implementing this change to enhance transaction state handling in the Adyen plugin.

Thank you!

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