From 6537a9392a0bfb3d5ada64f60152fba6afcdffb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 10 Dec 2022 19:00:19 +0800 Subject: Use the enum value instead of literal 0 --- midtrans.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/midtrans.c b/midtrans.c index 93bdb83..45fcd4d 100644 --- a/midtrans.c +++ b/midtrans.c @@ -297,7 +297,6 @@ enum midtrans_transaction_status midtrans_notification_transaction(char *post, json_object *object = json_tokener_parse_ex(tokener, post, strlen(post)); - enum midtrans_transaction_status status = 0; const char *status_code = NULL; const char *signature_key = NULL; const char *order_id = NULL; @@ -342,7 +341,7 @@ enum midtrans_transaction_status midtrans_notification_transaction(char *post, BIO_free_all(bio); if (strcmp(signature_key, hash)) - return 0; + return MIDTRANS_TRANSACTION_SIGNATUREKEYDOESNOTMATCH; transaction->order_id = malloc(order_id_len + 1); strcpy(transaction->order_id, order_id); -- cgit v1.2.3