MozillaFoundation / donate-wagtail

[Legacy] - Wagtail based donation stack
Mozilla Public License 2.0
42 stars 22 forks source link

Braintree Python SDK Update #1723

Closed mtdenton closed 1 year ago

mtdenton commented 1 year ago

It looks like we'll need to update the Braintree Python SDK one last time. From Braintree:

This is a reminder that a new version of the SDK was released on October 14, 2022 with new security enhancements. Please upgrade to the Braintree Python SDK v.4.17.1 as soon as possible. Starting February 28, 2023, older versions of the SDK may no longer be supported. Please disregard if you've already updated your SDK following our initial outreach on January 10 but take action now if you haven’t yet done so. To make this update: If you're currently using v4 of the Python SDK, you need to upgrade the SDK to v4.17.1 or higher. Your integration won't require any other changes. If you're currently using v3 or lower of the Braintree Python SDK, please upgrade to Braintree Python SDK v3.59.1. You also should plan to upgrade to v4.17.1 or higher in the near future. See our migration guide for details on necessary integration changes.

danielfmiranda commented 1 year ago

Hi @cdanfon this has been merged into staging! Though the ask of this ticket was just to update a dependency, so I do not think there is much to test.

Should I move this to the closed lane?

cdanfon commented 1 year ago

@danielfmiranda Sounds good, I've gone ahead and moved it

danielfmiranda commented 1 year ago

Hi @cdanfon my mistake, I think this ticket should be moved to the "Ready for production" lane before "Closed".

I have moved this ticket to ready for production, and will close it after todays prod push!

tbrlpld commented 1 year ago

I would say we should definitely test the critical paths. This is the SDK of our payment processor. So we should make sure donations are working as expected.

tbrlpld commented 1 year ago

Ok, test payments on staging worked $10 and $60, each with visa and paypal.

tbrlpld commented 1 year ago

Looks like this was still not deployed...

tbrlpld commented 1 year ago

Deploying this manually to staging now

tbrlpld commented 1 year ago

Ok, finally on staging.

tbrlpld commented 1 year ago

@danielfmiranda I am having issues with monthly Paypal donations. Tried $5 per month.

tbrlpld commented 1 year ago

A $25 monthly paypal donation worked

tbrlpld commented 1 year ago

Double checked in a different browser. Still issue with $5 monthly paypal. @danielfmiranda can you look into this?

cdanfon commented 1 year ago

We've discussed during daily huddle that this might not be a blocker for the deployment as the bug might have been there before the update. @danielfmiranda to check if this is still happening before v13. If that's the case @danielfmiranda will remove the deployment blocker label and let the team know.

danielfmiranda commented 1 year ago

Hi Everyone, after some further investigation, I can confirm that this error is independent from the SDK update and instead related to the configuration of ENV variables on the donate-staging site.

To confirm this, I have done the following:

However, on my local machine using v.13 or v.18, paypal payments of $5 do not go through when using the same braintree env variables as the donate-staging site. Instead the front end returns Something went wrong. We were unable to process your payment. and we find the following error in the logs: Failed Braintree transaction: PayPal buyer account can't be the same as the seller account.

I have created #1732 to track the work regarding the $5 Paypal Payment bug, but believe that we are OK to push the SDK update to production, I am also removing the "deployment blocker" label.

Thanks!

tbrlpld commented 1 year ago

@danielfmiranda Sorry, but I don't follow the above explanation. It sounds like the upgrade fixes the issue. However during QA I ran into this issue on staging.

I am also not sure which env settings are involved in what. You seem to use three different sets of envars:

Can you clarify which ones are used when? We need to make sure we are not mixing the variations here.

tbrlpld commented 1 year ago

@danielfmiranda Thanks for the update. That looks clearer now.

So the issue is in the envars used on donate-wagtail staging.

danielfmiranda commented 1 year ago

Hi @tbrlpld sorry about the confusion. I updated the comment above to better reflect the issue.

What I meant was that this error occurs on either v.13 or v.18, the breaking change being when the environment variables are set to the same ones as mofo donate-staging.

tbrlpld commented 1 year ago

Ok. I guess this is not as critical then, because actual donations won't use the seller login data to make donations 😅

We should use some other login info for testing though.