/// <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**..</param>
 /// <param name="FraudResult">The fraud result properties of the payment..</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="PaymentMethod">The payment method used in the transaction. (required).</param>
 /// <param name="PspReference">Adyen&#39;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&#39;s authorisation is refused or an error occurs during authorisation, this field holds Adyen&#39;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..</param>
 /// <param name="RefusalReasonCode">Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/developers/development-resources/response-handling#authorisationrefusalreasons)..</param>
 /// <param name="ResultCode">The result of the payment. Possible values:  * **Authorised** – Indicates the payment authorisation was successfully completed. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Refused** – Indicates the payment was refused. The reason is given in the &#x60;refusalReason&#x60; field. This is a final state. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **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. For more information on handling a pending payment, refer to [Payments with pending status](https://docs.adyen.com/developers/development-resources/payments-with-pending-status). * **Error** – Indicates an error occurred during processing of the payment. The reason is given in the &#x60;refusalReason&#x60; field. This is a final state..</param>
 /// <param name="ServiceError">The type of the error..</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), 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.PspReference      = PspReference;
     this.RefusalReason     = RefusalReason;
     this.RefusalReasonCode = RefusalReasonCode;
     this.ResultCode        = ResultCode;
     this.ServiceError      = ServiceError;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PaymentsResponse" /> 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**..</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="FraudResult">The fraud result properties of the payment..</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&#39;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">When the payment flow requires a redirect, this object contains information about the redirect URL..</param>
 /// <param name="RefusalReason">If the payment&#39;s authorisation is refused or an error occurs during authorisation, this field holds Adyen&#39;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..</param>
 /// <param name="RefusalReasonCode">Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/developers/development-resources/response-handling#authorisationrefusalreasons)..</param>
 /// <param name="ResultCode">The result of the payment. Possible values:  * **Authorised** – Indicates the payment authorisation was successfully completed. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Refused** – Indicates the payment was refused. The reason is given in the &#x60;refusalReason&#x60; field. This is a final state. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **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. For more information on handling a pending payment, refer to [Payments with pending status](https://docs.adyen.com/developers/development-resources/payments-with-pending-status). * **Error** – Indicates an error occurred during processing of the payment. The reason is given in the &#x60;refusalReason&#x60; field. This is a final state..</param>
 public PaymentsResponse(Dictionary <string, string> AdditionalData = default(Dictionary <string, string>), List <InputDetail> Details = default(List <InputDetail>), FraudResult FraudResult = default(FraudResult), 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.AdditionalData    = AdditionalData;
     this.Details           = Details;
     this.FraudResult       = FraudResult;
     this.PaymentData       = PaymentData;
     this.PspReference      = PspReference;
     this.Redirect          = Redirect;
     this.RefusalReason     = RefusalReason;
     this.RefusalReasonCode = RefusalReasonCode;
     this.ResultCode        = ResultCode;
 }