Skip to content

Latest commit

 

History

History
135 lines (92 loc) · 3.48 KB

AdyenV3PaymentInitializeOptions.md

File metadata and controls

135 lines (92 loc) · 3.48 KB

@bigcommerce/checkout-sdk / AdyenV3PaymentInitializeOptions

Interface: AdyenV3PaymentInitializeOptions

A set of options that are required to initialize the Adyenv3 payment method.

Once Adyenv3 payment is initialized, credit card form fields, provided by the payment provider as IFrames, will be inserted into the current page. These options provide a location and styling for each of the form fields.

<!-- This is where the credit card component will be inserted -->
<div id="container"></div>

<!-- This is where the secondary components (i.e.: 3DS) will be inserted -->
<div id="additional-action-container"></div>
service.initializePayment({
    methodId: 'adyenv3',
    adyenv3: {
        containerId: 'container',
        additionalActionOptions: {
            containerId: 'additional-action-container',
        },
    },
});

Additional options can be passed in to customize the components and register event callbacks.

service.initializePayment({
    methodId: 'adyenv3',
    adyenv3: {
        containerId: 'container',
        additionalActionOptions: {
            containerId: 'additional-action-container',
            onBeforeLoad(shopperInteraction) {
                console.log(shopperInteraction);
            },
            onLoad(cancel) {
                console.log(cancel);
            },
            onComplete() {
                console.log('Completed');
            },
        },
        options: {
            scheme: {
                hasHolderName: true,
            },
        },
    },
});

Table of contents

Properties

Methods

Properties

additionalActionOptions

additionalActionOptions: AdyenAdditionalActionOptions

A set of options that are required to initialize additional payment actions.


cardVerificationContainerId

Optional cardVerificationContainerId: string

The location to insert the Adyen custom card component


containerId

containerId: string

The location to insert the Adyen component.


hasVaultedInstruments

Optional hasVaultedInstruments: boolean

True if the Adyen component has some Vaulted instrument


options

Optional options: Pick<AdyenCreditCardComponentOptions, "details" | "enableStoreDetails" | "hasHolderName" | "holderNameRequired" | "data" | "groupTypes" | "placeholders" | "brands" | "styles" | "showBrandsUnderCardNumber" | "onSubmit" | "onError" | "onFieldValid">

Optional. Overwriting the default options


shouldShowNumberField

Optional shouldShowNumberField: boolean

Methods

validateCardFields

validateCardFields(validateState): void

Parameters

Name Type
validateState AdyenValidationState

Returns

void