fix: in wallet type

This commit is contained in:
Djery-Tom 2023-08-04 12:42:36 +01:00
parent 92c4fb55a7
commit 0d1514b293
1 changed files with 2 additions and 2 deletions

View File

@ -220,7 +220,7 @@ class InsuranceInvoiceController extends Controller
* description="Token la transaction de paiement"
* )
* ),
* example = {"password":"adbc1215448", "amount" : 50000 , "payment_method" : "wallet" }
* example = {"password":"adbc1215448", "amount" : 50000 , "payment_method" : "WALLET" }
* )
* ),
* @OA\Response(
@ -392,7 +392,7 @@ class InsuranceInvoiceController extends Controller
$user->save();
if (empty($transaction_id)) {
if ($payment_method == 'wallet') {
if ($payment_method == 'WALLET') {
$user->wallet->balance -= $amountToPaid;
$user->wallet->save();
}