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

Revert "Add temporary debug logging for refund notifications on test merchant" #5683

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ public boolean handleNotificationFor(String ipAddress, String payload) {
logger.debug("Payload: {}", payload);
notification = XMLUnmarshaller.unmarshall(payload, WorldpayNotification.class);
logger.info("Parsed {} notification: {}", PAYMENT_GATEWAY_NAME, notification);
if (isTemporaryLoggingRequiredOnTestOnly(notification)) {
logger.info("{} notification {} is being inspected (on test only) for PP-13416. Payload: {}", PAYMENT_GATEWAY_NAME, notification, payload);
}
} catch (XMLUnmarshallerException e) {
logger.error("{} notification parsing failed: {}", PAYMENT_GATEWAY_NAME, e);
return true;
Expand Down Expand Up @@ -164,13 +161,6 @@ private boolean isErrorNotification(WorldpayNotification notification) {
return "ERROR".equals(notification.getStatus());
}

// TODO: Temporary logging for PP-13416
private boolean isTemporaryLoggingRequiredOnTestOnly(WorldpayNotification notification) {
return ("REFUND_FAILED".equals(notification.getStatus()) ||
"SENT_FOR_REFUND".equals(notification.getStatus()))
&& "GBSRECABOFFGDSGBPTEST".equals(notification.getMerchantCode());
}

private RefundStatus newRefundStatus(WorldpayNotification notification) {
return "REFUND_FAILED".equals(notification.getStatus()) ? RefundStatus.REFUND_ERROR : RefundStatus.REFUNDED;
}
Expand Down
Loading