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

Type safe way to generate xml for SF01 #1418

Closed
RichardLindhout opened this issue Jan 8, 2025 · 2 comments
Closed

Type safe way to generate xml for SF01 #1418

RichardLindhout opened this issue Jan 8, 2025 · 2 comments

Comments

@RichardLindhout
Copy link

Based on docs here: https://docs.adyen.com/point-of-sale/shopper-engagement/display-data/display-receipt/#virtual-receipt-xml

Can we also generate the xml type safely with a class of this library or should this be done manually?

 var xmlBase64 = Base64.getEncoder().encodeToString(xml.getBytes());

        var outputContent = new OutputContent();
        outputContent.setOutputXHTML(xmlBase64.getBytes());
        outputContent.setOutputFormat(OutputFormatType.XHTML);
@RichardLindhout RichardLindhout changed the title User friendly way to generate xml for SF01 Type safe way to generate xml for SF01 Jan 8, 2025
@RichardLindhout
Copy link
Author

Not possible a.t.m. but it's fairly easy to generate dto classes which can in fact generate the xml so we're happy

@Kwok-he-Chu
Copy link
Contributor

The library currently does not support that. However, as you said, you can generate the DTO classes with the fields that need.

We'll add this as a potential improvement if this issue pops up again.

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

No branches or pull requests

2 participants