Object CheckoutSessionProvider
-
- All Implemented Interfaces:
public class CheckoutSessionProvider
-
-
Field Summary
Fields Modifier and Type Field Description public final static CheckoutSessionProviderINSTANCE
-
Method Summary
Modifier and Type Method Description final CheckoutSessionResultcreateSession(SessionModel sessionModel, Configuration configuration, OrderRequest order)Allows creating a CheckoutSession from the response of the /sessions endpoint. final CheckoutSessionResultcreateSession(SessionModel sessionModel, Environment environment, String clientKey, OrderRequest order)Allows creating a CheckoutSession from the response of the /sessions endpoint. final CheckoutSessionResultcreateSession(SessionPaymentResult sessionPaymentResult, Configuration configuration)Only to be used for initializing a component for partial payment flow. final CheckoutSessionResultcreateSession(SessionPaymentResult sessionPaymentResult, Environment environment, String clientKey)Only to be used for initializing a component for partial payment flow. -
-
Method Detail
-
createSession
final CheckoutSessionResult createSession(SessionModel sessionModel, Configuration configuration, OrderRequest order)
Allows creating a CheckoutSession from the response of the /sessions endpoint. This is a suspend function that executes a network call on the IO thread.
- Parameters:
sessionModel- The deserialized JSON response of the /sessions API call.configuration- A Configuration to initialize the session.order- An Order in case of an ongoing partial payment flow.- Returns:
The result of the API call.
-
createSession
final CheckoutSessionResult createSession(SessionModel sessionModel, Environment environment, String clientKey, OrderRequest order)
Allows creating a CheckoutSession from the response of the /sessions endpoint. This is a suspend function that executes a network call on the IO thread.
- Parameters:
sessionModel- The deserialized JSON response of the /sessions API call.environment- The Environment to be used for internal network calls from the SDK to Adyen.clientKey- Your Client Key used for internal network calls from the SDK to Adyen.order- An Order in case of an ongoing partial payment flow.- Returns:
The result of the API call.
-
createSession
final CheckoutSessionResult createSession(SessionPaymentResult sessionPaymentResult, Configuration configuration)
Only to be used for initializing a component for partial payment flow.
Allows creating a CheckoutSession from the response of the /sessions endpoint. This is a suspend function that executes a network call on the IO thread.
- Parameters:
sessionPaymentResult- The SessionPaymentResult object to initialize the session.configuration- A Configuration to initialize the session.- Returns:
The result of the API call.
-
createSession
final CheckoutSessionResult createSession(SessionPaymentResult sessionPaymentResult, Environment environment, String clientKey)
Only to be used for initializing a component for partial payment flow.
Allows creating a CheckoutSession from the response of the /sessions endpoint. This is a suspend function that executes a network call on the IO thread.
- Parameters:
sessionPaymentResult- The SessionPaymentResult object to initialize the session.environment- The Environment to be used for internal network calls from the SDK to Adyen.clientKey- Your Client Key used for internal network calls from the SDK to Adyen.- Returns:
The result of the API call.
-
-
-
-