CreatePaymentMethod
PayoneBanktransferInAdvanceCreatePaymentProvider
, PayoneCreditCardCreatePaymentMethodProvider
, PayoneKlarnaCreatePaymentMethodProvider
, PayoneRedirectPaymentMethodBase
public abstract class PayoneCreatePaymentMethodBase extends CreatePaymentMethodBase
Constructor | Description |
---|---|
PayoneCreatePaymentMethodBase() |
Modifier and Type | Method | Description |
---|---|---|
java.util.function.Function<CreatePaymentData,java.util.concurrent.CompletionStage<PaymentCreationResult>> |
create() |
Provides a function that handles the creation of a payment object within the CTP plattform.
|
protected io.sphere.sdk.types.CustomFieldsDraftBuilder |
createCustomFieldsBuilder() |
|
protected io.sphere.sdk.types.CustomFieldsDraftBuilder |
createCustomFieldsBuilder(CreatePaymentData cpd) |
By default all Payone custom fields have "languageCode" and "reference" values from payment data.
|
protected static java.lang.String |
getLanguageFromPaymentDataOrFallback(CreatePaymentData cpd) |
Try to define payment locale (two characters ISO 639) in the next order:
from custom payment data config, e.g.
|
addNewPayment, createPaymentDraft, getLanguageFromCart
protected io.sphere.sdk.types.CustomFieldsDraftBuilder createCustomFieldsBuilder()
CustomFieldsDraftBuilder
with implementation specific type key
(see getMethodType()
)protected io.sphere.sdk.types.CustomFieldsDraftBuilder createCustomFieldsBuilder(CreatePaymentData cpd)
cpd
- payment data from which fetch languageCode and referencegetMethodType()
)
with pre-filled default values from cpd
createCustomFieldsBuilder()
protected static java.lang.String getLanguageFromPaymentDataOrFallback(CreatePaymentData cpd)
cpd.getConfigByName(LANGUAGE_CODE)
(if not null)CreatePaymentMethodBase.getLanguageFromCart(Cart)
with cpd.getCart()
cpd
- payment-cart data from which define the localeCreatePaymentMethodBase.getLanguageFromCart(Cart)
public java.util.function.Function<CreatePaymentData,java.util.concurrent.CompletionStage<PaymentCreationResult>> create()
CreatePaymentMethod