Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stripe-checkout
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
stripe-checkout
Commits
5bf17369
Commit
5bf17369
authored
2 months ago
by
Pelle Koster
Browse files
Options
Downloads
Patches
Plain Diff
Exclude void invoices from possble errors
parent
dabd1814
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stripe_checkout/stripe_checkout/compare_visit_stripe.py
+9
-0
9 additions, 0 deletions
stripe_checkout/stripe_checkout/compare_visit_stripe.py
with
9 additions
and
0 deletions
stripe_checkout/stripe_checkout/compare_visit_stripe.py
+
9
−
0
View file @
5bf17369
...
@@ -43,6 +43,8 @@ class PossibleErrorReporter(CSVReporter):
...
@@ -43,6 +43,8 @@ class PossibleErrorReporter(CSVReporter):
yield
obj
yield
obj
unseen_invoices
:
dict
[
str
,
list
[
dict
]]
=
{}
unseen_invoices
:
dict
[
str
,
list
[
dict
]]
=
{}
for
obj_id
,
obj
in
data
[
"
stripe
"
].
items
():
for
obj_id
,
obj
in
data
[
"
stripe
"
].
items
():
if
obj
[
"
status
"
]
in
(
"
draft
"
,
"
void
"
):
continue
email
=
obj
[
"
customer_email
"
]
email
=
obj
[
"
customer_email
"
]
if
obj_id
.
startswith
(
"
in_
"
)
and
email
not
in
seen
:
if
obj_id
.
startswith
(
"
in_
"
)
and
email
not
in
seen
:
unseen_invoices
.
setdefault
(
email
,
[]).
append
(
obj
)
unseen_invoices
.
setdefault
(
email
,
[]).
append
(
obj
)
...
@@ -105,6 +107,13 @@ reporter = PossibleErrorReporter([VISITOR_SERIALIZER], get_data=get_all_data)
...
@@ -105,6 +107,13 @@ reporter = PossibleErrorReporter([VISITOR_SERIALIZER], get_data=get_all_data)
def
main
():
def
main
():
import
logging
import
logging
import
pathlib
import
pathlib
import
stripe
from
django.conf
import
settings
from
stripe_checkout.config
import
load_config
load_config
(
"
config.json
"
,
settings
=
settings
)
stripe
.
api_key
=
settings
.
STRIPE_API_KEY
logger
=
logging
.
getLogger
()
logger
=
logging
.
getLogger
()
logging
.
basicConfig
(
level
=
logging
.
INFO
)
logging
.
basicConfig
(
level
=
logging
.
INFO
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment