PayPal PayFlow Pro Quick Start
Broadleaf Commerce offers an out-of-the-box PayPal PayFlow Pro solution that requires little configuration and is easily set up.
** You must have completed the PayPal PayFlow Pro Environment Setup before continuing **
Adding PayPal PayFlow Pro Checkout Support
- Add the following component scan in your
applicationContext-servlet.xml
in yoursite
module
<context:component-scan base-package="com.broadleafcommerce.vendor.paypal.payflow"/>
- In your core
applicationContext.xml
, replace the block of text
<!-- Scan DemoSite Sample Payment Gateway Implementation -->
...
<!-- /End DemoSite NullPaymentGateway Config -->
with
<!-- PayPal Payflow Pro -->
<context:component-scan base-package="com.broadleafcommerce.payment.service.gateway"/>
<context:component-scan base-package="com.broadleafcommerce.vendor.paypal.payflow"/>
<bean class="com.broadleafcommerce.vendor.paypal.payflow.service.payment.PayPalPayFlowPaymentGatewayType"/>
<bean id="mySampleConfigurationServices" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<ref bean="blPayPalPayFlowConfigurationService"/>
</list>
</property>
</bean>
<bean class="org.broadleafcommerce.common.extensibility.context.merge.LateStageMergeBeanPostProcessor">
<property name="collectionRef" value="mySampleConfigurationServices"/>
<property name="targetRef" value="blPaymentGatewayConfigurationServices"/>
</bean>
- Make sure to exclude the payflow endpoint URL from the CSRF token filter in your
applicationContext-security.xml
in yoursite
module
<bean id="blCsrfFilter" class="org.broadleafcommerce.common.security.handler.CsrfFilter" >
<property name="excludedRequestPatterns">
<list>
<value>/paypal-payflow-pro/**</value>
</list>
</property>
</bean>
Done!
At this point, all the configuration should be complete and you are now ready to test your integration with PayPal Payflow Pro. Add something to your cart and proceed with checkout.