(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
Mule esb stripe
1.
2. Overview:
MuleSoft is a popular ESB technology to integrate Different on-premise and cloud
applications for data exchange. Stripe is an American company that allows both
private individuals and businesses to accept payments over the Internet. Stripe
specifically focuses on providing the technical, fraud prevention, and banking
infrastructure required to operate online payment systems. The Mule Stripe
Connector enables developers to interact with Stripe API to accept payments, create
invoices, coupons, cards and other various actions
4. Stripe Developer Account Setup:
For this sample purpose, we need developer Stripe account. We can sign up
for free at https://dashboard.stripe.com/login
5. Stripe API key Value:
Stripe developer account provides various options to control the communication
between Stripe API to other applications. To access the full features of Stripe and
connect with it, we need Stripe API key (For Test environment use Test Secret key).
These values available under Stripe Account settings
6. Mule Anypoint Stripe Connector:
Stripe is a online payment provider. Mule Stripe connector gives the options
to integrate Stripe to perform the below options
CRUD for Customers
Accepts Payments
CRUD for Coupons
Create Invoices , plans , subscriptions etc.
7. MULE ESB Flows for Stripe Integration
The below Mule application is used to create Customer and Coupon under
Stripe using Mule Anypoint Stripe connector
8. Steps to be followed for integrating ‘Stripe’ with MuleSoft Applications:
Install the Stripe Connector in Anypoint Studio (3.5 and above)
http://repository.mulesoft.org/connectors/releases/3.5
9. Create a new Anypoint Studio Project and Flow to create customer and coupon
Configure the Stripe global element in global elements section by providing the
Stripe API key
10. In the flow first add HTTP inbound endpoint to trigger the service.
Add choice router to route the control to create customer or create
coupon based on request action query parameter.
Now at this position we are integrated with Stripe to perform actions.
11. Running and Testing the Application:
Right-click on the application Run Mule Application.
Open the browser and hit the URL
http://localhost:8084/?action=createCustomer&customerEmail=test25
@gmail.com.
Service will create the new customer in Stripe account in case of no
errors.
Now, trigger the URL
http://localhost:8084/?action=createCoupon&couponID=25PercentFesti
valDiscount&percentOffpercentOff=5
Service will create new coupon under coupons sections if there no
errors.