public abstract class PayoneCreatePaymentMethodBase extends CreatePaymentMethodBase
Constructor and Description |
---|
PayoneCreatePaymentMethodBase() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected abstract java.lang.String |
getMethodType() |
addNewPayment, createPaymentDraft, getLanguageFromCart
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create
protected abstract java.lang.String getMethodType()
PayonePaymentMethodType
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)