Skip to content

Commit

Permalink
Update PayPal domain endpoints
Browse files Browse the repository at this point in the history
Some docs seem to point to the previous ones I had here
but the latest docs on making requests use these.
  • Loading branch information
davidfischer committed Feb 6, 2025
1 parent 9a8e6f7 commit eacbc1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions adserver/staff/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,11 @@ def pay_via_paypal(self, payout):
paypal_email = publisher.paypal_email
amount = str(round(payout.amount, 2)) # PayPal wants the amount as a string

# https://developer.paypal.com/api/rest/requests/
if settings.DEBUG:
paypal_api_root = "https://api.sandbox.paypal.com"
paypal_api_root = "https://api-m.sandbox.paypal.com"
else:
paypal_api_root = "https://api.paypal.com"
paypal_api_root = "https://api-m.paypal.com"

# https://developer.paypal.com/api/rest/authentication/
oauth_url = f"{paypal_api_root}/v1/oauth2/token"
Expand Down

0 comments on commit eacbc1b

Please sign in to comment.