Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ecommerce
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
ecommerce
Commits
13e80d5a
Commit
13e80d5a
authored
Jun 04, 2015
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #124 from edx/coverage-update
Boosted Code Coverage
parents
0f35b042
f1bfd99b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
28 deletions
+2
-28
.coveragerc
+2
-0
ecommerce/extensions/order/models.py
+0
-28
No files found.
.coveragerc
View file @
13e80d5a
...
@@ -8,3 +8,5 @@ omit = ecommerce/settings*
...
@@ -8,3 +8,5 @@ omit = ecommerce/settings*
*test*
*test*
*static*
*static*
*templates*
*templates*
ecommerce/extensions/checkout/apps.py
ecommerce/extensions/dashboard/refunds/config.py
ecommerce/extensions/order/models.py
View file @
13e80d5a
...
@@ -15,34 +15,6 @@ class Order(AbstractOrder):
...
@@ -15,34 +15,6 @@ class Order(AbstractOrder):
""" Returns a boolean indicating if order is eligible to retry fulfillment. """
""" Returns a boolean indicating if order is eligible to retry fulfillment. """
return
self
.
status
==
ORDER
.
FULFILLMENT_ERROR
return
self
.
status
==
ORDER
.
FULFILLMENT_ERROR
@classmethod
def
check_order_total
(
cls
,
order_num
,
auth_amount
,
auth_currency
):
"""
Verify that the auth amount given matches the total price of an order and that the currencies
are also correct.
Args:
order_num (str): order number for the given order
auth_amount (Decimal): the amount that we would like to verify is correct
auth_currency (str): the currency of the amount we'd like to verify is correct
Returns:
True if the amount and currency matches
False otherwise
Raises:
DoesNotExist: if there is no order that matches the number given
"""
order
=
Order
.
objects
.
get
(
number
=
order_num
)
if
order
.
total_excl_tax
==
auth_amount
and
order
.
currency
==
auth_currency
:
return
True
else
:
# Set the status to indicate that there was an error.
order
.
set_status
(
ORDER
.
PAYMENT_ERROR
)
return
False
class
PaymentEvent
(
AbstractPaymentEvent
):
class
PaymentEvent
(
AbstractPaymentEvent
):
processor_name
=
models
.
CharField
(
_
(
"Payment Processor"
),
max_length
=
32
,
blank
=
True
,
null
=
True
)
processor_name
=
models
.
CharField
(
_
(
"Payment Processor"
),
max_length
=
32
,
blank
=
True
,
null
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment