fix
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user