braintree / braintree_dotnet

Braintree .NET library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
136 stars 73 forks source link

“Braintree.Exceptions.AuthorizationException" error on using SubmitForSettlement(ccRequest.TransactionNumber,btTransactionRequest) #104

Closed SarjuPatel closed 4 years ago

SarjuPatel commented 4 years ago

General information

Issue description

“Braintree.Exceptions.AuthorizationException" error on using SubmitForSettlement(ccRequest.TransactionNumber, btTransactionRequest)

Other options listed below for Settlement method works fine:

scannillo commented 4 years ago

Hello. The arguments to Transaction.SubmitForSettlement are the required transactionId and optional amount. See our docs here.

However - an AuthorizationException is a misleading type of Exception to return in this scenario. I will have our team look into this.

If you've found an issue/bug with our SDK, please report it here. For help troubleshooting your specific integration please read our developer docs and then reach out to help.braintreepayments.com if additional help is needed.

scannillo commented 4 years ago

For some more context, see our docs on the AuthorizationException. The use case also does indeed apply to passing invalid parameters.

This error can also occur if the data you submitted was malformed – either a parameter isn't in the allowed list, or it is at the wrong location in the nested parameters.

SarjuPatel commented 4 years ago

We need to submit Level 2 and 3 information and hence we are following an example in the documentation. Documentation does mention about using TransactionRequest to submit Level 2 and 3 information.

Result result = gateway.Transaction.SubmitForSettlement("the_transaction_id", submitForSettlementRequest);

scannillo commented 4 years ago

I see. Thank you for further clarifying your use case.

You probably have invalid parameters on your TransactionRequest or your merchant account is not properly enabled for Level 2 & 3 processing. In either case, your best bet is to reach out to Braintree Support at www.help.braintreepayments.com so they can troubleshoot your specific integration.

SarjuPatel commented 4 years ago

Braintree support team and account managers think this is an issue with code. Account and Sandbox both should support this feature. Hence they directed me to add issue here.

scannillo commented 4 years ago

Our Support team will direct issues they find in our code base directly to our team internally. Are you sure you went through the online form to submit a request? You can also call at 877.434.2894.