wallet handling
This commit is contained in:
@@ -47,8 +47,9 @@ class RequestsController extends Controller
|
||||
$data['total_fee'] = $data['amount'] * $data['difference'];
|
||||
|
||||
$myCustomer = Customer::find($customer_id);
|
||||
$wallet_interface = new WalletInterface($customer_id, 2);
|
||||
$wallet = Wallet::where('owner', $customer_id)->whereNull('fund_id')->first();
|
||||
$ownerType = (int) ($myCustomer?->type ?? 2);
|
||||
$wallet_interface = new WalletInterface($customer_id, $ownerType);
|
||||
$wallet = $wallet_interface->wallet;
|
||||
|
||||
$response = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user