Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PaymentResponse" /> class.
 /// </summary>
 /// <param name="action">Action to be taken for completing the payment..</param>
 /// <param name="additionalData">This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** &gt; **Account** &gt; **API URLs** &gt; **Additional data settings**..</param>
 /// <param name="amount">amount.</param>
 /// <param name="authentication">Contains &#x60;threeds2.fingerprint&#x60; or &#x60;threeds2.challengeToken&#x60; values to be used in further calls to &#x60;/payments/details&#x60; endpoint. .</param>
 /// <param name="details">When non-empty, contains all the fields that you must submit to the &#x60;/payments/details&#x60; endpoint..</param>
 /// <param name="donationToken">donationToken.</param>
 /// <param name="fraudResult">fraudResult.</param>
 /// <param name="merchantReference">The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\&quot;-\&quot;). Maximum length: 80 characters..</param>
 /// <param name="order">order.</param>
 /// <param name="outputDetails">Contains the details that will be presented to the shopper..</param>
 /// <param name="paymentData">When non-empty, contains a value that you must submit to the &#x60;/payments/details&#x60; endpoint..</param>
 /// <param name="pspReference">Adyen&#x27;s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.  &gt; &#x60;pspReference&#x60; is returned only for non-redirect payment methods..</param>
 /// <param name="redirect">redirect.</param>
 /// <param name="refusalReason">If the payment&#x27;s authorisation is refused or an error occurs during authorisation, this field holds Adyen&#x27;s mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes &#x60;resultCode&#x60; and &#x60;refusalReason&#x60; values.  For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons)..</param>
 /// <param name="refusalReasonCode">Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons)..</param>
 /// <param name="resultCode">The result of the payment. For more information, see [Result codes](https://docs.adyen.com/checkout/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/checkout/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 &#x60;refusalReason&#x60; field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper&#x27;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 &#x60;refusalReason&#x60; field. This is a final state..</param>
 public PaymentResponse(IPaymentResponseAction action = default(IPaymentResponseAction),
                        Dictionary <string, string> additionalData = default(Dictionary <string, string>),
                        Amount amount = default(Amount),
                        Dictionary <string, string> authentication = default(Dictionary <string, string>),
                        List <InputDetail> details  = default(List <InputDetail>), string donationToken = default(string),
                        FraudResult fraudResult     = default(FraudResult), string merchantReference    = default(string),
                        CheckoutOrderResponse order = default(CheckoutOrderResponse),
                        Dictionary <string, string> outputDetails = default(Dictionary <string, string>),
                        string paymentData       = default(string), string pspReference       = default(string),
                        Redirect redirect        = default(Redirect), string refusalReason    = default(string),
                        string refusalReasonCode = default(string), ResultCodeEnum?resultCode = default(ResultCodeEnum?))
 {
     this.Action            = action;
     this.AdditionalData    = additionalData;
     this.Amount            = amount;
     this.Authentication    = authentication;
     this.Details           = details;
     this.DonationToken     = donationToken;
     this.FraudResult       = fraudResult;
     this.MerchantReference = merchantReference;
     this.Order             = order;
     this.OutputDetails     = outputDetails;
     this.PaymentData       = paymentData;
     this.PspReference      = pspReference;
     this.Redirect          = redirect;
     this.RefusalReason     = refusalReason;
     this.RefusalReasonCode = refusalReasonCode;
     this.ResultCode        = resultCode;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PaymentResultResponse" /> class.
 /// </summary>
 /// <param name="additionalData">This field contains additional data, which may be required to return in a particular payment response. To choose data fields to be returned, go to **Customer Area** &gt; **Account** &gt; **API URLs** &gt; **Additional data settings**..</param>
 /// <param name="fraudResult">fraudResult.</param>
 /// <param name="merchantReference">A unique value that you provided in the initial &#x60;/paymentSession&#x60; request as a &#x60;reference&#x60; field. (required).</param>
 /// <param name="order">order.</param>
 /// <param name="paymentMethod">The payment method used in the transaction. (required).</param>
 /// <param name="pspReference">Adyen&#x27;s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.  &gt; &#x60;pspReference&#x60; is returned only for non-redirect payment methods..</param>
 /// <param name="refusalReason">If the payment&#x27;s authorisation is refused or an error occurs during authorisation, this field holds Adyen&#x27;s mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes &#x60;resultCode&#x60; and &#x60;refusalReason&#x60; values.  For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons)..</param>
 /// <param name="refusalReasonCode">Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons)..</param>
 /// <param name="resultCode">The result of the payment. For more information, see [Result codes](https://docs.adyen.com/checkout/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/checkout/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 &#x60;refusalReason&#x60; field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper&#x27;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 &#x60;refusalReason&#x60; field. This is a final state..</param>
 /// <param name="serviceError">serviceError.</param>
 /// <param name="shopperLocale">The shopperLocale value provided in the payment request. (required).</param>
 public PaymentResultResponse(
     Dictionary <string, string> additionalData =
     default(Dictionary <string, string>), FraudResult fraudResult = default(FraudResult),
     string merchantReference  = default(string), CheckoutOrderResponse order        = default(CheckoutOrderResponse),
     string paymentMethod      = default(string), string pspReference                = default(string),
     string refusalReason      = default(string), string refusalReasonCode           = default(string),
     ResultCodeEnum?resultCode = default(ResultCodeEnum?), ServiceError serviceError = default(ServiceError),
     string shopperLocale      = default(string))
 {
     // to ensure "merchantReference" is required (not null)
     if (merchantReference == null)
     {
         throw new InvalidDataException(
                   "merchantReference is a required property for PaymentResultResponse and cannot be null");
     }
     else
     {
         this.MerchantReference = merchantReference;
     }
     // to ensure "paymentMethod" is required (not null)
     if (paymentMethod == null)
     {
         throw new InvalidDataException(
                   "paymentMethod is a required property for PaymentResultResponse and cannot be null");
     }
     else
     {
         this.PaymentMethod = paymentMethod;
     }
     // to ensure "shopperLocale" is required (not null)
     if (shopperLocale == null)
     {
         throw new InvalidDataException(
                   "shopperLocale is a required property for PaymentResultResponse and cannot be null");
     }
     else
     {
         this.ShopperLocale = shopperLocale;
     }
     this.AdditionalData    = additionalData;
     this.FraudResult       = fraudResult;
     this.Order             = order;
     this.PspReference      = pspReference;
     this.RefusalReason     = refusalReason;
     this.RefusalReasonCode = refusalReasonCode;
     this.ResultCode        = resultCode;
     this.ServiceError      = serviceError;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PaymentDetailsResponse" /> class.
 /// </summary>
 /// <param name="additionalData">Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** &gt; **Account** &gt; **API URLs** &gt; **Additional data settings**..</param>
 /// <param name="amount">amount.</param>
 /// <param name="donationToken">Donation Token containing payment details for Adyen Giving..</param>
 /// <param name="fraudResult">fraudResult.</param>
 /// <param name="order">order.</param>
 /// <param name="paymentMethod">The payment method used in the transaction..</param>
 /// <param name="pspReference">Adyen&#x27;s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request..</param>
 /// <param name="refusalReason">If the payment&#x27;s authorisation is refused or an error occurs during authorisation, this field holds Adyen&#x27;s mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes &#x60;resultCode&#x60; and &#x60;refusalReason&#x60; values.  For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons)..</param>
 /// <param name="refusalReasonCode">Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons)..</param>
 /// <param name="resultCode">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 &#x60;refusalReason&#x60; field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper&#x27;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 &#x60;refusalReason&#x60; field. This is a final state..</param>
 /// <param name="shopperLocale">The shopperLocale..</param>
 /// <param name="threeDS2Result">threeDS2Result.</param>
 public PaymentDetailsResponse(Dictionary <string, string> additionalData = default(Dictionary <string, string>), Amount amount = default(Amount), string donationToken = default(string), FraudResult fraudResult = default(FraudResult), CheckoutOrderResponse order = default(CheckoutOrderResponse), string paymentMethod = default(string), string pspReference = default(string), string refusalReason = default(string), string refusalReasonCode = default(string), ResultCodeEnum?resultCode = default(ResultCodeEnum?), string shopperLocale = default(string), ThreeDS2Result threeDS2Result = default(ThreeDS2Result))
 {
     this.AdditionalData    = additionalData;
     this.Amount            = amount;
     this.DonationToken     = donationToken;
     this.FraudResult       = fraudResult;
     this.Order             = order;
     this.PaymentMethod     = paymentMethod;
     this.PspReference      = pspReference;
     this.RefusalReason     = refusalReason;
     this.RefusalReasonCode = refusalReasonCode;
     this.ResultCode        = resultCode;
     this.ShopperLocale     = shopperLocale;
     this.ThreeDS2Result    = threeDS2Result;
 }