使用Java-com.Stripe.exception.ApiConnectionException在Google AppEngine上条带化支付:API请求条带化期间的IOException

使用Java-com.Stripe.exception.ApiConnectionException在Google AppEngine上条带化支付:API请求条带化期间的IOException,java,google-app-engine,servlets,stripe-payments,Java,Google App Engine,Servlets,Stripe Payments,需要帮助。。有点陷入了下面的问题- 我正在开发web应用程序,使用条带支付,并尝试使用以下代码进行收费。用户输入信用卡信息,它成功创建令牌。但是,条带收费总是失败,并出现以下错误。我没有任何互联网连接问题-可能与appengine不接受Stripe回复有关 条带电荷链- :com.stripe.exception.ApiConnectionException:IOException在API请求stripe()时发生异常:API.stripe.com请检查您的internet连接并重试。如果此问题

需要帮助。。有点陷入了下面的问题-

我正在开发web应用程序,使用条带支付,并尝试使用以下代码进行收费。用户输入信用卡信息,它成功创建令牌。但是,条带收费总是失败,并出现以下错误。我没有任何互联网连接问题-可能与appengine不接受Stripe回复有关

条带电荷链-

:com.stripe.exception.ApiConnectionException:IOException在API请求stripe()时发生异常:API.stripe.com请检查您的internet连接并重试。如果此问题仍然存在,您应该在检查stripe的服务状态,或在告知我们support@stripe.com.

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    .
    .
    .
    Stripe.apiKey = "sk_test_****************";
    Map<String, Object> chargeParams = new HashMap<String, Object>();
    chargeParams.put("amount", 999);
    chargeParams.put("currency", "usd");
    chargeParams.put("description", "Charge for test@gmail.com");
    chargeParams.put("source", "tok_visa");

    try {
        Charge.create(chargeParams);  /// <<<-- it fails here, no issue with internet connection. 
    } catch (StripeException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    .
    .
    .
    } //end of doPost
protectedvoiddopost(HttpServletRequest请求,HttpServletResponse响应)抛出ServletException,IOException{
.
.
.
Stripe.apiKey=“sk_test****************”;
Map chargeParams=new HashMap();
chargeParams.put(“金额”,999);
chargeParams.put(“货币”、“美元”);
chargeParams.put(“说明”、“费用”test@gmail.com");
chargeParams.put(“来源”、“托库签证”);
试一试{

Charge.create(chargeParams);///很抱歉标题出现异常错误msg----基本上我无法使用Java Servlets/JSP在GAE上使用条带支付创建“Charge”…出现错误,提示“api.Stripe.com请检查您的internet连接,然后重试。”您是否已经检查了证书…如com.stripe.net.LiveStripeResponseGetter.getStripeResponse(LiveStripeResponseGetter.java:592)第592行的错误中所述://HTTPSURLConnection默认情况下验证SSL证书返回makeUrlConnectionRequest(方法、url、查询、选项);Src:你100%确定你有一个正常的互联网连接吗?如果你连接到一个随机的外部URL,除了像
HttpUrlConnection
这样的条带,它能工作吗?也许应用程序引擎有一个防火墙阻止出站请求。啊,非常感谢你们两个…问题是因为我在使用appengine免费应用程序,我在appengine.xml-per-中缺少urlfetch。
<stderr>: com.stripe.exception.ApiConnectionException: IOException during API request to Stripe (https://api.stripe.com): api.stripe.com Please check your internet connection and try again. If this problem persists,you should check Stripe's service status at https://twitter.com/stripestatus, or let us know at support@stripe.com.
at com.stripe.net.LiveStripeResponseGetter.makeUrlConnectionRequest(LiveStripeResponseGetter.java:444)
at com.stripe.net.LiveStripeResponseGetter.getStripeResponse(LiveStripeResponseGetter.java:592)
at com.stripe.net.LiveStripeResponseGetter.rawRequest(LiveStripeResponseGetter.java:501)
at com.stripe.net.LiveStripeResponseGetter.staticRequest(LiveStripeResponseGetter.java:526)
at com.stripe.net.LiveStripeResponseGetter.request(LiveStripeResponseGetter.java:83)
at com.stripe.net.ApiResource.request(ApiResource.java:204)
at com.stripe.model.Charge.create(Charge.java:372)
at com.stripe.model.Charge.create(Charge.java:364)
at com.jagdish.ViewController.doPost(ViewController.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1772)
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>7.11.0</version>
</dependency>