Closed shabnam227 closed 9 months ago
@shabnam227 Hello. It appears that you did not follow the update instructions.
https://bavix.github.io/laravel-wallet/#/upgrade-guide?id=_81x-%e2%86%92-90x
At least this stage^
my laravel version is ^10.10" and i tried to run php artisan bx:transfer:fix. this is nor working
In version 10, the command has been removed. The package does not support version switching. A smooth upgrade from version to version is expected.
You have two options:
https://github.com/bavix/laravel-wallet/blob/9.6.2/src/Commands/TransferFixCommand.php
i down graded the laravel version to 9 but still it does not work Bavix\Wallet\Services\CastService::getWallet(): Argument #1 ($object) must be of type Bavix\Wallet\Interfaces\Wallet, null given, called in /Applications/XAMPP/xamppfiles/htdocs/codiner-order-backend/vendor/bavix/laravel-wallet/src/Commands/TransferFixCommand.php on line 37 showing this error This is my "laravel/framework": "^9.19", framework version. when in run this command got an error php artisan bx:transfer:fix
There was no need to downgrade the laravel version, but okay.
You need to upgrade from your version according to the instructions. I don't even know which version you're upgrading from.
You can generate the uuid of transfers yourself, there is no problem if the command is not executed for some reason.
After re-reading your mistakes, I suspect that you missed a step somewhere. Apparently you are upgrading from laravel-wallet 6.x, because... in version 7.x the uuid of wallets was added.
You will have to implement your own migrator. It is not possible to update the code from 6.x to 10.x using standard means.
Or update it step by step.
Thank you so much! It worked for me, and I really appreciate your help.
Bavix\Wallet\Internal\Service\StorageService::get(): Argument #1 ($uuid) must be of type string, null given, called in /Applications/XAMPP/xamppfiles/htdocs/codiner-order-backend/vendor/bavix/laravel-wallet/src/Services/RegulatorService.php on line 59
getting this error i have installed "bavix/laravel-wallet": "^10.1", This is my user.php (model) use Bavix\Wallet\Traits\HasWallet; use Bavix\Wallet\Interfaces\Wallet; use Bavix\Wallet\Traits\HasWalletFloat; use Bavix\Wallet\Interfaces\WalletFloat;
class User extends Authenticatable implements Wallet, WalletFloat { use Notifiable; use HasWallet; use HasWalletFloat;
this is my controller code if($user){ if($user->balanceFloat > 0){ $wallet_amount_used = $user->balanceFloat; if($customerCurrency){ $wallet_amount_used = $user->balanceFloat * $customerCurrency->doller_compare; } if($wallet_amount_used > $total_payable_amount){ $wallet_amount_used = $total_payable_amount; } $total_payable_amount = $total_payable_amount - $wallet_amount_used; $cart->wallet_amount_used = number_format($wallet_amount_used, 2, '.', ''); } }.