-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
https://developers.braintreepayments.com/javascript+python/guides/credit-cards#options Looks like Braintree only requires the |
Initially, I was thinking of linking braintree's customer ID directly to the participant's ID in our database. Later decided against it, coz (a) We don't yet know if it'll be possible to map the custom ID when we migrate cards from Balanced to Braintree (b) We'll end up adding a DB column like `has_braintree_account` anyway for caching purposes, it's a lot easier to just reuse the logic that we had with balanced (especially in the tests)
Per #3387 (comment), let's limit the scope of this PR to vaulting new cards on Braintree instead of Balanced. We want to deploy that ASAP, don't want to block it on |
This is used in many of the tests, and the settings page.
Per #3387 (comment) let's please double-vault to avoid a race condition unless we can think it through again from the top to ensure there isn't one. |
And !m @rohitpaulk. Happy to be rustlin' dogies with you, friend. :-) |
!m @whit537 :) |
@whit537 - I haven't gotten to the Braintree tests, but this is ready for you to look at and start testing manually. |
Awesome, thank you. |
Changes were made to BillingHarness, so we have to regenerate pretty much everything
Brought back the tests marked as xfail, deleted the migration page, reverted changes to credit card and bank account pages
In terms of timing on this, I think we should wait to deploy until the old cards are migrated to Braintree. Sound right, @rohitpaulk? |
Nope, this is ready to deploy now - it's backwards compatible with balanced cards. |
Took a first read through the code. What happens if someone fills out the credit card form after Balanced initiates the export but before Braintree completes it? |
If they're filling out the cc form - the new details will be sent to Braintree and if there was an old card(Braintree or Balanced), it'll be deleted. |
And then what happens when Braintree imports the old details, which will be included in the snapshot that Balanced took before the user posted the cc form? |
Once braintree is done importing, we'll only use the accounts for those who have not updated their card details, and delete the others. |
Interesting. I guess I need to run this code and look at the sandbox to understand how that's possible. I guess when we start saving cards now we'll be generating new Braintree customer ids, right? I guess Braintree will create a second customer record for those customers when it does the import. Presumably Balanced sent along some info that will show up in the customer records at Braintree that will allow us to connect them with participants in our database, and we can deduplicate based on that. Is that it? |
Two more points:
|
Vault new cards at Braintree
Steps to reproduce: visit https://gratipay.com/about/me/routes/credit-card.html. |
P.S. Does Braintree vault for us automatically or do we have to explicitly ask for cards to be stored permanently? |
Yes.
I'm assuming that we'll be provided with a mapping between |
As long as people can close their accounts (and use their bank account as the disbursement strategy), isn't that hole always open?
Hmm, we didn't do that for Balanced. I think it'd be best to wait for someone to ask.
Automatically 💃 |
Balanced did sandboxing differently. But yeah we can wait.
Yeah, but it's wider if people can connect new accounts.
Cool. |
#3377, #3287