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/noel-adapptor/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.Contextas the first parameter to call functions that make an outgoing remote call.
IMPROVEMENTS:
- Add
go test-logflag that logs requests and responses to stderr.
BUG FIXES:
- Responses not GZIP encoded were still attempted to be GZIP decoded.
BACKWARDS INCOMPATIBILITES:
- Change
VerifyCardonCreditCardOptionsandPaymentMethodRequestOptionsfromboolto*bool.
BUG FIXES:
- Setting
falsefor theVerifyCardfield onCreditCardOptionsandPaymentMethodRequestOptionsdid not send a value to Braintree and would not turn off verification if verification was enabled account wide.
IMPROVEMENTS:
- Add support for transaction cloning:
Clonefunction added to transaction gateway.TransactionCloneRequestadded.TransactionCloneOptionsadded.
- Add support for escrow:
EscrowStatusadded toTransaction.HoldInEscrowadded toTransactionOptions.CancelReleasefunction added to transaction gateway.ReleaseFromEscrowfunction added to transaction gateway.HoldInEscrowfunction added to transaction gateway.
Channeladded 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:
TransactionOptionsPaypalRequestadded toTransactionOptions.TaxAmountadded toTransactionandTransactionRequest.TaxExemptadded toTransactionandTransactionRequest.
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
VenmoAccounts. - Add support for
AndroidPayCards. - Add support for
ApplePayCards. - Added a default timeout of 60s to all connections.
PaymentMethodNonceadded toCustomer.TransactionStatusconstants added.
BUG FIXES:
- Numerous test and CI reliability improvements to reduce flakiness of integration tests.
BACKWARDS INCOMPATIBILITES:
TransactionGatewayCreatenow takes aTransactionRequest. Fields were removed fromTransactionthat are not included in the response.
IMPROVEMENTS:
CurrencyISOCodeadded toTransaction.GatewayRejectionReasonadded toTransaction.CVVResponseCodeadded toTransaction.AVSErrorResponseCode,AVSPostalCodeResponseCodeandAVSStreetAddressResponseCodeadded toTransaction.SubscriptionIdadded toTransaction.RiskDataRequestadded and can be set onTransactionRequestwhen callingTransactionGatewayCreate.WebhookNotificationGatewaynow supports validating signatures on webhook payloads for accounts that have multiple API Keys.ParseRequestadded toWebhookNotificationGateway.WebhookTestingGatewayadded for generating sample webhook notifications.
BACKWARDS INCOMPATIBILITES:
Environment,MerchantIdwerPublicKey,PrivateKeywere removed from theBraintreestruct.SubscriptionDiscountswas changed from an[]interface{}to a concrete type.SubscriptionRequestreplacedSubscriptionas the parameter when creating subscriptions.
DEPRECATED:
TransactionGatewaySettlefunction was marked as deprecated and theTestingGatewaySettlefunction should be used instead.
IMPROVEMENTS:
NewWithAccessTokenadded to allow initialization with an access token instead of an API key.NewWithHttpClientwas added.PaymentMethodGatewayUpdate,Find, andDeletewere added, and support for non-credit-card payment methods were supported.PaymentMethodwas added as an interface across all payment methods.CustomerDefaultPaymentMethodwas added.TransactionPayPalDetailswas added.PayPalAccountandPayPalAccountGatewaywere added.TransactionDeviceDatawas added.TransactionRefundedTransactionIdandRefundIdswere added.CustomFieldswere added toTransactionandCustomer.TransactionandSubscriptionDescriptorwas added to support setting dynamic descriptors.TransactionRiskDatain responses was added.TransactionPaymentInstrumentTypewas added.Subscriptionmodifications forAddOns andDiscountswere added as concrete objects.PlanAddOnsandDiscountswere added.SettlementGatewayandSettlementwere added.SearchQueryAddTimeFieldwas added to support querying on time/date ranges.Transactionwas added and is accessible onBraintreeError.APIErroris now returned for 404 responses to allow developers to get the status code and check for a 404.TestingGatewayadded with functions for changing the status of transactions in sandbox tosettle,settlement_confirm,settlement_decline, andsettlement_pendingto aid with integration tests.Environmentwas changed fromstringtostructthat can be constructed with a custom base URL.
BUG FIXES:
TransactionProcessorResponseCodewill now be zero if no processor response code is returned from the Braintree API.Decimalnow marshals correctly if they are under $1.00.Decimalmarshal 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, andDisbursementDetailschanged to betime.Timeordate.Datetypes to make their use simpler (rather than forcing the user to deserialize) - Additional currency fields migrated from
float64toDecimalto 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.ClientTokenwas renamed toClientTokenRequestClientTokenAPI changed to allow generation of client tokens with or without an associated customer.NewClientTokenRequestwas removed.
IMPROVEMENTS:
CustomerGateway.Searchadded to permit advanced searching for customers by metadataBraintreeErrortype was exposed to make it easier to inspect whether the errors returned by the library are network on Braintree Gatway errorsClientTokenGateway.GenerateWithCustomeradded to generate a customer specific client token
BACKWARDS INCOMPATIBILITES:
- Webhook constants made more uniform via
Webhooksuffix - All currency amounts changed from
floattoDecimalto remove loss of precision
IMPROVEMENTS:
- Specification of a custom
http.Clientto use viaBraintree.HttpClient. This enablesAppEnginesupport which required a being able to use a customhttp.Client. DisbursementDetailsadded toTransaction- Support for querying disbursement webhooks added via
WebhookNotification.Disbursement TransactionGateway.Settleadded to automatically settle transactions in sandbox (SubmitForSettlementshould be used in production)PaymentMethodNonceadded toCreditCardPaymentMethodNonceadded toTransactionDecimalarbitrary precision numeric type added to be used for currency amountsClientTokensupport added viaClientTokenGatewayto generate new client tokens
BUG FIXES:
- Typo in path for merchant account updates (
MerchantAccountGateway.Update) was fixed.
BACKWARDS INCOMPATIBILITES:
InvalidResponseErrorwas unexported to encourage use of the newBraintreeErrortypeCreditCard.Defaultchanged from string to boolCreditCard.Expiredchanged from string to bool
IMPROVEMENTS:
CustomerGateway.Updateadded to update metadata about the customerCustomerGateway.Deleteadded to allow customers to be deletedCustomer.DefaultCreditCardadded to return the default credit card associated with the customerBraintreeErrortype added to expose metadata about gateway errors in a structured mannerTransactionGateway.SubmitForSettlementadded to allow transactions to be submitted to be settledTransactionGateway.Voidadded to allow transactions to be voided- Additional fields added to
Plan(all exceptAddonsandDiscounts) - Additional fields added to
Subscription(all exceptAddonsandDescriptor) Subscription.Updateadded to allow subscription data to be updated- Remaining fields added to
CreditCardandCreditCardOptions CreditCardGateway.Updateadded to update credit card informationCreditCardGateway.Deleteadded to allow credit cards to be deletedCreditCard.AllSubscriptionsadded to allow subscriptions for a credit card to be queriedPlanGateway.Findadded to lookup plan by idSubscriptionStatus*constants were added to make comparisons easierTransactionGateway.Searchadded to permit searching for transactions by metadataCreatedAt,UpdatedAt,PlanIdadded toTransactionParseDateadded to facilitate parsing the date format returned by Braintree- Adedd
AddOnsupport viaAddOnGateway - Adedd
Discountsupport viaDiscountGateway - Adedd
MerchantAccountsupport viaMerchantAccountGatewayfor submerchant support. Includes addition ofServiceFeeAmounttoTransaction
BUG FIXES:
AddressGateway.Createnow copies address for sanitization to avoid modifying passed struct- Errors during failed HTTP requests no longer cause a nil pointer dereference
(when a
nilbody wasClosed)
BACKWARDS INCOMPATIBILITES:
- Large scale refactoring from
0.5.0
IMPROVEMENTS:
- Start of
SubscriptionandPlansupport AddressCreateandDeletesupport added viaAddressGatewayExpirationMonthandExpirationYearadded toCreditCard
Initial release