Skip to content

Commit

Permalink
Sandox or live>
Browse files Browse the repository at this point in the history
  • Loading branch information
shabda committed Jul 26, 2010
1 parent af022ec commit 5d8ac9f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sellflickr/adaptive/__init__.py
Expand Up @@ -20,5 +20,11 @@ def get_adaptive_payment_url(returnUrl, cancelUrl, receiverList, **kwargs):
request = urllib2.Request(API_END_POINT, data = json.dumps(data), headers = headers)
resp = json.loads(urllib2.urlopen(request).read())
key = resp["payKey"]
return "https://www.sandbox.paypal.com/webscr?cmd=_ap-payment&paykey=%s"%key
API_ENDPOINT = ""
if settings.DEBUG:
API_ENDPOINT = "https://www.sandbox.paypal.com/webscr"
else:
API_ENDPOINT = "https://www.paypal.com/webscr"
return "%s?cmd=_ap-payment&paykey=%s"%(API_ENDPOINT,key)


0 comments on commit 5d8ac9f

Please sign in to comment.