Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

PayPal Integration Within MULE ESB

DZone's Guide to

PayPal Integration Within MULE ESB

Want to get PayPal up and running with MULE ESB? Look no further. This quick tutorial guides you through the steps.

· Integration Zone ·
Free Resource
CRM integration has become the cornerstone to meeting initiatives across organizations. Explore the top 6 value-driven Salesforce CRM integrations ebook.  

PayPal Anypoint Connector helps integrate and PayPal within MULE. I have developed the sample program that connects to a PayPal account to do the -getbalance operation.

Used in this tutorial:

  • MULE ESB 3.8

  • Anypoint Studio 6.0

  • PayPal Connector (Mule 3.7.0 +)

Step 1: Install the paypal connector in the anypoint studio and restart the studio to reflect the chagnes.

Step 2: Use the HTTP listener to post the request to the PayPal API.

<http:listener config-ref="HTTP_Listener_Configuration" path="/getbalance" doc:name="HTTP"/>


Here's the listener config ref:

<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration"/>


Step 3: Drag and drop the PayPal connector and configure the PayPal connection details.

Created a sandbox account in PayPal and gather the API details (username, password, signature, appID, etc.)

You'll need the following details to configure PayPal:

  • Username.

  • Password.

  • ServiceAddress.

  • Signature.

  • AppId.

Here's the PayPal config:

<paypal:config name="PayPal" username="" password="" serviceAddress="" signature="" appId="" doc:name="PayPal Connector: configuration (Signature)"/>


And the PayPal connector entry:

<paypal:get-balance config-ref="PayPal" doc:name="PayPal"/>


Flow pic and XML:

Image title


<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration"/>  
<paypal:config name="PayPal" username="" password="" serviceAddress="" signature="" appId="" doc:name="PayPal Connector: configuration (Signature)"/>    
<flow name="httpexampleFlow1">      
<http:listener config-ref="HTTP_Listener_Configuration" path="/getbalance" doc:name="HTTP"/>   
    <paypal:get-balance config-ref="PayPal" doc:name="PayPal"/>   
</flow>


Run the Mule project in Anypoint Studio and access the URL for getbalance.

Sync, automate, and notify lead to customer changes across marketing, CRM, and messaging apps in real-time with the Cloud Elements eventing framework. Learn more.

Topics:
mule ,paypal ,integration

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}