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

Implement routine to transform brcode strings into objects (parser) #11

Open
hiagodotme opened this issue Apr 2, 2021 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@hiagodotme
Copy link
Owner

For the next versions, I believe it would be useful for a routine to do the reverse process. In other words, transform brcode strings into objects.

@hiagodotme hiagodotme added the enhancement New feature or request label Apr 2, 2021
@hiagodotme
Copy link
Owner Author

The implementation was started at the branch brcode-parser.

@andersoney
Copy link

u can show the example code to issue problem?

@hiagodotme
Copy link
Owner Author

@andersoney example:

const brcode = '00020101021126970014br.gov.bcb.pix0136fcba8826-cbff-46e2-8c40-1b39896402a80235Donation with defined amount - GPIX52040000530398654045.005802BR5917Hiago Silva Souza6009Rio Preto610815082131620705031236304520D';

// parsing brcode
const pix = PIX.parse(brcode);
console.log(pix.getReceiverName());

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

No branches or pull requests

2 participants