Adyen for Platforms
The Adyen plugin enables some specific features when set up for Adyen for Platforms.
To enable Adyen for Platforms go to Store > Plugins > Adyen Configure and check the checkbox "Enable Adyen Platforms".
Split Payments
Payments can be split between Adyen sub-accounts by setting up Product Fields to denote the Adyen Account ID.
Firstly, ensure the following Product Fields exist in Aurora Products > Fields > Fields
merchant_id
stock_brand_name
fulfilment_location_id
Secondly, add field values for those fields to the products which should be paid out to the different Sub Accounts.
For example, if a fictional product "Falco White Trainers" is fulfilled by a different Adyen Sub Account, get the Account ID for that Account from Adyens Platforms Dashboard and set the merchant_id
product field to that value for the product. The stock_brand_name
is a label which is passed to Adyen and is used in the split payment description.
The final step is to update your Adyen templates to tell Aurora to duplicate the merchant_id
and stock_brand_name
to the order items on completion of checkout.
More information about this can be found in this support article Submitting Ordered Item Additional Fields from Templates but the following code snippets show the steps taken in the AuroraDemo templates to get this to work.
Checkout
Simply provide the merchant_id
and stock_brand_name
as hidden fields under the name duplicate_product_fields_to_ordered_items[]
in the checkout. This can be within the Adyen template as it is specific to Adyen.
<input
name="duplicate_product_fields_to_ordered_items[]"
type="hidden"
value="merchant_id"
>
<input
name="duplicate_product_fields_to_ordered_items[]"
type="hidden"
value="stock_brand_name"
>
<input
name="duplicate_product_fields_to_ordered_items[]"
type="hidden"
value="fulfilment_location_id"
>
Ajax Checkout
We recommend looking at the updated template files detailed below to submit duplicate field names for Adyen transactions not done through standard checkout. For example PDP buttons.
Update the basket/adyen-order-fields.tpl.html
and products/adyen-order-fields.tpl.html
files to include the appropriate duplicate_product_fields_to_ordered_items
fields. Also ensure that the aapc.js
component is updated to serialize this data (using the adyen-order-fields
ID) to send to Aurora.
<div id="adyen-order-fields">
{*
* Fields submitted with name "duplicate_product_fields_to_ordered_items"
* will result in all ordered_items geting additional field values copied from the product.
* Note: The "ordered_items_additional_fields` records must have been created in Aurora for
* this to work.
*}
<input
name="duplicate_product_fields_to_ordered_items[]"
type="hidden"
value="merchant_id"
>
<input
name="duplicate_product_fields_to_ordered_items[]"
type="hidden"
value="stock_brand_name"
>
<input
name="duplicate_product_fields_to_ordered_items[]"
type="hidden"
value="fulfilment_location_id"
>
</div>
<div id="adyen-order-fields">
{*
* Fields submitted with name "duplicate_product_fields_to_ordered_items"
* will result in all ordered_items geting additional field values copied from the product.
* Note: The "ordered_items_additional_fields` records must have been created in Aurora for
* this to work.
*}
<input
name="duplicate_product_fields_to_ordered_items[]"
type="hidden"
value="merchant_id"
>
<input
name="duplicate_product_fields_to_ordered_items[]"
type="hidden"
value="stock_brand_name"
>
<input
name="duplicate_product_fields_to_ordered_items[]"
type="hidden"
value="fulfilment_location_id"
>
</div>
$(function() {
// ... Rest of component definition unchanged
$.aapc.setupSubmit = async (submitData, plugin, componentOptions) => {
if (componentOptions.placement === $.aapc.placements.pdp) {
await $.aapc.upgradeTemporaryBasket();
}
if (jQuery().serializeForm) {
$.extend(submitData, $('.order-fields input').serializeForm())
// This picks up the fields defined within the products/adyen-buttons.tpl.html
// and basket/adyen-order-fields.tpl.html templates.
$.extend(submitData, $('#adyen-order-fields input').serializeForm())
}
// ... Rest of setupSubmit method definition unchanged
}
// ... Rest of component definition unchanged
});
Settings
It is recommended that you enable this setting within Store > Settings > Aurora > Refunds > Disable Non-Automatic Refund Types.
Refunds cannot be split when using a non-automatic refund type and this setting will prevent users from selecting a non-automatic strategy during refund administration.
MicroService Settings
The following settings are configured from the Store > Microservices > Proxy Adyen and are specific to Adyen for Platforms
Parameter Name | Value for Integration | Notes |
---|---|---|
Enable Adyen Platforms | Checked - for Enabled Unchecked - for Disabled | When enabled, specific functionality for Adyen Platforms will be enabled. |
Default Payment Account ID | Get this value from Adyen | Optional - The Account ID used in the Default payment split. If not set the account value within the Default split will not be sent to Adyen. |
Liable Account ID | Get this value from Adyen | Optional - The platform liable Account ID. Used in the PaymentFee payment split and the Shipping BalanceAccount split for orders where all products contained a merchant_id If not set the account value for the PaymentFee split will not be sent to Adyen and shipping will always be included in the Default split, as account is a required field for BalanceAccount Splits. |
Updated 27 days ago