-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PPI-1056 - Refactor payment handlers to AbstractPaymentHandlers #99
base: trunk
Are you sure you want to change the base?
Conversation
fc2a1a9
to
752a6c4
Compare
8305258
to
8880f44
Compare
8880f44
to
b7df3cf
Compare
use Symfony\Component\HttpFoundation\Response; | ||
|
||
#[Package('checkout')] | ||
class CheckoutException extends PaymentException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should merge all our PaymentException extensions
} | ||
|
||
public function checkForCustomerData(OrderEntity $order, DataBag $dataBag, SalesChannelContext $salesChannelContext): void | ||
public function checkForCustomerData(PaymentTransactionStruct $transaction, Request $request, Context $context): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we still just rely on the DataBag? relying on the request in a service seems unfortunate
if (!$this->attemptExecution()) { | ||
return $paypalOrder; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we override this function and add the early return instead?
return null; | ||
} | ||
|
||
protected function executeOrder(PaymentTransactionStruct $transaction, Order $paypalOrder, OrderEntity $order, OrderTransactionEntity $orderTransaction, Context $context, bool $isUserPresent = true): Order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected functions should go after public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should be a case for the CS fixer 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it seems we missed the rule
Remaining issues / to check: