Compare commits
No commits in common. "test" and "master" have entirely different histories.
10
.env.example
10
.env.example
|
@ -26,7 +26,7 @@ TWILIO_SMS_FROM="+447400348273"
|
||||||
|
|
||||||
MAIL_HOST=mail.ilink-app.com
|
MAIL_HOST=mail.ilink-app.com
|
||||||
MAIL_USERNAME=noreply@ilink-app.com
|
MAIL_USERNAME=noreply@ilink-app.com
|
||||||
MAIL_PASSWORD=Reply@iLink2022@@@
|
MAIL_PASSWORD=ilink2017GA
|
||||||
MAIL_FROM_ADDRESS=noreply@ilink-app.com
|
MAIL_FROM_ADDRESS=noreply@ilink-app.com
|
||||||
MAIL_FROM_NAME="iLink World"
|
MAIL_FROM_NAME="iLink World"
|
||||||
MAIL_ENCRYPTION=tls
|
MAIL_ENCRYPTION=tls
|
||||||
|
@ -38,13 +38,5 @@ VISA_API_PASSWORD=PasswordHere!
|
||||||
NOTIFICATION_SERVICE_URL=localhost:8083
|
NOTIFICATION_SERVICE_URL=localhost:8083
|
||||||
NOTIFICATION_SERVICE_KEY=RfXvPQzQRgwpzQYPnLfWpZzgx4QseHlg
|
NOTIFICATION_SERVICE_KEY=RfXvPQzQRgwpzQYPnLfWpZzgx4QseHlg
|
||||||
|
|
||||||
|
|
||||||
PAYMENT_SERVICE_URL=localhost:8087
|
|
||||||
PAYMENT_SERVICE_KEY=U14YhuyFhweMeYpIYj8Ft2jm4cVgbMzD
|
|
||||||
|
|
||||||
|
|
||||||
SWAGGER_GENERATE_ALWAYS=true
|
SWAGGER_GENERATE_ALWAYS=true
|
||||||
SWAGGER_DOCS_TOKEN=ZfMqCAdHHrSH8ADdXreIejgjJtOwsH4K
|
SWAGGER_DOCS_TOKEN=ZfMqCAdHHrSH8ADdXreIejgjJtOwsH4K
|
||||||
|
|
||||||
SENTRY_LARAVEL_DSN=https://9d6f6b6a24514295910a3b0e5bdd1449@o1053292.ingest.sentry.io/4504848762863616
|
|
||||||
SENTRY_TRACES_SAMPLE_RATE=1
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace App\Enums;
|
|
||||||
|
|
||||||
|
|
||||||
abstract class PaymentMethod
|
|
||||||
{
|
|
||||||
const CARD = 'CARD'; // Les remboursements ou recharges vers des clients
|
|
||||||
const WALLET = 'WALLET'; // Les paiements effectués par les clients
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
namespace App\Enums;
|
|
||||||
|
|
||||||
|
|
||||||
abstract class PaymentType
|
|
||||||
{
|
|
||||||
const CASH_IN = 'CASH_IN'; // Les remboursements ou recharges vers des clients
|
|
||||||
const CASH_OUT = 'CASH_OUT'; // Les paiements effectués par les clients
|
|
||||||
}
|
|
|
@ -45,10 +45,6 @@ class Handler extends ExceptionHandler
|
||||||
*/
|
*/
|
||||||
public function report(Throwable $exception)
|
public function report(Throwable $exception)
|
||||||
{
|
{
|
||||||
if (app()->bound('sentry') && $this->shouldReport($exception)) {
|
|
||||||
app('sentry')->captureException($exception);
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::report($exception);
|
parent::report($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,5 +21,6 @@ use Laravel\Lumen\Routing\Controller as BaseController;
|
||||||
class Controller extends BaseController
|
class Controller extends BaseController
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
use ApiResponser, Helper;
|
use ApiResponser;
|
||||||
|
use Helper;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ class HelperController extends Controller
|
||||||
|
|
||||||
public function countries()
|
public function countries()
|
||||||
{
|
{
|
||||||
$countries = DB::select('SELECT id , name , code_dial , code_country, currency_code FROM countries_currencies WHERE id IN (
|
$countries = DB::select('SELECT id , name , code_dial , code_country FROM countries_currencies WHERE id IN (
|
||||||
SELECT distinct c.id FROM networks n INNER JOIN countries_currencies c ON n.country_id=c.id INNER JOIN configWallet cw ON cw.id_network = n.id WHERE status = 1
|
SELECT distinct c.id FROM networks n INNER JOIN countries_currencies c ON n.country_id=c.id INNER JOIN configWallet cw ON cw.id_network = n.id WHERE status = 1
|
||||||
);');
|
);');
|
||||||
return $this->successResponse($countries);
|
return $this->successResponse($countries);
|
||||||
|
|
|
@ -3,17 +3,18 @@
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
|
||||||
|
use App\Exceptions\AppException;
|
||||||
use App\Models\Agent;
|
use App\Models\Agent;
|
||||||
use App\Models\AgentPlus;
|
use App\Models\AgentPlus;
|
||||||
use App\Models\Identification;
|
use App\Models\Identification;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Traits\Helper;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
|
use Illuminate\Support\Facades\File;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class UserController extends Controller
|
class UserController extends Controller
|
||||||
{
|
{
|
||||||
use Helper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
|
@ -133,16 +134,26 @@ class UserController extends Controller
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function generateRandomString($length = 10)
|
||||||
|
{
|
||||||
|
$characters = '23456789abcdefghjkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ';
|
||||||
|
$charactersLength = strlen($characters);
|
||||||
|
$randomString = '';
|
||||||
|
for ($i = 0; $i < $length; $i++) {
|
||||||
|
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||||
|
}
|
||||||
|
return $randomString;
|
||||||
|
}
|
||||||
|
|
||||||
public function rattachCard(Request $request, $id_user)
|
public function rattachCard(Request $request, $id_user)
|
||||||
{
|
{
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
|
// 'id_user' => 'required|integer|min:0|not_in:0',
|
||||||
'numero_carte' => 'required',
|
'numero_carte' => 'required',
|
||||||
'expiration_date' => 'required_if:facade,front|date_format:m/y|after_or_equal:today',
|
'expiration_date' => 'required_if:facade,front|date_format:m/y|after_or_equal:today',
|
||||||
'card_country_id' => 'required|integer|exists:countries,id',
|
|
||||||
]);
|
]);
|
||||||
$user = User::findOrFail($id_user);
|
$user = User::findOrFail($id_user);
|
||||||
$user->numero_carte = $request->numero_carte;
|
$user->numero_carte = $request->numero_carte;
|
||||||
$user->card_country_id = $request->card_country_id;
|
|
||||||
$expiration_date = \DateTime::createFromFormat('m/y', $request->expiration_date);
|
$expiration_date = \DateTime::createFromFormat('m/y', $request->expiration_date);
|
||||||
if (!$expiration_date)
|
if (!$expiration_date)
|
||||||
$expiration_date = new \DateTime();
|
$expiration_date = new \DateTime();
|
||||||
|
@ -151,6 +162,85 @@ class UserController extends Controller
|
||||||
return $this->successResponse(trans('messages.successful_card_attachment'));
|
return $this->successResponse(trans('messages.successful_card_attachment'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws AppException
|
||||||
|
*/
|
||||||
|
public function uploadImage(Request $request, $key, $imageCode, $folderName)
|
||||||
|
{
|
||||||
|
|
||||||
|
// if ($request->hasFile('image')) {
|
||||||
|
$original_filename = $request->file($key)->getClientOriginalName();
|
||||||
|
$original_filename_arr = explode('.', $original_filename);
|
||||||
|
$file_ext = end($original_filename_arr);
|
||||||
|
$image = $imageCode . '-' . Str::uuid() . '.' . $file_ext;
|
||||||
|
|
||||||
|
//Check if the directory already exists.
|
||||||
|
$directoryName = './' . $folderName;
|
||||||
|
if (!is_dir($directoryName)) {
|
||||||
|
//Directory does not exist, so lets create it.
|
||||||
|
mkdir($directoryName, 0755);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allow certain file formats
|
||||||
|
// $allowTypes = array('jpg', 'png', 'jpeg', 'gif');
|
||||||
|
// if (in_array(strtolower($file_ext), $allowTypes)) {
|
||||||
|
|
||||||
|
$compressedImage = $this->compressImage($request->file($key), './' . $folderName . '/' . $image, 70);
|
||||||
|
if ($compressedImage) {
|
||||||
|
return url($folderName . '/' . $image);
|
||||||
|
} else {
|
||||||
|
throw new AppException(trans('errors.compression_failed'));
|
||||||
|
}
|
||||||
|
// } else {
|
||||||
|
// return $this->errorResponse('Sorry, only JPG, JPEG, PNG, & GIF files are allowed to upload.');
|
||||||
|
// }
|
||||||
|
|
||||||
|
// } else {
|
||||||
|
// return $this->errorResponse('File not found');
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function deleteImageFile($filename, $folderName)
|
||||||
|
{
|
||||||
|
// unlink(storage_path('./'.$folderName.'/' . $filename));
|
||||||
|
$path = './' . $folderName . '/' . $filename;
|
||||||
|
if (File::exists($path))
|
||||||
|
File::delete($path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Custom function to compress image size and
|
||||||
|
* upload to the server using PHP
|
||||||
|
*/
|
||||||
|
private function compressImage($source, $destination, $quality)
|
||||||
|
{
|
||||||
|
// Get image info
|
||||||
|
$imgInfo = getimagesize($source);
|
||||||
|
$mime = $imgInfo['mime'];
|
||||||
|
|
||||||
|
// Create a new image from file
|
||||||
|
switch ($mime) {
|
||||||
|
case 'image/jpeg':
|
||||||
|
$image = imagecreatefromjpeg($source);
|
||||||
|
break;
|
||||||
|
case 'image/png':
|
||||||
|
$image = imagecreatefrompng($source);
|
||||||
|
break;
|
||||||
|
case 'image/gif':
|
||||||
|
$image = imagecreatefromgif($source);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$image = imagecreatefromjpeg($source);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save image
|
||||||
|
imagejpeg($image, $destination, $quality);
|
||||||
|
|
||||||
|
// Return compressed image
|
||||||
|
return $destination;
|
||||||
|
}
|
||||||
|
|
||||||
// Mise a jour du mot de passe
|
// Mise a jour du mot de passe
|
||||||
|
|
||||||
public function updatePassword(Request $request)
|
public function updatePassword(Request $request)
|
||||||
|
|
|
@ -430,7 +430,7 @@ ug.date_creation as date_creation_groupe , ug.createur , ug.sponsor1 , ug.sponso
|
||||||
return $this->errorResponse(trans('errors.group_not_active'));
|
return $this->errorResponse(trans('errors.group_not_active'));
|
||||||
|
|
||||||
$sponsor = User::where('user_code', $request->code_sponsor)->first();
|
$sponsor = User::where('user_code', $request->code_sponsor)->first();
|
||||||
if (!isset($sponsor)) {
|
if (isset($sponsor)) {
|
||||||
return $this->errorResponse(trans('errors.sponsor_not_found', ['id' => $request->code_sponsor]));
|
return $this->errorResponse(trans('errors.sponsor_not_found', ['id' => $request->code_sponsor]));
|
||||||
}
|
}
|
||||||
if (!in_array($sponsor->id, [$group->id_sponsor1, $group->id_sponsor2, $group->id_sponsor3]))
|
if (!in_array($sponsor->id, [$group->id_sponsor1, $group->id_sponsor2, $group->id_sponsor3]))
|
||||||
|
|
|
@ -109,13 +109,12 @@ class WalletController extends Controller
|
||||||
// Wallets users iLink
|
// Wallets users iLink
|
||||||
public function showWalletUser($id_user)
|
public function showWalletUser($id_user)
|
||||||
{
|
{
|
||||||
$wallet = collect(DB::select('SELECT wu.*, u.user_code , u.numero_carte , u.expiration_date ,n2.id as id_wallet_network, n2.name as network , cc.name as country, cc.currency_code , card_cc.currency_code as card_currency_code, cw.has_nano_credit from wallets_users wu
|
$wallet = collect(DB::select('SELECT wu.*, u.user_code , u.numero_carte , u.expiration_date ,n2.id as id_wallet_network, n2.name as network , cc.name as country, cc.currency_code , cw.has_nano_credit from wallets_users wu
|
||||||
INNER JOIN users u ON u.id = wu.idUser
|
INNER JOIN users u ON u.id = wu.idUser
|
||||||
INNER JOIN networks n1 ON n1.id = u.network_id
|
INNER JOIN networks n1 ON n1.id = u.network_id
|
||||||
INNER JOIN networks n2 ON n2.country_id = n1.country_id
|
INNER JOIN networks n2 ON n2.country_id = n1.country_id
|
||||||
INNER JOIN configWallet cw ON cw.id_network = n2.id
|
INNER JOIN configWallet cw ON cw.id_network = n2.id
|
||||||
INNER JOIN countries_currencies cc ON cc.id = n2.country_id
|
INNER JOIN countries_currencies cc ON cc.id = n2.country_id
|
||||||
LEFT JOIN countries_currencies card_cc ON card_cc.id = u.card_country_id
|
|
||||||
WHERE wu.idUser = :id_user AND cw.type = \'ilink\' LIMIT 1', ['id_user' => $id_user]))->first();
|
WHERE wu.idUser = :id_user AND cw.type = \'ilink\' LIMIT 1', ['id_user' => $id_user]))->first();
|
||||||
if ($wallet) {
|
if ($wallet) {
|
||||||
return $this->successResponse($wallet);
|
return $this->successResponse($wallet);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -22,7 +22,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
* @property string $user_code
|
* @property string $user_code
|
||||||
* @property string $numero_carte
|
* @property string $numero_carte
|
||||||
* @property Carbon $expiration_date
|
* @property Carbon $expiration_date
|
||||||
* * @property int|null $card_country_id
|
|
||||||
* @property string $adresse
|
* @property string $adresse
|
||||||
* @property float $solde
|
* @property float $solde
|
||||||
* @property string $encrypted_password
|
* @property string $encrypted_password
|
||||||
|
@ -80,7 +79,6 @@ class User extends Model
|
||||||
'user_code',
|
'user_code',
|
||||||
'numero_carte',
|
'numero_carte',
|
||||||
'expiration_date',
|
'expiration_date',
|
||||||
'card_country_id',
|
|
||||||
'adresse',
|
'adresse',
|
||||||
'solde',
|
'solde',
|
||||||
'encrypted_password',
|
'encrypted_password',
|
||||||
|
|
|
@ -205,7 +205,6 @@ class WalletIlinkTransaction extends Model
|
||||||
'numero_carte' => 'required',
|
'numero_carte' => 'required',
|
||||||
'cvv' => 'required|size:3',
|
'cvv' => 'required|size:3',
|
||||||
'expiration_date' => 'required|date_format:m/y|after_or_equal:today',
|
'expiration_date' => 'required|date_format:m/y|after_or_equal:today',
|
||||||
'payment_transaction_id' => 'nullable|string' // Required if payment was redirected
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +213,6 @@ class WalletIlinkTransaction extends Model
|
||||||
return [
|
return [
|
||||||
// 'final_country' => 'required|integer|exists:countries,id',
|
// 'final_country' => 'required|integer|exists:countries,id',
|
||||||
'cvv' => 'required|size:3',
|
'cvv' => 'required|size:3',
|
||||||
'payment_transaction_id' => 'nullable|string' // Required if payment was redirected
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +229,7 @@ class WalletIlinkTransaction extends Model
|
||||||
'nom_destinataire' => 'required',
|
'nom_destinataire' => 'required',
|
||||||
'prenom_destinataire' => 'required',
|
'prenom_destinataire' => 'required',
|
||||||
'type_document_destinataire' => 'required',
|
'type_document_destinataire' => 'required',
|
||||||
'id_document_destinataire' => 'required'
|
// 'id_document_destinataire'=>'required'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +246,6 @@ class WalletIlinkTransaction extends Model
|
||||||
'type_document_destinataire' => 'required',
|
'type_document_destinataire' => 'required',
|
||||||
// 'id_document_destinataire'=>'required',
|
// 'id_document_destinataire'=>'required',
|
||||||
'id_destinataire' => 'required_without:phone_destinataire',
|
'id_destinataire' => 'required_without:phone_destinataire',
|
||||||
'type_id_destinataire' => 'required|string|in:user_code,phone',
|
|
||||||
'network_destinataire' => 'required|integer|exists:networks,id',
|
'network_destinataire' => 'required|integer|exists:networks,id',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,7 @@ use App\Models\WalletsUser;
|
||||||
use Barryvdh\DomPDF\Facade as PDF;
|
use Barryvdh\DomPDF\Facade as PDF;
|
||||||
use Brick\Math\RoundingMode;
|
use Brick\Math\RoundingMode;
|
||||||
use Brick\Money\Context\AutoContext;
|
use Brick\Money\Context\AutoContext;
|
||||||
use Brick\Money\Context\CustomContext;
|
|
||||||
use Brick\Money\CurrencyConverter;
|
use Brick\Money\CurrencyConverter;
|
||||||
use Brick\Money\Exception\CurrencyConversionException;
|
|
||||||
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
use Brick\Money\ExchangeRateProvider\BaseCurrencyProvider;
|
||||||
use Brick\Money\ExchangeRateProvider\PDOProvider;
|
use Brick\Money\ExchangeRateProvider\PDOProvider;
|
||||||
use Brick\Money\ExchangeRateProvider\PDOProviderConfiguration;
|
use Brick\Money\ExchangeRateProvider\PDOProviderConfiguration;
|
||||||
|
@ -40,7 +38,6 @@ use Illuminate\Support\Facades\File;
|
||||||
use Illuminate\Support\Facades\Input;
|
use Illuminate\Support\Facades\Input;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use Illuminate\Support\Str;
|
|
||||||
use PDO;
|
use PDO;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
|
@ -174,7 +171,7 @@ trait Helper
|
||||||
return $money->formatTo(app()->getLocale());
|
return $money->formatTo(app()->getLocale());
|
||||||
}
|
}
|
||||||
|
|
||||||
private function convertMoney($amount, $init_country, $final_country, $precision = 2)
|
private function convertMoney($amount, $init_country, $final_country)
|
||||||
{
|
{
|
||||||
// set to whatever your rates are relative to
|
// set to whatever your rates are relative to
|
||||||
$baseCurrency = 'USD';
|
$baseCurrency = 'USD';
|
||||||
|
@ -199,13 +196,13 @@ trait Helper
|
||||||
$converter = new CurrencyConverter($provider);
|
$converter = new CurrencyConverter($provider);
|
||||||
$init_country = Country::findOrFail($init_country);
|
$init_country = Country::findOrFail($init_country);
|
||||||
$final_country = Country::findOrFail($final_country);
|
$final_country = Country::findOrFail($final_country);
|
||||||
$init_money = Money::of(round($amount, $precision), $init_country->currency->code, new AutoContext());
|
$init_money = Money::of(round($amount, 2), $init_country->currency->code, new AutoContext());
|
||||||
return $converter->convert($init_money, $final_country->currency->code, RoundingMode::DOWN);
|
return $converter->convert($init_money, $final_country->currency->code, RoundingMode::DOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toMoneyWithCurrency($amount, $init_country, $final_country, $precision = 2)
|
public function toMoneyWithCurrency($amount, $init_country, $final_country)
|
||||||
{
|
{
|
||||||
return $this->convertMoney($amount, $init_country, $final_country, $precision)->formatTo(app()->getLocale());
|
return $this->convertMoney($amount, $init_country, $final_country)->formatTo(app()->getLocale());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toMoneyAmount($amount, $init_country, $final_country)
|
public function toMoneyAmount($amount, $init_country, $final_country)
|
||||||
|
@ -213,38 +210,6 @@ trait Helper
|
||||||
return $this->convertMoney($amount, $init_country, $final_country)->getAmount()->toFloat();
|
return $this->convertMoney($amount, $init_country, $final_country)->getAmount()->toFloat();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws CurrencyConversionException
|
|
||||||
*/
|
|
||||||
public function getExchangeRate($init_country, $final_country)
|
|
||||||
{
|
|
||||||
// set to whatever your rates are relative to
|
|
||||||
$baseCurrency = 'USD';
|
|
||||||
|
|
||||||
// use your own credentials, or re-use your existing PDO connection
|
|
||||||
$pdo = new PDO('mysql:host=' . env('DB_HOST') . ';dbname=' . env('DB_DATABASE'), env('DB_USERNAME'), env('DB_PASSWORD'));
|
|
||||||
|
|
||||||
$configuration = new PDOProviderConfiguration();
|
|
||||||
|
|
||||||
$configuration->tableName = 'exchange_rate';
|
|
||||||
$configuration->exchangeRateColumnName = 'exchange_rate';
|
|
||||||
$configuration->targetCurrencyColumnName = 'target_currency';
|
|
||||||
$configuration->sourceCurrencyCode = $baseCurrency;
|
|
||||||
|
|
||||||
// this provider loads exchange rates from your database
|
|
||||||
$provider = new PDOProvider($pdo, $configuration);
|
|
||||||
|
|
||||||
// this provider calculates exchange rates relative to the base currency
|
|
||||||
$provider = new BaseCurrencyProvider($provider, $baseCurrency);
|
|
||||||
|
|
||||||
$sourceCurrencyCode = CountriesCurrency::findOrFail($init_country)->currency_code;
|
|
||||||
$targetCurrencyCode = CountriesCurrency::findOrFail($final_country)->currency_code;
|
|
||||||
|
|
||||||
$rate = round($provider->getExchangeRate($sourceCurrencyCode, $targetCurrencyCode)->toFloat(), 6);
|
|
||||||
|
|
||||||
return $this->toMoneyWithCurrencyCode(1, $sourceCurrencyCode) . ' = ' . $rate. ' '. $targetCurrencyCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function toUSDAmount($amount, $init_country, $final_currency_code = 'USD')
|
public function toUSDAmount($amount, $init_country, $final_currency_code = 'USD')
|
||||||
{
|
{
|
||||||
// set to whatever your rates are relative to
|
// set to whatever your rates are relative to
|
||||||
|
@ -620,95 +585,4 @@ trait Helper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws AppException
|
|
||||||
*/
|
|
||||||
public function uploadImage(Request $request, $key, $imageCode, $folderName)
|
|
||||||
{
|
|
||||||
|
|
||||||
// if ($request->hasFile('image')) {
|
|
||||||
$original_filename = $request->file($key)->getClientOriginalName();
|
|
||||||
$original_filename_arr = explode('.', $original_filename);
|
|
||||||
$file_ext = end($original_filename_arr);
|
|
||||||
$image = $imageCode . '-' . Str::uuid() . '.' . $file_ext;
|
|
||||||
|
|
||||||
//Check if the directory already exists.
|
|
||||||
$directoryName = './' . $folderName;
|
|
||||||
if (!is_dir($directoryName)) {
|
|
||||||
//Directory does not exist, so lets create it.
|
|
||||||
mkdir($directoryName, 0755);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allow certain file formats
|
|
||||||
// $allowTypes = array('jpg', 'png', 'jpeg', 'gif');
|
|
||||||
// if (in_array(strtolower($file_ext), $allowTypes)) {
|
|
||||||
|
|
||||||
$compressedImage = $this->compressImage($request->file($key), './' . $folderName . '/' . $image, 70);
|
|
||||||
if ($compressedImage) {
|
|
||||||
return url($folderName . '/' . $image);
|
|
||||||
} else {
|
|
||||||
throw new AppException(trans('errors.compression_failed'));
|
|
||||||
}
|
|
||||||
// } else {
|
|
||||||
// return $this->errorResponse('Sorry, only JPG, JPEG, PNG, & GIF files are allowed to upload.');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// return $this->errorResponse('File not found');
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function deleteImageFile($filename, $folderName)
|
|
||||||
{
|
|
||||||
// unlink(storage_path('./'.$folderName.'/' . $filename));
|
|
||||||
$path = './' . $folderName . '/' . $filename;
|
|
||||||
if (File::exists($path))
|
|
||||||
File::delete($path);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Custom function to compress image size and
|
|
||||||
* upload to the server using PHP
|
|
||||||
*/
|
|
||||||
public function compressImage($source, $destination, $quality)
|
|
||||||
{
|
|
||||||
// Get image info
|
|
||||||
$imgInfo = getimagesize($source);
|
|
||||||
$mime = $imgInfo['mime'];
|
|
||||||
|
|
||||||
// Create a new image from file
|
|
||||||
switch ($mime) {
|
|
||||||
case 'image/jpeg':
|
|
||||||
$image = imagecreatefromjpeg($source);
|
|
||||||
break;
|
|
||||||
case 'image/png':
|
|
||||||
$image = imagecreatefrompng($source);
|
|
||||||
break;
|
|
||||||
case 'image/gif':
|
|
||||||
$image = imagecreatefromgif($source);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$image = imagecreatefromjpeg($source);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save image
|
|
||||||
imagejpeg($image, $destination, $quality);
|
|
||||||
|
|
||||||
// Return compressed image
|
|
||||||
return $destination;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function generateRandomString($length = 10)
|
|
||||||
{
|
|
||||||
$characters = '23456789abcdefghjkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ';
|
|
||||||
$charactersLength = strlen($characters);
|
|
||||||
$randomString = '';
|
|
||||||
for ($i = 0; $i < $length; $i++) {
|
|
||||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
|
||||||
}
|
|
||||||
return $randomString;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,13 +265,3 @@ if (!function_exists('cookie')) {
|
||||||
return $cookie->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly);
|
return $cookie->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!function_exists('remove_spaces')) {
|
|
||||||
function remove_spaces($string): string
|
|
||||||
{
|
|
||||||
$pattern = '/\s+/';
|
|
||||||
return preg_replace($pattern, '', $string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
|
@ -62,9 +62,7 @@ $app->singleton(
|
||||||
$app->configure('app');
|
$app->configure('app');
|
||||||
$app->configure('mail');
|
$app->configure('mail');
|
||||||
$app->configure('queue');
|
$app->configure('queue');
|
||||||
$app->configure('sentry');
|
|
||||||
$app->configure('variables');
|
$app->configure('variables');
|
||||||
$app->configure('services');
|
|
||||||
$app->alias('mailer', Illuminate\Mail\Mailer::class);
|
$app->alias('mailer', Illuminate\Mail\Mailer::class);
|
||||||
$app->alias('mailer', Illuminate\Contracts\Mail\Mailer::class);
|
$app->alias('mailer', Illuminate\Contracts\Mail\Mailer::class);
|
||||||
$app->alias('mailer', Illuminate\Contracts\Mail\MailQueue::class);
|
$app->alias('mailer', Illuminate\Contracts\Mail\MailQueue::class);
|
||||||
|
@ -106,17 +104,14 @@ $app->routeMiddleware([
|
||||||
|
|
||||||
// $app->register(App\Providers\AppServiceProvider::class);
|
// $app->register(App\Providers\AppServiceProvider::class);
|
||||||
// $app->register(App\Providers\AuthServiceProvider::class);
|
// $app->register(App\Providers\AuthServiceProvider::class);
|
||||||
$app->register(App\Providers\EventServiceProvider::class);
|
// $app->register(App\Providers\EventServiceProvider::class);
|
||||||
$app->register(Illuminate\Database\Eloquent\LegacyFactoryServiceProvider::class);
|
$app->register(Illuminate\Database\Eloquent\LegacyFactoryServiceProvider::class);
|
||||||
$app->register(Illuminate\Mail\MailServiceProvider::class);
|
$app->register(Illuminate\Mail\MailServiceProvider::class);
|
||||||
$app->register(\SwaggerLume\ServiceProvider::class);
|
$app->register(\SwaggerLume\ServiceProvider::class);
|
||||||
$app->register('Sentry\Laravel\ServiceProvider');
|
|
||||||
$app->register('Sentry\Laravel\Tracing\ServiceProvider');
|
|
||||||
$app->register(Maatwebsite\Excel\ExcelServiceProvider::class);
|
$app->register(Maatwebsite\Excel\ExcelServiceProvider::class);
|
||||||
$app->register(\Barryvdh\DomPDF\ServiceProvider::class);
|
$app->register(\Barryvdh\DomPDF\ServiceProvider::class);
|
||||||
$app->register(Flipbox\LumenGenerator\LumenGeneratorServiceProvider::class);
|
$app->register(Flipbox\LumenGenerator\LumenGeneratorServiceProvider::class);
|
||||||
|
/*
|
||||||
/*env
|
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Load The Application Routes
|
| Load The Application Routes
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -5,23 +5,19 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.0",
|
"php": "^7.3|^8.0",
|
||||||
"ext-gd": "*",
|
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"barryvdh/laravel-dompdf": "^0.9.0",
|
"barryvdh/laravel-dompdf": "^0.9.0",
|
||||||
"brick/money": "^0.5.2",
|
"brick/money": "^0.5.2",
|
||||||
"darkaonline/swagger-lume": "^8.0",
|
"darkaonline/swagger-lume": "^8.0",
|
||||||
"doctrine/dbal": "^3.6",
|
|
||||||
"flipbox/lumen-generator": "8.2.2",
|
"flipbox/lumen-generator": "8.2.2",
|
||||||
"guzzlehttp/guzzle": "^7.0.1",
|
"guzzlehttp/guzzle": "^7.0.1",
|
||||||
"illuminate/mail": "^8.62",
|
"illuminate/mail": "^8.62",
|
||||||
"laravel/legacy-factories": "^1.1",
|
"laravel/legacy-factories": "^1.1",
|
||||||
"laravel/lumen-framework": "^8.0",
|
"laravel/lumen-framework": "^8.0",
|
||||||
"maatwebsite/excel": "^3.1",
|
"maatwebsite/excel": "^3.1",
|
||||||
"sentry/sentry-laravel": "2.9",
|
|
||||||
"simplesoftwareio/simple-qrcode": "^4.2",
|
"simplesoftwareio/simple-qrcode": "^4.2",
|
||||||
"twilio/sdk": "^6.28",
|
"twilio/sdk": "^6.28"
|
||||||
"ext-pdo": "*"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "^1.9.1",
|
"fzaninotto/faker": "^1.9.1",
|
||||||
|
@ -46,10 +42,7 @@
|
||||||
"config": {
|
"config": {
|
||||||
"preferred-install": "dist",
|
"preferred-install": "dist",
|
||||||
"sort-packages": true,
|
"sort-packages": true,
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true
|
||||||
"allow-plugins": {
|
|
||||||
"php-http/discovery": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,57 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),
|
|
||||||
|
|
||||||
// capture release as git sha
|
|
||||||
// 'release' => trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')),
|
|
||||||
|
|
||||||
// When left empty or `null` the Laravel environment will be used
|
|
||||||
'environment' => env('SENTRY_ENVIRONMENT'),
|
|
||||||
|
|
||||||
'breadcrumbs' => [
|
|
||||||
// Capture Laravel logs in breadcrumbs
|
|
||||||
'logs' => true,
|
|
||||||
|
|
||||||
// Capture SQL queries in breadcrumbs
|
|
||||||
'sql_queries' => true,
|
|
||||||
|
|
||||||
// Capture bindings on SQL queries logged in breadcrumbs
|
|
||||||
'sql_bindings' => true,
|
|
||||||
|
|
||||||
// Capture queue job information in breadcrumbs
|
|
||||||
'queue_info' => true,
|
|
||||||
|
|
||||||
// Capture command information in breadcrumbs
|
|
||||||
'command_info' => true,
|
|
||||||
],
|
|
||||||
|
|
||||||
'tracing' => [
|
|
||||||
// Trace queue jobs as their own transactions
|
|
||||||
'queue_job_transactions' => env('SENTRY_TRACE_QUEUE_ENABLED', false),
|
|
||||||
|
|
||||||
// Capture queue jobs as spans when executed on the sync driver
|
|
||||||
'queue_jobs' => true,
|
|
||||||
|
|
||||||
// Capture SQL queries as spans
|
|
||||||
'sql_queries' => true,
|
|
||||||
|
|
||||||
// Try to find out where the SQL query originated from and add it to the query spans
|
|
||||||
'sql_origin' => true,
|
|
||||||
|
|
||||||
// Capture views as spans
|
|
||||||
'views' => true,
|
|
||||||
|
|
||||||
// Indicates if the tracing integrations supplied by Sentry should be loaded
|
|
||||||
'default_integrations' => true,
|
|
||||||
],
|
|
||||||
|
|
||||||
// @see: https://docs.sentry.io/platforms/php/configuration/options/#send-default-pii
|
|
||||||
'send_default_pii' => false,
|
|
||||||
|
|
||||||
'traces_sample_rate' => (float)(env('SENTRY_TRACES_SAMPLE_RATE', 0.0)),
|
|
||||||
|
|
||||||
'controllers_base_namespace' => env('SENTRY_CONTROLLERS_BASE_NAMESPACE', 'App\\Http\\Controllers'),
|
|
||||||
|
|
||||||
];
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'accepted_keys' => env('ACCEPTED_KEYS'),
|
|
||||||
'notification_service' => [
|
|
||||||
'base_uri' => env('NOTIFICATION_SERVICE_URL'),
|
|
||||||
'key' => env('NOTIFICATION_SERVICE_KEY')
|
|
||||||
],
|
|
||||||
'payment_service' => [
|
|
||||||
'base_uri' => env('PAYMENT_SERVICE_URL'),
|
|
||||||
'key' => env('PAYMENT_SERVICE_KEY')
|
|
||||||
],
|
|
||||||
'app_url' => env('APP_URL'),
|
|
||||||
'app_debug' => env('APP_DEBUG', false)
|
|
||||||
];
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class RenamePspReferenceInWalletIlinkTransaction extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('wallet_ilink_transaction', function (Blueprint $table) {
|
|
||||||
$table->renameColumn('pspReference', 'payment_transaction_id');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('wallet_ilink_transaction', function (Blueprint $table) {
|
|
||||||
$table->renameColumn('payment_transaction_id', 'pspReference');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class AddCardCountryIdToUsers extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('users', function (Blueprint $table) {
|
|
||||||
$table->integer('card_country_id')->nullable()->after('expiration_date');
|
|
||||||
|
|
||||||
$table->foreign('card_country_id','users_card_country_id_foreign')->references('id')->on('countries')->restrictOnDelete();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('users', function (Blueprint $table) {
|
|
||||||
$table->dropForeign('users_card_country_id_foreign');
|
|
||||||
$table->dropColumn('card_country_id');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class SetTownIdNullableInAgents extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('agents', function (Blueprint $table) {
|
|
||||||
$table->integer('town_id')->nullable()->change();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('agents', function (Blueprint $table) {
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class AddExchangeRateToWalletiLinkTransaction extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('wallet_ilink_transaction', function (Blueprint $table) {
|
|
||||||
$table->string('exchange_rate')->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('wallet_ilink_transaction', function (Blueprint $table) {
|
|
||||||
$table->dropColumn('exchange_rate');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,103 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class UpdateInfosIlinkTransactionView extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
DB::statement("
|
|
||||||
CREATE OR REPLACE VIEW `infos_ilink_transaction` AS
|
|
||||||
SELECT
|
|
||||||
`wit`.`id` AS `id`,
|
|
||||||
`wit`.`id_transaction` AS `id_transaction`,
|
|
||||||
`wit`.`montant` AS `montant`,
|
|
||||||
`wit`.`montant_net_final_country` AS `montant_net_final_country`,
|
|
||||||
`wit`.`montant_net` AS `montant_net`,
|
|
||||||
`wit`.`encrypted_code_retrait` AS `encrypted_code_retrait`,
|
|
||||||
`wit`.`code_retrait_salt` AS `code_retrait_salt`,
|
|
||||||
`wit`.`status_retrait` AS `status_retrait`,
|
|
||||||
`wit`.`date_retrait` AS `date_retrait`,
|
|
||||||
`wit`.`id_destinataire` AS `id_destinataire`,
|
|
||||||
`wit`.`type_id_destinataire` AS `type_id_destinataire`,
|
|
||||||
`wit`.`network_destinataire` AS `network_destinataire`,
|
|
||||||
`wit`.`type_document_destinataire` AS `type_document_destinataire`,
|
|
||||||
`wit`.`id_document_destinataire` AS `id_document_destinataire`,
|
|
||||||
`wit`.`nom_destinataire` AS `nom_destinataire`,
|
|
||||||
`wit`.`prenom_destinataire` AS `prenom_destinataire`,
|
|
||||||
`wit`.`nom_emetteur` AS `nom_emetteur`,
|
|
||||||
`wit`.`prenom_emetteur` AS `prenom_emetteur`,
|
|
||||||
`wit`.`email_emetteur` AS `email_emetteur`,
|
|
||||||
`wit`.`network_emetteur` AS `network_emetteur`,
|
|
||||||
`wit`.`type_document_emetteur` AS `type_document_emetteur`,
|
|
||||||
`wit`.`id_document_emetteur` AS `id_document_emetteur`,
|
|
||||||
`wit`.`frais` AS `frais`,
|
|
||||||
`wit`.`taxe` AS `taxe`,
|
|
||||||
`wit`.`part_reseau_emetteur` AS `part_reseau_emetteur`,
|
|
||||||
`wit`.`part_reseau_payeur` AS `part_reseau_payeur`,
|
|
||||||
`wit`.`part_reseau_payeur_final_country` AS `part_reseau_payeur_final_country`,
|
|
||||||
`wit`.`status_reseau_payeur` AS `status_reseau_payeur`,
|
|
||||||
`wit`.`numero_carte` AS `numero_carte`,
|
|
||||||
`wit`.`expiration_date` AS `expiration_date`,
|
|
||||||
`wit`.`init_country` AS `init_country`,
|
|
||||||
`wit`.`final_country` AS `final_country`,
|
|
||||||
`wit`.`commission_banque` AS `commission_banque`,
|
|
||||||
`wit`.`commission_ag` AS `commission_ag`,
|
|
||||||
`wit`.`commission_sup` AS `commission_sup`,
|
|
||||||
`wit`.`commission_hyp` AS `commission_hyp`,
|
|
||||||
`wit`.`id_wallet_user` AS `id_wallet_user`,
|
|
||||||
`wit`.`id_wallet_ag` AS `id_wallet_ag`,
|
|
||||||
`wit`.`id_wallet_sup` AS `id_wallet_sup`,
|
|
||||||
`wit`.`id_wallet_hyp` AS `id_wallet_hyp`,
|
|
||||||
`wit`.`id_wallet_hyp_payeur` AS `id_wallet_hyp_payeur`,
|
|
||||||
`wit`.`canceled` AS `canceled`,
|
|
||||||
`wit`.`type` AS `type`,
|
|
||||||
`wit`.`date` AS `date`,
|
|
||||||
`wit`.`exchange_rate` AS `exchange_rate`,
|
|
||||||
`wa`.`lastname` AS `agent`,
|
|
||||||
`wa`.`codeMembre` AS `code_agent`,
|
|
||||||
`wa`.`transactionNumber` AS `phone_agent`,
|
|
||||||
`wa`.`codeParrain` AS `code_parrain`,
|
|
||||||
`tit`.`type` AS `type_transaction`,
|
|
||||||
`tit`.`nom` AS `operation_fr`,
|
|
||||||
`tit`.`name` AS `operation_en`,
|
|
||||||
`tit`.`acteur` AS `acteur`,
|
|
||||||
`wu`.`lastname` AS `user`,
|
|
||||||
`wu`.`phone` AS `user_phone`,
|
|
||||||
`wu`.`user_code` AS `user_code`,
|
|
||||||
`cc`.`currency_code` AS `init_currency`,
|
|
||||||
`cc2`.`currency_code` AS `final_currency`,
|
|
||||||
`cc`.`name` AS `pays_init`,
|
|
||||||
`cc2`.`name` AS `pays_final`,
|
|
||||||
`wu_dest`.`phone` AS `destinataire_phone`,
|
|
||||||
`wu_dest`.`lastname` AS `destinataire_name`
|
|
||||||
FROM
|
|
||||||
((((((`wallet_ilink_transaction` `wit`
|
|
||||||
JOIN `type_ilink_transaction` `tit` ON ((`tit`.`id` = `wit`.`type`)))
|
|
||||||
LEFT JOIN `wallet_agent` `wa` ON ((`wa`.`wallet_id` = `wit`.`id_wallet_ag`)))
|
|
||||||
LEFT JOIN `wallet_user` `wu` ON ((`wu`.`id_wallet` = `wit`.`id_wallet_user`)))
|
|
||||||
LEFT JOIN `wallet_user` `wu_dest` ON ((CONVERT( `wu_dest`.`user_code` USING UTF8MB4) = `wit`.`id_destinataire`)))
|
|
||||||
LEFT JOIN `countries_currencies` `cc` ON ((`wit`.`init_country` = `cc`.`id`)))
|
|
||||||
LEFT JOIN `countries_currencies` `cc2` ON ((`wit`.`final_country` = `cc2`.`id`)))
|
|
||||||
ORDER BY `wit`.`date` DESC
|
|
||||||
");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -85,12 +85,5 @@ Paying network : :network :country',
|
||||||
"update_banking_information" => "Update your banking information",
|
"update_banking_information" => "Update your banking information",
|
||||||
"wallet_already_linked_to_bank_account" => "Your wallet is already linked to your bank account",
|
"wallet_already_linked_to_bank_account" => "Your wallet is already linked to your bank account",
|
||||||
"users_group_not_found" => "This group code does not exist",
|
"users_group_not_found" => "This group code does not exist",
|
||||||
"amount_not_allowed" => "This amount is not allowed. It must be between :min and :max",
|
"amount_not_allowed" => "Ce montant n'est pas autorisé. Il doit être compris entre :min et :max"
|
||||||
"transaction_already_completed" => "This transaction has already been completed",
|
|
||||||
'paying_network_api_failed' => "Request to API paying network failed",
|
|
||||||
'transaction_not_supported' => "This transaction is not supported",
|
|
||||||
'payment_invalid' => "Invalid payment",
|
|
||||||
'service_unavailable_in_country' => 'Service not available in this country',
|
|
||||||
'recipient_not_found' => "This recipient does not exist"
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -83,17 +83,14 @@ This message was sent to the sender\'s email',
|
||||||
'sent_by_mail_to_recipient' => "
|
'sent_by_mail_to_recipient' => "
|
||||||
|
|
||||||
This message was sent to the recipient's email",
|
This message was sent to the recipient's email",
|
||||||
'successful_user_send_to_cart' => "Sending money from your account to your card
|
'successful_user_send_to_cart' => 'Sending money to a visa card made.
|
||||||
Transaction information:
|
Transaction information :
|
||||||
- Number: :id_transaction
|
- ID : :id_transaction
|
||||||
- Transaction amount: :amount
|
- Amount of the transaction : :amount
|
||||||
- Fees and taxes: :fees
|
- Fees : :fees
|
||||||
- Departure country: :init_country
|
- Net shipping amount : :net
|
||||||
- Net amount: :net_init
|
- Issuer account :sender_code
|
||||||
- Sender account:: sender_code
|
- Card number: :cart_number',
|
||||||
- Country of destination: :final_country
|
|
||||||
- Recipient card number:: cart_number
|
|
||||||
- Net amount: :net_final",
|
|
||||||
'successful_user_send_to_cash' => 'Sending money from account to cash
|
'successful_user_send_to_cash' => 'Sending money from account to cash
|
||||||
Transaction information :
|
Transaction information :
|
||||||
- Number: :id_transaction
|
- Number: :id_transaction
|
||||||
|
@ -118,29 +115,25 @@ Transaction information:
|
||||||
- Country of destination: :init_country
|
- Country of destination: :init_country
|
||||||
- Issuer account : :sender_code
|
- Issuer account : :sender_code
|
||||||
- Withdrawal code : :code',
|
- Withdrawal code : :code',
|
||||||
'successful_user_remove_from_cart_to_wallet' => "Withdrawing money from your card to your account
|
'successful_user_remove_from_cart_to_wallet'=>'Withdrawing money from your card to your account
|
||||||
Transaction information:
|
Transaction information:
|
||||||
|
- Number : :id_transaction
|
||||||
|
- Amount of the transaction : :amount
|
||||||
|
- Fees : :fees
|
||||||
|
- Total withdrawal amount : :total
|
||||||
|
- Recipient account : :sender_code
|
||||||
|
- Card number : :cart_number',
|
||||||
|
'successful_user_remove_from_cart_to_cash' => 'Withdrawing money from your card to cash
|
||||||
|
Transaction information :
|
||||||
- Number: :id_transaction
|
- Number: :id_transaction
|
||||||
- Amount: :amount
|
- Amount of the transaction: :amount
|
||||||
- Fees and taxes: :fees
|
- Fees: :fees
|
||||||
- Card issuing country: :init_country
|
- Country of departure: :init_country
|
||||||
- Amount incl. VAT: :net_init
|
- Total withdrawal amount: :total
|
||||||
- Card number: :cart_number
|
- Country of destination: :init_country
|
||||||
- Country of destination: :final_country
|
- User code : :sender_code
|
||||||
- Recipient account:: sender_code
|
- Card number : :cart_number
|
||||||
- Amount: :net_final",
|
- Withdrawal code : :code',
|
||||||
'successful_user_remove_from_cart_to_cash' => "Withdrawing money from your card to cash
|
|
||||||
Transaction information:
|
|
||||||
- Number: :id_transaction
|
|
||||||
- Transaction amount: :amount
|
|
||||||
- Fees and taxes: :fees
|
|
||||||
- Card issuing country: :init_country
|
|
||||||
- Amount incl. VAT: :net_init
|
|
||||||
- Card number: :cart_number
|
|
||||||
- Country of destination: :final_country
|
|
||||||
- Amount: :net_final,
|
|
||||||
- User code: :sender_code
|
|
||||||
- Withdrawal code: :code",
|
|
||||||
'successful_agent_remove_cash' => 'Withdrawal of money from a geolocated agent
|
'successful_agent_remove_cash' => 'Withdrawal of money from a geolocated agent
|
||||||
Transaction information :
|
Transaction information :
|
||||||
- Number : :id_transaction
|
- Number : :id_transaction
|
||||||
|
@ -321,15 +314,4 @@ Transaction Information:
|
||||||
- IBAN of the recipient : :iban
|
- IBAN of the recipient : :iban
|
||||||
- Bank : :bank :country",
|
- Bank : :bank :country",
|
||||||
'successful_bank_account_attachment_taken' => 'Your request to link your bank account has been taken into account, you will receive a confirmation email as soon as the bank has validated your IBAN code',
|
'successful_bank_account_attachment_taken' => 'Your request to link your bank account has been taken into account, you will receive a confirmation email as soon as the bank has validated your IBAN code',
|
||||||
'successful_user_remove_from_cart_to_other_wallet' => "Withdraw money from your card to another account
|
|
||||||
Transaction information :
|
|
||||||
- Number: :id_transaction
|
|
||||||
- Amount : :amount
|
|
||||||
- Fees and taxes: :fees
|
|
||||||
- Country of card issue: :init_country
|
|
||||||
- Amount incl. VAT: :total
|
|
||||||
- Card number: :cart_number
|
|
||||||
- Country of destination: :final_country
|
|
||||||
- Destination account: :sender_code
|
|
||||||
- Amount: :net_final"
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -7,12 +7,12 @@ return [
|
||||||
'invalid_cvv' => 'CVV invalide',
|
'invalid_cvv' => 'CVV invalide',
|
||||||
'compression_failed' => 'Échec de la compression d\'image',
|
'compression_failed' => 'Échec de la compression d\'image',
|
||||||
'identification_carried_out' => 'Identification déjà éffectuée',
|
'identification_carried_out' => 'Identification déjà éffectuée',
|
||||||
'visa_api_failed' => 'La requête vers l\'api visa a échouée',
|
'visa_api_failed' => 'La requete vers l\'api visa a échouée',
|
||||||
'failed_transaction' => 'Transaction échouée',
|
'failed_transaction' => 'Transaction échouée',
|
||||||
'user_phone_not_exist' => 'Ce numéro client n\'existe pas',
|
'user_phone_not_exist' => 'Ce numéro client n\'existe pas',
|
||||||
'wallet_not_defined' => 'Ce code wallet destinataire n\'existe pas',
|
'wallet_not_defined' => 'Ce code wallet destinataire n\'existe pas',
|
||||||
'insufficient_balance' => 'Le solde est insuffisant pour effectuer cette transaction',
|
'insufficient_balance' => 'Le solde est insuffisant pour effectuer cette transaction',
|
||||||
'no_ilink_network' => 'Désolé , il n\'existe pas de réseau iLink World dans votre pays',
|
'no_ilink_network' => 'Désolé , il n\'existe pas de reseau iLink World dans votre pays',
|
||||||
'wallet_country_not_match' => 'Ce code wallet destinataire n\'est pas enregistré dans le pays :country',
|
'wallet_country_not_match' => 'Ce code wallet destinataire n\'est pas enregistré dans le pays :country',
|
||||||
'no_bank_card_attached' => 'Aucune carte bancaire n\'est rattachée à votre compte',
|
'no_bank_card_attached' => 'Aucune carte bancaire n\'est rattachée à votre compte',
|
||||||
'transaction_not_exist' => 'Cette transaction n\'existe pas',
|
'transaction_not_exist' => 'Cette transaction n\'existe pas',
|
||||||
|
@ -20,7 +20,7 @@ return [
|
||||||
'invalid_withdrawal_code' => 'Code de retrait invalide',
|
'invalid_withdrawal_code' => 'Code de retrait invalide',
|
||||||
'incorrect_withdrawal_amount' => 'Montant de retrait incorrect',
|
'incorrect_withdrawal_amount' => 'Montant de retrait incorrect',
|
||||||
'operation_cannot_performed_in_country' => 'Cette operation ne peut pas etre effectuée dans ce pays',
|
'operation_cannot_performed_in_country' => 'Cette operation ne peut pas etre effectuée dans ce pays',
|
||||||
'withdrawal_network_unauthorized' => 'Ce retrait ne peut etre effectué dans ce réseau.
|
'withdrawal_network_unauthorized' => 'Ce retrait ne peut etre effectué dans ce reseau.
|
||||||
Réseau payeur : :network :country',
|
Réseau payeur : :network :country',
|
||||||
'user_identification_required' => 'L\'identification de l\'utilisateur est requise pour continuer l\'operation',
|
'user_identification_required' => 'L\'identification de l\'utilisateur est requise pour continuer l\'operation',
|
||||||
'validation_user_identification_required' => 'La validation de l\'identification de l\'utilisateur est requise pour continuer l\'operation',
|
'validation_user_identification_required' => 'La validation de l\'identification de l\'utilisateur est requise pour continuer l\'operation',
|
||||||
|
@ -68,13 +68,13 @@ Réseau payeur : :network :country',
|
||||||
"international_weekly_regulations_limits_reached" => "Vous avez atteint votre limite hebdomadaire internationale.",
|
"international_weekly_regulations_limits_reached" => "Vous avez atteint votre limite hebdomadaire internationale.",
|
||||||
"international_monthly_regulations_limits_reached" => "Vous avez atteint votre limite mensuelle internationale.",
|
"international_monthly_regulations_limits_reached" => "Vous avez atteint votre limite mensuelle internationale.",
|
||||||
"forbidden" => "Interdit d'access",
|
"forbidden" => "Interdit d'access",
|
||||||
"request_already_processed" => "Cette requête a déja ete traitée",
|
"request_already_processed" => "Cette requete a déja ete traitée",
|
||||||
"recipient_network_not_configured" => "Ce réseau destinataire n'est pas configuré dans notre systeme",
|
"recipient_network_not_configured" => "Ce reseau destinataire n'est pas configuré dans notre systeme",
|
||||||
"recipient_network_not_authorized" => "Ce réseau destinataire n'est pas autorise à recevoir des transactions dans notre systeme",
|
"recipient_network_not_authorized" => "Ce reseau destinataire n'est pas autorise à recevoir des transactions dans notre systeme",
|
||||||
"bank_not_associated_with_network" => "Cette banque n'est pas associée à votre réseau",
|
"bank_not_associated_with_network" => "Cette banque n'est pas associée à votre réseau",
|
||||||
"transmitter_network_not_configured" => "Ce réseau émetteur n'est pas configuré dans notre systeme",
|
"transmitter_network_not_configured" => "Ce reseau emetteur n'est pas configuré dans notre systeme",
|
||||||
"transmitter_network_not_authorized" => "Ce réseau émetteur n'est pas autorisé à recevoir des transactions dans notre systeme",
|
"transmitter_network_not_authorized" => "Ce reseau emetteur n'est pas autorisé à recevoir des transactions dans notre systeme",
|
||||||
"transmitter_network_not_recognized" => "Ce réseau n'est pas reconnu comme etant un réseau émetteur du réseau destinataire",
|
"transmitter_network_not_recognized" => "Ce réseau n'est pas reconnu comme etant un réseau emetteur du reseau destinataire",
|
||||||
"invalid_iban" => "Le code IBAN est invalide",
|
"invalid_iban" => "Le code IBAN est invalide",
|
||||||
"country_not_match_iban" => "Le code IBAN ne correspond pas au pays cette banque",
|
"country_not_match_iban" => "Le code IBAN ne correspond pas au pays cette banque",
|
||||||
"bank_not_match_iban" => "Le code IBAN ne correspond à cette banque",
|
"bank_not_match_iban" => "Le code IBAN ne correspond à cette banque",
|
||||||
|
@ -85,11 +85,5 @@ Réseau payeur : :network :country',
|
||||||
"update_banking_information" => "Mettez à jour vos informations bancaires",
|
"update_banking_information" => "Mettez à jour vos informations bancaires",
|
||||||
"wallet_already_linked_to_bank_account" => "Votre wallet est déjà rattaché à votre compte bancaire",
|
"wallet_already_linked_to_bank_account" => "Votre wallet est déjà rattaché à votre compte bancaire",
|
||||||
"users_group_not_found" => "Ce code de groupe n'existe pas",
|
"users_group_not_found" => "Ce code de groupe n'existe pas",
|
||||||
"amount_not_allowed" => "Ce montant n'est pas autorisé. Il doit être compris entre :min et :max",
|
"amount_not_allowed" => "Ce montant n'est pas autorisé. Il doit être compris entre :min et :max"
|
||||||
"transaction_already_completed" => "Cette transaction a déjà été éffectuée",
|
|
||||||
'paying_network_api_failed' => "La requête vers l'API du réseau payeur a échouée",
|
|
||||||
'transaction_not_supported' => "Cette transaction n'est pas supportée",
|
|
||||||
'payment_invalid' => "Paiement invalide",
|
|
||||||
'service_unavailable_in_country' => 'Service non disponible dans ce pays',
|
|
||||||
'recipient_not_found' => "Ce destinataire n'existe pas"
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -65,35 +65,32 @@ Informations de la transaction :
|
||||||
- Noms du destinataire : :receiver_name
|
- Noms du destinataire : :receiver_name
|
||||||
- Montant net : :net_final
|
- Montant net : :net_final
|
||||||
- Code de retrait : :code',
|
- Code de retrait : :code',
|
||||||
'successful_user_send_to_wallet' => "Envoi d'argent compte à compte
|
'successful_user_send_to_wallet' => 'Envoi d\'argent compte à compte
|
||||||
Informations de la transaction :
|
Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
- Montant : :amount
|
- Montant : :amount
|
||||||
- Frais et taxes : :fees
|
- Frais et Taxes : :fees
|
||||||
- Pays de départ : :init_country
|
- Pays de départ : :init_country
|
||||||
- Compte émetteur : :sender_code
|
- Compte émetteur : :sender_code
|
||||||
- Montant net : :net_init
|
- Montant net : :net_init
|
||||||
- Pays de destination : :final_country
|
- Pays de destination : :final_country
|
||||||
- Réseau payeur : :network :final_country
|
- Réseau payeur : :network :final_country
|
||||||
- Compte destinataire : :receiver_code
|
- Compte destinataire : :receiver_code
|
||||||
- Montant net : :net_final",
|
- Montant net : :net_final',
|
||||||
'sent_by_mail' => '
|
'sent_by_mail' => '
|
||||||
|
|
||||||
Ce message a été envoyé dans le mail de l\'émetteur',
|
Ce message a été envoyé dans le mail de l\'émetteur',
|
||||||
'sent_by_mail_to_recipient' => "
|
'sent_by_mail_to_recipient' => "
|
||||||
|
|
||||||
Ce message a été envoyé dans le mail du destinataire",
|
Ce message a été envoyé dans le mail du destinataire",
|
||||||
'successful_user_send_to_cart' => "Envoi d'argent de votre compte vers votre carte
|
'successful_user_send_to_cart' => 'Envoi d\'argent de votre compte vers votre carte visa
|
||||||
Informations de la transaction :
|
Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
- Montant de la transaction : :amount
|
- Montant de la transaction : :amount
|
||||||
- Frais et taxes : :fees
|
- Frais : :fees
|
||||||
- Pays de départ : :init_country
|
- Montant net d\'envoi: :net
|
||||||
- Montant net : :net_init
|
|
||||||
- Compte émetteur : :sender_code
|
- Compte émetteur : :sender_code
|
||||||
- Pays de destination : :final_country
|
- N︒ carte destinataire : :cart_number',
|
||||||
- N︒ carte destinataire : :cart_number
|
|
||||||
- Montant net : :net_final",
|
|
||||||
'successful_user_send_to_cash' => 'Envoi d\'argent compte à cash
|
'successful_user_send_to_cash' => 'Envoi d\'argent compte à cash
|
||||||
Informations de la transaction :
|
Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
|
@ -108,7 +105,7 @@ Informations de la transaction :
|
||||||
- Noms du destinataire : :receiver_name
|
- Noms du destinataire : :receiver_name
|
||||||
- Montant net : :net_final
|
- Montant net : :net_final
|
||||||
- Code de retrait : :code',
|
- Code de retrait : :code',
|
||||||
'successful_user_remove_from_wallet_to_cash' => 'Retrait d\'argent personnel
|
'successful_user_remove_from_wallet_to_cash'=>'Retrait d\'argent personnel
|
||||||
Informations de la transaction :
|
Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
- Montant de la transaction : :amount
|
- Montant de la transaction : :amount
|
||||||
|
@ -118,29 +115,25 @@ Informations de la transaction :
|
||||||
- Pays de destination : :init_country
|
- Pays de destination : :init_country
|
||||||
- Compte émetteur : :sender_code
|
- Compte émetteur : :sender_code
|
||||||
- Code de retrait : :code',
|
- Code de retrait : :code',
|
||||||
'successful_user_remove_from_cart_to_wallet' => "Retrait d'argent de votre carte vers votre compte
|
'successful_user_remove_from_cart_to_wallet'=>'Retrait d\'argent de votre carte vers votre compte
|
||||||
Informations de la transaction :
|
|
||||||
- Numéro : :id_transaction
|
|
||||||
- Montant : :amount
|
|
||||||
- Frais et taxes : :fees
|
|
||||||
- Pays d'émission de la carte : :init_country
|
|
||||||
- Montant TTC : :net_init
|
|
||||||
- Numéro de la carte : :cart_number
|
|
||||||
- Pays de destination : :final_country
|
|
||||||
- Compte destinataire : :sender_code
|
|
||||||
- Montant : :net_final",
|
|
||||||
'successful_user_remove_from_cart_to_cash' => "Retrait d'argent de votre carte vers cash
|
|
||||||
Informations de la transaction :
|
Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
- Montant de la transaction : :amount
|
- Montant de la transaction : :amount
|
||||||
- Frais et taxes : :fees
|
- Frais : :fees
|
||||||
- Pays d'émission de la carte : :init_country
|
- Montant total de retrait: :total
|
||||||
- Montant TTC : :net_init
|
- Compte destinataire : :sender_code
|
||||||
- Numéro de la carte : :cart_number
|
- Numero de la carte : :cart_number',
|
||||||
|
'successful_user_remove_from_cart_to_cash' => 'Retrait d\'argent de votre carte vers cash
|
||||||
|
Informations de la transaction :
|
||||||
|
- Numéro : :id_transaction
|
||||||
|
- Montant de la transaction : :amount
|
||||||
|
- Frais : :fees
|
||||||
|
- Pays de départ : :init_country
|
||||||
|
- Montant total de retrait: :total
|
||||||
- Pays de destination : :final_country
|
- Pays de destination : :final_country
|
||||||
- Montant : :net_final,
|
|
||||||
- Code utilisateur : :sender_code
|
- Code utilisateur : :sender_code
|
||||||
- Code de retrait : :code",
|
- Numero de la carte : :cart_number
|
||||||
|
- Code de retrait : :code',
|
||||||
'successful_agent_remove_cash' => 'Retrait d\'argent chez un agent géolocalisé
|
'successful_agent_remove_cash' => 'Retrait d\'argent chez un agent géolocalisé
|
||||||
Informations de la transaction :
|
Informations de la transaction :
|
||||||
- Numéro : :id_transaction
|
- Numéro : :id_transaction
|
||||||
|
@ -322,15 +315,4 @@ Informations de la transaction :
|
||||||
- IBAN du destinataire : :iban
|
- IBAN du destinataire : :iban
|
||||||
- Banque : :bank :country",
|
- Banque : :bank :country",
|
||||||
'successful_bank_account_attachment_taken' => 'Votre requête de rattachement de votre compte bancaire a été prise en compte, vous recevrez un mail de confirmation dès lors que la banque aura validé votre code IBAN.',
|
'successful_bank_account_attachment_taken' => 'Votre requête de rattachement de votre compte bancaire a été prise en compte, vous recevrez un mail de confirmation dès lors que la banque aura validé votre code IBAN.',
|
||||||
'successful_user_remove_from_cart_to_other_wallet' => "Retrait d'argent de votre carte vers un autre compte
|
|
||||||
Informations de la transaction :
|
|
||||||
- Numéro : :id_transaction
|
|
||||||
- Montant : :amount
|
|
||||||
- Frais et taxes : :fees
|
|
||||||
- Pays d'émission de la carte : :init_country
|
|
||||||
- Montant TTC : :total
|
|
||||||
- Numéro de la carte : :cart_number
|
|
||||||
- Pays de destination : :final_country
|
|
||||||
- Compte destinataire : :sender_code
|
|
||||||
- Montant : :net_final",
|
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue