For general information on using connectors and their operations in your ESB configurations, see Using a Connector. To download the connector, go to https://store.wso2.com/store/assets/esbconnector/details/paypal, and click Download Connector. Then you can add and enable the connector in your ESB instance.
Connecting to PayPal
With each PayPal API call, you will need to set up your request headers, including an OAuth 2.0 access token. You get an access token by using the OAuth 2.0 client_credentials token grant type with your
clientId:secret as your Basic Auth credentials and all the other properties and attributes that are necessary to make the PayPal connector function. The connector includes a check to verify the value of the API URL, and if it is null, it gets set to
apiUrl: Optional - URL of the PayPal API. This is an optional parameter with a default value of
accessToken: Required - The access token allows you to make requests to the API on behalf of a user.
Entering secure data
For security purposes, you should store your accessToken in the WSO2 secure vault and reference it by alias instead of hard-coding the actual values in the configuration file. For more information, see Working with Passwords.
Re-using PayPal configurations
For best results, save the PayPal configuration as a local entry. You can then easily reference it with the
configKey attribute in your PayPal operations. For example, if you saved the above
<paypal.init> entry as a local entry named PayPalConfig, you could reference it from an operation like
createPayment as follows:
Performing operations on PayPal
The following sections describe how to perform various operations with the connector. For general information on using connectors and their operations in your ESB configurations, see Using a Connector. To download the connector, go to https://store.wso2.com/store/assets/esbconnector/paypal, and click Download Connector. Then you can add and enable the connector in your ESB instance.