Dear BLC Team,
Hope all are doing good!!! I have successfully configured the third party payment gateway. While the third party system is transferring the page to BLC confirmation page getting the following error. Seems to be the checkout process still validation the CreditCardinformation that should not be happen. Please help me to fix the issue.
I have overridden the "completeSecureCreditCardCheckout" function. Please find the code below.
Map<PaymentInfo, Referenced> payments = new HashMap<PaymentInfo, Referenced>();
orderService.removePaymentsFromOrder(cart, PaymentInfoType.CREDIT_CARD);
CreditCardPaymentInfo ccReference = (CreditCardPaymentInfo) securePaymentInfoService.create(PaymentInfoType.CREDIT_CARD);
ccReference.setReferenceNumber(request.getParameter("TxnReference"));
ccReference.setCvvCode("453");
ccReference.setExpirationMonth(12);
ccReference.setExpirationYear(15);
ccReference.setPan("4111111111111111");
ccReference.setNameOnCard("TEST");
PaymentInfo paymentInfo = paymentInfoService.create();
paymentInfo.setAddress(shipping);
paymentInfo.setOrder(cart);
paymentInfo.setType(PaymentInfoType.CREDIT_CARD);
paymentInfo.setReferenceNumber(request.getParameter("TxnReference"));
paymentInfo.setAmount(cart.getTotal());
payments.put(paymentInfo, null);
cart.getPaymentInfos().clear();
cart.getPaymentInfos().add(paymentInfo);
cart.setStatus(OrderStatus.SUBMITTED);
cart.setSubmitDate(Calendar.getInstance().getTime());
//CheckoutResponse checkoutResponse = checkoutService.performCheckout(cart, payments);
CheckoutResponse checkoutResponse = null;
try {
checkoutResponse = checkoutService.performCheckout(cart, payments);
} catch (CheckoutException e) {
LOG.error("Cannot perform checkout", e);
}
System.out.println("Status ::::::: " +request.getParameter("TxnStatus"));
int s1 = Integer.parseInt(request.getParameter("TxnStatus"));
System.out.println("Status ==== "+s1);
if(s1==0)
{
return getConfirmationView(cart.getOrderNumber());
}
else
{
return getCartPageRedirect();
}
The error I'm getting as follows,
Caused by: org.broadleafcommerce.core.workflow.WorkflowException: org.broadleafcommerce.core.payment.service.exception.PaymentException: Problem processing Credit Card.
at org.broadleafcommerce.core.workflow.DefaultErrorHandler.handleError(DefaultErrorHandler.java:57)
at org.broadleafcommerce.core.workflow.SequenceProcessor.doActivities(SequenceProcessor.java:88)
at org.broadleafcommerce.core.payment.service.workflow.CompositeActivity.execute(CompositeActivity.java:36)
at org.broadleafcommerce.core.payment.service.workflow.CompositeActivity.execute(CompositeActivity.java:23)
at org.broadleafcommerce.core.workflow.SequenceProcessor.doActivities(Se
quenceProcessor.java:79)
... 98 more
Caused by: org.broadleafcommerce.core.payment.service.exception.PaymentException: Problem processing Credit Card.
at org.broadleafcommerce.core.payment.service.module.NullCreditCardPayme
ntModule.processAuthorize(NullCreditCardPaymentModule.java:56)
at org.broadleafcommerce.core.payment.service.module.AbstractModule.auth
orize(AbstractModule.java:42)
at org.broadleafcommerce.core.payment.service.module.NullCreditCardPayme
ntModule.processAuthorizeAndDebit(NullCreditCardPaymentModule.java:70)
at org.broadleafcommerce.core.payment.service.module.AbstractModule.auth
orizeAndDebit(AbstractModule.java:79)
at org.broadleafcommerce.core.payment.service.PaymentServiceImpl.authori
zeAndDebit(PaymentServiceImpl.java:74)
at org.broadleafcommerce.core.payment.service.workflow.PaymentActivity.e
xecute(PaymentActivity.java:80)
at org.broadleafcommerce.core.payment.service.workflow.PaymentActivity.e
xecute(PaymentActivity.java:33)
at org.broadleafcommerce.core.workflow.SequenceProcessor.doActivities(Se
quenceProcessor.java:79)
... 101 more
[ERROR] 10:38:21 BroadleafCheckoutController - Cannot perform checkout
org.broadleafcommerce.core.checkout.service.exception.CheckoutException: Unable
to checkout order -- id: 20151
at org.broadleafcommerce.core.checkout.service.CheckoutServiceImpl.perfo
rmCheckout(CheckoutServiceImpl.java:82)
at com.mycompany.controller.checkout.CheckoutController.completeSecureCr
editCardCheckout(CheckoutController.java:335)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(
InvocableHandlerMethod.java:219)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeF
orRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocabl
eHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingH
andlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingH
andlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapt
er.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch
erServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche
rServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame
workServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServ
let.java:838)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkSer
vlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698
)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1564)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(We
bSocketUpgradeFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1535)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:330)
at org.broadleafcommerce.core.web.order.security.CartStateFilter.doFilte
r(CartStateFilter.java:57)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.broadleafcommerce.common.web.filter.TranslationFilter.doFilter(Tr
anslationFilter.java:48)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.broadleafcommerce.cms.web.URLHandlerFilter.doFilterInternal(URLHa
ndlerFilter.java:71)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(Fi
lterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
nProxy.java:166)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.intercept.FilterSecurityInter
ceptor.invoke(FilterSecurityInterceptor.java:118)
at org.springframework.security.web.access.intercept.FilterSecurityInter
ceptor.doFilter(FilterSecurityInterceptor.java:84)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.ExceptionTranslationFilter.do
Filter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.broadleafcommerce.profile.web.core.security.SessionFixationProtec
tionFilter.doFilter(SessionFixationProtectionFilter.java:95)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AnonymousAuthenticati
onFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.broadleafcommerce.profile.web.core.security.CustomerStateFilter.d
oFilter(CustomerStateFilter.java:53)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.servletapi.SecurityContextHolderAwar
eRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter
.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AbstractAuthenticatio
nProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.broadleafcommerce.common.security.handler.CsrfFilter.doFilter(Csr
fFilter.java:82)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.logout.LogoutFilter.d
oFilter(LogoutFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.context.SecurityContextPersistenceFi
lter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.channel.ChannelProcessingFilt
er.doFilter(ChannelProcessingFilter.java:144)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:330)
at org.broadleafcommerce.common.web.BroadleafRequestFilter.doFilterInter
nal(BroadleafRequestFilter.java:97)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doF
ilterInternal(OpenEntityManagerInViewFilter.java:180)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR
equestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(Fi
lterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
nProxy.java:166)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.
doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(Fi
lterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai
nProxy.java:160)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D
elegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat
ingFilterProxy.java:259)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1544)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java
:524)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:138)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:568)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandl
er.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl
er.java:1110)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
453)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandle
r.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle
r.java:1044)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:136)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(Cont
extHandlerCollection.java:200)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerColl
ection.java:109)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:445)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:278)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.jav
a:216)
at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java
:505)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo
l.java:601)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool
.java:532)
at java.lang.Thread.run(Unknown Source)
Caused by: org.broadleafcommerce.core.payment.service.exception.PaymentException: Problem processing Credit Card.
at org.broadleafcommerce.core.payment.service.module.NullCreditCardPayme
ntModule.processAuthorize(NullCreditCardPaymentModule.java:56)
at org.broadleafcommerce.core.payment.service.module.AbstractModule.auth
orize(AbstractModule.java:42)
at org.broadleafcommerce.core.payment.service.module.NullCreditCardPayme
ntModule.processAuthorizeAndDebit(NullCreditCardPaymentModule.java:70)
at org.broadleafcommerce.core.payment.service.module.AbstractModule.auth
orizeAndDebit(AbstractModule.java:79)
at org.broadleafcommerce.core.payment.service.PaymentServiceImpl.authori
zeAndDebit(PaymentServiceImpl.java:74)
at org.broadleafcommerce.core.payment.service.workflow.PaymentActivity.e
xecute(PaymentActivity.java:80)
at org.broadleafcommerce.core.payment.service.workflow.PaymentActivity.e
xecute(PaymentActivity.java:33)
at org.broadleafcommerce.core.workflow.SequenceProcessor.doActivities(Se
quenceProcessor.java:79)
at org.broadleafcommerce.core.payment.service.workflow.CompositeActivity
.execute(CompositeActivity.java:36)
at org.broadleafcommerce.core.payment.service.workflow.CompositeActivity
.execute(CompositeActivity.java:23)
at org.broadleafcommerce.core.workflow.SequenceProcessor.doActivities(Se
quenceProcessor.java:79)
at org.broadleafcommerce.core.payment.service.CompositePaymentServiceImp
l.executePayment(CompositePaymentServiceImpl.java:52)
at org.broadleafcommerce.core.checkout.service.workflow.PaymentServiceAc
tivity.execute(PaymentServiceActivity.java:47)
at org.broadleafcommerce.core.checkout.service.workflow.PaymentServiceAc
tivity.execute(PaymentServiceActivity.java:34)
at org.broadleafcommerce.core.workflow.SequenceProcessor.doActivities(Se
quenceProcessor.java:79)
at org.broadleafcommerce.core.checkout.service.CheckoutServiceImpl.perfo
rmCheckout(CheckoutServiceImpl.java:72)
... 93 more
Kindly help in these regards.
Thanks
Deepak
Have a Nice Day
This forum is in readonly mode and serves as an archive of old information. All posting, registration and commenting abilities have been turned off. To get help, the Broadleaf team reguarly monitors the broadleaf-commerce tag on Stack Overflow so please ask your questions there.