Package com.adyen.model.checkout
Class Payment
- java.lang.Object
-
- com.adyen.model.checkout.Payment
-
public class Payment extends Object
Payment
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPayment.ResultCodeEnumThe result of the payment.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AMOUNTstatic StringJSON_PROPERTY_PAYMENT_METHODstatic StringJSON_PROPERTY_PSP_REFERENCEstatic StringJSON_PROPERTY_RESULT_CODE
-
Constructor Summary
Constructors Constructor Description Payment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Paymentamount(Amount amount)amountbooleanequals(Object o)Return true if this Payment object is equal to o.static PaymentfromJson(String jsonString)Create an instance of Payment given an JSON stringAmountgetAmount()Get amountResponsePaymentMethodgetPaymentMethod()Get paymentMethodStringgetPspReference()Adyen's 16-character reference associated with the transaction/request.Payment.ResultCodeEnumgetResultCode()The result of the payment.inthashCode()PaymentpaymentMethod(ResponsePaymentMethod paymentMethod)paymentMethodPaymentpspReference(String pspReference)Adyen's 16-character reference associated with the transaction/request.PaymentresultCode(Payment.ResultCodeEnum resultCode)The result of the payment.voidsetAmount(Amount amount)amountvoidsetPaymentMethod(ResponsePaymentMethod paymentMethod)paymentMethodvoidsetPspReference(String pspReference)Adyen's 16-character reference associated with the transaction/request.voidsetResultCode(Payment.ResultCodeEnum resultCode)The result of the payment.StringtoJson()Convert an instance of Payment to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_AMOUNT
public static final String JSON_PROPERTY_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PAYMENT_METHOD
public static final String JSON_PROPERTY_PAYMENT_METHOD
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PSP_REFERENCE
public static final String JSON_PROPERTY_PSP_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RESULT_CODE
public static final String JSON_PROPERTY_RESULT_CODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
amount
public Payment amount(Amount amount)
amount- Parameters:
amount-- Returns:
- the current
Paymentinstance, allowing for method chaining
-
getAmount
public Amount getAmount()
Get amount- Returns:
- amount
-
setAmount
public void setAmount(Amount amount)
amount- Parameters:
amount-
-
paymentMethod
public Payment paymentMethod(ResponsePaymentMethod paymentMethod)
paymentMethod- Parameters:
paymentMethod-- Returns:
- the current
Paymentinstance, allowing for method chaining
-
getPaymentMethod
public ResponsePaymentMethod getPaymentMethod()
Get paymentMethod- Returns:
- paymentMethod
-
setPaymentMethod
public void setPaymentMethod(ResponsePaymentMethod paymentMethod)
paymentMethod- Parameters:
paymentMethod-
-
pspReference
public Payment pspReference(String pspReference)
Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.- Parameters:
pspReference- Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.- Returns:
- the current
Paymentinstance, allowing for method chaining
-
getPspReference
public String getPspReference()
Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.- Returns:
- pspReference Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.
-
setPspReference
public void setPspReference(String pspReference)
Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.- Parameters:
pspReference- Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.
-
resultCode
public Payment resultCode(Payment.ResultCodeEnum resultCode)
The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state.- Parameters:
resultCode- The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state.- Returns:
- the current
Paymentinstance, allowing for method chaining
-
getResultCode
public Payment.ResultCodeEnum getResultCode()
The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state.- Returns:
- resultCode The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state.
-
setResultCode
public void setResultCode(Payment.ResultCodeEnum resultCode)
The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state.- Parameters:
resultCode- The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state.
-
equals
public boolean equals(Object o)
Return true if this Payment object is equal to o.
-
fromJson
public static Payment fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Payment given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Payment
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Payment
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Payment to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-