cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Error on Payment Page in B2C Telco

0 Kudos

Hi Experts,

When we proceed to the Payment details after filling up Address details, I get the following error

  ERROR [hybrisHTTP27] [PaymentMethodCheckoutStepController] Failed to build beginCreateSubscription request
 org.springframework.web.client.HttpClientErrorException: 401 Unauthorized
         at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:63) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:407) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at com.hybris.cis.client.rest.subscription.oauth.service.impl.Oauth2ClientImpl.getToken(Oauth2ClientImpl.java:51) ~[hybris-cis-subscription-rest-client-6.6.0.0-RC5.jar:?]
         at com.hybris.cis.client.rest.subscription.oauth.OauthTokenRestCallInterceptor.intercept(OauthTokenRestCallInterceptor.java:47) ~[hybris-cis-subscription-rest-client-6.6.0.0-RC5.jar:?]
         at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:86) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at com.hybris.cis.client.rest.common.tenant.StaticTenantRestCallInterceptor.intercept(StaticTenantRestCallInterceptor.java:37) ~[hybris-cis-subscription-rest-client-6.6.0.0-RC5.jar:?]
         at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:86) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:70) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:652) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:531) ~[spring-web-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at com.hybris.cis.client.rest.subscription.impl.SubscriptionClientImpl.hpfUrl(SubscriptionClientImpl.java:257) ~[hybris-cis-subscription-rest-client-6.6.0.0-RC5.jar:?]
         at de.hybris.platform.integration.cis.subscription.service.impl.DefaultCisSubscriptionService.hpfUrl(DefaultCisSubscriptionService.java:81) ~[classes/:?]
         at de.hybris.platform.integration.cis.subscription.facades.impl.DefaultCisSubscriptionFacade.hpfUrl(DefaultCisSubscriptionFacade.java:223) ~[classes/:?]
         at de.hybris.platform.storefront.controllers.pages.checkout.steps.PaymentMethodCheckoutStepController.initialiseSubscriptionTransaction(PaymentMethodCheckoutStepController.java:448) ~[classes/:?]
         at de.hybris.platform.storefront.controllers.pages.checkout.steps.PaymentMethodCheckoutStepController.setupSilentOrderPostPage(PaymentMethodCheckoutStepController.java:414) ~[classes/:?]
         at de.hybris.platform.storefront.controllers.pages.checkout.steps.PaymentMethodCheckoutStepController.enterStep(PaymentMethodCheckoutStepController.java:184) [classes/:?]
         at de.hybris.platform.storefront.controllers.pages.checkout.steps.PaymentMethodCheckoutStepController$$FastClassBySpringCGLIB$$eab889c8.invoke(<generated>) [classes/:?]
         at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) [spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) [spring-aop-4.3.11.RELEASE.jar:4.3.11.RELEASE]
         at de.hybris.platform.acceleratorstorefrontcommons.checkout.steps.validation.CheckoutStepValidationAspect.validateCheckoutStep(CheckoutStepValidationAspect.java:46) [classes/:?]

I have also set cis.client.subscription.mock = true But still the problem persists....

I get the following error on my storefront....

An error occurred contacting the payment provider. Wait a few minutes and try again. If the problem persist, please contact our sales team.

And I am unable to see options under Card Type.

I am using Hybris Version: 6.6

Any pointers would be really appreciated....

Regards, Rupesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey Rupesh , Can you do the payment with the new fresh user , I think you are using the existing user after which you have done the server start .

Former Member
0 Kudos

Hi, I am using 6.7 TelcoAccelerator installed using recipe b2c_telco. I have the same issue even after adding the property cis.client.subscription.mock = true and creating a new user. The error says HTTPStatus 401 when trying to send a request to cis subscription rest service. I have oauth enabled and the clientId and secret are also created. I am not sure why it still throws the same error. Any help would be greatly appreciated.

Thanks, Vishnu.

Former Member
0 Kudos

Hi Vishnu

I am also facing similar issue with b2c_telco 6.7 setup. cis.client.subscription.mock = true is set Although on adding payment and clicking Next I am getting redirected to http://b2ctelco.local:9002/acceleratorservices/sop-mock/process which gives HTTP STATUS 401

and not to subscription.client.endpoint.uri=https\://b2ctelco.local\:9002/hybris-cis-mock-subscription-web/sub/cisSubscriptionMock

I don't understand why this issue is there with telco. cissubscription is available in my localextensions as well.

Any Help is highly appreciated.

Regards Rahul

Former Member
0 Kudos

If you add below property in local.properties, it will use accelerator services payment mock (https://b2ctelco.local:9002/acceleratorservices/hop-mock). By default its SOP in storefront project.properties. This helped me to place orders but the subscription service 401 status still remain me know if you found any solution for that.

 site.pci.strategy=HOP