Google电子钱包沙盒 - 没有数据发送到回发网址

时间:2014-09-22 18:19:01

标签: android-pay

我正在尝试设置一个Google沙盒支付系统,一切都很好,直到Google尝试将数据发送到我的系统,然后返回以下警告消息:

Unfortunately, we could not confirm your purchase with the merchant's server. Your order has been canceled. Please contact the merchant if this problem continues.

我看到Google试图联系我的服务器:

[22/Sep/2014:14:05:18 -0400] "POST /walletresponse/purchase HTTP/1.1" 301 657 "-" "Google-In-App-Payments; (+http://www.google.com/payments)" 20255

查看chrome-> console-> network->预览我看到JWT令牌在手动发送到网站时有效。关于如何调试这个的任何想法?

2 个答案:

答案 0 :(得分:0)

您需要调试服务器端并检查您是否responding correctly to the postback (within 10 seconds)。如果您手动发送,服务器的response是什么?

  

重要提示:如果您指定了回发网址,则您的服务器必须及时正确地响应Google为每笔交易发送的HTTP POST消息。否则,交易将被取消。

     
    

回应回发

         

您的服务器必须为Google发送到您的回发网址的每条HTTP POST消息发送200 OK响应。要发送此响应,您的服务器必须:

         
        
  1. 解码在POST消息的jwt参数中指定的JWT。
  2.     
  3. 检查以确保订单正常。
  4.     
  5. 获取JWT" orderId"的价值。字段。
  6.     
  7. 发送200 OK响应,其中只有一个东西在身体中:" orderId"你在第3步中获得的价值。
  8.        

... H个

答案 1 :(得分:0)

Googles服务器重新上线,现在似乎正在运行

相关问题