Skip to content

Commit

Permalink
Single statement for parsing body json
Browse files Browse the repository at this point in the history
  • Loading branch information
brylie committed Oct 25, 2023
1 parent 5b186fe commit 13a088f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions paypal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ def capture_paypal_order(
Return the PayPal response.
"""

body_json = json.loads(
request.body.decode("utf-8"),
)
body_json = json.loads(request.body.decode("utf-8"))

paypal_order_id = body_json["paypal_order_id"]
paypal_payment_id = body_json["paypal_payment_id"]
Expand Down

0 comments on commit 13a088f

Please sign in to comment.