diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-11-09 14:48:51 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-11-09 14:48:51 +0800 |
commit | 7d959df5fa79f88d58288c0c5b54af3b697c17c2 (patch) | |
tree | c0b053dcf24ebf501dce5968d3e30b625e0e31ef | |
parent | a5ec411d34e824a37a09a2e524c1e17dbc4c1836 (diff) |
Fix number of bill info conversions
-rw-r--r-- | midtrans.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -204,9 +204,9 @@ char *midtrans_charge_echannel(struct midtrans_echannel echannel, static const char *payment_tmpl = "echannel\",\n" "\t\"echannel\": {\n" - "\t\t\"bill_info1\": \"%s\"%s," - "\t\t\"bill_info2\": \"%s\"%s"; - const size_t payment_len = strlen(payment_tmpl) - strlen("%s") * 4 + "\t\t\"bill_info1\": \"%s\"," + "\t\t\"bill_info2\": \"%s\""; + const size_t payment_len = strlen(payment_tmpl) - strlen("%s") * 2 + strlen(echannel.bill_info1) + strlen(echannel.bill_info2); char *payment = malloc(payment_len + 1); sprintf(payment, payment_tmpl, echannel.bill_info1, |