Transaction.Sale AuthorizationException
See original GitHub issueGeneral information
- SDK/Library version: 4.5.0
- Environment: Sandbox
- Language, language version, and OS: C# .NET 4.5.2 on Windows 10
Issue description
I’m trying to do a Transaction.Sale to create a new customer with a new payment method but keep getting an authorization exception when I try and pass in the Customer object field.
var gatewayRequest = new TransactionRequest
{
Amount = 9.99m,
MerchantAccountId = "merchantId",
PaymentMethodNonce = "fake-valid-nonce",
Options = new TransactionOptionsRequest
{
StoreInVault = true,
SubmitForSettlement = false
},
Customer = new CustomerRequest
{
FirstName = "Joe",
LastName = "Example"
Email = "joe@example.com"
}
};
The call works providing I don’t pass the Customer object.
var gatewayRequest = new TransactionRequest
{
Amount = 9.99m,
MerchantAccountId = "merchantId",
PaymentMethodNonce = "fake-valid-nonce",
Options = new TransactionOptionsRequest
{
StoreInVault = true,
SubmitForSettlement = false
}
};
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
AuthorizationException while sending a payment request ...
Options.StoreInVault = true; var result = _gateway.Transaction.Sale(request);. What I'm missing?
Read more >Braintree: Payment Failed Authorization Exception
Raised when your Braintree API keys used to setup your payment gateway integration are incorrect. Common Causes For This Error. Entering incorrect values...
Read more >REST Error Codes
Sales and use tax determination and exemption certificate management ... 31, AuthorizationException, Your account is not authorized to call this API.
Read more >Exceptions | .NET - Braintree Developer Documentation
AuthorizationException. Raised when the API key that you're using is not authorized to perform the attempted action according to the role assigned to...
Read more >user 'xx##' is not authorized to take action 'inquire' on targets ...
What do I do if I receive the error message, "AuthorizationException: user 'xx##' is ... just close the Incident Report page, and continue...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi,
I figured it out.
A mapping I had setup from a custom model was defaulting the CustomFields dictionary to an empty dictionary.
Thanks for your help with this.
Hi,
I’d implemented my own model sorry, this was badly pasted. I’ve corrected it now.
I’ve also contacted Braintree support, as I thought the error was a permission issue and they’ve said it’s because of the CustomFields field within the Customer object.
They say this is the error from their logs