贝宝系统错误/商家不接受此类付款

时间:2020-07-05 23:33:02

标签: android paypal paypal-rest-sdk

我已经完成了这个项目的一半,但是我遇到了一些问题。我正在尝试使用Paypal集成在我的Android应用上接受付款。当我需要付款时,我会遇到两个错误。当我尝试使用我的Paypal登录信息付款时,出现系统错误,请稍后再试,然后当我尝试使用卡信息进行付款时,我付款失败:商家不接受此类付款。我不确定发生了什么。有人可以帮帮我吗。提前致谢。这是我的代码

    @EnableWebSecurity
    @EnableGlobalMethodSecurity(prePostEnabled = true)
    public class SecurityConfig extends WebSecurityConfigurerAdapter {
    
        @Autowired
        private Environment env;
        @Autowired
        private SecurityUserDetailsService securityUserDetailsService;
        @Autowired
        private SecurityRequestFilter securityRequestFilter;
        @Autowired
        private AuthenticationEntryPointJwt authenticationEntryPointJwt;
        @Autowired
        private AccessDeniedHandlerJwt accessDeniedHandlerJwt;
    
        @Override
        public void configure(AuthenticationManagerBuilder auth) throws Exception {
            auth.userDetailsService(securityUserDetailsService).passwordEncoder(passwordEncoder());
        }
    
        @Bean
        public BCryptPasswordEncoder passwordEncoder() {
            return new BCryptPasswordEncoder();
        }
    
        @Override
        @Bean
        public AuthenticationManager authenticationManagerBean() throws Exception {
            return super.authenticationManagerBean();
        }
    
        @Override
        protected void configure(HttpSecurity httpSecurity) throws Exception {
    
            if (Boolean.parseBoolean(env.getRequiredProperty("security.disable.csrf")))
                httpSecurity.csrf().disable();
    
            httpSecurity
                    .httpBasic().disable()
                    .formLogin().disable()
                    .authorizeRequests()
                    .antMatchers(env.getRequiredProperty("security.uri.white-list").split(",")).permitAll()
                    .anyRequest().authenticated().and()
                    .exceptionHandling().authenticationEntryPoint(authenticationEntryPointJwt).and()
                    .exceptionHandling().accessDeniedHandler(accessDeniedHandlerJwt).and()
                    .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
            httpSecurity.addFilterBefore(securityRequestFilter, UsernamePasswordAuthenticationFilter.class);
        }
    }

1 个答案:

答案 0 :(得分:0)

当我尝试使用卡信息付款时,我付款失败:商家不接受这种类型的付款。我不确定发生了什么

发生的事情就是这样。该帐户无法接受“卡”类型的付款。您正在使用一个非常旧的不推荐使用的SDK。它不起作用。

如果您需要通过本机SDK接受PayPal付款,则Braintree Mobile SDK是唯一受支持的工具:https://developer.paypal.com/docs/accept-payments/express-checkout/ec-braintree-sdk/get-started/。此集成的服务器端部分需要Web服务。


否则,请集成非本地JavaScript PayPal结帐https://developer.paypal.com/docs/checkout/