I tested the Braintree subscription plan with the Braintree sandbox in Bubble. All works great! But…
Now I want to take the application to production and use Braintree production. So I created the same 2 plans I had in the sandbox but now also in Braintree production. Same identical ID and names for both plans.
However, when I change API keys to the PRODUCTION keys in the bubble API area, I get 2 issues. Then I look at the ACTION and the plan dropdown have now changed from the PLAN NAME (previously showing correctly) to the PLAN ID. This happens in the 2 actions I have for the 2 plans I have.
Obviously they show as 2 issues and when I tested (preview) out I get “Error Calling Braintree API: Authentication Error”. I am testing in bubble development with Braintree production keys.
Needless to say this is key to my application and business model. I hope this information helps you hunt down the bug. Or is it something else?
If I add an new subscription payment action in the workflow area, I get an empty dropdown with no plan names. Again, this is only with production keys. If I change the keys back to SANDBOX the plan names appear.
How do you determine if you are looking at production or sandbox? I don’t see where I can select which I am testing. There is a third value setting in the Braintree documentation called “ENVIRONMENT” see below:
Braintree::Configuration.environment = :production
Braintree::Configuration.merchant_id = “YOUR_PRODUCTION_MERCHANT_ID”
Braintree::Configuration.public_key = “YOUR_PRODUCTION_PUBLIC_KEY”
Braintree::Configuration.private_key = “YOUR_PRODUCTION_PRIVATE_KEY”
Without someone specifying that, how would you know which system to look at to populate the dropdown available in the WORKFLOW area?