From 608718eae3babc9596afb385cacae66517e570ab Mon Sep 17 00:00:00 2001 From: Kendall Arneaud Date: Sat, 27 Jul 2024 11:42:24 -0400 Subject: [PATCH] Update PaymentMethod.php updated to not use token id integer but decrypt it Signed-off-by: Kendall Arneaud --- app/PaymentDrivers/Rotessa/PaymentMethod.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/PaymentDrivers/Rotessa/PaymentMethod.php b/app/PaymentDrivers/Rotessa/PaymentMethod.php index b52c2423bf7e..674961fb7a83 100755 --- a/app/PaymentDrivers/Rotessa/PaymentMethod.php +++ b/app/PaymentDrivers/Rotessa/PaymentMethod.php @@ -145,14 +145,13 @@ class PaymentMethod implements MethodInterface $request->validate([ 'source' => ['required','string','exists:client_gateway_tokens,token'], 'amount' => ['required','numeric'], - 'token_id' => ['required','integer','exists:client_gateway_tokens,id'], 'process_date'=> ['required','date','after_or_equal:today'], ]); $customer = ClientGatewayToken::query() ->where('company_gateway_id', $this->rotessa->company_gateway->id) ->where('client_id', $this->rotessa->client->id) - ->where('id', (int) $request->input('token_id')) ->where('token', $request->input('source')) + ->where('id', $this->decodePrimaryKey($request->input('source'))) ->first(); if(!$customer) throw new \Exception('Client gateway token not found!', 605);