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

balanced_customer_href is corrupted #2085

Closed
chadwhitacre opened this issue Feb 27, 2014 · 30 comments
Closed

balanced_customer_href is corrupted #2085

chadwhitacre opened this issue Feb 27, 2014 · 30 comments

Comments

@chadwhitacre
Copy link
Contributor

https://www.gittip.com/autogato/ has a bad link to Balanced.
https://www.gittip.com/matt-lowe/ has a good link (so the problem isn't universal).

Discovered during #2084. Is this a regression from #1369? Or from #2056? Or ... ?

If the balanced_customer_href is bad then we're going to have API failures during payday. And that's bad. Three stars!

@chadwhitacre
Copy link
Contributor Author

This is a regression from #2036. Not only did the name of the field change, the format of the value changed as well. Old:

/v1/marketplaces/MARKETPLACE_ID/accounts/ACCOUNT_ID

New:

/customers/CUSTOMER_ID

@chadwhitacre
Copy link
Contributor Author

Here's how we compute the URL to show on the profile page:

https://dashboard.balancedpayments.com/#/{{ participant.balanced_customer_href[4:] }}

@chadwhitacre
Copy link
Contributor Author

URLs like this:

https://dashboard.balancedpayments.com/#/v1/marketplaces/MARKETPLACE_ID/accounts/ACCOUNT_ID

now redirect to URLs like:

https://dashboard.balancedpayments.com/#/v1/marketplaces/MARKETPLACE_ID/customers/CUSTOMER_ID

@chadwhitacre
Copy link
Contributor Author

URLs like this:

https://dashboard.balancedpayments.com/#/customer/CUSTOMER_ID

redirect to:

https://dashboard.balancedpayments.com/#/marketplaces

with an error message, "Invalid URL specified, please check the URL.":

screen shot 2014-02-27 at 10 14 30 am

@chadwhitacre
Copy link
Contributor Author

cc: @matthewfl

@chadwhitacre
Copy link
Contributor Author

We have a BalancedThing class, but we don't use that during payday. Instead, we call balanced.Customer.fetch directly. Given that payday didn't completely fail last week, I surmise that fetch can take either form, the old account_uri and the new customer_href forms. So ... we should be good for payday (#2084) and this is just a cosmetic bug. Demoting to ★★☆ and proceeding with #2084.

@chadwhitacre
Copy link
Contributor Author

Old ACCOUNT_IDs count for new CUSTOMER_IDs, so we should be able to fix this by modifying the values in balanced_customer_href. We'd also need to start storing MARKETPLACE_ID somewhere else, probably in an envvar. And then we'd need to update the link itself.

@matthewfl
Copy link
Contributor

@whit537 you are correct that the fetch method can take the old (/v1/marketplace/MPadsf/account/asdf) url or the new (/customers/asdf) href. However, the api will always return the link on the object using the new href.
If you want, you could upgrade the href in the database by having a script preform a get request against the balanced api and the saving the new href.

for the dashboard links I am not 100 sure what needs to happen to make that work, I suppose you could prefix that with /marketplace/mpasdf/ to make it work.

Hopefully this answers any questions you have about corrupt hrefs, otherwise I am not sure what you mean

@chadwhitacre
Copy link
Contributor Author

MARKETPLACE_ID is already stored somewhere under balanced. Grep around.

@seanlinsley
Copy link
Contributor

Looks like @cczona is being bit by this: https://twitter.com/cczona/status/478714841209651201

@cczona
Copy link

cczona commented Jun 20, 2014

Any news on this? I've got a backlog of several weeks tips that weren't transferred. If possible, I'd like to get those transferred tomorrow with this week's scheduled one.

@cczona
Copy link

cczona commented Jun 25, 2014

Ping. Both of my accounts (cczona & callbackwomen) still have not made any external transfers since May 15th. The former has its banking info intact, so I'm not sure why it's not transferring. The latter's banking info was restored a week ago, prior to the scheduled transfer date, but the transfer again didn't happen.

@clone1018
Copy link
Contributor

@cczona Just so you know, banking information is on the "Account" tab not the "Profile" tab.

Context: https://twitter.com/cczona/status/478714841209651201

@clone1018
Copy link
Contributor

Oh I see @duckinator said that already, nevermind.

@chadwhitacre
Copy link
Contributor Author

@cczona Sorry this has languished. Let's figure this out ...

@chadwhitacre
Copy link
Contributor Author

First step is to understand whether @cczona is indeed getting bitten by this issue, or something else.

@chadwhitacre
Copy link
Contributor Author

(If something else, let's move to a different ticket.)

@cczona
Copy link

cczona commented Jun 25, 2014

Sure thing. What do you need from me?

@chadwhitacre
Copy link
Contributor Author

@cczona I'm reloading this ticket into my brain. The link from your Gittip profile to your account page in the Balanced dashboard does exhibit the behavior reported above, so it sounds like we're in the right place.

It's possible that we may need to repair your balance in Gittip if we thought we were making deposits when we weren't, need to answer that.

Also need to understand what the root issue is and how to fix it, and whether we should fix the root cause here or take care of your situation as a one-off ...

@chadwhitacre
Copy link
Contributor Author

Your balanced_customer_href does not match the format above, even though it still gives the "Invalid URL" message. So still maybe a different issue ... ?

@cczona
Copy link

cczona commented Jun 25, 2014

Do I have control over balanced_customer_href?

@chadwhitacre
Copy link
Contributor Author

@cczona Kinda maybe probably? Researching ...

@chadwhitacre
Copy link
Contributor Author

I've found @cczona's account by searching the Balanced dashboard. There is no bank account on file there right now. So there's two issues here:

  • The link between @cczona's Gittip and Balanced accounts is broken.
  • There is no longer a bank account on file at Balanced.

@chadwhitacre
Copy link
Contributor Author

@cczona Probably the quickest way out of this for you would be to re-enter your bank account details on Gittip (have you tried that yet?). Then we can either do a manual payout right now or just let it run tomorrow.

That way you aren't blocking while we resolve whatever the root causes are here.

@chadwhitacre
Copy link
Contributor Author

@cczona Though we do need to ensure that we haven't corrupted your Gittip balance before we do the payout.

@chadwhitacre
Copy link
Contributor Author

There is no bank account on file there right now.

But I do see many successful payouts up through May.

@chadwhitacre
Copy link
Contributor Author

#1811 is the issue for balance corruption due to not properly handling failed bank payouts.

@chadwhitacre
Copy link
Contributor Author

Picking up w/ @cczona's case over on #1811 ...

@Changaco
Copy link
Contributor

Changaco commented Sep 4, 2014

Tagging as "Ready to Start", we have 2953 users affected by this (select count(*) from participants where balanced_customer_href not like '/customers/%';).

@Changaco
Copy link
Contributor

Done in #3286.

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

Successfully merging a pull request may close this issue.

7 participants