Plugin icon

Set up the OCC extension

Set up the SAP Omni Commerce Connect (OCC) extension in the Adyen payments add-on.

The Adyen payments add-on supports SAP Omni Commerce Connect (OCC) V2 through com.adyen.v6.facades.AdyenCheckoutFacade.

With this integration, you can accept:

The add-on supports the following methods:

Return the stored cards associated with the shopping cart

  • OCC controller: UsersController.getPaymentInfos
  • Endpoint: GET /{USER_ID}/paymentdetails

Internally, this calls the following method:

PaymentDetailsListWsDTO getPaymentDetails(String userId) throws IOException, ApiException;

Receive and store payment details

  • OCC controller: CartsController.addPaymentDetails
  • Endpoint: POST /{CART_ID}/paymentdetails

Depending on the payment method, you may need to pass some additional parameters:

  • Credit cards: Encrypted cardholder data. For more information, refer to Cards.
  • Stored cards: The recurringDetailReference, the shopperReference, and the encrypted CVC. For more information, refer to Create and use tokens.
  • Installments: The number of installments. For more information, refer to Credit cards.
  • Boleto: The social security number. For more information, refer to Boleto.

For example, to make an installments payment and store credit card details, submit a POST /{CART_ID}/paymentdetails request, providing:

   "encryptedCardNumber": "adyenjs_0_1_1 ...",
   "encryptedExpiryMonth": "adyenjs_0_1_1 ...",
   "encryptedExpiryYear": "adyenjs_0_1_1 ...",
   "encryptedSecurityCode": "adyenjs_0_1_1 ...",
   "installments": "10",
        "saveCardData": true,
        "accountHolderName": "ABC",
        "cardNumber": "4111111111111222",
        "expiryMonth": "03",
        "expiryYear": "2030",
        "cardType" : {"code": "visa"},
        "adyenPaymentMethod": "adyen_cc",
        "billingAddress" : {
            "titleCode": "mr",
            "firstName": "Joao",
            "lastName": "Paulo",
            "line1": "Rua Luiz Fernandes",
            "town": "SJC",
            "postalCode": "12236750",
            "country": {"isocode": "BR"},
            "shippingAddress": true,
            "region" : {
                "countryIso" : "BR",
                "isocode": "SP",
                "name": "Sao Paulo"

Internally, this calls the following method:

PaymentDetailsWsDTO addPaymentDetails(PaymentDetailsWsDTO paymentDetails, DataMapper dataMapper);

Place an order using stored payment details

After storing payment information using the above methods, you can place an order:

  • OCC controller: OrdersController.placeOrder
  • Endpoint: POST /users/{USER_ID}/orders

Internally, this calls the following method:

OrderData authorisePayment(CartData cartData) throws Exception;

After a successful response from the Adyen API, the system registers the payment response on the cart/order level. It returns an instance of OrderWSDTO obtained from OrderData of the placed order.

For Boleto, the response contains the URL to the PDF, the Base64 encoded data, the expiration date, and the due date.

Set up the notification extension

If you want to receive Adyen webhooks, add the following Adyen extension to the config/localextensions.xml file:

    <extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6notification"/>

After you have added the notification extension, set up webhooks in your Adyen Customer Area.

Next steps