Skip to content

Commit

Permalink
[PRDP-220] Added charset utf-8 to bizEvent stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
svariant committed Nov 20, 2023
1 parent 61acf3f commit 516b075
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.Objects;

Expand Down Expand Up @@ -51,7 +52,9 @@ public BizEventToReceiptServiceImpl(PDVTokenizerServiceRetryWrapper pdvTokenizer
@Override
public void handleSendMessageToQueue(BizEvent bizEvent, Receipt receipt) {
//Encode biz-event to base64 string
String messageText = Base64.getMimeEncoder().encodeToString(Objects.requireNonNull(ObjectMapperUtils.writeValueAsString(bizEvent)).getBytes());
String messageText = Base64.getMimeEncoder().encodeToString(
Objects.requireNonNull(ObjectMapperUtils.writeValueAsString(bizEvent)).getBytes(StandardCharsets.UTF_8)
);

//Add message to the queue
int statusCode;
Expand Down

0 comments on commit 516b075

Please sign in to comment.