mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Fixed wallet - integrate
This commit is contained in:
@@ -84,7 +84,7 @@ class CreateWalletLogic extends AbstractControllerLogic
|
||||
DB::beginTransaction();
|
||||
|
||||
|
||||
$object = new WalletObject($request->input('currency'), $request->input('company_id'), $this->generatesWalletCode->execute());
|
||||
$object = new WalletObject($request->input('currency_id'), $request->input('company_id'), $this->generatesWalletCode->execute());
|
||||
|
||||
$this->canCreateCompanyWallet->passes($object);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ class WalletObject implements DataTransferObject
|
||||
private $company_id;
|
||||
|
||||
/** @var int */
|
||||
private $currency;
|
||||
private $currency_id;
|
||||
|
||||
/** @var int */
|
||||
private $code;
|
||||
@@ -25,7 +25,7 @@ class WalletObject implements DataTransferObject
|
||||
public function __construct(int $company_id, int $currency, int $code)
|
||||
{
|
||||
$this->company_id = $company_id;
|
||||
$this->currency = $currency;
|
||||
$this->currency_id = $currency;
|
||||
$this->code = $code;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class WalletObject implements DataTransferObject
|
||||
*/
|
||||
public function getCurrency(): int
|
||||
{
|
||||
return $this->currency;
|
||||
return $this->currency_id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ class CreatesWallet extends AbstractUpdateRecord
|
||||
$model = new Wallet();
|
||||
$model->company_id = $object->getCompanyId();
|
||||
$model->code = $object->getCode();
|
||||
$model->currency = $object->getCurrency();
|
||||
$model->currency_id = $object->getCurrency();
|
||||
|
||||
|
||||
return $this->handler($model);
|
||||
|
||||
@@ -16,7 +16,7 @@ class CompanyWalletValidation extends AbstractValidation
|
||||
{
|
||||
return [
|
||||
'company_id' => $object->getCompanyId(),
|
||||
'currency' => $object->getCurrency(),
|
||||
'currency_id' => $object->getCurrency(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class CompanyWalletValidation extends AbstractValidation
|
||||
{
|
||||
return [
|
||||
'company_id' => 'required',
|
||||
'currency' => 'required',
|
||||
'currency_id' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user