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
bc18caf5
Commit
bc18caf5
authored
Nov 11, 2016
by
uzairr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding logs for payment processors
parent
066a7648
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
ecommerce/extensions/api/v2/views/checkout.py
+6
-4
No files found.
ecommerce/extensions/api/v2/views/checkout.py
View file @
bc18caf5
...
...
@@ -23,7 +23,7 @@ class CheckoutView(APIView):
def
post
(
self
,
request
):
basket_id
=
request
.
data
[
'basket_id'
]
payment_processor
=
request
.
data
[
'payment_processor'
]
payment_processor
_name
=
request
.
data
[
'payment_processor'
]
# Get the basket, and make sure it belongs to the current user.
try
:
...
...
@@ -38,11 +38,13 @@ class CheckoutView(APIView):
# Return the payment info
try
:
payment_processor
=
get_processor_class_by_name
(
payment_processor
)(
request
.
site
)
payment_processor
=
get_processor_class_by_name
(
payment_processor
_name
)(
request
.
site
)
except
ProcessorNotFoundError
:
logger
.
exception
(
'Failed to get payment processor [
%
s].'
,
payment_processor
)
logger
.
exception
(
'Failed to get payment processor [
%
s]. basket id: [
%
s]. price: [
%
s]'
,
payment_processor_name
,
basket_id
,
basket
.
total_excl_tax
)
return
HttpResponseBadRequest
(
'Payment processor [{}] not found.'
.
format
(
payment_processor
)
'Payment processor [{}] not found.'
.
format
(
payment_processor
_name
)
)
parameters
=
payment_processor
.
get_transaction_parameters
(
basket
,
request
=
request
)
...
...
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