繁体   English   中英

需要验证。 您需要在phonegap中登录自己的Google帐户

[英]Authentication is required. You need to sign into your Google Account in phonegap

我已集成到应用购买中,但出现这些错误

在此处输入图片说明

这是我的配置文件

<gap:plugin name="com.smartmobilesoftware.inappbilling">
<param name="BILLING_KEY" value="MIIBIjANBgkqhkiG9w0BAQE****/></gap:plugin>

和我的index.html文件

    <!DOCTYPE HTML>
<html>
    <head>
        <title>In App Billing</title>
        <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
        <script type="text/javascript" charset="utf-8" src="inappbilling.js"></script>
        <script type="text/javascript" charset="utf-8">
            function successHandler (result) {
                var strResult = "";
                if(typeof result === 'object') {
                    strResult = JSON.stringify(result);
                } else {
                    strResult = result;
                }
                alert("SUCCESS: \r\n"+strResult );
            }

            function errorHandler (error) {
                alert("ERROR: \r\n"+error );
            }

            // Click on init button
            function init(){
                // Initialize the billing plugin
                inappbilling.init(successHandler, errorHandler, {showLog:true};
            }

            // Click on purchase button
            function buy(){
                // make the purchase
                inappbilling.buy(successHandler, errorHandler,"gas");

            }

            // Click on ownedProducts button
            function ownedProducts(){
                // Initialize the billing plugin
                inappbilling.getPurchases(successHandler, errorHandler);

            }

            // Click on Consume purchase button
            function consumePurchase(){

                inappbilling.consumePurchase(successHandler, errorHandler, "gas");
            }

            // Click on subscribe button
            function subscribe(){
                // make the purchase
                inappbilling.subscribe(successHandler, errorHandler,"infinite_gas");

            }

            // Click on Query Details button
            function getDetails(){
                // Query the store for the product details
                inappbilling.getProductDetails(successHandler, errorHandler, ["gas","infinite_gas"]);

            }

            // Click on Get Available Products button
            function getAvailable(){
                // Get the products available for purchase.
                inappbilling.getAvailableProducts(successHandler, errorHandler);

            }                       

        </script>

    </head>
    <body>
        <h1>Hello World</h1>
        <button onclick="init();">Initalize the billing plugin</button>
        <button onclick="buy();">Purchase</button>
        <button onclick="ownedProducts();">Owned products</button>
        <button onclick="consumePurchase();">Consume purchase</button>
        <button onclick="subscribe();">Subscribe</button>
        <button onclick="getDetails();">Query Details</button>
        <button onclick="getAvailable();">Get Available Products</button>
    </body>
</html>

以上index.html显示了所有集成插件。 我将这些应用程序集成在build.phonegap.com中。

我的产品编号是

在此处输入图片说明

请帮助我在哪里做错了,以及如何解决这些问题。在Beta版测试应用中仍然面临这些问题。

就我而言,我没有在草稿上发布正在播放的应用,而是在Alpha测试中发布了该应用,并使用我的测试者Gmail帐户(与开发者帐户分开的帐户)创建了测试用户,并将其添加到某个Google组中,然后单击“遵循本博客上的说明,成为“测试者”按钮以选择通过该测试者链接。 经过2、3个小时的发布,一切正常。

按照此博客上的说明进行操作:

http://help.gamesalad.com/gamesalad-cookbook/7-using-pro-features/7-03-adding-in-app-purchases-iap/7-03-2-setting-up-iap-for-谷歌播放/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM