File: /home/u665686179/domains/dealkr.com/public_html/app/Services/WithdrawService.php
<?php
namespace App\Services;
class WithdrawService
{
/**
* @param object $withdrawRequest
* @param object $wallet
* @return array
*/
public function getVendorWalletData(object $withdrawRequest, object $wallet):array
{
return [
'total_earning' => $wallet['total_earning'] + currencyConverter($withdrawRequest['amount'],to:'usd'),
'pending_withdraw' => $wallet['pending_withdraw'] - currencyConverter($withdrawRequest['amount'],to:'usd'),
];
}
}