Function: buildAdyenCheckoutOptions()
function buildAdyenCheckoutOptions(session, entry?): AdyenCheckoutOptions;Builds the options to pass to AdyenCheckout for a Firmhouse payment session.
Parameters
session
Session returned by client.payments.createAdyenSession
entry?
AdyenCheckoutEntry = ...
How the checkout page was entered. Defaults to a fresh mount
Returns
Options for AdyenCheckout
Remarks
Leave entry out to mount Drop-in, including when re-mounting it after the customer came back from a refused payment, because that needs the session that was just created.
Pass the redirect entry only to hand the result back to Adyen with checkout.submitDetails, which reports the outcome to the browser sooner than the webhook does. The session id then comes from the query parameters and the session data is left out, which is what Adyen expects for a redirect result. Only do this while the payment is still open; Firmhouse confirms the payment either way.
Last updated
Was this helpful?