Skip to content

Latest commit

 

History

History
148 lines (84 loc) · 3.11 KB

HostedForm.md

File metadata and controls

148 lines (84 loc) · 3.11 KB

@bigcommerce/checkout-sdk / HostedForm

Class: HostedForm

Implements

  • HostedForm

Table of contents

Constructors

Methods

Constructors

constructor

new HostedForm(_fields, _eventListener, _payloadTransformer, _eventCallbacks, _paymentHumanVerificationHandler)

Parameters

Name Type
_fields HostedField[]
_eventListener IframeEventListener<HostedInputEventMap, undefined>
_payloadTransformer HostedFormOrderDataTransformer
_eventCallbacks Pick<HostedFormOptions, "onBlur" | "onCardTypeChange" | "onFocus" | "onEnter" | "onValidate">
_paymentHumanVerificationHandler PaymentHumanVerificationHandler

Methods

attach

attach(): Promise<void>

Returns

Promise<void>

Implementation of

HostedFormInterface.attach


detach

detach(): void

Returns

void

Implementation of

HostedFormInterface.detach


getBin

getBin(): undefined | string

Returns

undefined | string

Implementation of

HostedFormInterface.getBin


getCardType

getCardType(): undefined | string

Returns

undefined | string

Implementation of

HostedFormInterface.getCardType


submit

submit(payload, additionalActionData?): Promise<HostedInputSubmitSuccessEvent>

Parameters

Name Type
payload OrderPaymentRequestBody
additionalActionData? PaymentAdditionalAction

Returns

Promise<HostedInputSubmitSuccessEvent>

Implementation of

HostedFormInterface.submit


submitStoredCard

submitStoredCard(payload): Promise<void | HostedInputStoredCardSucceededEvent>

Parameters

Name Type
payload Object
payload.data StoredCardHostedFormData
payload.fields StoredCardHostedFormInstrumentFields

Returns

Promise<void | HostedInputStoredCardSucceededEvent>


validate

validate(): Promise<void>

Returns

Promise<void>

Implementation of

HostedFormInterface.validate