我有许多使用Paypal按钮手动创建的订阅。 现在,我想获取订阅的详细信息。 (https://www.paypal.com/cgi-bin/webscr?cmd=_merchant-hub) 我该怎么办?
我刚刚尝试使用rest API:
import paypalrestsdk
import logging
paypal_api = paypalrestsdk.configure({
"mode": "sandbox", # sandbox or live
"client_id": "XXXXXXXX",
"client_secret": "XXXXXXXX" })
# Fetch Payment
payment_history = paypalrestsdk.Payment.all({"count": 10})
print("List Payment:")
for payment in payment_history.payments:
print(" -> Payment[%s]" % (payment.id))
响应为空列表。我了解到此代码仅适用于使用SDK进行的订阅。 所以我尝试了这个:
from paypal import PayPalInterface
paypal_api = PayPalInterface(API_USERNAME="xxxxxxxxxxxxapi1.gmail.com",
API_PASSWORD="xxxxxxxxxxxx",
API_SIGNATURE="xxxxxxxxxxx",
DEBUG_LEVEL=0,
HTTP_TIMEOUT=30)
transactions = paypal_api.transaction_search(STARTDATE='2019-01-01T00:00:00Z',STATUS="Success")
print(transactions)
但是回应是这样:
{'ACK':['Success'],'BUILD':[some_numbers],'CORRELATIONID': [id],'TIMESTAMP':['2019-02-24T21:49:47Z'],'VERSION': ['98 .0']}
我如何获取类似客户的电子邮件,地址,个人资料信息等信息?