Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Error while attempting to retrieve_stripe_customer using a charge ID #332

Closed
lmorchard opened this issue Oct 28, 2019 · 2 comments
Closed
Assignees

Comments

@lmorchard
Copy link

While working to troubleshoot an issue adjacent to zip code validation, I noticed that subhub was logging this error while attempting to fetch customer data:

{"message": "RETRIEVE STRIPE CUSTOMER ERROR", "lineno": 168, "pathname": "/subhub/sub/shared/vendor.py", "levelname": "ERROR", "threadName": "Thread-31", "error": "Request req_fF3sb9JkiNGkbd: No such customer: ch_1FYh1KEOSeHhIAfQY32wfWhV", "logger": "__main__", "timestamp": "2019-10-28T23:26:25.579941Z"}

The ch_ prefix on ch_1FYh1KEOSeHhIAfQY32wfWhV looks like it's a Charge ID and not a Customer ID.

Digging around, I noticed this line in create_update_data in src/sub/payments.py:

intents = vendor.retrieve_stripe_customer(invoice["charge"])

Seems like this should be more like this line?

intents = vendor.retrieve_stripe_charge(invoice["charge"])
@marty331
Copy link
Contributor

Thanks @lmorchard, you are correct about this. The fix will be out in the next PR.

@marty331 marty331 self-assigned this Oct 29, 2019
@marty331
Copy link
Contributor

marty331 commented Nov 1, 2019

PR for has been pushed to prod and prod-test @lmorchard

@marty331 marty331 closed this as completed Nov 1, 2019
claudiouzelac added a commit that referenced this issue Nov 1, 2019
* master:
  COPS-828 Increase sub/payments code coverage - Add tests for sub/payments.py
  adding return data and more tests
  Defect resolution
  Change customer call to invoice for #332
claudiouzelac added a commit that referenced this issue Nov 1, 2019
* test-sub-hub-split:
  updated
  updated
  udpated
  CFG part 2
  testing.
  CFG addition
  fixed pathing
  missed one.
  COPS-828 Increase sub/payments code coverage - Add tests for sub/payments.py
  adding return data and more tests
  Defect resolution
  updates
  Change customer call to invoice for #332
  test
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