Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

migrate data from Stripe to Balanced #174

Closed
chadwhitacre opened this issue Jul 21, 2012 · 18 comments
Closed

migrate data from Stripe to Balanced #174

chadwhitacre opened this issue Jul 21, 2012 · 18 comments

Comments

@chadwhitacre
Copy link
Contributor

I've kicked this off in email. Target is Thursday, July 26. Once the data is migrated I will need balanced_account_uris to put in Gittip's db. I can probably get these through the Balanced web UI or API?

@mjallday
Copy link
Contributor

mjallday commented Aug 3, 2012

I've tokenized the cards for Gittip.

I have a mapping of stripe ids to cards that have been tokenized but not associated to accounts.

We'll (I can do this but you'll need to run it since I don't have your prod DB) need to create a script to run through the list and create an account (or GET it if it exists) and then PUT the card onto the account. After that's done we need to update the account within the gittip DB.

I want to encrypt this so I can send it to you. Can you give me a pub key so I can encrypt it for you?

@chadwhitacre
Copy link
Contributor Author

ssh-dss AAAAB3NzaC1kc3MAAACBANLbWI9Lb8bYLwrivpJxDgLn43WRc5AyLfXrb6PePpBSmhs7EeB4RY1IQQiK4OWDm1Yj79OT/Hojf5lYgYi/LnLIjfo9epq2GAtAmDjxvl5WI2b3RNpFygmYBltqWlTJjUwixkXub99cgmAgypMqvyIERXmXX8a1EtmxZMtnMcp/AAAAFQC+3rRI2hXzM9PbUxZ1GBZLmuaGCQAAAIBmroAyfCYxGewWtAeUw+uKHPnK9Him/Z5MXQwksmsyIe5OL648sIbTKFRVl3Cmsxj2Gps9RYX3jcKQjq856PpqtQgi27g6WeodgIM2iGhokBa3uTTYfZyRPb4hhwL98BQlfQCvr12X6xTWOn87IZWrI2/LPQfd8qjCXfakaEF+yAAAAIBac1IMdj+vgaHXhvPwyQgPH3KkbcKb7xKrZVHXaYasZb3YgHtMnCbfdpbxh01KLrhFcdYAWwoPRwCD0Z1mx8NEowAiaNRw+585YFIosPtDXEgccSnYDQOd6BnN6PQXc/otjzUuak6boMyij0RqXYYEIFFESSy2p3N7HkbL20maLw== [email protected]

@mjallday
Copy link
Contributor

mjallday commented Aug 3, 2012

Wrong format for the pub key, run this command (substitute path to private key as needed)

openssl rsa -in ~/.ssh/id_rsa -out whit537.pub -outform PEM -pubout

Let me know if I'm being a n00b and can use the key you've given me in some other way.

@chadwhitacre
Copy link
Contributor Author

Nope, I'm the n00b. 🐭

Maybe this?


-----BEGIN PUBLIC KEY-----
MIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEAnC+Ube3sM2InJj8m1JFS
LSrIynU3cli35xwx20WlSR0eTu6TYEsg/D8cPVrvwT+/Gwr4xnRg/nkgB6aaISu0
DVqPmYr4ZHgGdmcrCSAf8Vw0AKPlydArH5vdREJOYT9B9g7St5L/u7a4SwBB0ew3
6Orinc/VobB3oDx8MNiCic7mWomeHSNKVy/EZx7zl0yUTSxFcr5YVptwfb0zJOlI
jtrWtg+ohMiz93Mtujqy+QGQWfxOs5g/xUro1sHvyfoRNqUThVChFLUHCLlOhFOz
G1vX703ALQf/vYzzopkIu7MbYMpS3tnfL+pw3cxwkrdRyZgONZznJrCU4p2H/WaD
rQIBIw==
-----END PUBLIC KEY-----

@mjallday
Copy link
Contributor

mjallday commented Aug 3, 2012

Thanks, I shot the files + instructions through to your email.

@chadwhitacre
Copy link
Contributor Author

I'm going to be on vacation this week. I'll be back on Friday, August 10 to run Gittip #10, and will pick up with development the week following. In an emergency please call my cell, +1-412-925-4220. Thanks!

@chadwhitacre
Copy link
Contributor Author

I have a mapping for this. Punting to next week as I spent my time this AM on #203.

@chadwhitacre
Copy link
Contributor Author

Here are some characteristics of the mapping:

  • 117 entries
  • 5 have no value for balanced_card_uri
  • 4 have billing failures
    • 2 of these have no balanced_card_uri
    • 2 of these do have a balanced_card_uri
  • One of the billing failures is the string "None," which is worrisome

Tasks:

  • investigate the "no value" cases
  • investigate the None last_bill_result
  • decide how to handle billing_failures

@chadwhitacre
Copy link
Contributor Author

The None last_bill_result is indeed a NULL result from the db. The user has entered credit card info but is not tipping anyone. Working as advertised. :-)

@chadwhitacre
Copy link
Contributor Author

Of the 5 with no value for balanced_card_uri:

  • 2 have billing failures
    • 1 has only billing failures-4 of them
    • 1 has 2 early billing successes followed by 3 billing failures
  • 2 have only successful payments
  • 1 has no payment attempts

I don't see a rhyme or reason why these five are missing from the mapping. In two cases we'd be leaving money on the table to not have a balanced_card_uri for them.

Will take to private email to debug ...

@chadwhitacre
Copy link
Contributor Author

For billing failures we need to still bring over the new card info into Balanced.

However, note that if the user already has a balanced_account_uri we don't want to overwrite that, as it means they have already manually reentered their credit card data with Balanced.

@mjallday
Copy link
Contributor

All these cards are syntacticly valid (card numbers OK pass LUHN check, expiry in the future).

The two that have billing failures, these cards aren't valid so I don't see why you'd bring them over. Balanced doesn't support tokenizing declined cards so you'll have to give me a really good reason to do that ;)

For the other three, it's not Balanced declining the cards, it's the card processor.

@chadwhitacre
Copy link
Contributor Author

I've created balanced.Accounts for each of the card_uris and have stored these in the db for the 112 out of 117 records (96%) where we had a card_uri.

For the other three, it's not Balanced declining the cards, it's the card processor.

Why is the card processor declining the cards, especially for the two that worked last week?

@chadwhitacre
Copy link
Contributor Author

Here's the script I used for the migration:

https://gist.github.com/3370171

@mjallday
Copy link
Contributor

Hey Chad,

Can you email me which github users were working last week and are not working this week? I'll check the exact reason on those.

On 16/08/2012, at 6:33, Chad Whitacre [email protected] wrote:

I've created balanced.Accounts for each of the card_uris and have stored these in the db for the 112 out of 117 records (96%) where we had a card_uri.

For the other three, it's not Balanced declining the cards, it's the card processor.

Why is the card processor declining the cards, especially for the two that worked last week?


Reply to this email directly or view it on GitHub.

@chadwhitacre
Copy link
Contributor Author

Done.

@chadwhitacre
Copy link
Contributor Author

If nothing else happens the worst case scenario at this point is that those five continue to be run on Stripe, and if the three supposedly-working cards (including the never-billed one) fail the next time we bill them with Stripe then we'll know something happened since last time, and we can just abandon all five.

@chadwhitacre
Copy link
Contributor Author

I've reticketed monitoring the straggling five as #238.

Woo-hoo!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants