Skip to content

Commit 992b54e

Browse files
authored
Merge pull request #1181 from Adyen/add-encryptedPassword
Add Card EncryptedPassword attribute
2 parents 60dc349 + ffdd264 commit 992b54e

File tree

2 files changed

+46
-8
lines changed

2 files changed

+46
-8
lines changed

Adyen/Model/Checkout/CardDetails.cs

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ public enum TypeEnum
123123
/// <param name="encryptedCardNumber">The encrypted card number..</param>
124124
/// <param name="encryptedExpiryMonth">The encrypted card expiry month..</param>
125125
/// <param name="encryptedExpiryYear">The encrypted card expiry year..</param>
126+
/// <param name="encryptedPassword">This field contains an encrypted, one-time password or an authentication code provided by the cardholder..</param>
126127
/// <param name="encryptedSecurityCode">The encrypted card verification code..</param>
127128
/// <param name="expiryMonth">The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide)..</param>
128129
/// <param name="expiryYear">The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide)..</param>
129130
/// <param name="fastlaneData">The encoded fastlane data blob.</param>
130131
/// <param name="fundingSource">The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**..</param>
131132
/// <param name="holderName">The name of the card holder..</param>
132-
/// <param name="networkPaymentReference">The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment..</param>
133+
/// <param name="networkPaymentReference">The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment..</param>
133134
/// <param name="number">The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide)..</param>
134135
/// <param name="recurringDetailReference">This is the &#x60;recurringDetailReference&#x60; returned in the response when you created the token..</param>
135136
/// <param name="shopperNotificationReference">The &#x60;shopperNotificationReference&#x60; returned in the response when you requested to notify the shopper. Used only for recurring payments in India..</param>
@@ -140,7 +141,7 @@ public enum TypeEnum
140141
/// <param name="storedPaymentMethodId">This is the &#x60;recurringDetailReference&#x60; returned in the response when you created the token..</param>
141142
/// <param name="threeDS2SdkVersion">Required for mobile integrations. Version of the 3D Secure 2 mobile SDK..</param>
142143
/// <param name="type">Default payment method details. Common for scheme payment methods, and for simple payment method details. (default to TypeEnum.Scheme).</param>
143-
public CardDetails(string brand = default(string), string checkoutAttemptId = default(string), string cupsecureplusSmscode = default(string), string cvc = default(string), string encryptedCard = default(string), string encryptedCardNumber = default(string), string encryptedExpiryMonth = default(string), string encryptedExpiryYear = default(string), string encryptedSecurityCode = default(string), string expiryMonth = default(string), string expiryYear = default(string), string fastlaneData = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string holderName = default(string), string networkPaymentReference = default(string), string number = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string srcCorrelationId = default(string), string srcDigitalCardId = default(string), string srcScheme = default(string), string srcTokenReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Scheme)
144+
public CardDetails(string brand = default(string), string checkoutAttemptId = default(string), string cupsecureplusSmscode = default(string), string cvc = default(string), string encryptedCard = default(string), string encryptedCardNumber = default(string), string encryptedExpiryMonth = default(string), string encryptedExpiryYear = default(string), string encryptedPassword = default(string), string encryptedSecurityCode = default(string), string expiryMonth = default(string), string expiryYear = default(string), string fastlaneData = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string holderName = default(string), string networkPaymentReference = default(string), string number = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string srcCorrelationId = default(string), string srcDigitalCardId = default(string), string srcScheme = default(string), string srcTokenReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Scheme)
144145
{
145146
this.Brand = brand;
146147
this.CheckoutAttemptId = checkoutAttemptId;
@@ -150,6 +151,7 @@ public enum TypeEnum
150151
this.EncryptedCardNumber = encryptedCardNumber;
151152
this.EncryptedExpiryMonth = encryptedExpiryMonth;
152153
this.EncryptedExpiryYear = encryptedExpiryYear;
154+
this.EncryptedPassword = encryptedPassword;
153155
this.EncryptedSecurityCode = encryptedSecurityCode;
154156
this.ExpiryMonth = expiryMonth;
155157
this.ExpiryYear = expiryYear;
@@ -225,6 +227,13 @@ public enum TypeEnum
225227
[DataMember(Name = "encryptedExpiryYear", EmitDefaultValue = false)]
226228
public string EncryptedExpiryYear { get; set; }
227229

230+
/// <summary>
231+
/// This field contains an encrypted, one-time password or an authentication code provided by the cardholder.
232+
/// </summary>
233+
/// <value>This field contains an encrypted, one-time password or an authentication code provided by the cardholder.</value>
234+
[DataMember(Name = "encryptedPassword", EmitDefaultValue = false)]
235+
public string EncryptedPassword { get; set; }
236+
228237
/// <summary>
229238
/// The encrypted card verification code.
230239
/// </summary>
@@ -261,9 +270,9 @@ public enum TypeEnum
261270
public string HolderName { get; set; }
262271

263272
/// <summary>
264-
/// The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.
273+
/// The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.
265274
/// </summary>
266-
/// <value>The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.</value>
275+
/// <value>The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.</value>
267276
[DataMember(Name = "networkPaymentReference", EmitDefaultValue = false)]
268277
public string NetworkPaymentReference { get; set; }
269278

@@ -347,6 +356,7 @@ public override string ToString()
347356
sb.Append(" EncryptedCardNumber: ").Append(EncryptedCardNumber).Append("\n");
348357
sb.Append(" EncryptedExpiryMonth: ").Append(EncryptedExpiryMonth).Append("\n");
349358
sb.Append(" EncryptedExpiryYear: ").Append(EncryptedExpiryYear).Append("\n");
359+
sb.Append(" EncryptedPassword: ").Append(EncryptedPassword).Append("\n");
350360
sb.Append(" EncryptedSecurityCode: ").Append(EncryptedSecurityCode).Append("\n");
351361
sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n");
352362
sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n");
@@ -439,6 +449,11 @@ public bool Equals(CardDetails input)
439449
(this.EncryptedExpiryYear != null &&
440450
this.EncryptedExpiryYear.Equals(input.EncryptedExpiryYear))
441451
) &&
452+
(
453+
this.EncryptedPassword == input.EncryptedPassword ||
454+
(this.EncryptedPassword != null &&
455+
this.EncryptedPassword.Equals(input.EncryptedPassword))
456+
) &&
442457
(
443458
this.EncryptedSecurityCode == input.EncryptedSecurityCode ||
444459
(this.EncryptedSecurityCode != null &&
@@ -565,6 +580,10 @@ public override int GetHashCode()
565580
{
566581
hashCode = (hashCode * 59) + this.EncryptedExpiryYear.GetHashCode();
567582
}
583+
if (this.EncryptedPassword != null)
584+
{
585+
hashCode = (hashCode * 59) + this.EncryptedPassword.GetHashCode();
586+
}
568587
if (this.EncryptedSecurityCode != null)
569588
{
570589
hashCode = (hashCode * 59) + this.EncryptedSecurityCode.GetHashCode();

Adyen/Model/Checkout/CardDonations.cs

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ public enum TypeEnum
123123
/// <param name="encryptedCardNumber">The encrypted card number..</param>
124124
/// <param name="encryptedExpiryMonth">The encrypted card expiry month..</param>
125125
/// <param name="encryptedExpiryYear">The encrypted card expiry year..</param>
126+
/// <param name="encryptedPassword">This field contains an encrypted, one-time password or an authentication code provided by the cardholder..</param>
126127
/// <param name="encryptedSecurityCode">The encrypted card verification code..</param>
127128
/// <param name="expiryMonth">The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide)..</param>
128129
/// <param name="expiryYear">The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide)..</param>
129130
/// <param name="fastlaneData">The encoded fastlane data blob.</param>
130131
/// <param name="fundingSource">The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**..</param>
131132
/// <param name="holderName">The name of the card holder..</param>
132-
/// <param name="networkPaymentReference">The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment..</param>
133+
/// <param name="networkPaymentReference">The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment..</param>
133134
/// <param name="number">The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide)..</param>
134135
/// <param name="recurringDetailReference">This is the &#x60;recurringDetailReference&#x60; returned in the response when you created the token..</param>
135136
/// <param name="shopperNotificationReference">The &#x60;shopperNotificationReference&#x60; returned in the response when you requested to notify the shopper. Used only for recurring payments in India..</param>
@@ -140,7 +141,7 @@ public enum TypeEnum
140141
/// <param name="storedPaymentMethodId">This is the &#x60;recurringDetailReference&#x60; returned in the response when you created the token..</param>
141142
/// <param name="threeDS2SdkVersion">Required for mobile integrations. Version of the 3D Secure 2 mobile SDK..</param>
142143
/// <param name="type">Default payment method details. Common for scheme payment methods, and for simple payment method details. (default to TypeEnum.Scheme).</param>
143-
public CardDonations(string brand = default(string), string checkoutAttemptId = default(string), string cupsecureplusSmscode = default(string), string cvc = default(string), string encryptedCard = default(string), string encryptedCardNumber = default(string), string encryptedExpiryMonth = default(string), string encryptedExpiryYear = default(string), string encryptedSecurityCode = default(string), string expiryMonth = default(string), string expiryYear = default(string), string fastlaneData = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string holderName = default(string), string networkPaymentReference = default(string), string number = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string srcCorrelationId = default(string), string srcDigitalCardId = default(string), string srcScheme = default(string), string srcTokenReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Scheme)
144+
public CardDonations(string brand = default(string), string checkoutAttemptId = default(string), string cupsecureplusSmscode = default(string), string cvc = default(string), string encryptedCard = default(string), string encryptedCardNumber = default(string), string encryptedExpiryMonth = default(string), string encryptedExpiryYear = default(string), string encryptedPassword = default(string), string encryptedSecurityCode = default(string), string expiryMonth = default(string), string expiryYear = default(string), string fastlaneData = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string holderName = default(string), string networkPaymentReference = default(string), string number = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string srcCorrelationId = default(string), string srcDigitalCardId = default(string), string srcScheme = default(string), string srcTokenReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Scheme)
144145
{
145146
this.Brand = brand;
146147
this.CheckoutAttemptId = checkoutAttemptId;
@@ -150,6 +151,7 @@ public enum TypeEnum
150151
this.EncryptedCardNumber = encryptedCardNumber;
151152
this.EncryptedExpiryMonth = encryptedExpiryMonth;
152153
this.EncryptedExpiryYear = encryptedExpiryYear;
154+
this.EncryptedPassword = encryptedPassword;
153155
this.EncryptedSecurityCode = encryptedSecurityCode;
154156
this.ExpiryMonth = expiryMonth;
155157
this.ExpiryYear = expiryYear;
@@ -225,6 +227,13 @@ public enum TypeEnum
225227
[DataMember(Name = "encryptedExpiryYear", EmitDefaultValue = false)]
226228
public string EncryptedExpiryYear { get; set; }
227229

230+
/// <summary>
231+
/// This field contains an encrypted, one-time password or an authentication code provided by the cardholder.
232+
/// </summary>
233+
/// <value>This field contains an encrypted, one-time password or an authentication code provided by the cardholder.</value>
234+
[DataMember(Name = "encryptedPassword", EmitDefaultValue = false)]
235+
public string EncryptedPassword { get; set; }
236+
228237
/// <summary>
229238
/// The encrypted card verification code.
230239
/// </summary>
@@ -261,9 +270,9 @@ public enum TypeEnum
261270
public string HolderName { get; set; }
262271

263272
/// <summary>
264-
/// The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.
273+
/// The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.
265274
/// </summary>
266-
/// <value>The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.</value>
275+
/// <value>The transaction identifier from card schemes. This is the [&#x60;networkTxReference&#x60;](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.</value>
267276
[DataMember(Name = "networkPaymentReference", EmitDefaultValue = false)]
268277
public string NetworkPaymentReference { get; set; }
269278

@@ -347,6 +356,7 @@ public override string ToString()
347356
sb.Append(" EncryptedCardNumber: ").Append(EncryptedCardNumber).Append("\n");
348357
sb.Append(" EncryptedExpiryMonth: ").Append(EncryptedExpiryMonth).Append("\n");
349358
sb.Append(" EncryptedExpiryYear: ").Append(EncryptedExpiryYear).Append("\n");
359+
sb.Append(" EncryptedPassword: ").Append(EncryptedPassword).Append("\n");
350360
sb.Append(" EncryptedSecurityCode: ").Append(EncryptedSecurityCode).Append("\n");
351361
sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n");
352362
sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n");
@@ -439,6 +449,11 @@ public bool Equals(CardDonations input)
439449
(this.EncryptedExpiryYear != null &&
440450
this.EncryptedExpiryYear.Equals(input.EncryptedExpiryYear))
441451
) &&
452+
(
453+
this.EncryptedPassword == input.EncryptedPassword ||
454+
(this.EncryptedPassword != null &&
455+
this.EncryptedPassword.Equals(input.EncryptedPassword))
456+
) &&
442457
(
443458
this.EncryptedSecurityCode == input.EncryptedSecurityCode ||
444459
(this.EncryptedSecurityCode != null &&
@@ -565,6 +580,10 @@ public override int GetHashCode()
565580
{
566581
hashCode = (hashCode * 59) + this.EncryptedExpiryYear.GetHashCode();
567582
}
583+
if (this.EncryptedPassword != null)
584+
{
585+
hashCode = (hashCode * 59) + this.EncryptedPassword.GetHashCode();
586+
}
568587
if (this.EncryptedSecurityCode != null)
569588
{
570589
hashCode = (hashCode * 59) + this.EncryptedSecurityCode.GetHashCode();

0 commit comments

Comments
 (0)