File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1010 stopOnFailure =" false"
1111>
1212 <testsuites >
13- <testsuite name =" Unit" >
14- <directory suffix =" Test.php" >./tests/Unit</directory >
15- </testsuite >
16- <testsuite name =" Feature" >
17- <directory suffix =" Test.php" >./tests/Feature</directory >
13+ <testsuite name =" Package Test" >
14+ <directory suffix =" .php" >./tests/</directory >
1815 </testsuite >
1916 </testsuites >
2017 <php >
Original file line number Diff line number Diff line change 11{
2- "failed_message" : " حدث خطأ في عملية الدفع يرجى المحاولة مرة أخرى."
2+ "failed_message" : " حدث خطأ في عملية الدفع يرجى المحاولة مرة أخرى." ,
3+ "invalid_checkout_id" : " checkout_id غير صالح"
34}
Original file line number Diff line number Diff line change 33namespace Devinweb \LaravelHyperpay \Support ;
44
55use Illuminate \Support \Arr ;
6+ use Illuminate \Validation \ValidationException ;
67
78class TransactionBuilder
89{
@@ -60,6 +61,10 @@ public function findByIdOrCheckoutId($id)
6061 $ transaction_model = config ('hyperpay.transaction_model ' );
6162 $ transaction = app ($ transaction_model )->whereId ($ id )->orWhere ('checkout_id ' , $ id )->first ();
6263
64+ if (! $ transaction ) {
65+ throw ValidationException::withMessages ([__ ('invalid_checkout_id ' )]);
66+ }
67+
6368 return $ transaction ;
6469 }
6570
You can’t perform that action at this time.
0 commit comments