From dd986a2a0c6ff1738af7681d8d6f8405365034e0 Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <me@adhisimon.org>
Date: Fri, 6 Dec 2019 12:45:38 +0700
Subject: [PATCH] BUY: perbaikan custom request id

---
 lib/command-handler/buy.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/command-handler/buy.js b/lib/command-handler/buy.js
index b036de7..65d0355 100644
--- a/lib/command-handler/buy.js
+++ b/lib/command-handler/buy.js
@@ -41,7 +41,7 @@ function execute(tokens, params, cb) {
         product_name: tokens[1].toUpperCase(),
         destination: tokens[2].replace(/^\+62/, '0'),
         password: tokens[3],
-        request_id: tokens[4] || generateRequestId(tokens[1], tokens[2]),
+        request_id: `${generateRequestId(tokens[1], tokens[2])}${Number(tokens[4]) ? '_req' + Number(tokens[4]) : ''}`,
         postpaid: 0
     };
 
-- 
1.9.0