IMPROVEMENTS:
- Add TransactionRefundRequest.
- Add RefundWithRequest, with OrderID, to TransactionGateway.
- Add ProductID to CreditCard.
- Add AuthorizationExpiresAt to Transaction.
- Add ProcessorResponseType to Transaction.
- Add GenerateWithRequest to ClientTokenGateway.
INTERNAL:
- Minor test improvements.
BACKWARDS INCOMPATIBILITES:
- Move package from github.com/lionelbarrow/braintree-go to github.com/BoltApp/braintree-go.
IMPROVEMENTS:
- Add go.mod and go.sum for support of Go1.11 modules.
- Add BIN to ApplePayCard.
- Add BIN to ApplePayDetails.
- Add AccountUpdaterDailyReport webhook subject.
BACKWARDS INCOMPATIBILITES:
- Add subscription ID parameter to SubscriptionGateway Update. See #243.
DEPRECATED:
- TransactionGateway Search and SearchNext functions are deprecated, use SearchIDs and SearchPage instead.
- SubscriptionGateway Search and SearchNext functions are deprecated, use SearchIDs and SearchPage instead.
- CustomerGateway Search function is deprecated, use SearchIDs and SearchPage instead.
IMPROVEMENTS:
- Add CreatedAt, UpdatedAt to Subscription.
- Add StoreInVaultOnSuccess to TransactionOptions.
- Add PaymentInstrumentType constants to Transaction.
- Add SearchPage to TransactionGateway, deprecating Search and SearchNext.
- Add SearchPage to SubscriptionGateway, deprecating Search and SearchNext.
- Add ExpiringBetweenIDs, ExpiringBetweenPage to CreditCardGateway.
- Add SearchIDs, SearchPage to CustomerGateway.
- Add PaymentMethodNonce, PaymentMethodNonceDetails, PaymentMethodNonceGateway.
- Add 3DS support:
- Add ThreeDSecure to TransactionOptions.
- Add ThreeDSecureInfo to Transaction.
BACKWARDS INCOMPATIBILITES:
- Rewrite error handling and interfaces. See #222 for details.
IMPROVEMENTS:
- Add TransactionLineItemGateway, TransactionLineItem, TransactionLineItemRequest, and add LineItems to TransactionRequest.
- Add DisputeGateway, Dispute, DisputeEvidence, DisputeTextEvidenceRequest, related types, and add Disputes to Transaction.
- Add support for validation errors on all fields. See #222 for details.
- Add RetryCharge to SubscriptionGateway.
- Add TransactionSource to TransactionRequest.
- Add CurrentBillingCycle to Modification.
- Add SubscriptionDetails to Transaction.
- Add StatusEvents to Subscription.
- Add SearchIDs, Search, and SearchNext to SubscriptionGateway.
- Add CreatedAt and UpdatedAt to Customer.
- Add comments to some exported functions, constants, and types.
INTERNAL:
- Fix VenmoSDK tests.
- Fix errcheck checks.
- Other minor test fixes.
BACKWARDS INCOMPATIBILITES:
- Require TLS 1.2 on outgoing connections.
- Replace Address with AddressRequest for creating Addresses.
- Replace Customer with CustomerRequest for creating and updating Customers.
IMPROVEMENTS:
- Add SearchIDs to TransactionGateway.
- Add SearchNext to TransactionGateway.
- Add SkipAdvancedFraudChecking to TransactionOptions.
- Add Update to AddressGateway.
- Add Addresses to Customer.
IMPROVEMENTS:
- Add NumerOfBillingCycles to Modifications.
- Add PurchaseOrderNumber to Transaction and TransactionRequest.
INTERNAL:
- Remove omitempty from structs only used for deserialization.
- Add build tags for unit and integration tests.
- Add analysis detailed warning messages.
- Remove slow unit tests.
BACKWARDS INCOMPATIBILITES:
- Support for Go1.6 has been dropped. Support from this version onwards is Go1.7+.
- Add
context.Context
as the first parameter to call functions that make an outgoing remote call.
IMPROVEMENTS:
- Add
go test
-log
flag that logs requests and responses to stderr.
BUG FIXES:
- Responses not GZIP encoded were still attempted to be GZIP decoded.
BACKWARDS INCOMPATIBILITES:
- Change
VerifyCard
onCreditCardOptions
andPaymentMethodRequestOptions
frombool
to*bool
.
BUG FIXES:
- Setting
false
for theVerifyCard
field onCreditCardOptions
andPaymentMethodRequestOptions
did not send a value to Braintree and would not turn off verification if verification was enabled account wide.
IMPROVEMENTS:
- Add support for transaction cloning:
Clone
function added to transaction gateway.TransactionCloneRequest
added.TransactionCloneOptions
added.
- Add support for escrow:
EscrowStatus
added toTransaction
.HoldInEscrow
added toTransactionOptions
.CancelRelease
function added to transaction gateway.ReleaseFromEscrow
function added to transaction gateway.HoldInEscrow
function added to transaction gateway.
Channel
added toTransaction
,TransactionRequest
, andTransactionCloneRequest
.
BUG FIXES:
- Test and CI reliability improvements to reduce flakiness of integration tests.
BACKWARDS INCOMPATIBILITES:
- Nullable struct types were removed, with *NullBool/*NullInt64 replaced with *bool/*int and bool/int.
IMPROVEMENTS:
TransactionOptionsPaypalRequest
added toTransactionOptions
.TaxAmount
added toTransaction
andTransactionRequest
.TaxExempt
added toTransaction
andTransactionRequest
.
BUG FIXES:
- Minor example typo fix.
BACKWARDS INCOMPATIBILITES:
- Support for Go1.2-1.5 has been dropped. Support from this version onwards is Go1.6+.
IMPROVEMENTS:
- API endpoints updated to use the
api.
prefix:sandbox.braintreepayments.com
=>api.sandbox.braintreegateway.com
,www.braintreegateway.com
=>api.braintreegateway.com
. - Add support for
VenmoAccount
s. - Add support for
AndroidPayCard
s. - Add support for
ApplePayCard
s. - Added a default timeout of 60s to all connections.
PaymentMethodNonce
added toCustomer
.Transaction
Status
constants added.
BUG FIXES:
- Numerous test and CI reliability improvements to reduce flakiness of integration tests.
BACKWARDS INCOMPATIBILITES:
TransactionGateway
Create
now takes aTransactionRequest
. Fields were removed fromTransaction
that are not included in the response.
IMPROVEMENTS:
CurrencyISOCode
added toTransaction
.GatewayRejectionReason
added toTransaction
.CVVResponseCode
added toTransaction
.AVSErrorResponseCode
,AVSPostalCodeResponseCode
andAVSStreetAddressResponseCode
added toTransaction
.SubscriptionId
added toTransaction
.RiskDataRequest
added and can be set onTransactionRequest
when callingTransactionGateway
Create
.WebhookNotificationGateway
now supports validating signatures on webhook payloads for accounts that have multiple API Keys.ParseRequest
added toWebhookNotificationGateway
.WebhookTestingGateway
added for generating sample webhook notifications.
BACKWARDS INCOMPATIBILITES:
Environment
,MerchantId
werPublicKey
,PrivateKey
were removed from theBraintree
struct.Subscription
Discounts
was changed from an[]interface{}
to a concrete type.SubscriptionRequest
replacedSubscription
as the parameter when creating subscriptions.
DEPRECATED:
TransactionGateway
Settle
function was marked as deprecated and theTestingGateway
Settle
function should be used instead.
IMPROVEMENTS:
NewWithAccessToken
added to allow initialization with an access token instead of an API key.NewWithHttpClient
was added.PaymentMethodGateway
Update
,Find
, andDelete
were added, and support for non-credit-card payment methods were supported.PaymentMethod
was added as an interface across all payment methods.Customer
DefaultPaymentMethod
was added.Transaction
PayPalDetails
was added.PayPalAccount
andPayPalAccountGateway
were added.Transaction
DeviceData
was added.Transaction
RefundedTransactionId
andRefundIds
were added.CustomFields
were added toTransaction
andCustomer
.Transaction
andSubscription
Descriptor
was added to support setting dynamic descriptors.Transaction
RiskData
in responses was added.Transaction
PaymentInstrumentType
was added.Subscription
modifications forAddOn
s andDiscounts
were added as concrete objects.Plan
AddOns
andDiscounts
were added.SettlementGateway
andSettlement
were added.SearchQuery
AddTimeField
was added to support querying on time/date ranges.Transaction
was added and is accessible onBraintreeError
.APIError
is now returned for 404 responses to allow developers to get the status code and check for a 404.TestingGateway
added with functions for changing the status of transactions in sandbox tosettle
,settlement_confirm
,settlement_decline
, andsettlement_pending
to aid with integration tests.Environment
was changed fromstring
tostruct
that can be constructed with a custom base URL.
BUG FIXES:
Transaction
ProcessorResponseCode
will now be zero if no processor response code is returned from the Braintree API.Decimal
now marshals correctly if they are under $1.00.Decimal
marshal and unmarshals correctly if it's value is zero.- Numerous test reliability improvements to reduce flakiness of integration tests.
- Documentation improvements.
BACKWARDS INCOMPATIBILITES:
- Time fields such as
CreatedAt
,UpdatedAt
, andDisbursementDetails
changed to betime.Time
ordate.Date
types to make their use simpler (rather than forcing the user to deserialize) - Additional currency fields migrated from
float64
toDecimal
to avoid precision loss Null(Int64|Bool)
types added to support empty XML elements. Many of the nonstring,string
, fields were updated to be nullable of their actual type.ClientToken
was renamed toClientTokenRequest
ClientToken
API changed to allow generation of client tokens with or without an associated customer.NewClientTokenRequest
was removed.
IMPROVEMENTS:
CustomerGateway.Search
added to permit advanced searching for customers by metadataBraintreeError
type was exposed to make it easier to inspect whether the errors returned by the library are network on Braintree Gatway errorsClientTokenGateway.GenerateWithCustomer
added to generate a customer specific client token
BACKWARDS INCOMPATIBILITES:
- Webhook constants made more uniform via
Webhook
suffix - All currency amounts changed from
float
toDecimal
to remove loss of precision
IMPROVEMENTS:
- Specification of a custom
http.Client
to use viaBraintree.HttpClient
. This enablesAppEngine
support which required a being able to use a customhttp.Client
. DisbursementDetails
added toTransaction
- Support for querying disbursement webhooks added via
WebhookNotification.Disbursement
TransactionGateway.Settle
added to automatically settle transactions in sandbox (SubmitForSettlement
should be used in production)PaymentMethodNonce
added toCreditCard
PaymentMethodNonce
added toTransaction
Decimal
arbitrary precision numeric type added to be used for currency amountsClientToken
support added viaClientTokenGateway
to generate new client tokens
BUG FIXES:
- Typo in path for merchant account updates (
MerchantAccountGateway.Update
) was fixed.
BACKWARDS INCOMPATIBILITES:
InvalidResponseError
was unexported to encourage use of the newBraintreeError
typeCreditCard.Default
changed from string to boolCreditCard.Expired
changed from string to bool
IMPROVEMENTS:
CustomerGateway.Update
added to update metadata about the customerCustomerGateway.Delete
added to allow customers to be deletedCustomer.DefaultCreditCard
added to return the default credit card associated with the customerBraintreeError
type added to expose metadata about gateway errors in a structured mannerTransactionGateway.SubmitForSettlement
added to allow transactions to be submitted to be settledTransactionGateway.Void
added to allow transactions to be voided- Additional fields added to
Plan
(all exceptAddons
andDiscounts
) - Additional fields added to
Subscription
(all exceptAddons
andDescriptor
) Subscription.Update
added to allow subscription data to be updated- Remaining fields added to
CreditCard
andCreditCardOptions
CreditCardGateway.Update
added to update credit card informationCreditCardGateway.Delete
added to allow credit cards to be deletedCreditCard.AllSubscriptions
added to allow subscriptions for a credit card to be queriedPlanGateway.Find
added to lookup plan by idSubscriptionStatus*
constants were added to make comparisons easierTransactionGateway.Search
added to permit searching for transactions by metadataCreatedAt
,UpdatedAt
,PlanId
added toTransaction
ParseDate
added to facilitate parsing the date format returned by Braintree- Adedd
AddOn
support viaAddOnGateway
- Adedd
Discount
support viaDiscountGateway
- Adedd
MerchantAccount
support viaMerchantAccountGateway
for submerchant support. Includes addition ofServiceFeeAmount
toTransaction
BUG FIXES:
AddressGateway.Create
now copies address for sanitization to avoid modifying passed struct- Errors during failed HTTP requests no longer cause a nil pointer dereference
(when a
nil
body wasClose
d)
BACKWARDS INCOMPATIBILITES:
- Large scale refactoring from
0.5.0
IMPROVEMENTS:
- Start of
Subscription
andPlan
support Address
Create
andDelete
support added viaAddressGateway
ExpirationMonth
andExpirationYear
added toCreditCard
Initial release