Skip to content
This repository was archived by the owner on May 4, 2021. It is now read-only.

Commit 8de04a2

Browse files
Tayeb-AliTayeb-Ali
Tayeb-Ali
authored and
Tayeb-Ali
committed
Server EBS Work A
1 parent cccb943 commit 8de04a2

File tree

6 files changed

+16
-80
lines changed

6 files changed

+16
-80
lines changed

app/Http/Controllers/API/BalanceInquiry.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function balance_inquiry(Request $request){
7878
$ipin = Functions::encript($publickKey , $uuid , $ipin);
7979

8080
$response = BalanceInquiryModel::sendRequest($transaction->id , $ipin, $bank_id);
81-
dd($response);
81+
// dd($response);
8282
if ($response == false) {
8383
$res = ["error" => true, "message" => "Some Error Found"];
8484
return response()->json($res,200);

app/Http/Controllers/API/CardTransfer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function card_transfer(Request $request){
9090
}
9191
$ipin = Functions::encript($publickKey , $uuid , $ipin);
9292

93-
$response = CardTransferModel::sendRequest($transaction->id,$ipin);
93+
$response = CardTransferModel::sendRequest($transaction->id,$ipin, $bank_id);
9494
if ($response == false) {
9595
$res = ["error" => true, "message" => "Some Error Found"];
9696
return response()->json($res,200);

app/Http/Controllers/API/Electricity.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function electricity(Request $request)
103103

104104

105105

106-
$response = ElectricityModel::sendRequest($transaction->id , $ipin);
106+
$response = ElectricityModel::sendRequest($transaction->id , $ipin, $bank_id);
107107
if ($response == false) {
108108
$res = ["error" => true, "message" => "Some Error Found"];
109109
return response()->json($res,200);

app/Model/CardTransfer.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Model;
44

5+
use App\Functions;
56
use App\Model\Account\BankAccount;
67
use Illuminate\Database\Eloquent\Model;
78

@@ -12,7 +13,7 @@ class CardTransfer extends Model
1213
public function transfer(){
1314
return $this->belongsTo('App\Model\Transfer');
1415
}
15-
public static function requestBuild($transaction_id , $ipin){
16+
public static function requestBuild($transaction_id , $ipin, $bank_id){
1617
$request = array();
1718
$transaction = Transaction::where("id", $transaction_id)->first();
1819
$user = User::where("id",$transaction->user_id)->first();
@@ -29,7 +30,7 @@ public static function requestBuild($transaction_id , $ipin){
2930
$entityId = "";
3031
$entityType = "";
3132
$authenticationType = "00";
32-
$bank = BankAccount::getBankAccountByUser($user);
33+
$bank = Functions::getAccountTypeId($bank_id);
3334
$PAN = $bank->PAN;
3435

3536
$mbr = $bank->mbr;
@@ -56,8 +57,8 @@ public static function requestBuild($transaction_id , $ipin){
5657
$request += ["authenticationType" => $authenticationType];
5758
return $request;
5859
}
59-
public static function sendRequest($transaction_id, $ipin){
60-
$request = self::requestBuild($transaction_id, $ipin);
60+
public static function sendRequest($transaction_id, $ipin, $bank_id){
61+
$request = self::requestBuild($transaction_id, $ipin, $bank_id);
6162

6263
$response = SendRequest::sendRequest($request , self::CardTransfer);
6364
return $response;

app/Model/Payment/Electricity.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
namespace App\Model\Payment;
44

5-
use App\Model\Account\BankAccount;
5+
use App\Functions;
6+
//use App\Model\Account\BankAccount;
67
use App\Model\SendRequest;
78
use App\Model\Transaction;
89
use Illuminate\Database\Eloquent\Model;
@@ -21,7 +22,7 @@ public function payment(){
2122
return $this->belongsTo('App\Model\Payment\Payment' , 'payment_id');
2223
}
2324

24-
public static function requestBuild($transaction_id , $ipin){
25+
public static function requestBuild($transaction_id , $ipin, $bank_id){
2526
$transaction = Transaction::where("id", $transaction_id)->first();
2627
$user = User::where("id",$transaction->user_id)->first();
2728
$payment = Payment::where("transaction_id", $transaction_id)->first();
@@ -49,7 +50,7 @@ public static function requestBuild($transaction_id , $ipin){
4950
$mbr = "";
5051
$expDate = "";
5152
$authenticationType = "00";
52-
$bank = BankAccount::getBankAccountByUser($user);
53+
$bank = Functions::getBankAccountByUser($bank_id);
5354
$PAN = $bank->PAN;
5455
$mbr = $bank->mbr;
5556
$expDate = $bank->expDate;
@@ -73,8 +74,8 @@ public static function requestBuild($transaction_id , $ipin){
7374
//dd($request);
7475
return $request;
7576
}
76-
public static function sendRequest($transaction_id , $ipin){
77-
$request = self::requestBuild($transaction_id , $ipin);
77+
public static function sendRequest($transaction_id , $ipin, $bank_id){
78+
$request = self::requestBuild($transaction_id , $ipin, $bank_id);
7879

7980
$response = SendRequest::sendRequest($request , self::Payment);
8081
return $response;

readme.md

+2-68
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,2 @@
1-
<p align="center"><img src="https://laravel.com/assets/img/components/logo-laravel.svg"></p>
2-
<<<<<<< HEAD
3-
=======
4-
5-
<p align="center">
6-
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
7-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a>
8-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a>
9-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" alt="License"></a>
10-
</p>
11-
12-
## About Laravel
13-
14-
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:
15-
16-
- [Simple, fast routing engine](https://laravel.com/docs/routing).
17-
- [Powerful dependency injection container](https://laravel.com/docs/container).
18-
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
19-
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
20-
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
21-
- [Robust background job processing](https://laravel.com/docs/queues).
22-
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
23-
24-
Laravel is accessible, yet powerful, providing tools needed for large, robust applications.
25-
26-
## Learning Laravel
27-
28-
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of any modern web application framework, making it a breeze to get started learning the framework.
29-
30-
If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 1100 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library.
31-
32-
## Laravel Sponsors
33-
34-
We would like to extend our thanks to the following sponsors for helping fund on-going Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell):
35-
36-
- **[Vehikl](https://vehikl.com/)**
37-
- **[Tighten Co.](https://tighten.co)**
38-
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
39-
- **[Cubet Techno Labs](https://cubettech.com)**
40-
- **[British Software Development](https://www.britishsoftware.co)**
41-
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
42-
- [UserInsights](https://userinsights.com)
43-
- [Fragrantica](https://www.fragrantica.com)
44-
- [SOFTonSOFA](https://softonsofa.com/)
45-
- [User10](https://user10.com)
46-
- [Soumettre.fr](https://soumettre.fr/)
47-
- [CodeBrisk](https://codebrisk.com)
48-
- [1Forge](https://1forge.com)
49-
- [TECPRESSO](https://tecpresso.co.jp/)
50-
- [Runtime Converter](http://runtimeconverter.com/)
51-
- [WebL'Agence](https://weblagence.com/)
52-
- [Invoice Ninja](https://www.invoiceninja.com)
53-
- [iMi digital](https://www.imi-digital.de/)
54-
- [Earthlink](https://www.earthlink.ro/)
55-
- [Steadfast Collective](https://steadfastcollective.com/)
56-
57-
## Contributing
58-
59-
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
60-
61-
## Security Vulnerabilities
62-
63-
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
64-
65-
## License
66-
67-
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
68-
>>>>>>> e168e364d6f1b9acf437e04945dcb6040e850a83
1+
## بسكويت بركة
2+
بسكوست الشاي

0 commit comments

Comments
 (0)