QR Code generator for the Brazilian payment system PIX Tools for test PIX QR Decoder.
toml
[dependencies]
pix-br = "0.1.0"
Parse String
```rust mod pixbr; pub use crate::pixbr::pix;
fn main() { let brcode = pix::brcode( "460ef235-e006-492f-8686-eb5b8cfc5c82", //key (required) "Guilherme Luis Faustino", //name (required) Some(82.82), //amount (optional) None, //city (required) Some("Havaina e caipirinha"), //description (optional) None, //zipcode (optional) None, //isunique_transaction (optional) );
pix::save_qrcode_png(brcode.clone(), "/path/file_name.png");
pix::save_qrcode_svg(brcode.clone(), "/path/file_name.svg");
pix::get_qrcode_data_uri(brcode.clone()); // return "data:image/png;base64, ... "
pix::get_qrcode_svg(brcode); // return svg code
}
```
brcode(params)
:
| object key | type | required | | ------------ | ------- | -------- | | merchantKey | string | ✅ | | merchantName | string | ✅ | | amount | number | ❌ | | merchantCity | string | ✅ | | merchantCep | string | ❌ | | description | string | ❌ | | isUnique | boolean | ❌ |
Thanks goes to these wonderful people (emoji key):
Guilherme L. Faustino 💻 📖 ⚠️ |