cancel
Showing results for 
Search instead for 
Did you mean: 

/hybris-cis-mock-subscription-web/sub/cisSubscriptionMock is giving 401 with Hybris 6.7 and teco add 6.7

Former Member
0 Kudos

I have installed OOB telco add on hybris6.7 with Telco 6.7. However when I am placing the order on billing section getting the following error

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | org.springframework.web.client.HttpClientErrorException: 401

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:86) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:708) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:661) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:621) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:415) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at com.hybris.cis.client.rest.subscription.oauth.service.impl.Oauth2ClientImpl.getToken(Oauth2ClientImpl.java:51) ~[hybris-cis-subscription-rest-client-6.7.0.0-RC1.jar:?]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at com.hybris.cis.client.rest.subscription.oauth.OauthTokenRestCallInterceptor.intercept(OauthTokenRestCallInterceptor.java:47) ~[hybris-cis-subscription-rest-client-6.7.0.0-RC1.jar:?]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:88) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at com.hybris.cis.client.rest.common.tenant.StaticTenantRestCallInterceptor.intercept(StaticTenantRestCallInterceptor.java:37) ~[hybris-cis-subscription-rest-client-6.7.0.0-RC1.jar:?]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:88) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:72) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE] INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:660) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:621) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:539) ~[spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at com.hybris.cis.client.rest.subscription.impl.SubscriptionClientImpl.hpfUrl(SubscriptionClientImpl.java:257) ~[hybris-cis-subscription-rest-client-6.7.0.0-RC1.jar:?]

INFO | jvm 1 | main | 2018/07/25 10:26:44.174 | at de.hybris.platform.integration.cis.subscription.service.impl.DefaultCisSubscriptionService.hpfUrl(DefaultCisSubscriptionService.java:81) ~[classes/:?]

in local.properties it is using

subscription.client.endpoint.uri=https\://localhost\:9802/hybris-cis-mock-subscription-web/sub/cisSubscriptionMock

I have changed the port.

Anyone help what I am missing here.

On billing section the card in not getting populated

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I have had the same issue when I installed 6.7 Telco. I resolved it.

1) Add below properties in local.properties

 cis.client.subscription.mock=true
 site.pci.strategy=SOP
 subscription.client.endpoint.uri=https://localhost:${tomcat.ssl.port}/hybris-cis-mock-subscription-web/sub/cisSubscriptionMock
 security.oauth2.client.accessTokenUri=https://localhost:${tomcat.ssl.port}/authorizationserver/oauth/token

2) Make sure you have the sbg_admin OAuth client. Login into backoffice and navigate to System->OAuth->OAuth Clients

3) Open the editor and edit attribute 'OAuth registered redirect URI'. By default the value is https://localhost:9002/authorizationserver/oauth2_callback. But SBG module uses a different call back url for validating the access token. Also if you had updated the tomcat port from default, you need to change that as well.

 https://localhost:<port_number>/authorizationserver/oauth/whoami

4) Configure hybris-cis-mock-subscription-web to verify the token, in ${HYBRIS_BIN_DIR}/platform/tomcat/lib/sbg-subscription.properties:

 hybris.sbg.web.platform.oauth.enabled=true
 hybris.sbg.web.platform.oauth.whoami.url=https://localhost:<port_number>/authorizationserver/oauth/whoami

The best way to do this is, to create a directory ${HYBRIS_HOME_DIR}/hybris/config/tomcat/lib. Place the sbg-subscription.properties. Add above properties and save it. Run 'ant server'. This will copy the file to platform tomcat directory ${HYBRIS_BIN_DIR}/platform/tomcat/lib. Now start the server. The checkout should happen smoothly.

Reference: https://help.hybris.com/6.7.0/hcd/8b7a249b86691014b6b1ed48f0715917.html