【发布时间】:2025-05-10 00:25:02
【问题描述】:
我正在尝试通过 Java Paypal SDK 连接到我的 Paypal 商业帐户以自动发送发票。我这样配置 .properties 文件:
http.ConnectionTimeOut=5000
http.Retry=1
http.ReadTimeOut=30000
http.MaxConnection=100
# HTTP Proxy configuration
# If you are using proxy set http.UseProxy to true and replace the following
values with your proxy parameters
http.ProxyPort=8080
http.ProxyHost=127.0.0.1
http.UseProxy=false
http.ProxyUserName=null
http.ProxyPassword=null
#Set this property to true if you are using the PayPal SDK within a Google
App Engine java app
http.GoogleAppEngine = false
# Service Configuration
service.EndPoint=https://api.sandbox.paypal.com
# Live EndPoint
# service.EndPoint=https://api.paypal.com
# Credentials
clientId=ID (of SANDBOX API CREDENTIALS)
clientSecret=SECRET (of SANDBOX API CREDENTIALS)
# Webhook Validation
#webhook.trustCert=DigiCertSHA2ExtendedValidationServerCA.crt
当它连接时,我收到“错误消息:应用程序属性中没有配置 API 帐户”。我的 .properties 文件有什么问题?
【问题讨论】:
-
我没有看到任何 API 凭据配置? github.com/paypal/sdk-core-java/wiki/…
-
clientId 和 clientSecret 被替换为 ID 和 SECRET。还是我也需要 acctX 凭据?