This commit is contained in:
2022-08-07 14:22:14 -04:00
parent a57db5292a
commit 2025955687
2 changed files with 15 additions and 5 deletions
+14 -4
View File
@@ -1,7 +1,9 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* handlethe return for money top up from flutrerwave here
*/
class Fltw extends WRB_Controller {
function __construct()
@@ -21,14 +23,22 @@ class Fltw extends WRB_Controller {
}
public function complete() {
$in= [];
$in= [];
// //https://oameye.work.wrenchboard.com/dash?status=successful&tx_ref=wrench-1161918567&transaction_id=3631794
$in['tx_ref'] = $this->input->get('tx_ref');
$in['transaction_id'] = $this->input->get('transaction_id');
$in['status'] = $this->input->get('status');
$in['return_status'] = $this->input->get('status'); // this cabe back as string, I need INT
if ( $in['tx_ref'] !='' && $in['transaction_id'] !='' && $in['status']!='' ){
if ( $in['tx_ref'] !='' && $in['transaction_id'] !='' && $in['return_status']!='' ){
switch ($in['return_status']){
case 'completed':
$in['status'] = 5;
break;
default:
$in['status'] = 0;
break;
}
$in['action'] = WRENCHBOARD_ACCOUNT_COMPLETE_TOPUP;
$this->load->model('backend_model');