如何配置.properties文件?

oyt4ldly  于 2021-07-03  发布在  Java
关注(0)|答案(1)|浏览(317)

我正在尝试通过JavaPayPalSDK连接到我的paypal业务帐户,以自动发送发票。我将.properties文件配置为:

  1. http.ConnectionTimeOut=5000
  2. http.Retry=1
  3. http.ReadTimeOut=30000
  4. http.MaxConnection=100
  5. # HTTP Proxy configuration
  6. # If you are using proxy set http.UseProxy to true and replace the following
  7. values with your proxy parameters
  8. http.ProxyPort=8080
  9. http.ProxyHost=127.0.0.1
  10. http.UseProxy=false
  11. http.ProxyUserName=null
  12. http.ProxyPassword=null
  13. # Set this property to true if you are using the PayPal SDK within a Google
  14. App Engine java app
  15. http.GoogleAppEngine = false
  16. # Service Configuration
  17. service.EndPoint=https://api.sandbox.paypal.com
  18. # Live EndPoint
  19. # service.EndPoint=https://api.paypal.com
  20. # Credentials
  21. clientId=ID (of SANDBOX API CREDENTIALS)
  22. clientSecret=SECRET (of SANDBOX API CREDENTIALS)
  23. # Webhook Validation
  24. # webhook.trustCert=DigiCertSHA2ExtendedValidationServerCA.crt

当它连接时,我得到“错误消息:应用程序属性中没有配置api帐户”。我的.properties文件有什么问题?

bqjvbblv

bqjvbblv1#

您可以使用PayPalJavaSDK创建发票。您可以使用以下链接阅读一些有关如何创建发票的示例:
https://github.com/paypal/paypal-java-sdk/wiki/making-first-call
https://github.com/paypal/paypal-java-sdk/blob/master/rest-api-sample/src/main/java/com/paypal/api/sample/invoicesample.java

相关问题