summaryrefslogtreecommitdiff
path: root/midtrans.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-10-31 14:38:25 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-10-31 14:38:25 +0800
commit9a84970860ceed47216f063133327723c91a8753 (patch)
tree61a4d3c156898fb235f15e625acc82c19d6c1b96 /midtrans.c
parent69c7965e505e611486f6cd1b063f07dd1bfaec22 (diff)
Fix status condition checking
Diffstat (limited to 'midtrans.c')
-rw-r--r--midtrans.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/midtrans.c b/midtrans.c
index da4f03b..003e8e2 100644
--- a/midtrans.c
+++ b/midtrans.c
@@ -99,8 +99,8 @@ void midtrans_status(const char *order_id)
{
static const char *tmpl = "%s%s/status";
char url[strlen(tmpl) - strlen("%s") * 2 + strlen(base_url)
- + (production ? strlen(order_id) : strlen(ORDER_ID)) + 1];
- sprintf(url, tmpl, base_url, production ? order_id : ORDER_ID);
+ + (order_id ? strlen(order_id) : strlen(ORDER_ID)) + 1];
+ sprintf(url, tmpl, base_url, order_id ? order_id : ORDER_ID);
curl_easy_setopt(curl, CURLOPT_URL, url);
request(NULL);