diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-12-10 19:00:19 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2022-12-10 19:00:19 +0800 |
commit | 6537a9392a0bfb3d5ada64f60152fba6afcdffb5 (patch) | |
tree | 67084f78696ef5562c4cf6971b61025c6d84d954 | |
parent | 67d9be303e663ded395f0611e26cc964e8b60cea (diff) |
Use the enum value instead of literal 0
-rw-r--r-- | midtrans.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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); |