Skip to content
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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

mstegmeyer
Copy link
Contributor

@mstegmeyer mstegmeyer commented Feb 1, 2025

Remaining issues / to check:

  • Vaulting with PayPal does not show correct buttons (general issue? account issue?)
  • Canceling APMs redirects wrong
  • Recurring in queue
  • Tests :D

@mstegmeyer mstegmeyer self-assigned this Feb 1, 2025
Base automatically changed from 6.7.x to trunk February 6, 2025 07:57
@mstegmeyer mstegmeyer force-pushed the ppi-1056/refactor-to-abstractpaymenthandlers branch 2 times, most recently from fc2a1a9 to 752a6c4 Compare February 7, 2025 21:57
@mstegmeyer mstegmeyer force-pushed the ppi-1056/refactor-to-abstractpaymenthandlers branch 10 times, most recently from 8305258 to 8880f44 Compare February 13, 2025 10:43
@mstegmeyer mstegmeyer force-pushed the ppi-1056/refactor-to-abstractpaymenthandlers branch from 8880f44 to b7df3cf Compare February 13, 2025 11:52
@mstegmeyer mstegmeyer marked this pull request as ready for review February 13, 2025 12:50
@mstegmeyer mstegmeyer requested review from cyl3x and Bird87ZA February 13, 2025 14:20
use Symfony\Component\HttpFoundation\Response;

#[Package('checkout')]
class CheckoutException extends PaymentException
Copy link
Contributor

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
Copy link
Contributor

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

Comment on lines +144 to +146
if (!$this->attemptExecution()) {
return $paypalOrder;
}
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Member

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 🙂

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants