fix
This commit is contained in:
@@ -644,28 +644,21 @@ class Member extends Users_Controller {
|
||||
|
||||
|
||||
//*************GET MOST OF THESE DATA FROM BACKEND */
|
||||
$in=[];
|
||||
$in['amount'] = $data['amount'];
|
||||
$in=[];
|
||||
$out = array();
|
||||
$res = -1;
|
||||
$in['amount'] = $data['amount']*100;
|
||||
$in['member_id'] = $_SESSION['member_id']; // just maing sure
|
||||
$in['currency'] = "NGN";
|
||||
|
||||
$in['action'] = WRENCHBOARD_ACCOUNT_PREPARE_TOPUP;
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
if ($in['amount'] > 0 ){
|
||||
$in['action'] = WRENCHBOARD_ACCOUNT_PREPARE_TOPUP;
|
||||
$this->load->model('backend_model');
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
}
|
||||
|
||||
if ($res > 0) {
|
||||
// prepare the fullter parameters
|
||||
/*
|
||||
*
|
||||
* 12:16:52.238 INFO [237499]: RET: consumer_id=1
|
||||
- 12:16:52.238 INFO [237499]: RET: consumer_mac=3119b744-42ad-4834-bb83-b737588754ca
|
||||
- 12:16:52.238 INFO [237499]: RET: currency=NGN
|
||||
- 12:16:52.238 INFO [237499]: RET: phone=
|
||||
- 12:16:52.238 INFO [237499]: RET: result=YES I GET TO BACK END
|
||||
- 12:16:52.238 INFO [237499]: RET: status=OK
|
||||
- 12:16:52.238 INFO [237499]: RET: tx_ref=c30b3a20-b7f2-4324-b733-a9afa29dc7d1
|
||||
* *
|
||||
*/
|
||||
$data['tx_ref'] = $out['tx_ref'];
|
||||
$data['currency'] =$out['currency'];
|
||||
$data['customer_email'] = $_SESSION['username'];
|
||||
@@ -677,6 +670,7 @@ class Member extends Users_Controller {
|
||||
$data['public_key'] = $out["public_key"]; //"FLWPUBK_TEST-54c90141b028789d671067bd72f781a9-X";
|
||||
} else {
|
||||
// very bad here
|
||||
redirect('member/addfund');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user