Skip to content
JL Alías E2Y edited this page May 16, 2023 · 1 revision

Components in the add-on

Use components from the Adyen payments add-on for custom extensions and tailor-made integrations.

The Adyen payments add-on for SAP Commerce (formerly Hybris) offers various components that you can use to build custom extensions and tailor-made integrations.

Facades

The add-on introduces the adyenCheckoutFacade which includes methods to initiate payments during the checkout process. You can use this facade in combination with your own storefront controllers.

The adyenCheckoutFacade overrides the checkoutFlowFacade to re-implement the hasNoPaymentInfo method, because the defaultCheckoutFlowFacade is strongly coupled to built-in credit card payments.

Services

The add-on offers the following services:

  • adyenTransactionService: Provides methods to register Adyen transaction entries.
  • adyenPaymentService: Provides methods to communicate with Adyen APIs such as APIs for authorizations, captures, and refunds.
  • adyenNotificationService: Provides methods to handle Adyen notifications to be used in a custom notification controller.
  • adyenOrderService: Provides methods to update an order with payment data such as fraud results.
  • adyenBusinessProcessService: Provides methods to trigger Adyen events for order and return processes.

Models

The following models are extended in the add-on:

  • CartModel to add the CSE token.
  • BaseStoreModel to add Adyen configurations on store level.
  • PaymentInfoModel to add the payment details, for example the selected payment method and fraud results.

Populators

The add-on includes the following populators:

  • AbstractOrderPopulator: Injects the billing address to an OrderData or CartData object. This is done because the AbstractOrderData is strongly coupled to credit card payments. This populator is added to the list of populators of cartConverter, extendedCartConverter, and orderConverter.
  • CartPopulator: Injects data about the selected payment method to the CartData object so that the data is available from the controllers that use the cart facade.

Controllers

The following URLs are handled by Adyen Controllers:

  • GET /checkout/multi/adyen/select-payment-method: Implementation of the Payment & Billing Address checkout step. In this step, the shopper selects a card or local payment method.
  • POST /checkout/multi/adyen/select-payment-method: This contains the handler of the payment method selection form and stores the selection (CSE token, issuerId) to the cart.
  • GET /checkout/multi/adyen/summary/view: Implementation of the Final Review checkout step. In this step, we show a payment form to be posted to the Adyen Place Order handler. The reason why this controller exists is to override the target of the default form submission.
  • POST /checkout/multi/adyen/summary/placeOrder: Handler for the final payment submission. In this step we create the order, initiate an authorization call and redirect to 3D Secure by showing a silent form that posts to the issuer. The shopper is then redirected to skin and finally to the order confirmation page.
  • POST /checkout/multi/adyen/summary/authorise-3d-adyen-response: Handler for the Adyen redirect after the shopper finishes their 3D Secure authentication.
  • POST /adyen/v6/notification: Handler for notifications sent by Adyen.
  • POST /adyen/component/payment: Handler to initiate a payment using a payment method that uses an Adyen component (for example, PayPal).
  • POST /adyen/component/submit-details: Handler to submit payment details after initializing a payment through an Adyen component.
  • POST /checkout/multi/adyen/select-payment-method/component-result: Handler to process the result of a payment submitted through an Adyen component.