refactoring, airtelmoney test
This commit is contained in:
10
app/Models/KazangApi.php
Normal file
10
app/Models/KazangApi.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class KazangApi extends Model
|
||||
{
|
||||
|
||||
}
|
||||
12
app/Models/KazangSession.php
Normal file
12
app/Models/KazangSession.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class KazangSession extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'session_uuid',
|
||||
];
|
||||
}
|
||||
13
app/Models/KazangTransaction.php
Normal file
13
app/Models/KazangTransaction.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class KazangTransaction extends Model
|
||||
{
|
||||
protected $guarded = [
|
||||
'id'
|
||||
];
|
||||
public $table = 'transactions_kazang';
|
||||
}
|
||||
@@ -15,14 +15,14 @@ class Transaction extends Model
|
||||
|
||||
public function createAirtel($org_id, $msisdn, $reference_id, $amount, $product_name, $result_code){
|
||||
$bind = [
|
||||
"org_id" => $org_id,
|
||||
"msisdn" => $msisdn,
|
||||
"reference_id" => $reference_id,
|
||||
"amount" => $amount,
|
||||
"product_name" => $product_name,
|
||||
"result_code" => $result_code,
|
||||
"ussd_push_result_code" => $result_code,
|
||||
"last_updated_by" => 'clientRequest'
|
||||
"org_id" => $org_id,
|
||||
"msisdn" => $msisdn,
|
||||
"reference_id" => $reference_id,
|
||||
"amount" => $amount,
|
||||
"product_name" => $product_name,
|
||||
"result_code" => $result_code,
|
||||
"ussd_push_result_code" => $result_code,
|
||||
"last_updated_by" => 'clientRequest'
|
||||
];
|
||||
$result = Models\AirtelTransaction::create($bind);
|
||||
return ($result) ? 1 : 0;
|
||||
|
||||
@@ -9,7 +9,7 @@ use Illuminate\Notifications\Notifiable;
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
public $table = 'auth_users';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user