Skip to content

Commit

Permalink
5.27.0
Browse files Browse the repository at this point in the history
Co-authored-by: klaguerre <[email protected]>
Co-authored-by: Sara Vasquez <[email protected]>
Co-authored-by: Rajaram Gurumurthi <[email protected]>
  • Loading branch information
4 people committed Sep 19, 2024
1 parent 49c40ea commit a18cba8
Show file tree
Hide file tree
Showing 23 changed files with 432 additions and 228 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 5.27.0
- Add `PayerName`, `Bic` and `IbanLastChars` to LocalPaymentCompleted webhook
- Add `edit_paypal_vault_id` to `PayPalAccount`
- Add `AniFirstNameResponseCode` and `AniLastNameResponseCode` to `CreditCardVerification`
- Add `ShippingTaxAmount` to `Transaction` and `TransactionRequest`
- Add `networkTokenizationAttributes` to `TransactionCreditCardRequest`
- Add `NetworkTokenizationAttributesRequest` class
- Add validation error codes:
- `CREDIT_CARD_NETWORK_TOKENIZATION_ATTRIBUTE_CRYPTOGRAM_IS_REQUIRED`

## 5.26.0
- Add attributes to `ThreeDSecureLookupRequest`
- `MerchantInitiatedRequestType`
Expand Down
22 changes: 9 additions & 13 deletions src/Braintree/Braintree.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,22 @@
<PropertyGroup>
<Description>Braintree Client Library</Description>
<Copyright>Copyright © Braintree, a division of PayPal, Inc. 2021</Copyright>
<VersionPrefix>5.26.0</VersionPrefix>
<VersionPrefix>5.27.0</VersionPrefix>
<Authors>Braintree</Authors>
<!-- We target NET standard 2.0 so that we can support NET Core 2.1. When NET Core 2.1 reaches EOL, we can update to Net Standard 2.1 -->
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<AssemblyName>Braintree</AssemblyName>
<PackageId>Braintree</PackageId>
<PackageTags>braintree;paypal;venmo;intenational;payments;gateway;currencies;money;visa;mastercard;bitcoin;maestro;apple pay;android pay;amex;jcb;diners club;discover;american express</PackageTags>
<PackageReleaseNotes>
- Add attributes to `ThreeDSecureLookupRequest`
- `MerchantInitiatedRequestType`
- `PriorAuthenticationId`
- `MerchantOnRecordName`
- `PriorAuthenticationDetails`
- Add `ForeignRetailer` to `Transaction` and `TransactionRequest`
- Add `InternationalPhone` to `Address` and `Customer`
- Add `fundingSourceDescription` to `PayPalAccount`
- Add missing `AndroidPayCard` error code
- Add `REFUND_FAILED` to `WebhookKind`
- Add `FinalCapture` to Transaction `TransactionRequest`
- Deprecate `paypal_tracking_id` in favor of `paypal_tracker_id` in PackageDetails
- Add `PayerName`, `Bic` and `IbanLastChars` to LocalPaymentCompleted webhook
- Add `edit_paypal_vault_id` to `PayPalAccount`
- Add `AniFirstNameResponseCode` and `AniLastNameResponseCode` to `CreditCardVerification`
- Add `ShippingTaxAmount` to `Transaction` and `TransactionRequest`
- Add `networkTokenizationAttributes` to `TransactionCreditCardRequest`
- Add `NetworkTokenizationAttributesRequest` class
- Add validation error codes:
- `CREDIT_CARD_NETWORK_TOKENIZATION_ATTRIBUTE_CRYPTOGRAM_IS_REQUIRED`
</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/braintree/braintree_dotnet</PackageProjectUrl>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand Down
26 changes: 15 additions & 11 deletions src/Braintree/CreditCardVerification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,37 @@ public enum VerificationStatus
public class CreditCardVerification
{
public virtual decimal? Amount { get; protected set; }
public virtual string AniFirstNameResponseCode { get; protected set; }
public virtual string AniLastNameResponseCode { get; protected set; }
public virtual string AvsErrorResponseCode { get; protected set; }
public virtual string AvsPostalCodeResponseCode { get; protected set; }
public virtual string AvsStreetAddressResponseCode { get; protected set; }
public virtual Address BillingAddress { get; protected set; }
public virtual DateTime? CreatedAt { get; protected set; }
public virtual CreditCard CreditCard { get; protected set; }
public virtual string CurrencyIsoCode { get; protected set; }
public virtual string CvvResponseCode { get; protected set; }
public virtual TransactionGatewayRejectionReason? GatewayRejectionReason { get; protected set; }
public virtual string ProcessorResponseCode { get; protected set; }
public virtual string ProcessorResponseText { get; protected set; }
public virtual ProcessorResponseType ProcessorResponseType { get; protected set; }
public virtual string GraphQLId { get; protected set; }
public virtual string Id { get; protected set; }
public virtual string MerchantAccountId { get; protected set; }
public virtual string NetworkResponseCode { get; protected set; }
public virtual string NetworkResponseText { get; protected set; }
public virtual string NetworkTransactionId { get; protected set; }
public virtual string MerchantAccountId { get; protected set; }
public virtual VerificationStatus? Status { get; protected set; }
public virtual string GraphQLId { get; protected set; }
public virtual string Id { get; protected set; }
public virtual Address BillingAddress { get; protected set; }
public virtual CreditCard CreditCard { get; protected set; }
public virtual DateTime? CreatedAt { get; protected set; }
public virtual string ProcessorResponseCode { get; protected set; }
public virtual string ProcessorResponseText { get; protected set; }
public virtual ProcessorResponseType ProcessorResponseType { get; protected set; }
public virtual RiskData RiskData { get; protected set; }
public virtual VerificationStatus? Status { get; protected set; }
public virtual ThreeDSecureInfo ThreeDSecureInfo { get; protected set; }

public CreditCardVerification(NodeWrapper node, IBraintreeGateway gateway)
{
if (node == null) return;

Amount = node.GetDecimal("amount");
AniFirstNameResponseCode = node.GetString("ani-first-name-response-code");
AniLastNameResponseCode = node.GetString("ani-last-name-response-code");
AvsErrorResponseCode = node.GetString("avs-error-response-code");
AvsPostalCodeResponseCode = node.GetString("avs-postal-code-response-code");
AvsStreetAddressResponseCode = node.GetString("avs-street-address-response-code");
Expand Down
10 changes: 8 additions & 2 deletions src/Braintree/LocalPaymentCompleted.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@ namespace Braintree
{
public class LocalPaymentCompleted
{
public virtual string PaymentId { get; protected set; }
public virtual string Bic { get; protected set; }
public virtual string IbanLastChars { get; protected set; }
public virtual string PayerId { get; protected set; }
public virtual string PayerName { get; protected set; }
public virtual string PaymentId { get; protected set; }
public virtual string PaymentMethodNonce { get; protected set; }
public virtual Transaction Transaction { get; protected set; }

protected internal LocalPaymentCompleted(NodeWrapper node, IBraintreeGateway gateway)
{
PaymentId = node.GetString("payment-id");
Bic = node.GetString("bic");
IbanLastChars = node.GetString("iban-last-chars");
PayerId = node.GetString("payer-id");
PayerName = node.GetString("payer-name");
PaymentId = node.GetString("payment-id");
PaymentMethodNonce = node.GetString("payment-method-nonce");

var transactionNode = node.GetNode("transaction");
Expand Down
46 changes: 46 additions & 0 deletions src/Braintree/NetworkTokenizationAttributesRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#pragma warning disable 1591

using System;

namespace Braintree
{
/// <summary>
/// A class for building transaction requests with manual key entry.
/// </summary>
/// <example>
/// A network tokenization attributes request can be constructed as follows:
/// <code>
/// NetworkTokenizationAttributesRequest createRequest = new NetworkTokenizationAttributesRequest
/// {
/// Cryptogram = "validcryptogram",
/// EcommerceIndicator = "05",
/// TokenRequestorId = "123456"
/// }
/// </code>
/// </example>
public class NetworkTokenizationAttributesRequest : Request
{
public string Cryptogram { get; set; }
public string EcommerceIndicator { get; set; }
public string TokenRequestorId { get; set; }

public override string ToXml()
{
return ToXml("network-tokenization-attributes");
}

public override string ToXml(string root)
{
return BuildRequest(root).ToXml();
}

protected virtual RequestBuilder BuildRequest(string root)
{
return new RequestBuilder(root).
AddElement("cryptogram", Cryptogram).
AddElement("ecommerce-indicator", EcommerceIndicator).
AddElement("token-requestor-id", TokenRequestorId);

}
}
}
2 changes: 2 additions & 0 deletions src/Braintree/PayPalAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class PayPalAccount : PaymentMethod
public virtual string BillingAgreementId { get; protected set; }
public virtual DateTime? CreatedAt { get; protected set; }
public virtual string CustomerId { get; protected set; }
public virtual string EditPayPalVaultId {get; protected set;}
public virtual string Email { get; protected set; }
public virtual string FundingSourceDescription { get; protected set; }
public virtual string ImageUrl { get; protected set; }
Expand All @@ -22,6 +23,7 @@ protected internal PayPalAccount(NodeWrapper node, IBraintreeGateway gateway)
BillingAgreementId = node.GetString("billing-agreement-id");
CreatedAt = node.GetDateTime("created-at");
CustomerId = node.GetString("customer-id");
EditPayPalVaultId = node.GetString("edit-paypal-vault-id");
Email = node.GetString("email");
FundingSourceDescription = node.GetString("funding-source-description");
ImageUrl = node.GetString("image-url");
Expand Down
4 changes: 2 additions & 2 deletions src/Braintree/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("5.26.0.0")]
[assembly: AssemblyFileVersion("5.26.0.0")]
[assembly: AssemblyVersion("5.27.0.0")]
[assembly: AssemblyFileVersion("5.27.0.0")]
Loading

0 comments on commit a18cba8

Please sign in to comment.