Giter VIP home page Giter VIP logo

adyen-hybris's Introduction

Adyen SAP Commerce (Hybris) v6 plugin

This plugin supports SAP Commerce (Hybris) versions 6.x

Integration

The SAP Commerce integrates Adyen Checkout for all card payments and local/redirect payment methods. Boleto, PayPal ECS and RatePay are routed over the old integration. When available in the new Checkout they will be migrated to the new flow.

Requirements

SAP Commerce (Hybris) version 6.x or 1905

Installation

1. Copy extension files to bin/custom directory

2. Add the Adyen extensions to the config/localextensions.xml file

Required for the checkout:

<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6core"/>
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6b2ccheckoutaddon"/>
<extension dir="${HYBRIS_BIN_DIR}/custom/adyen-hybris/adyenv6backoffice"/>

Required for the notifications:

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

Additionally, required when using yacceleratorordermanagement (b2c_acc_oms recipe for 6.x and b2c_b2b_acc_oms recipe for 1905) :

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

Additionally, required when using yacceleratorfulfilment (b2c_acc recipe for 6.x and b2c_acc_plus for 1905):

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

3. Modify local.properties

Modify config/local.properties file:

  1. append ,/[^/]+(/[^?]*)+(adyen-response)$,/adyen(/[^?]*)+$ to the value of csrf.allowed.url.patterns
  2. add is3DS2allowed = true

4. Build

cd bin/platform
. ./setantenv.sh
ant addoninstall -Daddonnames="adyenv6b2ccheckoutaddon" -DaddonStorefront.yacceleratorstorefront="yacceleratorstorefront"
ant clean all

5. Add your Adyen credentials to the BaseStore via Hybris backoffice

For more detailed instructions you can visit the documentation page Please make sure your merchant has Variant true in API and responses section so that you get paymentMethod back in response.

Supported payment methods

Credit Cards

Credit Card payments are supported using Checkout Components.

Ratepay

Ratepay is supported via Adyen API.

Boleto

Boleto is supported via Adyen API.

Paypal Express Checkout Shortcut

Requires both Adyen API and HPP credentials.

The plugin offers:

  • a facade (AdyenPaypalFacade) that takes care of the communication from and to Adyen regarding Paypal ECS
  • a default controller that given a valid Cart, can initiate such payment "/en/adyen/paypal-ecs/initialize"

More details can be found here: https://docs.adyen.com/developers/payment-methods/paypal/express-checkout-shortcut

Other alternative payment methods

Supported via Adyen Checkout.

Usage with OCC

The plugin supports the following OCC v2 compatible methods via com.adyen.v6.facades.AdyenCheckoutFacade:

  1. PaymentDetailsListWsDTO getPaymentDetails(String userId) throws IOException, ApiException;
    OCC controller: UsersController.getPaymentInfos
    Endpoint: GET /{userId}/paymentdetails

This method that will return the stored cards associated to the shopping cart user via Adyen API.

  1. PaymentDetailsWsDTO addPaymentDetails(PaymentDetailsWsDTO paymentDetails, DataMapper dataMapper);
    OCC controller: CartsController.addPaymentDetails
    Endpoint: POST /{cartId}/paymentdetails

This method that will receive the payment method selection and rest of payment details and store them in the Cart.

For Credit Card payments - it expects encrypted card holder data obtained from your frontend implementation using Secured Fields

For Stored Cards payments - selected Adyen recurringReference of the card and encrypted cvc

For Boleto payments - social security number

  1. OrderData authorisePayment(CartData cartData) throws Exception;
    OCC controller: OrdersController.placeOrder
    Endpoint: POST /users/{userId}/orders

This method will place the payment request using the previously stored payment method selection data. Upon successful response from Adyen API, it will register payment response in cart/order level.

It returns an instance of OrderWSDTO obtained from OrderData of the placed order. For Boleto, it will contain the pdf url, the base64 encoded data, expiration date and due date https://docs.adyen.com/developers/payment-methods/boleto-bancario/boleto-payment-request

3DS2 configuration

By default 3DS2 is enabled (Except for OCC). If you want to disable 3DS2 in your system, please set following property in local.properties file, build your environment and restart the server.

is3DS2allowed = false

POS Timeout configuration

POS timeout (time calculated since initiating a payment) is max time to keep terminal connection open. It is set to 130 seconds by default already. If you want to change it, please add following property in local.properties file, build your environment and restart the server. (Change 130 to your desired time, in seconds).

pos.totaltimeout = 130

Pending Order Timeout configuration

By default, an order remains in PAYMENT_PENDING status in order management for 1 hour and it is configured in dynamic order process defintiion file. Based on which extension you are using (fulfillment or ordermanangement) timeout value can be updated in corresponding order-process.xml file.

For example, following 2 files have 60 mins configuration under waitForAdyenPendingPayment process with delay value=PT60M

Fulfillment extension file - resources/adyenv6fulfilmentprocess/process/order-process.xml

OrderManagement extension file - resources/adyenv6ordermanagement/process/order-process.xml

<wait id="waitForAdyenPendingPayment" then="checkPendingOrder">
        <event>AdyenPaymentResult</event>
        <timeout delay="PT60M" then="checkPendingOrder"/>
    </wait>

PayPal configuration

This plugin uses Adyen's Checkout Component for PayPal payments. To use that in a live environment, a PayPal Merchant Id is required (check here how to get one). This id has to be provided when adding your Adyen credentials to the BaseStore via the backoffice (installation step 5).

Documentation

https://docs.adyen.com/developers/plugins/hybris

Support

If you have a feature request, or spotted a bug or a technical problem, create a GitHub issue. For other questions, contact our support team.

Contributing

We strongly encourage you to join us in contributing to this repository so everyone can benefit from:

  • New features and functionality
  • Resolved bug fixes and issues
  • Any general improvements

Read our contribution guidelines to find out how.

License

MIT license. For more information, see the LICENSE file.

adyen-hybris's People

Contributors

rkewlani avatar lancergr avatar martinsrenato avatar rikterbeek avatar alexandrosmor avatar joaosantosadyen avatar alexegidioadyen avatar aleffio avatar momberg avatar adyen-gc avatar maciek-marcinkowski avatar scottpowell14 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.