diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <prabowo@darapsa.org> | 2022-10-05 17:42:46 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <prabowo@darapsa.org> | 2022-10-05 17:42:46 +0800 |
commit | 0c9fa43eae3dcdbd6a22eef77d846122563da75d (patch) | |
tree | cf1f115f872f7c3151f66cda62370419b61d3ecc | |
parent | f6739e2e7cada25178bde2ef7921ba00a8a0fae2 (diff) |
Fix the encoding
-rw-r--r-- | midtrans.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -35,7 +35,8 @@ void midtrans_init(_Bool production, const char *api_key, const char *cainfo) BIO *b64 = BIO_new(BIO_f_base64()); BIO *mem = BIO_new(BIO_s_mem()); BIO_push(b64, mem); - BIO_puts(b64, basic); + BIO_write(b64, basic, basic_len); + BIO_flush(b64); char *pp; long base64_len = BIO_get_mem_data(b64, &pp); char base64[base64_len + 1]; |