From ebe13ef30be235444b8cac6722eb6c9c80be2503 Mon Sep 17 00:00:00 2001 From: Olusesan Ameye Date: Thu, 2 Jun 2022 21:15:27 -0400 Subject: [PATCH] fix --- www/application/controllers/Coupons.php | 9 ++++++++- www/application/views/users/view_coupon.php | 18 +++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/www/application/controllers/Coupons.php b/www/application/controllers/Coupons.php index 5bd7f2fa..7919be38 100644 --- a/www/application/controllers/Coupons.php +++ b/www/application/controllers/Coupons.php @@ -32,7 +32,7 @@ class Coupons extends Users_Controller { $what = $this->input->get('what'); $value = $this->input->get('value'); - echo "RD $what $value"; + if ($what !='' && $value!=''){ $data = $this->getSessionArray(); $in=[]; @@ -44,6 +44,13 @@ class Coupons extends Users_Controller { $this->load->model('backend_model'); $out = array(); $res = $this->backend_model->wrenchboard_api($in, $out); + if ( $res == 0 ){ + echo 'Completed'; + } + else + { + echo 'Redeem fail'; + } } } diff --git a/www/application/views/users/view_coupon.php b/www/application/views/users/view_coupon.php index 1eec0728..d03ef761 100644 --- a/www/application/views/users/view_coupon.php +++ b/www/application/views/users/view_coupon.php @@ -58,12 +58,15 @@ status ?> +
+ + +
-