Package com.adyen.model.payments
Class PaymentResult
- java.lang.Object
-
- com.adyen.model.payments.PaymentResult
-
public class PaymentResult extends Object
PaymentResult
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPaymentResult.CustomTypeAdapterFactorystatic classPaymentResult.ResultCodeEnumThe result of the payment.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_ADDITIONAL_DATAstatic StringSERIALIZED_NAME_AUTH_CODEstatic StringSERIALIZED_NAME_DCC_AMOUNTstatic StringSERIALIZED_NAME_DCC_SIGNATUREstatic StringSERIALIZED_NAME_FRAUD_RESULTstatic StringSERIALIZED_NAME_ISSUER_URLstatic StringSERIALIZED_NAME_MDstatic StringSERIALIZED_NAME_PA_REQUESTstatic StringSERIALIZED_NAME_PSP_REFERENCEstatic StringSERIALIZED_NAME_REFUSAL_REASONstatic StringSERIALIZED_NAME_RESULT_CODE
-
Constructor Summary
Constructors Constructor Description PaymentResult()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PaymentResultadditionalData(Map<String,String> additionalData)PaymentResultauthCode(String authCode)PaymentResultdccAmount(Amount dccAmount)PaymentResultdccSignature(String dccSignature)booleanequals(Object o)PaymentResultfraudResult(FraudResult fraudResult)static PaymentResultfromJson(String jsonString)Create an instance of PaymentResult given an JSON stringMap<String,String>getAdditionalData()Contains additional information about the payment.StringgetAuthCode()Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment.AmountgetDccAmount()Get dccAmountStringgetDccSignature()Cryptographic signature used to verify `dccQuote`.FraudResultgetFraudResult()Get fraudResultStringgetIssuerUrl()The URL to direct the shopper to.StringgetMd()The payment session.StringgetPaRequest()The 3D request data for the issuer.StringgetPspReference()Adyen's 16-character reference associated with the transaction/request.StringgetRefusalReason()If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error.PaymentResult.ResultCodeEnumgetResultCode()The result of the payment.inthashCode()PaymentResultissuerUrl(String issuerUrl)PaymentResultmd(String md)PaymentResultpaRequest(String paRequest)PaymentResultpspReference(String pspReference)PaymentResultputAdditionalDataItem(String key, String additionalDataItem)PaymentResultrefusalReason(String refusalReason)PaymentResultresultCode(PaymentResult.ResultCodeEnum resultCode)voidsetAdditionalData(Map<String,String> additionalData)voidsetAuthCode(String authCode)voidsetDccAmount(Amount dccAmount)voidsetDccSignature(String dccSignature)voidsetFraudResult(FraudResult fraudResult)voidsetIssuerUrl(String issuerUrl)voidsetMd(String md)voidsetPaRequest(String paRequest)voidsetPspReference(String pspReference)voidsetRefusalReason(String refusalReason)voidsetResultCode(PaymentResult.ResultCodeEnum resultCode)StringtoJson()Convert an instance of PaymentResult to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_ADDITIONAL_DATA
public static final String SERIALIZED_NAME_ADDITIONAL_DATA
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_AUTH_CODE
public static final String SERIALIZED_NAME_AUTH_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DCC_AMOUNT
public static final String SERIALIZED_NAME_DCC_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DCC_SIGNATURE
public static final String SERIALIZED_NAME_DCC_SIGNATURE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FRAUD_RESULT
public static final String SERIALIZED_NAME_FRAUD_RESULT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ISSUER_URL
public static final String SERIALIZED_NAME_ISSUER_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MD
public static final String SERIALIZED_NAME_MD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PA_REQUEST
public static final String SERIALIZED_NAME_PA_REQUEST
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PSP_REFERENCE
public static final String SERIALIZED_NAME_PSP_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REFUSAL_REASON
public static final String SERIALIZED_NAME_REFUSAL_REASON
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_RESULT_CODE
public static final String SERIALIZED_NAME_RESULT_CODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
additionalData
public PaymentResult additionalData(Map<String,String> additionalData)
-
putAdditionalDataItem
public PaymentResult putAdditionalDataItem(String key, String additionalDataItem)
-
getAdditionalData
public Map<String,String> getAdditionalData()
Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.- Returns:
- additionalData
-
authCode
public PaymentResult authCode(String authCode)
-
getAuthCode
public String getAuthCode()
Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty.- Returns:
- authCode
-
setAuthCode
public void setAuthCode(String authCode)
-
dccAmount
public PaymentResult dccAmount(Amount dccAmount)
-
getDccAmount
public Amount getDccAmount()
Get dccAmount- Returns:
- dccAmount
-
setDccAmount
public void setDccAmount(Amount dccAmount)
-
dccSignature
public PaymentResult dccSignature(String dccSignature)
-
getDccSignature
public String getDccSignature()
Cryptographic signature used to verify `dccQuote`. > This value only applies if you have implemented Dynamic Currency Conversion. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).- Returns:
- dccSignature
-
setDccSignature
public void setDccSignature(String dccSignature)
-
fraudResult
public PaymentResult fraudResult(FraudResult fraudResult)
-
getFraudResult
public FraudResult getFraudResult()
Get fraudResult- Returns:
- fraudResult
-
setFraudResult
public void setFraudResult(FraudResult fraudResult)
-
issuerUrl
public PaymentResult issuerUrl(String issuerUrl)
-
getIssuerUrl
public String getIssuerUrl()
The URL to direct the shopper to. > In case of SecurePlus, do not redirect a shopper to this URL.- Returns:
- issuerUrl
-
setIssuerUrl
public void setIssuerUrl(String issuerUrl)
-
md
public PaymentResult md(String md)
-
getMd
public String getMd()
The payment session.- Returns:
- md
-
setMd
public void setMd(String md)
-
paRequest
public PaymentResult paRequest(String paRequest)
-
getPaRequest
public String getPaRequest()
The 3D request data for the issuer. If the value is **CUPSecurePlus-CollectSMSVerificationCode**, collect an SMS code from the shopper and pass it in the `/authorise3D` request. For more information, see [3D Secure](https://docs.adyen.com/classic-integration/3d-secure).- Returns:
- paRequest
-
setPaRequest
public void setPaRequest(String paRequest)
-
pspReference
public PaymentResult pspReference(String pspReference)
-
getPspReference
public String getPspReference()
Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.- Returns:
- pspReference
-
setPspReference
public void setPspReference(String pspReference)
-
refusalReason
public PaymentResult refusalReason(String refusalReason)
-
getRefusalReason
public String getRefusalReason()
If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).- Returns:
- refusalReason
-
setRefusalReason
public void setRefusalReason(String refusalReason)
-
resultCode
public PaymentResult resultCode(PaymentResult.ResultCodeEnum resultCode)
-
getResultCode
public PaymentResult.ResultCodeEnum getResultCode()
The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state.- Returns:
- resultCode
-
setResultCode
public void setResultCode(PaymentResult.ResultCodeEnum resultCode)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to PaymentResult
-
fromJson
public static PaymentResult fromJson(String jsonString) throws IOException
Create an instance of PaymentResult given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PaymentResult
- Throws:
IOException- if the JSON string is invalid with respect to PaymentResult
-
toJson
public String toJson()
Convert an instance of PaymentResult to an JSON string- Returns:
- JSON string
-
-