我有一个非常简单的Python程序:
#!/usr/bin/python
import paypalrestsdk
paypalrestsdk.configure({
"mode": "live",
"client_id": "...",
"client_secret": "..." })
payment_history = paypalrestsdk.Payment.all({"count": 10})
print payment_history.payments
但是,它始终返回INTERNAL_SERVICE_ERROR:
$ ./paypal.py
Traceback (most recent call last):
File "./paypal.py", line 22, in <module>
payment_history = paypalrestsdk.Payment.all({"count": 10})
File "build/bdist.linux-x86_64/egg/paypalrestsdk/resource.py", line 131, in all
File "build/bdist.linux-x86_64/egg/paypalrestsdk/api.py", line 219, in get
File "build/bdist.linux-x86_64/egg/paypalrestsdk/api.py", line 138, in request
File "build/bdist.linux-x86_64/egg/paypalrestsdk/api.py", line 166, in http_call
File "build/bdist.linux-x86_64/egg/paypalrestsdk/api.py", line 195, in handle_response
paypalrestsdk.exceptions.ServerError: Failed. Response status: 503. Response message: Service Unavailable. Error message: {"name":"INTERNAL_SERVICE_ERROR","information_link":"https://api.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"14a7e825c5d9d"}
任何人都知道如何修复它?我错过了哪些简单的东西?
(在沙箱模式下,它返回有效值“无”。)