Say back to the Sdk_config configuration file, here is an example of a project configuration.
Configure under the Src/main/resources directory:
Sdk_config.properties
1 # Mode=sandbox2 mode=live3 # Account credentials (Add one or more APIs accounts here)4 # Sandbox Test Account5 # Acct1. UserName = user1.gmail.com6 # Acct1. Password = xxxxxxxxxx7 # Acct1. Signature = xxxxxxxxxxxxxxxx8 # acct1.appid=app-80w284485p519543t9 Ten # Live account (need to fill in real user info) One A Acct1. UserName = user1.gmail.com - Acct1. Password = xxxxxxxxxx - Acct1. Signature = xxxxxxxxxxxxxxxx the # Optional If Acct1 is used as Third-party account. - # Subject User must grant permission to Acct1 on Paypal website. - # Can support multiple subject users split by comma. (not PAYPAL Standard) - Acct1. Subject = subjectuser1.gmail.com,subjectuser2.gmail.com + - #Sandbox Email Address + [email protected] A at # Connection Information - http. connectiontimeout=30000 - http. retry=10 - http. readtimeout=30000 - http. maxconnection=100 - http. ipaddress=127.0.0.1 in - # HTTP Proxy configuration to # If You are using proxy set HTTP. UseProxy to True and replace the following values with your proxy parameters + http. Useproxy=false - http. proxyport=8080 the http. proxyhost=127.0.0.1 * http. Proxyusername=null $ http. Proxypassword=nullPanax Notoginseng - #Set This property to True if you are using the PayPal SDK within a Google app Engine Java app the http. Googleappengine = False + A the # Service Configuration +Service.redirecturl=https://www.sandbox.paypal.com/webscr&cmd= - service. Devcentralurl=https://developer.paypal.com $ SERVICE.IPNENDPOINT=HTTPS://IPNPB.SANDBOX.PAYPAL.COM/CGI-BIN/WEBSCR $ - # Multiple end-points configuration, while using multiple SDKs in combination, like Merchant and Permissions etc.. - # Configure the end-points as shown below one for each service used, the existing service. EndPoint property is still the # Supported for backward compatibility (using a single SDK) - #------------------------------SANDBOX------------------------------#Wuyi # Merchant Service (3 tokens) the # service.endpoint.paypalapi=https://api-3t.sandbox.paypal.com/2.0 - # service.endpoint.paypalapiaa=https://api-3t.sandbox.paypal.com/2.0 Wu # Merchant Service (Certificate) - # service.endpoint.paypalapi=https://api.sandbox.paypal.com/2.0 About # service.endpoint.paypalapiaa=https://api.sandbox.paypal.com/2.0 $ # Permissions Platform Service - # service.endpoint.permissions=https://svcs.sandbox.paypal.com/ - # adaptivepayments Platform Service - # service.endpoint.adaptivepayments=https://svcs.sandbox.paypal.com/ A # adaptiveaccounts Platform Service + # service.endpoint.adaptiveaccounts=https://svcs.sandbox.paypal.com/ the # Invoicing Platform Service - # service.endpoint.invoice=https://svcs.sandbox.paypal.com/ $ the #------------------------------PRODUCTION------------------------------# the # Merchant Service (3 tokens) the service.endpoint.paypalapi=https://api-3t.paypal.com/2.0 the service.endpoint.paypalapiaa=https://api-3t.paypal.com/2.0 - in # Merchant Service (Certificate) the # service.endpoint.paypalapi=https://api.paypal.com/2.0 the # service.endpoint.paypalapiaa=https://api.paypal.com/2.0 About # Permissions Platform Service the service.endpoint.permissions=https://svcs.paypal.com/ the service.endpoint.adaptiveaccounts=https://svcs.paypal.com/ the service.endpoint.adaptivepayments=https://svcs.paypal.com/ +service.endpoint.invoice=https://svcs.paypal.com/
Description
1) mode can be specified as sandbox sandbox or live real environment. Sandbox testing is actually used to do a small amount of testing can also, big data volume does not support the import of real trading data, do the data too cumbersome.
2) Acct1 is account related information, username and password and signature need to be obtained in PayPal's seller settings option,my accounts > profile > My selling Tools > API Access.
3) in the sandbox environment AppID are unified as follows:
appid=app-80w284485p519543t
And in the production environment according to their own in the PayPal developer registered AppID fill out, or do not fill out also can use the API.
4) The ACC1 account information is read by default in the configuration, and if multiple accounts are configured, the service object will still use only ACC1 account permissions.
This is not clearly stated in the official information. When you need to read the transaction information for multiple accounts, you can only instantiate multiple service files with multiple profiles.
Or, you can set custom properties in the Sdk_config.properties file individually, configure multiple accounts in the same file, and instantiate multiple service implementations.
5) Acct1.subject is an agent account, if Acct1 belongs to a third-party account and needs to read the transaction information of other accounts as an agent, then subject is the account that it wants to proxy read.
By default, only one account can be proxied, if you want to broker multiple accounts as in the example, you still need to process the multi-account information separated by commas in the program and instantiate multiple service operations.
Some of the other configuration items are not described, basically as an example, which part of the API function to remove the previous comment symbol.
PayPal get Transaciton History Trading API Preliminary Study (iii)--configuration file