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');
|
||||
|
||||
@@ -674,7 +674,7 @@ class Member extends Users_Controller {
|
||||
$data['consumer_id'] =$out['consumer_id'];
|
||||
$data['consumer_mac'] =$out['consumer_mac'];
|
||||
$data['redirect_url'] = base_url() . "fltw/complete"; //"https://oameye.work.wrenchboard.com/dash";
|
||||
$data['public_key'] = "FLWPUBK_TEST-54c90141b028789d671067bd72f781a9-X";
|
||||
$data['public_key'] = $out["public_key"]; //"FLWPUBK_TEST-54c90141b028789d671067bd72f781a9-X";
|
||||
} else {
|
||||
// very bad here
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user