如何每月自动获取PayPal已完成付款的CSV?

时间:2019-03-31 08:50:40

标签: paypal paypal-sandbox paypal-ipn

我们可以通过手动转到https://business.paypal.com/merchantdata/reportHome?reportType=DLOG并执行以下操作来下载特定日期范围内的PayPal完成付款的CSV文件:

enter image description here

但是如何每月自动(使用API​​?)获得此信息,而不必手动访问网站?

是否有API可以触发与此https://business.paypal.com/merchantdata/reportHome?reportType=DLOG页几乎相同格式的交易CSV下载?

注意:

所需输出示例:

"Date","Time","TimeZone","Name","Type","Status","Currency","Gross","Fee","Net","From Email Address","To Email Address","Transaction ID","Shipping Address","Address Status","Item Title","Item ID","Shipping and Handling Amount","Insurance Amount","Sales Tax","Option 1 Name","Option 1 Value","Option 2 Name","Option 2 Value","Reference Txn ID","Invoice Number","Custom Number","Quantity","Receipt ID","Balance","Address Line 1","Address Line 2/District/Neighborhood","Town/City","State/Province/Region/County/Territory/Prefecture/Republic","Zip/Postal Code","Country","Contact Phone Number","Subject","Note","Country Code","Balance Impact"
"3/1/2018","04:52:07","CET","John Doe","Website Payment","Completed","EUR","100.00","0","100","johndoe@gmail.com","contact@example.com",...
"3/1/2018","16:29:30","CET","Mike Abcd","Website Payment","Completed","EUR","100.00","0","100","mikeabc@example.com","contact@example.com",...

1 个答案:

答案 0 :(得分:-1)

您将必须通过XML api进行操作。基本上,您通过给定的链接中的示例XML进行发布请求,但其中包含数据。响应将采用XML格式,然后您使用返回的reportId,然后调用get report api,它将以xml返回报告数据。