提交 eb49473c authored 作者: 梁业锦's avatar 梁业锦 💬

Merge remote-tracking branch 'origin/master'

This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
2019-11-06 12:22:32.789 [restartedMain] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'payPalController': Unsatisfied dependency expressed through field 'payPalService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payPalService' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\chinafrica\service\impl\PayPalServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202)
at com.diaoyun.zion.ZionApplication.main(ZionApplication.java:18)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payPalService' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\chinafrica\service\impl\PayPalServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1303)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1197)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
... 24 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:184)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1295)
... 35 common frames omitted
Caused by: java.lang.NullPointerException: null
at com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl.<init>(PayPalServiceImpl.java:61)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172)
... 37 common frames omitted
2019-11-06 12:23:19.535 [restartedMain] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'payPalController': Unsatisfied dependency expressed through field 'payPalService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payPalService' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\chinafrica\service\impl\PayPalServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202)
at com.diaoyun.zion.ZionApplication.main(ZionApplication.java:18)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payPalService' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\chinafrica\service\impl\PayPalServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1303)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1197)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
... 24 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:184)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1295)
... 35 common frames omitted
Caused by: java.lang.NullPointerException: null
at com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl.<init>(PayPalServiceImpl.java:61)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172)
... 37 common frames omitted
2019-11-06 12:24:32.186 [restartedMain] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'payPalController': Unsatisfied dependency expressed through field 'payPalService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payPalService' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\chinafrica\service\impl\PayPalServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1213)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1202)
at com.diaoyun.zion.ZionApplication.main(ZionApplication.java:18)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payPalService' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\chinafrica\service\impl\PayPalServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1303)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1197)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
... 24 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:184)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1295)
... 35 common frames omitted
Caused by: java.lang.NullPointerException: null
at com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl.<init>(PayPalServiceImpl.java:60)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172)
... 37 common frames omitted
2019-11-06 15:05:14.493 [http-nio-8083-exec-3] ERROR c.d.z.chinafrica.service.impl.TbCfOrderServiceImpl - 支付错误: errcode=IOException, errmsg=Connection reset
com.egzosn.pay.common.exception.PayErrorException: 支付错误: errcode=IOException, errmsg=Connection reset
at com.egzosn.pay.common.http.HttpRequestTemplate.doExecute(HttpRequestTemplate.java:353)
at com.egzosn.pay.common.http.HttpRequestTemplate.postForObject(HttpRequestTemplate.java:235)
at com.egzosn.pay.paypal.api.PayPalPayService.getAccessToken(PayPalPayService.java:92)
at com.egzosn.pay.paypal.api.PayPalPayService.getAccessToken(PayPalPayService.java:64)
at com.egzosn.pay.paypal.api.PayPalPayService.authHeader(PayPalPayService.java:134)
at com.egzosn.pay.paypal.api.PayPalPayService.orderInfo(PayPalPayService.java:180)
at com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl.payForOrder(PayPalServiceImpl.java:81)
at com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl$$FastClassBySpringCGLIB$$7a349833.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl$$EnhancerBySpringCGLIB$$2827d1a8.payForOrder(<generated>)
at com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl$$FastClassBySpringCGLIB$$7a349833.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl$$EnhancerBySpringCGLIB$$df6299c8.payForOrder(<generated>)
at com.diaoyun.zion.chinafrica.controller.PayPalController.payForOrder(PayPalController.java:41)
at com.diaoyun.zion.chinafrica.controller.PayPalController$$FastClassBySpringCGLIB$$88f5f11b.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
at com.diaoyun.zion.chinafrica.client.TokenVerification.validateLogin(TokenVerification.java:63)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at com.diaoyun.zion.chinafrica.controller.PayPalController$$EnhancerBySpringCGLIB$$cb5dbf2a.payForOrder(<generated>)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at com.diaoyun.zion.master.security.JwtTokenFilter.doFilterInternal(JwtTokenFilter.java:39)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:74)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
This source diff could not be displayed because it is too large. You can view the blob instead.
2019-11-01 17:57:33.043 [restartedMain] INFO com.diaoyun.zion.ZionApplication - Starting ZionApplication on USER-20181114WP with PID 11688 (E:\JavaProject\zion\target\classes started by Administrator in E:\JavaProject\zion)
2019-11-01 17:57:33.045 [restartedMain] INFO com.diaoyun.zion.ZionApplication - No active profile set, falling back to default profiles: default
2019-11-01 17:57:33.073 [restartedMain] INFO o.s.b.d.env.DevToolsPropertyDefaultsPostProcessor - Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2019-11-01 17:57:33.073 [restartedMain] INFO o.s.b.d.env.DevToolsPropertyDefaultsPostProcessor - For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2019-11-01 17:57:34.545 [restartedMain] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
2019-11-01 17:57:34.547 [restartedMain] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode.
2019-11-01 17:57:34.639 [restartedMain] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 75ms. Found 0 repository interfaces.
2019-11-01 17:57:35.032 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'com.alibaba.druid.spring.boot.autoconfigure.stat.DruidSpringAopConfiguration' of type [com.alibaba.druid.spring.boot.autoconfigure.stat.DruidSpringAopConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.101 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$8c04674c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.223 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.datasource.druid-com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties' of type [com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.234 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'advisor' of type [org.springframework.aop.support.RegexpMethodPointcutAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.258 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$24b22f86] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.264 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.267 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@1f430b42' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.271 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$4986d238] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.274 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.289 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConfig' of type [com.diaoyun.zion.master.config.RedisConfig$$EnhancerBySpringCGLIB$$7653076a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-11-01 17:57:35.682 [restartedMain] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8083 (http)
2019-11-01 17:57:35.697 [restartedMain] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8083"]
2019-11-01 17:57:35.706 [restartedMain] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat]
2019-11-01 17:57:35.707 [restartedMain] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.21]
2019-11-01 17:57:35.867 [restartedMain] INFO o.a.c.c.ContainerBase.[Tomcat].[localhost].[/zion] - Initializing Spring embedded WebApplicationContext
2019-11-01 17:57:35.867 [restartedMain] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2794 ms
2019-11-01 17:57:37.423 [restartedMain] INFO io.lettuce.core.EpollProvider - Starting without optional epoll library
2019-11-01 17:57:37.425 [restartedMain] INFO io.lettuce.core.KqueueProvider - Starting without optional kqueue library
2019-11-01 17:57:38.106 [restartedMain] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
2019-11-01 17:57:38.269 [restartedMain] INFO o.s.b.d.autoconfigure.OptionalLiveReloadServer - LiveReload server is running on port 35729
2019-11-01 17:57:38.471 [restartedMain] INFO o.s.security.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/v2/api-docs'], []
2019-11-01 17:57:38.471 [restartedMain] INFO o.s.security.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources/**'], []
2019-11-01 17:57:38.471 [restartedMain] INFO o.s.security.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-ui.html'], []
2019-11-01 17:57:38.471 [restartedMain] INFO o.s.security.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/configuration/**'], []
2019-11-01 17:57:38.471 [restartedMain] INFO o.s.security.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/webjars/**'], []
2019-11-01 17:57:38.471 [restartedMain] INFO o.s.security.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/public'], []
2019-11-01 17:57:38.471 [restartedMain] INFO o.s.security.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/h2-console/**/**'], []
2019-11-01 17:57:38.514 [restartedMain] INFO o.s.security.web.DefaultSecurityFilterChain - Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6f173fdc, org.springframework.security.web.context.SecurityContextPersistenceFilter@39d5de4b, org.springframework.security.web.header.HeaderWriterFilter@4d951bec, org.springframework.web.filter.CorsFilter@5a1c4bbc, org.springframework.security.web.authentication.logout.LogoutFilter@168763c4, com.diaoyun.zion.master.security.JwtTokenFilter@4dc69a0e, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@52aa2eed, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@347e0373, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@14c8d92f, org.springframework.security.web.session.SessionManagementFilter@50281a86, org.springframework.security.web.access.ExceptionTranslationFilter@23e63a3d, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@16cf219e]
2019-11-01 17:57:39.323 [restartedMain] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Context refreshed
2019-11-01 17:57:39.343 [restartedMain] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s)
2019-11-01 17:57:39.395 [restartedMain] INFO s.d.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references
2019-11-01 17:57:39.704 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: queryAllUsingGET_1
2019-11-01 17:57:39.704 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: queryAllUsingHEAD_1
2019-11-01 17:57:39.705 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: queryAllUsingPOST_1
2019-11-01 17:57:39.706 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: queryAllUsingPUT_1
2019-11-01 17:57:39.707 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: queryAllUsingPATCH_1
2019-11-01 17:57:39.707 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: queryAllUsingDELETE_1
2019-11-01 17:57:39.708 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: queryAllUsingOPTIONS_1
2019-11-01 17:57:39.708 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: queryAllUsingTRACE_1
2019-11-01 17:57:39.787 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: updateUserInfoUsingPUT_1
2019-11-01 17:57:39.793 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: getGoodsTypeListUsingGET_1
2019-11-01 17:57:39.794 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: getGoodsTypeListUsingHEAD_1
2019-11-01 17:57:39.795 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: getGoodsTypeListUsingPOST_1
2019-11-01 17:57:39.795 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: getGoodsTypeListUsingPUT_1
2019-11-01 17:57:39.797 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: getGoodsTypeListUsingPATCH_1
2019-11-01 17:57:39.798 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: getGoodsTypeListUsingDELETE_1
2019-11-01 17:57:39.799 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: getGoodsTypeListUsingOPTIONS_1
2019-11-01 17:57:39.800 [restartedMain] INFO s.d.s.w.r.operation.CachingOperationNameGenerator - Generating unique operation named: getGoodsTypeListUsingTRACE_1
2019-11-01 17:57:39.907 [restartedMain] INFO org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8083"]
2019-11-01 17:57:39.925 [restartedMain] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 8083 (http) with context path '/zion'
2019-11-01 17:57:39.929 [restartedMain] INFO com.diaoyun.zion.ZionApplication - Started ZionApplication in 7.513 seconds (JVM running for 9.047)
2019-11-01 18:04:54.706 [Thread-6] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-0} closing ...
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
2019-11-04 09:10:02.609 [restartedMain] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisKeyExpirationListener' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\master\listener\RedisKeyExpirationListener.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379
2019-11-04 19:50:43.035 [restartedMain] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [jar:file:/C:/Users/Administrator/.m2/repository/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/C:/Users/Administrator/.m2/repository/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'paymentController' method
public java.lang.String com.diaoyun.zion.chinafrica.controller.PaymentController.cancelPay()
to {GET /paypal/cancel}: There is already 'payPalController' bean method
public com.diaoyun.zion.master.base.Result com.diaoyun.zion.chinafrica.controller.PayPalController.cancelPay() mapped.
2019-11-04 23:54:37.986 [restartedMain] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisKeyExpirationListener' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\master\listener\RedisKeyExpirationListener.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379
2019-11-05 08:56:23.508 [restartedMain] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisKeyExpirationListener' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\master\listener\RedisKeyExpirationListener.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379
2019-11-05 10:46:30.515 [restartedMain] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gson' defined in class path resource [com/diaoyun/zion/master/config/WebMvcConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.google.gson.Gson]: Factory method 'gson' threw exception; nested exception is java.lang.NoClassDefFoundError: com/diaoyun/zion/master/gson/SpringfoxJsonToGsonAdapter
2019-11-06 12:22:32.737 [restartedMain] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'payPalController': Unsatisfied dependency expressed through field 'payPalService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payPalService' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\chinafrica\service\impl\PayPalServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
2019-11-06 12:23:19.493 [restartedMain] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'payPalController': Unsatisfied dependency expressed through field 'payPalService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payPalService' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\chinafrica\service\impl\PayPalServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
2019-11-06 12:24:32.141 [restartedMain] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'payPalController': Unsatisfied dependency expressed through field 'payPalService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'payPalService' defined in file [E:\JavaProject\zion\target\classes\com\diaoyun\zion\chinafrica\service\impl\PayPalServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.diaoyun.zion.chinafrica.service.impl.PayPalServiceImpl]: Constructor threw exception; nested exception is java.lang.NullPointerException
2019-11-06 14:33:29.898 [http-nio-8083-exec-4] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D996786781%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:03:31 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:03:31 GMT
2019-11-06 14:33:29.900 [http-nio-8083-exec-4] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 14:33:33.239 [http-nio-8083-exec-4] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D1047118429%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:03:34 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:03:34 GMT
2019-11-06 14:33:33.240 [http-nio-8083-exec-4] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 14:38:50.428 [http-nio-8083-exec-5] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2070594141%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:08:51 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:08:51 GMT
2019-11-06 14:38:50.434 [http-nio-8083-exec-5] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 14:38:54.217 [http-nio-8083-exec-5] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2137703005%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:08:55 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:08:55 GMT
2019-11-06 14:38:54.223 [http-nio-8083-exec-5] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 14:47:49.310 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2506932829%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:17:49 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:17:49 GMT
2019-11-06 14:47:49.312 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 14:47:52.544 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2574041693%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:17:54 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:17:54 GMT
2019-11-06 14:47:52.545 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 14:58:16.959 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D175096413%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:28:18 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:28:18 GMT
2019-11-06 14:58:16.959 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 14:58:28.705 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D326091357%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:28:28 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:28:28 GMT
2019-11-06 14:58:28.706 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 15:18:07.423 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2725495389%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:47:54 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:47:54 GMT
2019-11-06 15:18:07.424 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 15:18:10.622 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2993930845%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:48:11 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:48:11 GMT
2019-11-06 15:18:10.622 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 15:21:57.352 [http-nio-8083-exec-5] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2524234333%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:51:58 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:51:58 GMT
2019-11-06 15:21:57.355 [http-nio-8083-exec-5] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 15:22:01.066 [http-nio-8083-exec-5] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2591343197%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 07:52:02 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 07:52:02 GMT
2019-11-06 15:22:01.066 [http-nio-8083-exec-5] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 17:00:08.659 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2576073309%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 09:30:10 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 09:30:10 GMT
2019-11-06 17:00:08.659 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
2019-11-06 17:00:13.816 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dapiplatformproxyserv%26TIME%3D2659959389%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Wed, 06 Nov 2019 09:30:15 GMT; domain=.paypal.com; path=/; Secure; HttpOnly". Invalid 'expires' attribute: Wed, 06 Nov 2019 09:30:15 GMT
2019-11-06 17:00:13.817 [http-nio-8083-exec-3] WARN o.a.http.client.protocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT". Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:01 GMT
...@@ -46,7 +46,8 @@ public class TokenVerification { ...@@ -46,7 +46,8 @@ public class TokenVerification {
"&&!execution(* com.diaoyun.zion.chinafrica.controller.GoodsTypeController.*(..))"+ "&&!execution(* com.diaoyun.zion.chinafrica.controller.GoodsTypeController.*(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.VersionController.*(..))"+ "&&!execution(* com.diaoyun.zion.chinafrica.controller.VersionController.*(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeeController.*(..))"+ "&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfFeeController.*(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfOrderController.*(..))" "&&!execution(* com.diaoyun.zion.chinafrica.controller.TbCfOrderController.*(..))"+
"&&!execution(* com.diaoyun.zion.chinafrica.controller.PayPalController.*(..))"
) )
public void controllerAspect() { public void controllerAspect() {
......
package com.diaoyun.zion.chinafrica.controller; package com.diaoyun.zion.chinafrica.controller;
import com.diaoyun.zion.chinafrica.service.PayPalService; import com.diaoyun.zion.chinafrica.service.PayPalService;
import com.diaoyun.zion.chinafrica.vo.PayPalResult;
import com.diaoyun.zion.master.base.Result; import com.diaoyun.zion.master.base.Result;
import com.egzosn.pay.common.api.PayService; import com.egzosn.pay.common.api.PayService;
import com.egzosn.pay.common.bean.MethodType; import com.egzosn.pay.common.bean.MethodType;
...@@ -28,23 +29,51 @@ public class PayPalController { ...@@ -28,23 +29,51 @@ public class PayPalController {
@Autowired @Autowired
private PayPalService payPalService; private PayPalService payPalService;
@PostMapping ("/pay") /**
public Result payForOrder(@RequestParam("orderId") String orderId){ * 发起支付
*
* @param orderId
* @return
*/
@PostMapping("/pay")
public Result payForOrder(@RequestParam("orderId") String orderId) {
return payPalService.payForOrder(orderId); return payPalService.payForOrder(orderId);
} }
/**
* 支付成功的回调
*
* @param request
* @return
*/
@GetMapping("/success") @GetMapping("/success")
public Result payForSuccess(HttpServletRequest request,@RequestParam("orderId") String orderId){ public Result payForSuccess(HttpServletRequest request) {
return payPalService.payForSuccess(request,orderId); return payPalService.payForSuccess(request);
} }
/**
* 取消支付
*
* @return
*/
@GetMapping("/cancel") @GetMapping("/cancel")
public Result cancelPay(){ public Result cancelPay() {
return new Result().setMessage("订单支付已取消"); return new Result().setMessage("订单支付已取消");
} }
/**
* 退款
* @param orderId
* @param payId
* @return
*/
@GetMapping("/refund")
public Result refund(@RequestParam("orderId") String orderId, @RequestParam("payId") String payId) {
return payPalService.refund(orderId, payId);
}
} }
...@@ -31,7 +31,6 @@ public class TbCfExpCatRelController { ...@@ -31,7 +31,6 @@ public class TbCfExpCatRelController {
@ApiOperation("关联运费模板和商品种类") @ApiOperation("关联运费模板和商品种类")
@PostMapping("/buildRelate") @PostMapping("/buildRelate")
public Result buildRelate(@ApiParam("包含分类id数组和模板id") @RequestBody Map<String,Object> param) { public Result buildRelate(@ApiParam("包含分类id数组和模板id") @RequestBody Map<String,Object> param) {
List<String> categoryIdArray= (List<String>) param.get("categoryIds"); List<String> categoryIdArray= (List<String>) param.get("categoryIds");
String tempalteId= (String) param.get("tempalteId"); String tempalteId= (String) param.get("tempalteId");
......
package com.diaoyun.zion.chinafrica.service; package com.diaoyun.zion.chinafrica.service;
import com.diaoyun.zion.chinafrica.vo.PayPalResult;
import com.diaoyun.zion.master.base.Result; import com.diaoyun.zion.master.base.Result;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -7,5 +8,6 @@ import javax.servlet.http.HttpServletRequest; ...@@ -7,5 +8,6 @@ import javax.servlet.http.HttpServletRequest;
public interface PayPalService { public interface PayPalService {
public Result payForOrder( String orderId); public Result payForOrder( String orderId);
public Result payForSuccess(HttpServletRequest request,String orderId); public Result payForSuccess(HttpServletRequest request);
Result refund(String orderId,String payId);
} }
package com.diaoyun.zion.chinafrica.service.impl; package com.diaoyun.zion.chinafrica.service.impl;
import com.diaoyun.zion.chinafrica.constant.KeyConstant; import com.diaoyun.zion.chinafrica.constant.KeyConstant;
import com.diaoyun.zion.chinafrica.dao.TbCfFinanceDao;
import com.diaoyun.zion.chinafrica.dao.TbCfIssueCouponDao;
import com.diaoyun.zion.chinafrica.dao.TbCfOrderDao; import com.diaoyun.zion.chinafrica.dao.TbCfOrderDao;
import com.diaoyun.zion.chinafrica.entity.TbCfFinanceEntity;
import com.diaoyun.zion.chinafrica.entity.TbCfOrderEntity; import com.diaoyun.zion.chinafrica.entity.TbCfOrderEntity;
import com.diaoyun.zion.chinafrica.enums.DeliveryStatusEnum; import com.diaoyun.zion.chinafrica.enums.DeliveryStatusEnum;
import com.diaoyun.zion.chinafrica.enums.OrderStatusEnum; import com.diaoyun.zion.chinafrica.enums.OrderStatusEnum;
import com.diaoyun.zion.chinafrica.service.PayPalService; import com.diaoyun.zion.chinafrica.service.PayPalService;
import com.diaoyun.zion.chinafrica.vo.PayPalResult;
import com.diaoyun.zion.chinafrica.vo.TbCfFinanceVo;
import com.diaoyun.zion.chinafrica.vo.TbCfOrderVo; import com.diaoyun.zion.chinafrica.vo.TbCfOrderVo;
import com.diaoyun.zion.master.base.Result; import com.diaoyun.zion.master.base.Result;
import com.diaoyun.zion.master.common.RedisCache; import com.diaoyun.zion.master.common.RedisCache;
import com.diaoyun.zion.master.config.DomainProperties; import com.diaoyun.zion.master.config.DomainProperties;
import com.diaoyun.zion.master.enums.ResultCodeEnum; import com.diaoyun.zion.master.enums.ResultCodeEnum;
import com.diaoyun.zion.master.util.IdUtil;
import com.diaoyun.zion.master.util.JsoupUtil;
import com.egzosn.pay.common.api.PayService; import com.egzosn.pay.common.api.PayService;
import com.egzosn.pay.common.bean.MethodType; import com.egzosn.pay.common.bean.MethodType;
import com.egzosn.pay.common.bean.PayOrder; import com.egzosn.pay.common.bean.PayOrder;
import com.egzosn.pay.common.bean.RefundOrder;
import com.egzosn.pay.common.http.HttpConfigStorage; import com.egzosn.pay.common.http.HttpConfigStorage;
import com.egzosn.pay.paypal.api.PayPalConfigStorage; import com.egzosn.pay.paypal.api.PayPalConfigStorage;
import com.egzosn.pay.paypal.api.PayPalPayService; import com.egzosn.pay.paypal.api.PayPalPayService;
import com.egzosn.pay.paypal.bean.PayPalTransactionType; import com.egzosn.pay.paypal.bean.PayPalTransactionType;
import com.stripe.model.Charge;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -34,7 +44,10 @@ import java.util.Map; ...@@ -34,7 +44,10 @@ import java.util.Map;
import java.util.UUID; import java.util.UUID;
@Service("payPalService") @Service("payPalService")
@Transactional
public class PayPalServiceImpl implements PayPalService { public class PayPalServiceImpl implements PayPalService {
@Autowired
private TbCfFinanceDao tbCfFinanceDao;
@Autowired @Autowired
private DomainProperties domainProperties; private DomainProperties domainProperties;
@Resource @Resource
...@@ -42,16 +55,20 @@ public class PayPalServiceImpl implements PayPalService { ...@@ -42,16 +55,20 @@ public class PayPalServiceImpl implements PayPalService {
private static Logger logger = LoggerFactory.getLogger(TbCfOrderServiceImpl.class); private static Logger logger = LoggerFactory.getLogger(TbCfOrderServiceImpl.class);
@Autowired @Autowired
private TbCfOrderDao tbCfOrderDao; private TbCfOrderDao tbCfOrderDao;
@Autowired
private TbCfIssueCouponDao tbCfIssueCouponDao;
private String ORDER_ID = "";
@Override @Override
@Transactional
public Result payForOrder(String orderId) { public Result payForOrder(String orderId) {
Result result = new Result(); ORDER_ID = orderId;
PayPalConfigStorage storage = new PayPalConfigStorage(); PayPalConfigStorage storage = new PayPalConfigStorage();
Result result = new Result();
storage.setClientID(domainProperties.getProperty("paypal.client.app")); storage.setClientID(domainProperties.getProperty("paypal.client.app"));
storage.setClientSecret(domainProperties.getProperty("paypal.client.secret")); storage.setClientSecret(domainProperties.getProperty("paypal.client.secret"));
//storage.setTest(true);
//发起付款后的页面转跳地址 //发起付款后的页面转跳地址
storage.setTest(true);
storage.setReturnUrl(domainProperties.getProperty("paypal.success.url")); storage.setReturnUrl(domainProperties.getProperty("paypal.success.url"));
//取消按钮转跳地址,这里用异步通知地址的兼容的做法 //取消按钮转跳地址,这里用异步通知地址的兼容的做法
storage.setNotifyUrl(domainProperties.getProperty("paypal.cancel.url")); storage.setNotifyUrl(domainProperties.getProperty("paypal.cancel.url"));
...@@ -62,10 +79,17 @@ public class PayPalServiceImpl implements PayPalService { ...@@ -62,10 +79,17 @@ public class PayPalServiceImpl implements PayPalService {
try { try {
if (tbCfOrderVo != null) { if (tbCfOrderVo != null) {
BigDecimal realityPay = tbCfOrderVo.getRealityPay(); BigDecimal realityPay = tbCfOrderVo.getRealityPay();
PayOrder order = new PayOrder("Order_payment:", "Order payment", realityPay, UUID.randomUUID().toString().replace("-", ""), PayPalTransactionType.sale); PayOrder order = new PayOrder("Order_payment:", "tbCfOrderVo.getUserName()+\"'s order,the total price is $\"+tbCfOrderVo.getRealityPay()", realityPay, UUID.randomUUID().toString().replace("-", ""), PayPalTransactionType.sale);
Map orderInfo = service.orderInfo(order); Map orderInfo = service.orderInfo(order);
String request = service.buildRequest(orderInfo, MethodType.POST); Map<String, String> orderHref = JsoupUtil.getOrderHref(orderInfo.toString());
result.setData(request); System.out.println(orderHref.get("approval_url"));
String url = orderHref.get("approval_url");
PayPalResult palResult = new PayPalResult();
palResult.setOrderId(orderId);
palResult.setPayId((String) orderInfo.get("id"));
palResult.setPaypalUrl(url);
palResult.setOrderDesc(tbCfOrderVo.getUserName() + "'s order,the total price is $" + tbCfOrderVo.getRealityPay());
result.setData(palResult);
} else { } else {
result.setCode(ResultCodeEnum.SERVICE_ERROR.getCode()).setMessage("订单不存在!"); result.setCode(ResultCodeEnum.SERVICE_ERROR.getCode()).setMessage("订单不存在!");
} }
...@@ -78,37 +102,90 @@ public class PayPalServiceImpl implements PayPalService { ...@@ -78,37 +102,90 @@ public class PayPalServiceImpl implements PayPalService {
} }
@Override @Override
public Result payForSuccess(HttpServletRequest request, String orderId) { public Result payForSuccess(HttpServletRequest request) {
Result result = new Result(); Result result = new Result();
PayPalConfigStorage storage = new PayPalConfigStorage(); PayPalConfigStorage storage = new PayPalConfigStorage();
storage.setClientID(domainProperties.getProperty("paypal.client.app")); storage.setClientID(domainProperties.getProperty("paypal.client.app"));
storage.setClientSecret(domainProperties.getProperty("paypal.client.secret")); storage.setClientSecret(domainProperties.getProperty("paypal.client.secret"));
//storage.setTest(true); storage.setTest(true);
//发起付款后的页面转跳地址
storage.setReturnUrl(domainProperties.getProperty("paypal.success.url"));
//取消按钮转跳地址,这里用异步通知地址的兼容的做法
storage.setNotifyUrl(domainProperties.getProperty("paypal.cancel.url"));
HttpConfigStorage httpConfigStorage = new HttpConfigStorage();
PayService service = new PayPalPayService(storage); PayService service = new PayPalPayService(storage);
Map<String, Object> params = null; Map<String, Object> params = null;
TbCfOrderVo tbCfOrderVo = (TbCfOrderVo) orderRedisCache.get(KeyConstant.ORDER_DET + orderId);
try { try {
params = service.getParameter2Map(request.getParameterMap(), request.getInputStream()); params = service.getParameter2Map(request.getParameterMap(), request.getInputStream());
String payerID = (String) params.get("PayerID");
String paymentId = (String) params.get("paymentId");
String token = (String) params.get("token");
if (service.verify(params)) { if (service.verify(params)) {
System.out.println("支付成功"); System.out.println("支付成功");
result.setData("支付成功"); result.setMessage("支付成功");
} else {
result.setMessage("支付失败");
}
if (ORDER_ID != null) {
TbCfOrderVo tbCfOrderVo = (TbCfOrderVo) orderRedisCache.get(KeyConstant.ORDER_DET + ORDER_ID);
//修改订单状态
changeOrderState(paymentId, tbCfOrderVo);
//修改优惠券状态
if (tbCfOrderVo.getCouponId() != null && tbCfOrderVo.getOrderStatus() == 20) {
tbCfIssueCouponDao.changeCoupnStatus(tbCfOrderVo.getUserId(), tbCfOrderVo.getCouponId());
}
//生成支付流水
TbCfFinanceEntity finance = createFinance(paymentId, token, payerID, tbCfOrderVo);
TbCfFinanceVo tbCfFinanceVo = new TbCfFinanceVo();
BeanUtils.copyProperties(finance, tbCfFinanceVo);
//清除订单
removeRedisCache(tbCfOrderVo); removeRedisCache(tbCfOrderVo);
} }
} catch (IOException e) { } catch (IOException e) {
result.setCode(ResultCodeEnum.SERVICE_ERROR.getCode()).setMessage(e.getMessage()); result.setCode(ResultCodeEnum.SERVICE_ERROR.getCode()).setMessage(e.getMessage());
logger.error(e.getMessage(), e); logger.error(e.getMessage(), e);
return result; return result;
} }
return result;
}
/**
* 退款
*
* @param orderId
* @param payId
* @return
*/
@Override
public Result refund(String orderId, String payId) {
Result result = new Result();
PayPalConfigStorage storage = new PayPalConfigStorage();
storage.setClientID(domainProperties.getProperty("paypal.client.app"));
storage.setClientSecret(domainProperties.getProperty("paypal.client.secret"));
HttpConfigStorage httpConfigStorage = new HttpConfigStorage();
try {
PayService service = new PayPalPayService(storage);
RefundOrder order = new RefundOrder();
order.setTradeNo(orderId);
order.setOutTradeNo(payId);
//根据orderId查询订单信息
TbCfOrderEntity tbCfOrderEntity = tbCfOrderDao.queryObject(orderId);
order.setRefundAmount(tbCfOrderEntity.getRealityPay());
order.setTotalAmount(tbCfOrderEntity.getTotalPrice());
Map refund = service.refund(order);
result.setData(refund).setCode(1).setMessage("退款成功");
} catch (Exception e) {
result.setCode(ResultCodeEnum.SERVICE_ERROR.getCode()).setMessage(e.getMessage());
logger.error(e.getMessage(), e);
return result;
}
return result; return result;
} }
/**
* 清空订单缓存
*
* @param tbCfOrderVo
*/
private void removeRedisCache(TbCfOrderVo tbCfOrderVo) { private void removeRedisCache(TbCfOrderVo tbCfOrderVo) {
orderRedisCache.delete(KeyConstant.ORDER_DET + tbCfOrderVo.getOrderId()); orderRedisCache.delete(KeyConstant.ORDER_DET + tbCfOrderVo.getOrderId());
String couponId = ""; String couponId = "";
...@@ -119,6 +196,12 @@ public class PayPalServiceImpl implements PayPalService { ...@@ -119,6 +196,12 @@ public class PayPalServiceImpl implements PayPalService {
orderRedisCache.delete(KeyConstant.ORDER_EXP + orderIdAndCouponId); orderRedisCache.delete(KeyConstant.ORDER_EXP + orderIdAndCouponId);
} }
/**
* 修改订单状态
*
* @param payId
* @param oldOrder
*/
private void changeOrderState(String payId, TbCfOrderVo oldOrder) { private void changeOrderState(String payId, TbCfOrderVo oldOrder) {
//更改订单状态 //更改订单状态
TbCfOrderEntity tbCfOrder = new TbCfOrderEntity(); TbCfOrderEntity tbCfOrder = new TbCfOrderEntity();
...@@ -131,4 +214,26 @@ public class PayPalServiceImpl implements PayPalService { ...@@ -131,4 +214,26 @@ public class PayPalServiceImpl implements PayPalService {
tbCfOrder.setPayStatus(OrderStatusEnum.PAID.getValue()); tbCfOrder.setPayStatus(OrderStatusEnum.PAID.getValue());
tbCfOrderDao.update(tbCfOrder); tbCfOrderDao.update(tbCfOrder);
} }
/**
* 记录财务流水
*
* @param
* @param tbCfOrderVo
*/
private TbCfFinanceEntity createFinance(String paymentId, String token, String payerId, TbCfOrderVo tbCfOrderVo) {
TbCfFinanceEntity tbCfFinance = new TbCfFinanceEntity();
String successUrl = domainProperties.getProperty("paypal.success.url");
String receiptUrl = successUrl + "?paymentId=" + paymentId + "&token=" + token + "&PayerID=" + payerId;
tbCfFinance.setOrderId(tbCfOrderVo.getOrderId());
tbCfFinance.setFinaceId(IdUtil.createIdbyUUID());
tbCfFinance.setPayAccount(tbCfOrderVo.getRealityPay());
tbCfFinance.setPayId(paymentId);
tbCfFinance.setPayTime(new Date());
tbCfFinance.setReceiptUrl(receiptUrl);
tbCfFinance.setPayWayCode("paypal");
tbCfFinance.setUserId(tbCfOrderVo.getUserId());
tbCfFinanceDao.save(tbCfFinance);
return tbCfFinance;
}
} }
package com.diaoyun.zion.chinafrica.vo;
/**
* 支付返回类
*/
public class PayPalResult {
//订单id
private String orderId;
//支付id
private String payId;
//paypal回调url
private String paypalUrl;
//订单描述
private String orderDesc;
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getPayId() {
return payId;
}
public void setPayId(String payId) {
this.payId = payId;
}
public String getPaypalUrl() {
return paypalUrl;
}
public void setPaypalUrl(String paypalUrl) {
this.paypalUrl = paypalUrl;
}
public String getOrderDesc() {
return orderDesc;
}
public void setOrderDesc(String orderDesc) {
this.orderDesc = orderDesc;
}
}
...@@ -35,24 +35,16 @@ tencent.wordpos.app_url=https://api.ai.qq.com/fcgi-bin/nlp/nlp_wordpos ...@@ -35,24 +35,16 @@ tencent.wordpos.app_url=https://api.ai.qq.com/fcgi-bin/nlp/nlp_wordpos
################腾讯翻译配置 END################### ################腾讯翻译配置 END###################
##################新11.05(stripe公钥(不加密)和私钥(已用 AESUtils 加密))################################
stripe.pk=pk_live_FP6ipnw3lt0e1AmS5IVdpJWd00s5PLdbVa
stripe.sk=YWA9aMOPvCfq0KWda2Wsh567lLl600+QK/X8ZEFDPj6UDNd3icKr6fJ+X3ey8X+T
#stripe.pk=pk_test_y5dXLjyUyBD11Ta9g2DGynxN0048vnmpGz
#stripe.sk=+RFm7p84hym4liN1/MSoshYMiy4rWgUFoZ3S5+ucxRTyzblQL2Pi0y1TDQoSE96z
##################stripe公钥(不加密)和私钥(已用 AESUtils 加密)################################ ##################stripe公钥(不加密)和私钥(已用 AESUtils 加密)################################
#stripe.pk=pk_live_5MdXU4N1cvmU1yatYp5v0E0n00C7tAXpGB #stripe.pk=pk_live_5MdXU4N1cvmU1yatYp5v0E0n00C7tAXpGB
#stripe.sk=d87UqTQ6QUjuNkXrjH51Gl/Zqnfy98HRl23xljism2hpaXjSNTwdl6pv6FM7D4tT #stripe.sk=d87UqTQ6QUjuNkXrjH51Gl/Zqnfy98HRl23xljism2hpaXjSNTwdl6pv6FM7D4tT
stripe.pk=pk_test_rXUSgU8Kw7DLhDzMbHM0r55O00JAzVBBJR
#stripe.pk=pk_test_rXUSgU8Kw7DLhDzMbHM0r55O00JAzVBBJR stripe.sk=3ff57yz9S5INBexBOnzi/ZaxClXkXlJ+FZ6XLc/f2vpESScG7YOaQaG2YNRic3HF
#stripe.sk=3ff57yz9S5INBexBOnzi/ZaxClXkXlJ+FZ6XLc/f2vpESScG7YOaQaG2YNRic3HF
######################outlook的账户公钥密钥##################### ######################outlook的账户公钥密钥#####################
#stripe.pk=pk_test_uljWJWUuD8fzZXPlGtDZ1fxx00o1ZKr7QL #stripe.pk=pk_test_uljWJWUuD8fzZXPlGtDZ1fxx00o1ZKr7QL
#stripe.sk=BbLXgo+ohgrAP7p3tB52YTqNwhAiTYzYWAX0W+/1PES6kOupxwc/7xpAR8QsG6gP #stripe.sk=BbLXgo+ohgrAP7p3tB52YTqNwhAiTYzYWAX0W+/1PES6kOupxwc/7xpAR8QsG6gP
######################outlook的账户公钥密钥 END##################### ######################outlook的账户公钥密钥 END#####################
##################stripe公钥和私钥 END############################### ##################stripe公钥和私钥 END###############################
#############################第三方物流公司接口################################# #############################第三方物流公司接口#################################
express.info.api=http://shd.kjwlxt.com/api/track.php express.info.api=http://shd.kjwlxt.com/api/track.php
express.info.user_no=shd806 express.info.user_no=shd806
...@@ -62,7 +54,11 @@ express.info.token=d44426bd5b64dd2 ...@@ -62,7 +54,11 @@ express.info.token=d44426bd5b64dd2
#paypal.client.app=AW7u5JVLhzA7_0EznoZ7uKHFzz1_nACOtt6k9oEpbisGUy3nqjjb3L-MmBFnD3YDuMSapcXpfSiYWtiB #paypal.client.app=AW7u5JVLhzA7_0EznoZ7uKHFzz1_nACOtt6k9oEpbisGUy3nqjjb3L-MmBFnD3YDuMSapcXpfSiYWtiB
#paypal.client.secret=EIyDryMDyM0BDWp2mtuGFdSU2WOkWtmSuGGaRnUiIom7kxuM7JhuSFfETbC8X4e9E_ZbMX4zg4jHA1lV #paypal.client.secret=EIyDryMDyM0BDWp2mtuGFdSU2WOkWtmSuGGaRnUiIom7kxuM7JhuSFfETbC8X4e9E_ZbMX4zg4jHA1lV
paypal.mode=live paypal.mode=live
paypal.client.app=AWbyqn1AKJeVvzNsYms_9fs_LVr5_w5Xyt8nX5q0Wmqoq0NYCZf2wyz9DDeA5ArsWx0LFBwl5Oz6amD2 #################################真实######################################################
paypal.client.secret=EFhRjCBzhtI1lf88Xiy3VF07gVpu1vWk0VheSP3n5J0fhQxA6Pu7j89dbyYTLj3FxqiJBOlxQRKG_58e #paypal.client.app=AUUFVT30kPIP-a7dcQfPS8KYdl5cCZIwyYNIS79Cp7E_0GNZWfut3ZHQiRIoamqRstHigMoTTy1n8Glj
paypal.success.url=http://127.0.0.1:8083/paypal/success #paypal.client.secret=EJBVz86f9Mg482bL3lniPtLYe_ULyBkjTS0q-qhZBIVFC3dgae-J7-JJA5iWQAZsQqtAOV_ctVGWNLJS
paypal.cancel.url=http://127.0.0.1:8083/paypal/cancel #################################测试######################################################
\ No newline at end of file paypal.client.app=AW7u5JVLhzA7_0EznoZ7uKHFzz1_nACOtt6k9oEpbisGUy3nqjjb3L-MmBFnD3YDuMSapcXpfSiYWtiB
paypal.client.secret=EIyDryMDyM0BDWp2mtuGFdSU2WOkWtmSuGGaRnUiIom7kxuM7JhuSFfETbC8X4e9E_ZbMX4zg4jHA1lV
paypal.success.url=http://localhost:8083/zion/paypal/success
paypal.cancel.url=http://localhost:8083/zion/paypal/cancel
\ No newline at end of file
package com.diaoyun.zion; package com.diaoyun.zion;
import com.diaoyun.zion.master.util.JsoupUtil;
import com.egzosn.pay.common.api.PayService; import com.egzosn.pay.common.api.PayService;
import com.egzosn.pay.common.bean.CurType; import com.egzosn.pay.common.bean.CurType;
import com.egzosn.pay.common.bean.MethodType; import com.egzosn.pay.common.bean.MethodType;
...@@ -8,13 +9,18 @@ import com.egzosn.pay.common.http.HttpConfigStorage; ...@@ -8,13 +9,18 @@ import com.egzosn.pay.common.http.HttpConfigStorage;
import com.egzosn.pay.paypal.api.PayPalConfigStorage; import com.egzosn.pay.paypal.api.PayPalConfigStorage;
import com.egzosn.pay.paypal.api.PayPalPayService; import com.egzosn.pay.paypal.api.PayPalPayService;
import com.egzosn.pay.paypal.bean.PayPalTransactionType; import com.egzosn.pay.paypal.bean.PayPalTransactionType;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.paypal.api.payments.Links; import com.paypal.api.payments.Links;
import net.sf.json.JSONObject;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Set;
import java.util.UUID; import java.util.UUID;
/** /**
...@@ -30,24 +36,32 @@ public class PayTest { ...@@ -30,24 +36,32 @@ public class PayTest {
public static void main(String[] args) { public static void main(String[] args) {
PayPalConfigStorage storage = new PayPalConfigStorage(); PayPalConfigStorage storage = new PayPalConfigStorage();
storage.setClientID("AWbyqn1AKJeVvzNsYms_9fs_LVr5_w5Xyt8nX5q0Wmqoq0NYCZf2wyz9DDeA5ArsWx0LFBwl5Oz6amD2"); storage.setClientID("AW7u5JVLhzA7_0EznoZ7uKHFzz1_nACOtt6k9oEpbisGUy3nqjjb3L-MmBFnD3YDuMSapcXpfSiYWtiB");
storage.setClientSecret("EFhRjCBzhtI1lf88Xiy3VF07gVpu1vWk0VheSP3n5J0fhQxA6Pu7j89dbyYTLj3FxqiJBOlxQRKG_58e"); storage.setClientSecret("EIyDryMDyM0BDWp2mtuGFdSU2WOkWtmSuGGaRnUiIom7kxuM7JhuSFfETbC8X4e9E_ZbMX4zg4jHA1lV");
//storage.setTest(true); storage.setTest(true);
//发起付款后的页面转跳地址 //发起付款后的页面转跳地址
storage.setReturnUrl("http://127.0.0.1:8083/pay/success"); storage.setReturnUrl("http://localhost:8083/zion/paypal/success?orderId=d56afd2ab3134dee87b6ba7dc88c4c8c");
//取消按钮转跳地址,这里用异步通知地址的兼容的做法 //取消按钮转跳地址,这里用异步通知地址的兼容的做法
storage.setNotifyUrl("http://127.0.0.1:8083/pay/cancel"); storage.setNotifyUrl("http://localhost:8083/zion/paypal/cancel");
HttpConfigStorage httpConfigStorage = new HttpConfigStorage(); HttpConfigStorage httpConfigStorage = new HttpConfigStorage();
PayService service = new PayPalPayService(storage); PayService service = new PayPalPayService(storage);
BigDecimal price = new BigDecimal("500"); BigDecimal price = new BigDecimal("500");
PayOrder order = new PayOrder("Order_payment:", "Order payment", price, UUID.randomUUID().toString().replace("-", ""), PayPalTransactionType.sale); PayOrder order = new PayOrder("Order_payment:", "Order payment", price, UUID.randomUUID().toString().replace("-", ""), PayPalTransactionType.sale);
Map orderInfo = service.orderInfo(order); Map orderInfo = service.orderInfo(order);
// String payId =(String) orderInfo.get("id");
String request = service.buildRequest(orderInfo, MethodType.POST); // System.out.println("orderInfo====>>>"+orderInfo);
System.out.println(request); // System.out.println("links====>>>"+orderInfo.get("links"));
// String request = service.buildRequest(orderInfo, MethodType.POST);
// System.out.println(request);
// Set set = orderInfo.entrySet();
// Iterator iterator = set.iterator();
// while (iterator.hasNext()){
// System.out.println(iterator.next());
// }
System.out.println(orderInfo.get("links"));
Map<String, String> orderHref = JsoupUtil.getOrderHref(orderInfo.toString());
System.out.println(orderHref.get("approval_url"));
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论