简体   繁体   中英

AuthorizationError on 'submit_for_settlement'=True Braintree python

I am using sandbox account credentials where my user has all the permissions still when I create a transaction it gives me AuthorizationError

Here is my code.

self.braintree_client.transaction.sale(
                {
                    "amount": charge["amount"],
                    "payment_method_token": "token_stored",
                    "merchant_account_id": merchant_id,
                    "options": {
                        "submit_for_settlement": True,
                    },
                }
            )

Everything works fine If I remove the submit_for_settlement but I want to settle the payment.

Does anyone have anyone have any idea what I am doing wrong here?

Any help would be appreciated.

Double check that your user has the Right to submit sales for settlement. Without this permission added to your User's Role, you'll get an authorization error.

More on managing user roles and permissions here

If you have any further questions or continue to encounter this error, contact Support .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM