403在setExpressCheckout期间禁止 [英] 403 Forbidden during setExpressCheckout

查看:82
本文介绍了403在setExpressCheckout期间禁止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用setExpressCheckout方法的沙箱帐户中的Expresscheckout期间,出现以下错误.我正在使用SOAPpaypal_base.jarpaypal_stubs.jar

I am getting the following error during Expresscheckout in sandbox account using setExpressCheckout method. I am using SOAP library paypal_base.jar, paypal_stubs.jar

PM com.paypal.sdk.exceptions.TransactionException <init>
SEVERE: (403)Forbidden

有人帮助我解决此问题吗?

Anyone help me to resolve this issue?

推荐答案

这就像上面所有答案以及其他参考文献的总结.

This is like a summery of all answers above along with additional reference.

如user3405529所述,请点击链接并了解您的问题.

As mentioned by user3405529 follow the link and understand your problem.

使用HTTP 1.0协议的商人.

这对于所有使用旧的PayPal API(轴1.4)的人来说都是常见的

This is common for all who are using old PayPal API with axis 1.4

这是我项目中的问题.

我引用了此链接以获取更多详细信息,以了解并解决问题

I referred this link for more details to understand and solve the problem

http://marc.info/?l=axis-user&m= 119144869612056

有四种解决方法

1)修改轴源代码以使用HTTP 1.1协议

1)Modify axis source code to use HTTP 1.1 protocol

    String httpver = msgContext.getStrProp(MessageContext.HTTP_TRANSPORT_VERSION);
    if (null == httpver) {
         httpver = HTTPConstants.HEADER_PROTOCOL_V11;
    }
    //httpver = httpver.trim();
    //if (httpver.equals(HTTPConstants.HEADER_PROTOCOL_V11)) {
    //   http10 = false;
    //}

或 将消息上下文msgContext.setStrProp(..)设置为HTTPConstants.HEADER_PROTOCOL_V11

OR Set Message Context msgContext.setStrProp(..) as HTTPConstants.HEADER_PROTOCOL_V11

然后重建轴并维护您自己的源代码以供参考

Then rebuild axis and maintain your own source code for reference

2)根据用户3405529,在classpath中使用client-config.wsdd 传输中的java:org.apache.axis.transport.http.CommonsHTTPSender 标签

2)As per user3405529 use client-config.wsdd in classpath with java:org.apache.axis.transport.http.CommonsHTTPSender in transport tag

我测试了此更改,并且它按预期工作.

I tested with this changes and it is working as expected.

但是默认情况下,这两种方法都使用HTTP 1.1.在我们的项目中,因为我们没有为这种HTTP协议版本的更改做好准备.

But both the approaches use HTTP 1.1 by default. In our project as we are not prepared for this change of HTTP protocol version.

http://www2.research.att.com上查看更多详细信息/~bala/papers/h0vh1.html

3)更新PayPal存根并重建以供使用-我没有尝试.

3)Update the PayPal stub and rebuild it for use - I do not try it.

4)将PayPal SDK更新到最新版本...

4)Update the PayPal SDK to latest version...

我们使用更新的PayPal SDK.将来会很有帮助.

We go with updated PayPal SDK. It will be helpful in future.

我希望对您有帮助

这篇关于403在setExpressCheckout期间禁止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆