File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/Services/PaymentHandlers Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 77use Illuminate \Foundation \Auth \User ;
88use Damms005 \LaravelMultipay \Models \Payment ;
99use Damms005 \LaravelMultipay \Models \PaymentPlan ;
10+ use Damms005 \LaravelMultipay \ValueObjects \ReQuery ;
1011use Illuminate \Database \Eloquent \Casts \ArrayObject ;
1112use Damms005 \LaravelMultipay \Services \PaymentService ;
1213use Damms005 \LaravelMultipay \Actions \CreateNewPayment ;
@@ -228,24 +229,24 @@ protected static function getPaymentDescription(?Payment $payment): array
228229 /**
229230 * @see \Damms005\LaravelMultipay\Contracts\PaymentHandlerInterface::reQuery()
230231 */
231- public function reQueryUnsuccessfulPayment (Payment $ unsuccessfulPayment )
232+ public function reQueryUnsuccessfulPayment (Payment $ unsuccessfulPayment ): ? ReQuery
232233 {
233234 /** @var PaymentHandlerInterface **/
234235 $ handler = app ()->make (PaymentHandlerInterface::class, [$ unsuccessfulPayment ]);
235236
236237 $ reQueryResponse = $ handler ->reQuery ($ unsuccessfulPayment );
237238
238239 if ($ reQueryResponse == null ) {
239- return false ;
240+ return null ;
240241 }
241242
242- $ isSuccessFulPayment = boolval ($ reQueryResponse ->payment ->refresh ()->is_success );
243+ $ isSuccessful = boolval ($ reQueryResponse ->payment ->refresh ()->is_success );
243244
244- if ($ isSuccessFulPayment ) {
245+ if ($ isSuccessful ) {
245246 event (new SuccessfulLaravelMultipayPaymentEvent ($ reQueryResponse ->payment ));
246247 }
247248
248- return $ isSuccessFulPayment ;
249+ return $ reQueryResponse ;
249250 }
250251
251252 public function paymentCompletionWebhookHandler (Request $ request )
You can’t perform that action at this time.
0 commit comments